.category-pills { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 30px; }
.pill { padding: 8px 20px; border-radius: 50px; border: 1px solid #ddd; background: #fff; cursor: pointer; transition: 0.3s; font-weight: 500; }
.pill.active { background: #000; color: #fff; border-color: #000; }
.wc-ajax-listing-container { position: relative; min-height: 400px; }
#product-response.loading { opacity: 0.3; }

/* Container Logic */
.bakery-grid .grid-layout {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.bakery-module-wrapper { padding: 20px 0; }

/* The Card Styling */
.bakery-card {
    position: relative;
    border-radius: 3px;
    overflow: hidden;
    background: #4a3625;
    box-shadow: rgba(0, 0, 0, 0.16) 0px 10px 36px 0px, rgba(0, 0, 0, 0.06) 0px 0px 0px 1px;
}
.bakery-card .card-body {
    padding: 0.55rem 0.75rem 0;
}
.card-image {
    min-height: 350px;
    max-height: 350px;
    background: #f1ede8;
}
.brand-card .card-image {
    position: relative;
    min-height: 315px;
    background-size: cover;
    background-position: center;
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    align-items: flex-end;    
}
.card-image img, 
.card-image .woocommerce-placeholder {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures the placeholder fills the 400px height of your card */
    display: block;
}

/* Optional: Add a light background to placeholders to match your brand */
.woocommerce-placeholder {
    background-color: #dcdad5; 
}

.card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: auto;
    min-height: 30%;
    background: #4a3625d4;
    display: grid;
    justify-content: start;
    color: #a68966;
    align-items: center;
    grid-template-columns: 1fr;
    grid-auto-flow: row;
    align-content: end;
    justify-items: stretch;
}

.product-title {
    font-size: 20px;
    font-weight: 400;
    margin: 0;
    color: #dbd3c9;
    min-height: 40px;
}

.meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 5px;
    margin-bottom: 5px;
}

.meta-row .brand-info { font-size: 13px; color: #d1c7bc; margin-bottom: 10px; }
.meta-row .case-info { font-size: 10px; color: #d1c7bc; margin-bottom: 10px; }
.meta-row .shelf-life { font-size: 10px; color: #a39689; margin-bottom: 10px; }

/* Buttons */
.card-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

/* Slider Overrides */
.bakery-slider { padding-bottom: 40px; }
.swiper-button-next, .swiper-button-prev { color: #fff !important; }

/* Bootstrap Overrides */
/* --- Colors & Buttons --- */
:root {
    --bakery-beige: #e5e2dd;
    --bakery-brown: #4a3625;
    --bakery-brown-light: #8b6b4d;
    --bakery-cream: #f1ede8;
}

.btn-cream { background: var(--bakery-cream); color: var(--bakery-brown); border: none; }
.btn-brown { background: var(--bakery-brown-light); color: #fff; border: none; }

/* --- Header & Mega Menu Layout --- */
.navbar { background-color: var(--bakery-beige) !important; padding: 1rem 2rem; }

.dropdown-menu.mega-menu-content {
    background-color: var(--bakery-beige);
    border: none;
    border-top: 1px solid #d1cfcb;
    width: 900px;
    padding: 2rem;
    left: 50% !important;
    transform: translateX(-50%) !important;
}

/* Custom internal grid for Mega Menu */
.mega-menu-container {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 40px;
}

/* --- Product Card Overlay Style (Image 3) --- */
.bakery-product-card {
    position: relative;
    height: 350px;
    border-radius: 15px;
    overflow: hidden;
    background: #000;
}

.card-bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-gradient-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(46, 33, 23, 0.98) 0%, rgba(46, 33, 23, 0.6) 50%, transparent 100%);
    display: flex;
    align-items: flex-end;
}

/* Swiper Fixes */
.bakery-swiper { padding-bottom: 30px; }

/* Container must have relative positioning */
.bakery-module-wrapper.swiper {
    position: relative;
    padding-bottom: 60px; /* Create space at the bottom for the buttons */
}

/* Base Swiper Button Reset */
.bakery-module-wrapper .swiper-button-next,
.bakery-module-wrapper .swiper-button-prev {
    top: auto !important; /* Remove default middle-vertical alignment */
    bottom: 0px !important;
    margin-top: 0;
    width: 45px !important;
    height: 45px !important;
    background-color: #4a3625 !important; /* Brown from your "Get Started" button */
    border-radius: 50%; /* Circular buttons */
    transition: all 0.3s ease;
    z-index: 10;
}

/* Position Previous Button */
.bakery-module-wrapper .swiper-button-prev {
    left: auto !important;
    right: 65px !important; /* Offset by the width of the next button + gap */
}

/* Position Next Button */
.bakery-module-wrapper .swiper-button-next {
    right: 10px !important;
}

/* Adjust Arrow Icon size and color */
.bakery-module-wrapper .swiper-button-next::after,
.bakery-module-wrapper .swiper-button-prev::after {
    font-size: 18px !important;
    font-weight: 800;
    color: #f1ede8 !important; /* Cream color for the arrow */
}

/* Hover Effect matching your brand */
.bakery-module-wrapper .swiper-button-next:hover,
.bakery-module-wrapper .swiper-button-prev:hover {
    background-color: #8b6b4d !important; /* Muted brown from footer */
    transform: translateY(-3px);
}

/* Responsive adjustment for Mobile */
@media (max-width: 768px) {
    .bakery-module-wrapper {
        padding-bottom: 50px;
    }
    .bakery-module-wrapper .swiper-button-next,
    .bakery-module-wrapper .swiper-button-prev {
        width: 35px !important;
        height: 35px !important;
    }
    .bakery-module-wrapper .swiper-button-prev {
        right: 50px !important;
    }
    .bakery-module-wrapper .swiper-button-next::after,
    .bakery-module-wrapper .swiper-button-prev::after {
        font-size: 14px !important;
    }
}