/* ==========================================================
   JEWELVY — GIFT COLLECTION
   Gold Jewellery theme | Responsive | Layout-safe
========================================================== */

:root {
    --gift-gold: #ffc348;
    --gift-gold-dark: #dc7900;
    --gift-black: #080808;
    --gift-cream: #fffaf2;
    --gift-page: #fffdf9;
    --gift-border: #ece5d9;
    --gift-muted: #777;
}

/* Only style the Gift Collection content */
.gift-hero,
.gift-intro,
.gift-recipient-section,
.gift-occasion-section,
.gift-price-section,
.gift-products-section,
.gift-services-section {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    font-family: Georgia, "Times New Roman", serif;
}

.gift-hero *,
.gift-intro *,
.gift-recipient-section *,
.gift-occasion-section *,
.gift-price-section *,
.gift-products-section *,
.gift-services-section * {
    box-sizing: border-box;
}

.gift-hero img,
.gift-recipient-section img,
.gift-products-section img {
    max-width: 100%;
}

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

.gift-hero {
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: center;
    min-height: 390px;
    padding: 48px 6%;
    overflow: hidden;
    background-color: #f4dfbf;
    background-image:
        linear-gradient(90deg,
            rgba(255, 250, 242, .97) 0%,
            rgba(255, 250, 242, .86) 42%,
            rgba(255, 250, 242, .10) 100%),
        url("/frontassets/gift-hero.jpg");
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}

.gift-hero-overlay {
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
}

.gift-hero-content {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 590px;
}

.gift-eyebrow,
.product-eyebrow {
    display: inline-block;
    margin-bottom: 12px;
    color: #956000;
    font: 700 11px/1.5 Arial, sans-serif;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.gift-hero-content h1 {
    margin: 0 0 12px;
    color: var(--gift-black);
    font-size: clamp(38px, 5.4vw, 66px);
    font-weight: normal;
    line-height: 1.04;
    letter-spacing: -1px;
}

.gift-hero-content h2 {
    margin: 0 0 12px;
    color: #40301d;
    font-size: clamp(18px, 2.2vw, 25px);
    font-weight: normal;
    line-height: 1.4;
}

.gift-hero-content p {
    max-width: 470px;
    margin: 0 0 23px;
    color: #5b5043;
    font-size: 15px;
    line-height: 1.8;
}

.gift-hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 11px;
}

.gift-primary-btn,
.gift-secondary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 12px 23px;
    border: 1px solid var(--gift-gold);
    border-radius: 4px;
    font: 700 12px Arial, sans-serif;
    text-decoration: none;
    transition: .2s ease;
}

.gift-primary-btn {
    background: var(--gift-gold);
    color: #17120a;
}

.gift-secondary-btn {
    background: rgba(255, 255, 255, .8);
    color: #17120a;
}

.gift-primary-btn:hover,
.gift-secondary-btn:hover {
    border-color: var(--gift-black);
    background: var(--gift-black);
    color: var(--gift-gold);
}

/* =========================
   SECTION HEADINGS
========================= */

.gift-intro,
.gift-recipient-section,
.gift-occasion-section,
.gift-price-section,
.gift-services-section {
    padding: 36px 3%;
    background: var(--gift-page);
}

.gift-section-heading {
    max-width: 760px;
    margin: 0 auto 25px;
    text-align: center;
}

.gift-section-heading>span {
    display: block;
    margin-bottom: 9px;
    color: #956000;
    font: 700 10px/1.5 Arial, sans-serif;
    letter-spacing: 2px;
}

.gift-section-heading h2 {
    margin: 0;
    color: var(--gift-black);
    font-size: clamp(25px, 3vw, 34px);
    font-weight: normal;
    line-height: 1.25;
}

.gift-section-heading h2::after {
    content: "";
    display: block;
    width: 48px;
    height: 2px;
    margin: 13px auto;
    background: var(--gift-gold-dark);
}

.gift-section-heading p {
    margin: 0 auto;
    color: #72685b;
    font-size: 13px;
    line-height: 1.8;
}

/* =========================
   RECIPIENT CARDS
========================= */

.recipient-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 15px;
    width: 100%;
}

.recipient-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--gift-border);
    border-radius: 6px;
    background: #fff;
    color: #17130d;
    text-decoration: none;
    transition: transform .2s ease, box-shadow .2s ease;
}

.recipient-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 9px 25px rgba(0, 0, 0, .09);
}

.recipient-image {
    overflow: hidden;
    background: #f8eddd;
}

.recipient-image img {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1.05;
    object-fit: cover;
    transition: transform .35s ease;
}

.recipient-card:hover .recipient-image img {
    transform: scale(1.04);
}

.recipient-content {
    padding: 15px 12px;
    text-align: center;
}

.recipient-content h3 {
    margin: 0 0 7px;
    color: #17130d;
    font-size: 17px;
    font-weight: normal;
}

.recipient-content p {
    margin: 0 0 12px;
    color: #766c5e;
    font-size: 12px;
    line-height: 1.6;
}

.recipient-content span {
    color: #976000;
    font: 700 11px Arial, sans-serif;
}

/* =========================
   OCCASION CARDS
========================= */

.occasion-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 13px;
}

.occasion-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 125px;
    padding: 18px 10px;
    border: 1px solid var(--gift-border);
    border-radius: 6px;
    background: #fff;
    color: #242018;
    text-align: center;
    transition: .2s ease;
}

.occasion-card:hover,
.occasion-card.active {
    border-color: var(--gift-gold-dark);
    background: #fff4dc;
}

.occasion-icon {
    display: block;
    margin-bottom: 8px;
    font-size: 25px;
}

.occasion-card strong {
    margin-bottom: 5px;
    font-size: 15px;
    font-weight: normal;
}

.occasion-card small {
    color: #7a7062;
    font-size: 11px;
    line-height: 1.5;
}

/* =========================
   PRICE BANDS
========================= */

.price-band-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 13px;
}

.price-band {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 125px;
    padding: 18px 10px;
    border: 1px solid var(--gift-border);
    border-radius: 6px;
    background: #fff;
    color: #242018;
    text-align: center;
    transition: .2s ease;
}

.price-band:hover,
.price-band.active {
    border-color: var(--gift-gold-dark);
    background: #fff4dc;
    box-shadow: 0 4px 15px rgba(190, 121, 0, .08);
}

.price-band>span {
    margin-bottom: 7px;
    color: #776c5d;
    font-size: 12px;
}

.price-band strong {
    color: #8a5700;
    font-size: 17px;
    font-weight: normal;
    line-height: 1.4;
}

.price-band small {
    margin-top: 7px;
    color: #766c5e;
    font-size: 11px;
}

/* =========================
   PRODUCT SECTION
========================= */

.gift-products-section {
    padding: 32px 2.5% 45px;
    background: linear-gradient(120deg, #fffaf2, #fffdf9);
    scroll-margin-top: 70px;
}

.gift-products-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 22px;
}

.gift-products-top h2 {
    margin: 0 0 7px;
    color: var(--gift-black);
    font-size: clamp(24px, 3vw, 32px);
    font-weight: normal;
}

.gift-products-top p {
    margin: 0;
    color: var(--gift-muted);
    font-size: 12px;
}

.gift-products-top .product-eyebrow {
    margin-bottom: 7px;
}

.gift-controls {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.gift-controls label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #5b5043;
    font: 12px Arial, sans-serif;
}

.gift-controls select {
    min-height: 39px;
    max-width: 190px;
    padding: 8px 10px;
    border: 1px solid #e5dccd;
    border-radius: 4px;
    background: #fff;
    color: #222;
    font: 12px Arial, sans-serif;
}

.gift-view-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid #e5dccd;
    border-radius: 4px;
    background: #fff;
    color: #222;
    font-size: 20px;
}

.gift-view-btn:hover,
.gift-view-btn.active {
    border-color: var(--gift-gold-dark);
    background: #fff0cd;
}

/* =========================
   FILTERS + PRODUCTS
========================= */

.gift-shop-layout {
    display: grid;
    grid-template-columns: 225px minmax(0, 1fr);
    align-items: start;
    gap: 20px;
}

.gift-filters {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--gift-border);
    border-radius: 6px;
    background: #fff;
}

.gift-filter-group {
    display: grid;
    gap: 10px;
    padding: 16px;
    border-bottom: 1px solid #eee9e1;
}

.gift-filter-title {
    margin-bottom: 3px;
    color: #17130d;
    font-size: 15px;
    font-weight: bold;
}

.gift-filter-group label {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    color: #514a40;
    font-size: 12px;
    line-height: 1.5;
    cursor: pointer;
}

.gift-filter-group input[type="checkbox"] {
    flex: 0 0 auto;
    width: 15px;
    height: 15px;
    margin: 2px 0 0;
    accent-color: var(--gift-gold-dark);
}

.clear-gift-filters {
    width: calc(100% - 28px);
    min-height: 38px;
    margin: 14px;
    border: 1px solid var(--gift-gold-dark);
    border-radius: 4px;
    background: #fff7e7;
    color: #704600;
    font: 700 12px Arial, sans-serif;
}

.clear-gift-filters:hover {
    background: var(--gift-black);
    color: var(--gift-gold);
}

/* =========================
   PRODUCT CARDS
========================= */

.gift-products-area {
    min-width: 0;
}

.gift-products-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
    gap: 15px;
}

.gift-product {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--gift-border);
    border-radius: 6px;
    background: #fff;
    transition: transform .2s ease, box-shadow .2s ease;
}

.gift-product:hover {
    transform: translateY(-3px);
    box-shadow: 0 7px 22px rgba(0, 0, 0, .08);
}

.gift-product-image {
    position: relative;
    display: block;
    overflow: hidden;
    background: #fff;
    text-decoration: none;
}

.gift-product-image img {
    display: block;
    width: 100%;
    aspect-ratio: 1 / .95;
    object-fit: contain;
    background: #fff;
    transition: transform .3s ease;
}

.gift-product:hover .gift-product-image img {
    transform: scale(1.035);
}

.gift-label {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    padding: 5px 7px;
    border-radius: 3px;
    background: #ffdc8b;
    color: #33220a;
    font: 700 9px Arial, sans-serif;
}

.gift-label.bestseller {
    background: #e8b647;
}

.gift-label.new {
    background: #222;
    color: #fff;
}

.gift-heart {
    position: absolute;
    top: 9px;
    right: 9px;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 33px;
    height: 33px;
    border: 1px solid #eee3d3;
    border-radius: 50%;
    background: rgba(255, 255, 255, .95);
    color: #222;
    font: 21px Arial, sans-serif;
    line-height: 1;
    cursor: pointer;
}

.gift-heart:hover {
    color: #d8203b;
}

.gift-product-info {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: stretch;
    padding: 13px;
}

.gift-product-type {
    margin-bottom: 6px;
    color: #986000;
    font: 700 10px Arial, sans-serif;
    letter-spacing: .5px;
    text-transform: uppercase;
}

.gift-product-info h3 {
    display: -webkit-box;
    min-height: 36px;
    margin: 0 0 8px;
    overflow: hidden;
    color: #211b12;
    font-size: 14px;
    font-weight: normal;
    line-height: 1.4;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.gift-rating {
    margin-bottom: 8px;
    color: #e5a000;
    font: 13px Arial, sans-serif;
}

.gift-rating small {
    color: #777;
    font: 11px Georgia, serif;
}

.gift-price {
    margin-bottom: 12px;
    color: #17130d;
    font-size: 16px;
    font-weight: bold;
}

.gift-add-btn {
    width: 100%;
    min-height: 39px;
    margin-top: auto;
    padding: 9px 7px;
    border: 1px solid var(--gift-gold);
    border-radius: 4px;
    background: var(--gift-gold);
    color: #17120a;
    font: 700 12px Arial, sans-serif;
    transition: .2s ease;
}

.gift-add-btn:hover {
    border-color: var(--gift-black);
    background: var(--gift-black);
    color: var(--gift-gold);
}

/* List view — controlled by existing JavaScript */
.gift-products-grid.list-view {
    grid-template-columns: 1fr;
}

.gift-products-grid.list-view .gift-product {
    display: grid;
    grid-template-columns: minmax(150px, 230px) minmax(0, 1fr);
}

.gift-products-grid.list-view .gift-product-image img {
    height: 100%;
    min-height: 180px;
    aspect-ratio: auto;
}

.gift-products-grid.list-view .gift-product-info {
    justify-content: center;
}

/* =========================
   EMPTY RESULTS
========================= */

#giftEmpty {
    display: none;
    padding: 35px 18px;
    border: 1px dashed #dfd0b7;
    border-radius: 6px;
    background: #fff;
    text-align: center;
}

#giftEmpty.show {
    display: block;
}

#giftEmpty h3 {
    margin: 0 0 8px;
    color: #211b12;
    font-weight: normal;
}

#giftEmpty p {
    color: #766c5e;
    font-size: 13px;
    line-height: 1.6;
}

#emptyClearBtn {
    padding: 10px 18px;
    border: 0;
    border-radius: 4px;
    background: var(--gift-gold);
    color: #111;
    font: 700 12px Arial, sans-serif;
}

/* =========================
   GIFT SERVICES
========================= */

.gift-service-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.gift-service {
    padding: 23px 15px;
    border: 1px solid var(--gift-border);
    border-radius: 6px;
    background: #fff;
    text-align: center;
}

.gift-service .service-icon {
    margin-bottom: 10px;
    color: var(--gift-gold-dark);
    font-size: 28px;
}

.gift-service h3 {
    margin: 0 0 8px;
    color: #211b12;
    font-size: 15px;
    font-weight: normal;
}

.gift-service p {
    margin: 0;
    color: #766c5e;
    font-size: 12px;
    line-height: 1.7;
}

/* =========================
   MOBILE FILTER DRAWER
========================= */

.mobile-filter-btn {
    display: none;
    min-height: 38px;
    padding: 8px 12px;
    border: 1px solid var(--gift-gold);
    border-radius: 4px;
    background: #fff4dc;
    color: #30210b;
    font: 700 12px Arial, sans-serif;
}

.mobile-filter-header {
    display: none;
}

.gift-filter-overlay {
    position: fixed;
    inset: 0;
    z-index: 10010;
    background: rgba(0, 0, 0, .55);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: .25s ease;
}

.gift-filter-overlay.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.gift-toast {
    position: fixed;
    left: 50%;
    bottom: 20px;
    z-index: 10020;
    width: max-content;
    max-width: calc(100vw - 30px);
    padding: 12px 18px;
    border: 1px solid #40382a;
    border-radius: 5px;
    background: #111;
    color: #fff;
    font: 13px/1.5 Arial, sans-serif;
    text-align: center;
    box-shadow: 0 6px 22px rgba(0, 0, 0, .2);
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, 12px);
    transition: .2s ease;
}

.gift-toast.show {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}

body.gift-filter-open {
    overflow: hidden;
}

/* =========================
   TABLET
========================= */

@media (max-width: 1050px) {
    .recipient-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .gift-shop-layout {
        grid-template-columns: 205px minmax(0, 1fr);
        gap: 14px;
    }

    .gift-products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .gift-service-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

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

@media (max-width: 800px) {
    .gift-hero {
        min-height: 300px;
        padding: 35px 5%;
        background-position: 60% center;
    }

    .recipient-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .gift-shop-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .gift-shop-layout>.gift-filters {
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        z-index: 10011;
        width: min(86vw, 340px);
        height: 100vh;
        height: 100dvh;
        padding-bottom: 25px;
        overflow-y: auto;
        border: 0;
        border-radius: 0;
        background: var(--gift-page);
        box-shadow: 12px 0 30px rgba(0, 0, 0, .18);
        transform: translateX(-105%);
        visibility: hidden;
        transition: transform .28s ease, visibility .28s ease;
    }

    .gift-shop-layout>.gift-filters.open {
        transform: translateX(0);
        visibility: visible;
    }

    .mobile-filter-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .mobile-filter-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 17px;
        border-bottom: 1px solid var(--gift-border);
        font-size: 18px;
    }

    .mobile-filter-header button {
        width: 34px;
        height: 34px;
        border: 1px solid var(--gift-border);
        border-radius: 50%;
        background: #fff;
        color: #111;
        font-size: 23px;
    }

    .gift-controls {
        width: 100%;
    }

    .gift-controls label {
        flex: 1;
        justify-content: space-between;
    }

    .gift-controls select {
        max-width: 170px;
        min-width: 0;
    }
}

@media (max-width: 580px) {
    .gift-hero {
        min-height: 245px;
        padding: 24px 17px;
        background-position: 62% center;
    }

    .gift-hero-content h1 {
        max-width: 300px;
        font-size: 37px;
    }

    .gift-hero-content h2 {
        max-width: 300px;
        font-size: 17px;
    }

    .gift-hero-content p {
        max-width: 290px;
        font-size: 12px;
        line-height: 1.65;
    }

    .gift-primary-btn,
    .gift-secondary-btn {
        min-height: 39px;
        padding: 10px 14px;
        font-size: 11px;
    }

    .gift-intro,
    .gift-recipient-section,
    .gift-occasion-section,
    .gift-price-section,
    .gift-services-section {
        padding: 25px 12px;
    }

    .gift-section-heading {
        margin-bottom: 17px;
    }

    .gift-section-heading h2 {
        font-size: 24px;
    }

    .recipient-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 9px;
    }

    .recipient-content {
        padding: 11px 7px;
    }

    .recipient-content h3 {
        font-size: 15px;
    }

    .recipient-content p {
        font-size: 11px;
    }

    .occasion-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .occasion-card {
        min-height: 112px;
        padding: 12px 6px;
    }

    .occasion-card strong {
        font-size: 13px;
    }

    .occasion-card small {
        font-size: 10px;
    }

    .price-band-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .price-band {
        min-height: 105px;
        padding: 12px 6px;
    }

    .price-band strong {
        font-size: 14px;
    }

    .gift-products-section {
        padding: 24px 10px 32px;
    }

    .gift-products-top {
        align-items: flex-start;
        gap: 13px;
        margin-bottom: 16px;
    }

    .gift-products-top h2 {
        font-size: 24px;
    }

    .gift-controls {
        gap: 6px;
    }

    .gift-controls label {
        font-size: 11px;
    }

    .gift-controls select {
        min-height: 36px;
        padding: 6px;
        font-size: 11px;
    }

    .gift-view-btn {
        width: 34px;
        height: 36px;
    }

    .gift-products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .gift-product-info {
        padding: 9px;
    }

    .gift-product-info h3 {
        min-height: 34px;
        font-size: 12px;
    }

    .gift-product-type {
        font-size: 9px;
    }

    .gift-price {
        font-size: 14px;
    }

    .gift-add-btn {
        min-height: 35px;
        padding: 7px 3px;
        font-size: 10px;
    }

    .gift-label {
        top: 5px;
        left: 5px;
        padding: 4px 5px;
        font-size: 8px;
    }

    .gift-heart {
        top: 5px;
        right: 5px;
        width: 28px;
        height: 28px;
        font-size: 18px;
    }

    .gift-products-grid.list-view .gift-product {
        grid-template-columns: 110px minmax(0, 1fr);
    }

    .gift-products-grid.list-view .gift-product-image img {
        min-height: 150px;
    }

    .gift-service-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .gift-service {
        padding: 16px 9px;
    }

    .gift-service h3 {
        font-size: 13px;
    }

    .gift-service p {
        font-size: 11px;
    }
}

@media (prefers-reduced-motion: reduce) {

    .gift-hero *,
    .gift-intro *,
    .gift-recipient-section *,
    .gift-occasion-section *,
    .gift-price-section *,
    .gift-products-section *,
    .gift-services-section * {
        transition: none !important;
        animation: none !important;
    }
}