.wep-product-cards-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    margin: 0 auto;
    padding: 0;
    box-sizing: border-box;
}

.wep-product-card {
    display: flex;
    flex-direction: column; /* Default to column for mobile-first */
    gap: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    width: 100%;
    box-sizing: border-box;
    align-items: flex-start;
    position: relative;
}

.wep-product-card .wep-product-image {
    width: 100%;
    max-width: 200px; /* Adjust as needed for desktop */
    height: auto;
    margin: 0 auto;
    display: block;
}

.wep-product-card .wep-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
}

.wep-product-card .wep-product-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-align: center;
    width: 100%;
}

.wep-product-card .wep-product-info {
    flex: 2 1 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
    min-width: 0;
    justify-content: flex-start;
    word-break: break-word;
}

.wep-product-card .wep-product-info h2 {
    font-size: 18px;
    margin: 0;
    text-transform: uppercase;
    word-break: break-word;
}

.wep-product-card .wep-product-info p {
    font-size: 14px;
    color: #555;
    margin: 0;
}

/* Ideal With Section */
.wep-product-card .wep-ideal-with {
    margin-top: 0; /* Remove auto margin */
    margin-bottom: 0; /* Ensure no bottom margin */
    padding: 15px;
    background: #f8f8f8;
    border-radius: 6px;
    width: 100%; /* Ensure it takes full width within its container */
    box-sizing: border-box;
    display: flex; /* Make it a flex container */
    align-items: center; /* Align items vertically */
    flex-wrap: wrap; /* Allow items to wrap if space is limited */
    gap: 10px; /* Space between items */
}

.wep-product-card .wep-ideal-with strong {
    display: inline-block; /* Change to inline-block */
    margin-bottom: 0; /* Remove bottom margin */
    margin-right: 10px; /* Add right margin for spacing */
    font-size: 14px;
    color: #333;
    text-transform: uppercase;
}

.wep-product-card .wep-ideal-with .icon {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #fff;
    border-radius: 4px;
    margin: 0; /* Remove margin as gap is handled by parent flex container */
    font-size: 14px;
    color: #666;
}

.wep-product-card .wep-ideal-with .icon img {
    width: 40px;
    height: 30px;
    opacity: 0.7;
}

/* Flavor Profile Section */
.wep-product-card .flavor-profile {
    margin: 0 0 20px 0; /* Remove top margin, keep bottom margin */
    text-align: center;
    width: 100%; /* Ensure it takes full width within its container */
    box-sizing: border-box;
    background: #f8f8f8; /* Added background for consistency */
    padding: 15px; /* Added padding for consistency */
    border-radius: 6px; /* Added border-radius for consistency */
}

.wep-product-card .flavor-profile strong {
    display: block;
    margin-bottom: 15px;
    font-size: 14px;
    color: #333;
    text-transform: uppercase;
}

.wep-product-card .flavor-chart {
    margin: 10px auto;
    max-width: 200px;
}

.wep-product-card .flavor-chart svg {
    width: 100%;
    height: auto;
    overflow: visible; /* Ensure labels are visible */
}

.wep-product-card .chart-label {
    font-size: 12px;
    fill: #666;
}

/* Price/Variations */
.wep-product-card .wep-swatches {
    display: flex;
    flex-direction: column; /* Default to column for mobile */
    gap: 8px;
    width: 100%; /* Ensure it takes full width */
}

.wep-product-card .wep-purchase-options .wep-swatches .wep-swatch {
    color: #fff; /* White text */
    display: inline-flex;
    justify-content: center;
    font-size: 16px;
    font-style: normal;
    font-weight: 500;
    line-height: 30px;
    padding: 0 15px;
    background-color: #f39c12; /* Orange background */
    border: none; /* No border */
    border-radius: 6px; /* Rounded corners */
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    white-space: nowrap;
    width: auto;
    max-width: 150px;
    box-sizing: border-box;
}

.wep-product-card .wep-purchase-options .wep-swatches .wep-swatch:hover {
    background-color: #ec3d08; /* Slightly darker orange on hover */
    color: #fff;
}

.wep-product-card .wep-purchase-options .wep-swatches .wep-swatch.selected {
    background-color: #ec3d08; /* Darker orange when selected */
    color: #fff;
}

.wep-product-card .wep-swatch .woocommerce-Price-amount.amount {
    color: inherit; /* Inherit color from parent button */
    font-size: inherit; /* Inherit font size from parent button */
    font-weight: inherit; /* Inherit font weight from parent button */
}

.wep-product-card .price {
    font-size: 16px;
    color: #333;
    font-weight: 600;
    margin-bottom: 10px;
    width: 100%; /* Ensure it takes full width */
    text-align: center;
}

/* Cart Section */
.wep-product-card .cart {
    margin-top: auto;
    display: flex;
    flex-direction: row; /* Arrange children horizontally */
    gap: 10px; /* Space between qty controls and add to cart button */
    width: 100%; /* Ensure it takes full width */
    align-items: center; /* Align items vertically in the center */
    justify-content: flex-start; /* Align items to the start */
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

.wep-product-card .qty-controls {
    display: flex;
    flex-direction: row; /* Arrange qty buttons and input horizontally */
    align-items: center;
    gap: 6px; /* Space between qty buttons and input */
    flex-basis: 40%; /* 40% width */
    max-width: 40%; /* Ensure it doesn't grow beyond 40% */
    justify-content: flex-start; /* Align quantity controls to the left within their space */
}

.wep-product-card .qty-btn {
    width: 40px; /* Larger for circular shape */
    display: flex;
    align-items: center;
    justify-content: center;
    border: none; /* No border */
    background: #f39c12; /* Orange background */
    cursor: pointer;
    font-size: 20px; /* Larger font for symbols */
    color: #fff; /* White symbols */
    transition: background 0.2s;
}

.wep-product-card .qty-btn:hover {
    background: #ec3d08; /* Darker orange on hover */
}

.wep-product-card .qty {
    width: 60px; /* Adjusted width for better appearance */
    text-align: center;
    font-size: 16px;
    border-radius: 6px; /* Rounded corners */
    border: 1px solid #ccc; /* Subtle border */
    margin: 0;
    background: #fff; /* White background */
    color: #000; /* Black text */
    padding: 4px; /* Added padding for better visibility */
    box-sizing: border-box; /* Ensure consistent sizing */
}

.wep-product-card .qty:focus {
    outline: 2px solid #007cba; /* WooCommerce blue */
    background: #f9f9f9;
}

.wep-product-card .add_to_cart_button {
    flex-basis: 30%; /* 30% width */
    max-width: 30%; /* Ensure it doesn't grow beyond 30% */
    padding: 8px 12px; /* Reduced padding */
    background: #f39c12;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px; /* Reduced font size */
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
    margin-left: auto; /* Push to the right, creating empty space */
}

.wep-product-card .add_to_cart_button:hover {
    background: #ec3d08;
}

/* Products with Filters Widget */
.wep-products-with-filters-widget {
  display: flex;
  flex-direction: row;
  gap: 2rem;
  align-items: flex-start;
}

.wep-filters-col {
  position: sticky;
  top: 2rem;
  flex: 0 0 320px;
  max-width: 340px;
  min-width: 220px;
  background: #fff;
  border-radius: 1.5rem;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  padding: 2rem 1.5rem 1.5rem 1.5rem;
  margin-bottom: 2rem;
  z-index: 10;
}

.wep-filters-col label,
.wep-filters-col .wep-filter-group > label {
  font-weight: bold;
  color: #2d1c0b;
  text-transform: uppercase;
  font-size: 1rem;
  letter-spacing: 0.03em;
  margin-bottom: 0.5rem;
  display: block;
}

.wep-filter-search {
  width: 100%;
  border: 1.5px solid #f57c1f;
  border-radius: 8px;
  padding: 0.7em 1em;
  font-size: 1rem;
  margin-bottom: 1.5rem;
  background: #faf9f7;
  color: #2d1c0b;
}

.wep-filter-group {
  margin-bottom: 1.5rem;
}

.wep-flavor-range label {
  font-size: 0.95em;
  color: #7a5c3e;
  font-weight: 600;
  margin-bottom: 0.2em;
  display: inline-block;
}

.wep-filter-flavor {
  width: 100%;
  accent-color: #a05a1f;
  margin-bottom: 0.5em;
  height: 4px;
  background: linear-gradient(90deg, #f57c1f 0%, #a05a1f 100%); /* Add color gradient */
  border-radius: 2px;
}

.wep-filter-flavor::-webkit-slider-thumb {
  background: #7a4a1f;
  border-radius: 8px;
  width: 22px;
  height: 22px;
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.wep-filter-flavor::-moz-range-thumb {
  background: #7a4a1f;
  border-radius: 8px;
  width: 22px;
  height: 22px;
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.wep-filter-flavor::-ms-thumb {
  background: #7a4a1f;
  border-radius: 8px;
  width: 22px;
  height: 22px;
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.wep-filter-ideal {
  accent-color: #a05a1f;
  margin-right: 0.5em;
  width: 1.2em;
  height: 1.2em;
}

.wep-ideal-with-icons {
  display: flex;
  flex-direction: column;
  gap: 0.7em;
  margin-top: 0.5em;
}

.wep-ideal-with-icons label {
  display: flex;
  align-items: center;
  font-weight: 500;
  font-size: 1em;
  color: #2d1c0b;
  background: none;
  margin-bottom: 0;
  cursor: pointer;
}

.wep-ideal-with-icons img {
  width: 32px;
  height: 32px;
  margin-right: 0.7em;
  background: #e6f7e6;
  border-radius: 50%;
  padding: 2px;
}

.wep-clear-filters {
  background: #f57c1f;
  color: #fff;
  border: none;
  border-radius: 2em;
  padding: 0.7em 2em;
  font-size: 1.1em;
  font-weight: bold;
  margin-top: 1.2em;
  cursor: pointer;
  transition: background 0.2s;
}

.wep-clear-filters:hover {
  background: #a05a1f;
}

/* Hide WooCommerce "View cart" button after AJAX add to cart */
.added_to_cart.wc-forward {
    display: none !important;
}

@media (min-width: 769px) {
    .wep-product-card {
        flex-direction: row; /* Two columns on larger screens */
        align-items: stretch; /* Ensure columns stretch to equal height */
    }

    .wep-product-card .wep-product-image {
        flex: 0 0 300px; /* Fixed width for image column */
        max-width: 300px;
        margin: 0; /* Remove auto margin */
    }

    .wep-product-card .wep-product-content {
        flex: 1; /* Take remaining space */
        display: grid;
        grid-template-columns: 2fr 1fr; /* Info on left, flavor/purchase on right */
        gap: 20px;
        text-align: left; /* Align text left for multi-column layout */
    }

    .wep-product-card .wep-product-info {
        grid-column: 1 / 2; /* Span first column */
        text-align: left;
    }

    .wep-product-card .wep-ideal-with {
        margin-top: 0; /* Reset margin */
    }

    .wep-product-card .flavor-profile {
        grid-column: 2 / 3; /* Span second column */
        grid-row: 1 / 3; /* Span both rows */
        margin: 0; /* Reset margin */
        text-align: center;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }

    .wep-product-card .wep-purchase-options {
        grid-column: 1 / 2; /* Keep it in the first column of the main grid */
        display: flex;
        flex-direction: column; /* Stack children (swatches/price and cart) vertically */
        gap: 15px; /* Space between swatches/price and cart */
        align-items: flex-start; /* Align items to the start */
    }

    .wep-product-card .wep-swatches {
        display: flex; /* Ensure swatches themselves are in a row */
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
        width: 100%; /* Take full width */
        justify-content: flex-start; /* Align swatches to the start */
    }

    .wep-product-card .wep-swatch {
        width: auto; /* Allow swatches to size based on content */
        flex-shrink: 0; /* Prevent swatches from shrinking too much */
    }

    .wep-product-card .price {
        margin-bottom: 0; /* Remove bottom margin */
        text-align: left; /* Align price to the left */
        width: 100%; /* Take full width */
    }

    .wep-product-card .cart {
        margin-top: 0; /* Remove top margin */
        display: flex;
        flex-direction: row; /* Keep qty controls and add to cart in one row */
        gap: 10px; /* Space between qty controls and add to cart button */
        width: 100%; /* Take full width */
        align-items: center; /* Align items vertically in the center */
        justify-content: flex-start; /* Align items to the start */
        flex-wrap: wrap; /* Allow wrapping on smaller screens */
    }

    .wep-products-with-filters-widget {
  flex-direction: row;
}

.wep-filters-col {
  max-width: 340px;
  width: 100%;
}

.wep-products-col {
  flex: 1 1 0%;
  width: 100%;
  display: flex;
  grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
  gap: 2rem;
}
}

@media (max-width: 768px) {
    .wep-product-card {
        flex-direction: column;
    }
    
    .wep-product-card .wep-product-image {
        width: 100%;
        flex: none;
        height: auto;
        aspect-ratio: 1;
    }
    
    .wep-product-card .wep-product-content {
        flex-direction: column;
        width: 100%;
        min-width: 0;
    }
    
    .wep-product-card .wep-purchase-options {
        width: 100%;
        flex-direction: column;
    }
    
    .wep-product-card .cart {
        width: 100%;
        margin: 0;
    }

    .wep-products-with-filters-widget {
  flex-direction: column;
}

.wep-filters-col {
  max-width: 100%;
  width: 100%;
  position: static;
  margin-bottom: 1.5rem;
}

.wep-products-list {
  grid-template-columns: 1fr;
}
}

/* Custom Alert Styles */
.wep-custom-alert {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #4CAF50; /* Green background for success */
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 15px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}

.wep-custom-alert.show {
    opacity: 1;
    visibility: visible;
}

.wep-alert-error {
    background-color: #f44336; /* Red background for error */
}

.wep-alert-message {
    font-size: 16px;
    font-weight: 500;
}

.wep-alert-button {
    background-color: #fff;
    color: #4CAF50; /* Green text for success button */
    padding: 8px 15px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.2s, color 0.2s;
}

.wep-alert-error .wep-alert-button {
    color: #f44336; /* Red text for error button */
}

.wep-alert-button:hover {
    background-color: #eee;
}

/* Make product list fill available width and display as responsive grid */
.wep-products-col {
    flex: 1 1 0%;
    width: 100%;
    display: flex;
    grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
    gap: 2rem;
}
