/* =========================================================
   LUNEA LUXE — SHOP PAGE
   ========================================================= */


/* =========================================================
   SHOP HERO
   ========================================================= */

.shop-hero {
    position: relative;
    min-height: 68vh;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    background: linear-gradient( 90deg, rgba(20, 17, 18, 0.82) 0%, rgba(20, 17, 18, 0.48) 45%, rgba(20, 17, 18, 0.12) 100%), url("../images/hero/shop-hero.jpg") center center / cover no-repeat;
    color: #ffffff;
}


/*
   If shop-hero.jpg does not exist, this background
   automatically falls back to a luxury neutral gradient.
*/

.shop-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient( 180deg, rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.28));
    pointer-events: none;
}

.shop-hero-content {
    position: relative;
    z-index: 2;
    width: min(1400px, 90%);
    margin: 0 auto;
    padding: 100px 0 95px;
}

.shop-hero .eyebrow {
    color: #f4e4c5;
    margin-bottom: 25px;
}

.shop-hero h1 {
    max-width: 850px;
    margin: 0;
    font-family: "Cormorant Garamond", serif;
    font-size: clamp( 4rem, 8vw, 8.5rem);
    font-weight: 400;
    line-height: 0.88;
    letter-spacing: -0.045em;
    color: #ffffff;
}

.shop-hero h1 em {
    color: #d8b57a;
    font-style: italic;
}

.shop-hero-content>p:last-child {
    max-width: 560px;
    margin-top: 35px;
    font-size: 1rem;
    line-height: 1.8;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.86);
}


/* =========================================================
   SHOP CONTAINER
   ========================================================= */

.shop-container {
    width: min(1400px, 90%);
    margin: 0 auto;
    padding: 100px 0 120px;
}


/* =========================================================
   SHOP HEADING
   ========================================================= */

.shop-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 40px;
    margin-bottom: 55px;
    padding-bottom: 35px;
    border-bottom: 1px solid rgba(30, 16, 23, 0.14);
}

.shop-heading .eyebrow {
    margin-bottom: 15px;
}

.shop-heading h2 {
    margin: 0;
    font-family: "Cormorant Garamond", serif;
    font-size: clamp( 2.8rem, 5vw, 5rem);
    font-weight: 400;
    line-height: 0.95;
    color: #1e1017;
}

#productCount {
    margin: 0;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #777;
    white-space: nowrap;
}


/* =========================================================
   SHOP TOOLBAR
   ========================================================= */

.shop-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
    margin-bottom: 50px;
}


/* =========================================================
   CATEGORY FILTERS
   ========================================================= */

.category-filters {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.category-btn {
    appearance: none;
    border: 1px solid rgba(30, 16, 23, 0.22);
    background: transparent;
    color: #1e1017;
    padding: 13px 22px;
    font-family: "DM Sans", sans-serif;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}

.category-btn:hover {
    border-color: #5c1a2e;
    color: #5c1a2e;
    transform: translateY(-2px);
}

.category-btn.active {
    background: #1e1017;
    border-color: #1e1017;
    color: #ffffff;
}

.category-btn.active:hover {
    background: #5c1a2e;
    border-color: #5c1a2e;
    color: #ffffff;
}


/* =========================================================
   SORT
   ========================================================= */

.shop-sort {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.shop-sort label {
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #777;
}

.shop-sort select {
    appearance: none;
    min-width: 180px;
    padding: 13px 38px 13px 16px;
    border: 1px solid rgba(30, 16, 23, 0.2);
    border-radius: 0;
    outline: none;
    background-color: #ffffff;
    background-image: linear-gradient( 45deg, transparent 50%, #1e1017 50%), linear-gradient( 135deg, #1e1017 50%, transparent 50%);
    background-position: calc(100% - 18px) 18px, calc(100% - 13px) 18px;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
    color: #1e1017;
    font-family: "DM Sans", sans-serif;
    font-size: 0.78rem;
    cursor: pointer;
}

.shop-sort select:focus {
    border-color: #5c1a2e;
}


/* =========================================================
   PRODUCTS GRID
   ========================================================= */

.shop-products {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 55px 20px;
    min-height: 300px;
}


/* =========================================================
   PRODUCT CARD
   ========================================================= */

.shop-product-card {
    position: relative;
    min-width: 0;
    animation: productFadeIn 0.65s ease both;
}

@keyframes productFadeIn {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* =========================================================
   PRODUCT IMAGE
   ========================================================= */

.shop-product-image {
    position: relative;
    width: 100%;
    aspect-ratio: 0.78;
    overflow: hidden;
    background: #eee9e5;
}

.shop-product-image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier( 0.2, 0.65, 0.3, 1);
}

.shop-product-card:hover .shop-product-image img {
    transform: scale(1.055);
}


/* =========================================================
   PRODUCT BADGE
   ========================================================= */

.product-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 3;
    padding: 7px 11px;
    background: #f4e4c5;
    color: #1e1017;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}


/* =========================================================
   PRODUCT WISHLIST BUTTON
   ========================================================= */

.product-wishlist {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 5;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    color: #1e1017;
    font-size: 21px;
    cursor: pointer;
    transition: transform 0.3s ease, background 0.3s ease, color 0.3s ease;
}

.product-wishlist:hover {
    transform: scale(1.08);
    background: #1e1017;
    color: #ffffff;
}

.product-wishlist.active {
    background: #5c1a2e;
    color: #ffffff;
}


/* =========================================================
   PRODUCT QUICK ACTION
   ========================================================= */

.product-quick-add {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 18px;
    z-index: 4;
    padding: 15px;
    border: none;
    background: rgba(255, 255, 255, 0.96);
    color: #1e1017;
    font-family: "DM Sans", sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.35s ease, transform 0.35s ease, background 0.3s ease, color 0.3s ease;
}

.shop-product-card:hover .product-quick-add {
    opacity: 1;
    transform: translateY(0);
}

.product-quick-add:hover {
    background: #1e1017;
    color: #ffffff;
}


/* =========================================================
   PRODUCT INFORMATION
   ========================================================= */

.shop-product-info {
    padding-top: 18px;
}

.shop-product-category {
    margin: 0 0 8px;
    font-size: 0.66rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #8b777e;
}

.shop-product-name {
    margin: 0;
    font-family: "Cormorant Garamond", serif;
    font-size: 1.55rem;
    font-weight: 500;
    line-height: 1.05;
    color: #1e1017;
}

.shop-product-name a {
    color: inherit;
    text-decoration: none;
    transition: color 0.25s ease;
}

.shop-product-name a:hover {
    color: #5c1a2e;
}

.shop-product-price {
    display: block;
    margin-top: 10px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #1e1017;
}


/* =========================================================
   PRODUCT STOCK
   ========================================================= */

.product-stock {
    margin-top: 9px;
    font-size: 0.68rem;
    letter-spacing: 0.05em;
    color: #777;
}

.product-stock.low-stock {
    color: #9b5b29;
}

.product-stock.out-of-stock {
    color: #9b2636;
}


/* =========================================================
   LOADING STATE
   ========================================================= */

.loading-products {
    grid-column: 1 / -1;
    min-height: 420px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    color: #777;
}

.loading-products p {
    margin: 0;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(30, 16, 23, 0.15);
    border-top-color: #5c1a2e;
    border-radius: 50%;
    animation: shopSpinner 0.8s linear infinite;
}

@keyframes shopSpinner {
    to {
        transform: rotate(360deg);
    }
}


/* =========================================================
   EMPTY PRODUCTS
   ========================================================= */

.empty-products {
    padding: 110px 30px;
    text-align: center;
    border-top: 1px solid rgba(30, 16, 23, 0.1);
    border-bottom: 1px solid rgba(30, 16, 23, 0.1);
}

.empty-products .eyebrow {
    margin-bottom: 18px;
}

.empty-products h3 {
    margin: 0;
    font-family: "Cormorant Garamond", serif;
    font-size: 3rem;
    font-weight: 400;
    color: #1e1017;
}

.empty-products p {
    max-width: 420px;
    margin: 15px auto 30px;
    color: #777;
    line-height: 1.7;
}


/* =========================================================
   PRODUCT LINKS
   ========================================================= */

.shop-product-card a {
    text-decoration: none;
}

.shop-product-link {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: block;
    cursor: pointer;
}


/* =========================================================
   SEARCH RESULT HIGHLIGHT
   ========================================================= */

.search-result-info {
    margin-bottom: 30px;
    padding: 15px 18px;
    background: #f3ede8;
    font-size: 0.8rem;
    color: #5c1a2e;
}


/* =========================================================
   CART DRAWER — SHOP OVERRIDES
   ========================================================= */

.cart-drawer {
    z-index: 1001;
}

.cart-overlay {
    z-index: 1000;
}


/* =========================================================
   RESPONSIVE — LARGE TABLETS
   ========================================================= */

@media (max-width: 1200px) {
    .shop-products {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 45px 18px;
    }
    .shop-hero {
        min-height: 62vh;
    }
    .shop-hero h1 {
        font-size: clamp( 4rem, 8vw, 7rem);
    }
}


/* =========================================================
   RESPONSIVE — TABLET
   ========================================================= */

@media (max-width: 900px) {
    .shop-container {
        width: min(92%, 700px);
        padding-top: 75px;
        padding-bottom: 90px;
    }
    .shop-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 15px;
        margin-bottom: 40px;
    }
    #productCount {
        white-space: normal;
    }
    .shop-toolbar {
        flex-direction: column;
        align-items: flex-start;
        margin-bottom: 40px;
    }
    .category-filters {
        width: 100%;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 8px;
        scrollbar-width: none;
    }
    .category-filters::-webkit-scrollbar {
        display: none;
    }
    .category-btn {
        flex-shrink: 0;
    }
    .shop-sort {
        width: 100%;
        justify-content: space-between;
    }
    .shop-sort select {
        flex: 1;
        max-width: 260px;
    }
    .shop-products {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 45px 16px;
    }
    .shop-hero {
        min-height: 58vh;
    }
    .shop-hero-content {
        padding-bottom: 70px;
    }
}


/* =========================================================
   RESPONSIVE — MOBILE
   ========================================================= */

@media (max-width: 650px) {
    .shop-hero {
        min-height: 68vh;
        background-position: center;
    }
    .shop-hero-content {
        width: 88%;
        padding: 80px 0 55px;
    }
    .shop-hero h1 {
        font-size: clamp( 3.5rem, 16vw, 5.5rem);
        line-height: 0.9;
    }
    .shop-hero-content>p:last-child {
        max-width: 400px;
        font-size: 0.9rem;
        line-height: 1.7;
    }
    .shop-container {
        width: 90%;
        padding: 65px 0 75px;
    }
    .shop-heading h2 {
        font-size: 3rem;
    }
    .shop-products {
        grid-template-columns: repeat(2, 1fr);
        column-gap: 12px;
        row-gap: 40px;
    }
    .shop-product-image {
        aspect-ratio: 0.76;
    }
    .shop-product-info {
        padding-top: 13px;
    }
    .shop-product-name {
        font-size: 1.25rem;
    }
    .shop-product-price {
        font-size: 0.78rem;
    }
    .product-quick-add {
        left: 10px;
        right: 10px;
        bottom: 10px;
        padding: 11px 8px;
        font-size: 0.6rem;
    }
    .product-wishlist {
        width: 36px;
        height: 36px;
        top: 9px;
        right: 9px;
        font-size: 18px;
    }
    .product-badge {
        top: 9px;
        left: 9px;
        padding: 5px 7px;
        font-size: 0.55rem;
    }
    /*
       On touch screens there is no hover.
       Keep Add to Bag visible.
    */
    .product-quick-add {
        opacity: 1;
        transform: translateY(0);
    }
    .empty-products {
        padding: 75px 20px;
    }
    .empty-products h3 {
        font-size: 2.5rem;
    }
}


/* =========================================================
   SMALL MOBILE
   ========================================================= */

@media (max-width: 420px) {
    .shop-products {
        column-gap: 10px;
        row-gap: 32px;
    }
    .shop-product-name {
        font-size: 1.12rem;
    }
    .shop-product-price {
        font-size: 0.72rem;
    }
    .shop-product-category {
        font-size: 0.57rem;
    }
    .shop-sort {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    .shop-sort select {
        width: 100%;
        max-width: none;
    }
}/* =========================================================
   SHOP CART DRAWER
   ========================================================= */

.cart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.35s ease, visibility 0.35s ease;
    z-index: 1000;
}

.cart-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.cart-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: min(430px, 92vw);
    height: 100vh;
    background: #ffffff;
    z-index: 1001;

    transform: translateX(100%);
    visibility: hidden;

    display: flex;
    flex-direction: column;

    transition: transform 0.4s cubic-bezier(0.2, 0.65, 0.3, 1),
                visibility 0.4s ease;

    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.12);
}

.cart-drawer.open {
    transform: translateX(0);
    visibility: visible;
}


/* CART HEADER */

.cart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 28px 25px;

    border-bottom: 1px solid rgba(30, 16, 23, 0.1);
}

.cart-header h2 {
    margin: 0;

    font-family: "Cormorant Garamond", serif;
    font-size: 2rem;
    font-weight: 500;

    color: #1e1017;
}

.cart-header button {
    width: 38px;
    height: 38px;

    border: none;
    background: transparent;

    font-size: 30px;
    line-height: 1;

    color: #1e1017;

    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: center;
}


/* CART ITEMS */

.cart-items {
    flex: 1;
    overflow-y: auto;

    padding: 25px;
}

.empty-cart {
    min-height: 220px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    text-align: center;
}

.empty-cart p {
    margin: 0 0 8px;

    font-family: "Cormorant Garamond", serif;
    font-size: 1.5rem;

    color: #1e1017;
}

.empty-cart span {
    color: #777;
    font-size: 0.85rem;
}


/* CART ITEM */

.cart-item {
    position: relative;

    display: flex;
    gap: 15px;

    padding: 0 0 20px;
    margin-bottom: 20px;

    border-bottom: 1px solid rgba(30, 16, 23, 0.1);
}

.cart-item-image {
    width: 80px;
    height: 100px;

    flex-shrink: 0;

    background: #eee9e5;

    overflow: hidden;
}

.cart-item-image img {
    width: 100%;
    height: 100%;

    object-fit: cover;
}

.cart-item-details {
    flex: 1;
    padding-right: 25px;
}

.cart-item-details h4 {
    margin: 0 0 7px;

    font-family: "Cormorant Garamond", serif;
    font-size: 1.2rem;
    font-weight: 500;

    color: #1e1017;
}

.cart-item-details p {
    margin: 0 0 12px;

    font-size: 0.82rem;
    color: #555;
}


/* QUANTITY */

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cart-item-controls button {
    width: 28px;
    height: 28px;

    border: 1px solid rgba(30, 16, 23, 0.2);
    background: #ffffff;

    cursor: pointer;

    font-size: 16px;
}

.cart-item-controls span {
    min-width: 15px;
    text-align: center;

    font-size: 0.8rem;
}


/* REMOVE */

.cart-item-remove {
    position: absolute;
    top: 0;
    right: 0;

    border: none;
    background: transparent;

    font-size: 22px;
    color: #777;

    cursor: pointer;
}

.cart-item-remove:hover {
    color: #5c1a2e;
}


/* CART FOOTER */

.cart-footer {
    padding: 25px;

    border-top: 1px solid rgba(30, 16, 23, 0.1);

    background: #ffffff;
}

.cart-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;

    margin-bottom: 20px;

    color: #1e1017;
}

.cart-total-row span {
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.cart-total-row strong {
    font-size: 1rem;
}

.checkout-button {
    display: block;

    width: 100%;

    padding: 16px;

    background: #1e1017;
    color: #ffffff;

    text-align: center;
    text-decoration: none;

    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;

    transition: background 0.3s ease;
}

.checkout-button:hover {
    background: #5c1a2e;
}