/* =========================================================
   COLLECTION PAGES
========================================================= */

.collection-page {
    padding-top: 88px;
    background: var(--background);
    min-height: 100vh;
}


/* =========================================================
   COLLECTION HERO
========================================================= */

.collection-hero {
    position: relative;
    min-height: 380px;
    display: flex;
    align-items: center;
    overflow: hidden;
    background:
        radial-gradient(
            circle at 75% 40%,
            rgba(220,166,109,0.18),
            transparent 35%
        ),
        #211812;
}

.collection-hero::before {
    content: "";
    position: absolute;
    inset: 0;

    background:
        linear-gradient(
            90deg,
            rgba(17,12,9,0.96),
            rgba(17,12,9,0.55),
            rgba(17,12,9,0.75)
        );
}

.collection-hero-content {
    position: relative;
    z-index: 2;
    max-width: 720px;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 9px;

    margin-bottom: 25px;

    color: #92887d;
    font-size: 11px;
}

.breadcrumb a {
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: var(--gold-light);
}

.breadcrumb span {
    color: var(--gold-light);
}

.collection-hero h1 {
    font-family: "Playfair Display", serif;
    font-size: clamp(50px, 7vw, 82px);
    line-height: 1;
    font-weight: 500;
    letter-spacing: -2px;
    margin-bottom: 22px;
}

.collection-hero-description {
    max-width: 580px;

    color: #bdb3a9;

    font-size: 15px;
    line-height: 1.8;
}


/* =========================================================
   PRODUCT SECTION
========================================================= */

.collection-products {
    padding: 90px 0 120px;
}

.collection-products-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;

    margin-bottom: 40px;
}

.collection-products-heading h2 {
    font-family: "Playfair Display", serif;
    font-size: 42px;
    font-weight: 500;
}

.product-count {
    color: var(--muted);
    font-size: 12px;
}


/* =========================================================
   SHOP PRODUCT GRID
========================================================= */

.shop-product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}


/* =========================================================
   SHOP PRODUCT CARD
========================================================= */

.shop-product-card {
    background: var(--surface);

    border: 1px solid var(--border);

    overflow: hidden;

    transition:
        transform 0.35s ease,
        border-color 0.35s ease,
        box-shadow 0.35s ease;
}

.shop-product-card:hover {
    transform: translateY(-7px);

    border-color:
        rgba(220,166,109,0.30);

    box-shadow:
        0 20px 45px rgba(0,0,0,0.18);
}


/* =========================================================
   PRODUCT IMAGE
========================================================= */

.shop-product-image {
    height: 300px;

    position: relative;

    display: flex;
    align-items: center;
    justify-content: center;

    overflow: hidden;
}

.shop-product-image::after {
    content: "";

    position: absolute;
    inset: 0;

    background:
        linear-gradient(
            180deg,
            transparent 65%,
            rgba(0,0,0,0.22)
        );

    pointer-events: none;
}

.shop-product-visual {
    font-size: 105px;

    transition:
        transform 0.5s ease;

    filter:
        drop-shadow(
            12px 18px 18px
            rgba(0,0,0,0.30)
        );
}

.shop-product-card:hover
.shop-product-visual {
    transform:
        scale(1.08)
        rotate(-2deg);
}


/* Different product backgrounds */

.visual-bread {
    background:
        radial-gradient(
            circle at center,
            #9a5b2f,
            #382014
        );
}

.visual-pastry {
    background:
        radial-gradient(
            circle at center,
            #a97042,
            #352217
        );
}

.visual-cake {
    background:
        radial-gradient(
            circle at center,
            #75483b,
            #291a17
        );
}

.visual-cookie {
    background:
        radial-gradient(
            circle at center,
            #9a673b,
            #35251a
        );
}

.visual-donut {
    background:
        radial-gradient(
            circle at center,
            #8e5940,
            #321d19
        );
}

.visual-dessert {
    background:
        radial-gradient(
            circle at center,
            #745052,
            #28181b
        );
}


/* =========================================================
   PRODUCT DETAILS
========================================================= */

.shop-product-details {
    padding: 23px 22px 22px;
}

.shop-product-category {
    color: var(--gold-light);

    font-size: 8px;
    font-weight: 600;

    letter-spacing: 2px;

    margin-bottom: 7px;
}

.shop-product-name {
    font-family: "Playfair Display", serif;

    font-size: 23px;
    font-weight: 500;

    margin-bottom: 8px;
}

.shop-product-description {
    min-height: 48px;

    color: var(--muted);

    font-size: 12px;
    line-height: 1.7;

    margin-bottom: 18px;
}


/* =========================================================
   PRICE + CART BUTTON
========================================================= */

.shop-product-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 15px;
}

.shop-product-price {
    color: var(--gold-light);

    font-size: 15px;
    font-weight: 500;
}

.add-cart-button {
    border: 1px solid
        rgba(220,166,109,0.35);

    background: transparent;

    color: var(--cream);

    padding: 10px 15px;

    font-size: 11px;

    cursor: pointer;

    transition:
        background 0.3s ease,
        border-color 0.3s ease,
        transform 0.3s ease;
}

.add-cart-button:hover {
    background:
        rgba(220,166,109,0.12);

    border-color:
        var(--gold-light);

    transform:
        translateY(-2px);
}

.add-cart-button.added {
    background:
        rgba(91,146,91,0.15);

    border-color:
        rgba(120,180,120,0.45);

    color:
        #b9d9b9;
}


/* =========================================================
   CART BUTTON
========================================================= */

.cart-button {
    position: fixed;

    right: 28px;
    bottom: 28px;

    z-index: 200;

    display: flex;
    align-items: center;
    gap: 10px;

    padding: 13px 19px;

    border: 1px solid
        rgba(220,166,109,0.5);

    border-radius: 50px;

    background:
        rgba(32,25,20,0.92);

    backdrop-filter: blur(15px);

    color: var(--cream);

    cursor: pointer;

    box-shadow:
        0 12px 35px rgba(0,0,0,0.3);

    transition:
        transform 0.3s ease,
        background 0.3s ease;
}

.cart-button:hover {
    transform:
        translateY(-4px);

    background:
        rgba(50,37,27,0.96);
}

.cart-icon {
    font-size: 17px;
}

.cart-count {
    min-width: 21px;
    height: 21px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: var(--gold-light);

    color: #24170e;

    font-size: 10px;
    font-weight: 600;
}


/* =========================================================
   CART DRAWER
========================================================= */

.cart-overlay {
    position: fixed;

    inset: 0;

    z-index: 300;

    background:
        rgba(0,0,0,0.60);

    opacity: 0;
    visibility: hidden;

    transition:
        opacity 0.3s ease,
        visibility 0.3s ease;
}

.cart-overlay.open {
    opacity: 1;
    visibility: visible;
}

.cart-drawer {
    position: absolute;

    top: 0;
    right: 0;

    width: min(430px, 92vw);
    height: 100%;

    display: flex;
    flex-direction: column;

    background:
        #1d1814;

    border-left:
        1px solid
        rgba(255,255,255,0.08);

    transform:
        translateX(100%);

    transition:
        transform 0.4s ease;
}

.cart-overlay.open .cart-drawer {
    transform:
        translateX(0);
}


/* =========================================================
   CART HEADER
========================================================= */

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 25px;

    border-bottom:
        1px solid
        rgba(255,255,255,0.07);
}

.cart-header h2 {
    font-family: "Playfair Display", serif;

    font-size: 28px;
    font-weight: 500;
}

.close-cart {
    width: 35px;
    height: 35px;

    border: 1px solid
        rgba(255,255,255,0.1);

    border-radius: 50%;

    background: transparent;

    color: var(--cream);

    cursor: pointer;

    font-size: 18px;
}


/* =========================================================
   CART ITEMS
========================================================= */

.cart-items {
    flex: 1;

    overflow-y: auto;

    padding: 20px 25px;
}

.empty-cart {
    padding-top: 70px;

    text-align: center;

    color: var(--muted);

    font-size: 14px;
}

.cart-item {
    display: grid;

    grid-template-columns: 65px 1fr auto;

    gap: 14px;

    align-items: center;

    padding: 15px 0;

    border-bottom:
        1px solid
        rgba(255,255,255,0.07);
}

.cart-item-image {
    width: 65px;
    height: 65px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #30231b;

    font-size: 30px;
}

.cart-item-name {
    font-family: "Playfair Display", serif;

    font-size: 15px;

    margin-bottom: 4px;
}

.cart-item-price {
    color: var(--gold-light);

    font-size: 11px;
}

.cart-quantity {
    display: flex;
    align-items: center;

    gap: 8px;

    margin-top: 8px;
}

.quantity-button {
    width: 24px;
    height: 24px;

    border: 1px solid
        rgba(255,255,255,0.12);

    background: transparent;

    color: var(--cream);

    cursor: pointer;
}

.quantity-value {
    min-width: 15px;

    text-align: center;

    font-size: 11px;
}

.remove-item {
    color: #9f8c7d;

    border: none;

    background: transparent;

    cursor: pointer;

    font-size: 11px;
}


/* =========================================================
   CART FOOTER
========================================================= */

.cart-footer {
    padding: 22px 25px;

    border-top:
        1px solid
        rgba(255,255,255,0.08);
}

.cart-total {
    display: flex;
    justify-content: space-between;

    margin-bottom: 18px;

    font-size: 15px;
}

.cart-total strong {
    color: var(--gold-light);
}

.checkout-button {
    width: 100%;

    min-height: 48px;

    border: none;

    background: var(--gold-light);

    color: #24170e;

    font-weight: 600;

    cursor: pointer;

    transition:
        background 0.3s ease,
        transform 0.3s ease;
}

.checkout-button:hover {
    background: #ebbb88;

    transform:
        translateY(-2px);
}


/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 900px) {

    .shop-product-grid {
        grid-template-columns:
            repeat(2, 1fr);
    }

}


@media (max-width: 600px) {

    .collection-page {
        padding-top: 76px;
    }

    .collection-hero {
        min-height: 330px;
    }

    .collection-hero h1 {
        font-size: 50px;
    }

    .collection-products {
        padding: 70px 0 100px;
    }

    .collection-products-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .collection-products-heading h2 {
        font-size: 36px;
    }

    .shop-product-grid {
        grid-template-columns: 1fr;
    }

    .shop-product-image {
        height: 280px;
    }

    .cart-button {
        right: 15px;
        bottom: 15px;
    }

}
/* =====================================================
   REAL PRODUCT IMAGES
===================================================== */

.shop-product-image {
    position: relative;
    width: 100%;
    height: 300px;
    overflow: hidden;
    background: #f2ede5;
}


.shop-product-image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform 0.6s ease;
}


.shop-product-card:hover .shop-product-image img {
    transform: scale(1.05);
}


/* Temporary fallback if an image is missing */

.image-placeholder {
    display: none;

    position: absolute;
    inset: 0;

    align-items: center;
    justify-content: center;

    font-family: "Playfair Display", serif;
    font-size: 1.3rem;

    color: #6b6258;
}


.shop-product-image.image-missing img {
    display: none;
}


.shop-product-image.image-missing .image-placeholder {
    display: flex;
}