/* =========================================================
   Noor-e-Libas — Luxury Pakistani Unstitched Atelier
   Design System: Warm Amber + Stone + Playfair
   ========================================================= */

/* ---------- Base ---------- */
body {
    margin: 0;
    color: #1c1917;
    background-color: #fafaf9; /* stone-50 */
    font-family: 'Plus Jakarta Sans', ui-sans-serif, system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ---------- Buttons ---------- */
.btn-primary,
.btn-add-to-bag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    border: 0;
    border-radius: 0.75rem;
    background-color: #451a03; /* amber-950 */
    color: #fffbeb;
    padding: 0.9rem 1.75rem;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 14px rgba(69, 26, 3, 0.18);
}

.btn-primary:hover,
.btn-add-to-bag:hover {
    background-color: #78350f; /* amber-900 */
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(69, 26, 3, 0.22);
}

.btn-primary:active,
.btn-add-to-bag:active {
    transform: translateY(0);
}

/* ---------- Navbar brand (kept for compatibility) ---------- */
.navbar-brand {
    color: #451a03;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* =========================================================
   HERO SLIDER
   ========================================================= */
.hero-slider-section {
    position: relative;
    width: 100%;
    height: min(78vh, 760px);
    min-height: 480px;
    overflow: hidden;
    background: #292524;
}

.hero-slider,
.hero-slide {
    width: 100%;
    height: 100%;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-position: center 42%;
    background-size: cover;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.hero-slide.active {
    z-index: 1;
    opacity: 1;
    visibility: visible;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        105deg,
        rgba(28, 25, 23, 0.55) 0%,
        rgba(28, 25, 23, 0.2) 55%,
        rgba(28, 25, 23, 0.4) 100%
    );
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 820px;
    padding: 0 24px;
    color: #fffbeb;
    text-align: center;
    text-shadow: 0 2px 24px rgba(0, 0, 0, 0.35);
}

.hero-subheading {
    display: block;
    margin-bottom: 14px;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: #fde68a;
}

.hero-title {
    margin: 0 0 10px;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(2rem, 5vw, 3.25rem);
    font-weight: 600;
    letter-spacing: 0.06em;
    line-height: 1.15;
    text-transform: uppercase;
}

.hero-caption {
    margin: 0 0 28px;
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    opacity: 0.9;
}

.hero-btn {
    display: inline-block;
    padding: 0.85rem 2rem;
    border: 1px solid rgba(255, 251, 235, 0.85);
    border-radius: 0.6rem;
    color: #fffbeb;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-decoration: none;
    text-transform: uppercase;
    transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.hero-btn:hover {
    background: #fffbeb;
    color: #451a03;
    border-color: #fffbeb;
}

.slider-arrow {
    position: absolute;
    z-index: 3;
    top: 50%;
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    transform: translateY(-50%);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    background: rgba(28, 25, 23, 0.25);
    backdrop-filter: blur(6px);
    color: #fffbeb;
    font-size: 16px;
    cursor: pointer;
    opacity: 0.85;
    transition: background-color 0.2s ease, opacity 0.2s ease;
}

.slider-arrow:hover {
    background: rgba(28, 25, 23, 0.5);
    opacity: 1;
}

.prev-arrow { left: 18px; }
.next-arrow { right: 18px; }

.hero-pagination {
    position: absolute;
    z-index: 3;
    right: 0;
    bottom: 22px;
    left: 0;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.hero-dot {
    width: 8px;
    height: 8px;
    padding: 0;
    border: 1px solid #fffbeb;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.hero-dot.active {
    background: #fffbeb;
}

@media (max-width: 640px) {
    .hero-slider-section {
        height: 68vh;
        min-height: 420px;
    }
    .hero-title {
        font-size: 1.85rem;
        letter-spacing: 0.04em;
    }
    .hero-subheading {
        font-size: 10px;
        letter-spacing: 0.22em;
    }
    .slider-arrow {
        width: 38px;
        height: 38px;
        font-size: 14px;
    }
    .prev-arrow { left: 10px; }
    .next-arrow { right: 10px; }
}

/* =========================================================
   PRODUCT DETAIL PAGE (legacy + sapphire layout)
   ========================================================= */
.pdp-container {
    display: flex;
    max-width: 1280px;
    margin: 40px auto;
    gap: 48px;
    padding: 0 20px;
    align-items: flex-start;
}

.pdp-product-gallery-column {
    width: 58%;
    min-width: 0;
}

.pdp-details {
    width: 42%;
    min-width: 0;
}

.pdp-gallery {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.pdp-thumbnails {
    display: flex;
    flex: 0 0 78px;
    flex-direction: column;
    gap: 10px;
    max-height: 75vh;
    overflow-y: auto;
}

.thumb-img {
    display: block;
    width: 78px;
    height: 104px;
    flex: 0 0 auto;
    overflow: hidden;
    border: 1px solid #e7e5e4;
    border-radius: 0.5rem;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.thumb-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumb-img.active,
.thumb-img:hover {
    border-color: #451a03;
    box-shadow: 0 0 0 1px #451a03;
}

.pdp-main-viewport {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
    border-radius: 0.75rem;
    overflow: hidden;
    background: #f5f5f4;
}

.pdp-main-viewport img {
    width: 100%;
    height: 100%;
    max-width: 580px;
    object-fit: cover;
}

.pdp-category-tag {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #78716c;
}

.pdp-title {
    margin: 10px 0 8px;
    color: #1c1917;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    line-height: 1.3;
}

.pdp-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1c1917;
}

.pdp-sku {
    margin-top: 2px;
    color: #a8a29e;
    font-size: 12px;
}

@media (max-width: 767px) {
    .pdp-container {
        flex-direction: column;
        gap: 28px;
        margin: 24px auto;
    }
    .pdp-product-gallery-column,
    .pdp-details {
        width: 100%;
    }
    .pdp-gallery {
        flex-direction: column;
    }
    .pdp-main-viewport {
        order: 0;
        width: 100%;
    }
    .pdp-thumbnails {
        order: 1;
        width: 100%;
        max-height: none;
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
    }
    .thumb-img {
        width: 64px;
        height: 84px;
    }
}

/* Sapphire PDP layout (product.php) */
.sapphire-pdp-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.85fr) minmax(300px, 1fr);
    align-items: start;
    gap: 48px;
    max-width: 1280px;
    margin: 40px auto;
    padding: 0 4% 60px;
}

.pdp-images-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-content: start;
    gap: 12px;
    min-width: 0;
}

.grid-image-item {
    display: block;
    width: 100%;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    padding: 0;
    border: 0;
    border-radius: 0.75rem;
    background: #f5f5f4;
    cursor: zoom-in;
}

.grid-image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.grid-image-item:hover img {
    transform: scale(1.03);
}

.pdp-sticky-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
    padding-top: 8px;
    align-self: start;
}

.related-products-section {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 4% 64px;
}

.related-products-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .sapphire-pdp-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 28px;
        margin-top: 24px;
    }
    .pdp-images-grid {
        grid-template-columns: minmax(0, 1fr);
    }
    .pdp-sticky-sidebar {
        position: static;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .related-products-header {
        align-items: center;
    }

    .related-heading {
        font-size: 1.25rem;
    }
}

/* =========================================================
   SHOP / CATALOG
   ========================================================= */
.catalog-container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding-right: 16px;
    padding-left: 16px;
}

.filter-sort-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.75rem;
    padding-bottom: 1.15rem;
    border-bottom: 1px solid #e7e5e4;
    color: #57534e;
    font-size: 13px;
}

.catalog-results-count {
    margin: 0;
}

.catalog-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.product-carousel-controls {
    display: flex;
    flex: 0 0 auto;
    gap: 0.5rem;
}

.product-carousel-shell {
    position: relative;
    left: 50%;
    width: 100vw;
    max-width: 100vw;
    transform: translateX(-50%);
}

.product-carousel-shell > .product-carousel-controls {
    position: absolute;
    z-index: 8;
    top: calc(var(--carousel-image-height, 33.333vw) / 2);
    right: 0;
    left: 0;
    transform: translateY(-50%);
    justify-content: space-between;
    padding: 0 clamp(10px, 2.5vw, 48px);
    pointer-events: none;
}

.product-carousel-arrow {
    display: grid;
    width: clamp(38px, 3.2vw, 54px);
    height: 56px;
    place-items: center;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #292524;
    font-size: clamp(1.5rem, 2.2vw, 2.25rem);
    cursor: pointer;
    pointer-events: auto;
    transition: color 0.2s ease, transform 0.2s ease;
}

.product-carousel-arrow:hover {
    color: #78350f;
    transform: scale(1.08);
}

.product-carousel-arrow:focus-visible,
.product-carousel-track:focus-visible {
    outline: 2px solid #b45309;
    outline-offset: 3px;
}

.product-carousel-track {
    display: flex;
    position: relative;
    width: 100%;
    gap: 4px;
    overflow-x: auto;
    padding-bottom: 0;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    overscroll-behavior-inline: contain;
    scrollbar-width: none;
}

.product-carousel-track::-webkit-scrollbar {
    display: none;
}

.product-carousel-track .sapphire-card {
    min-width: 0;
    flex: 0 0 calc((100% - 4px) / 2);
    scroll-snap-align: start;
}

.product-carousel-track .sapphire-card > div {
    padding: 14px 20px 20px;
}

.product-carousel-track .sapphire-card > div > p:first-child {
    margin-bottom: 6px;
    font-size: 12px;
    letter-spacing: 0.14em;
}

.product-carousel-track .sapphire-card > div > p:nth-child(2) {
    margin-bottom: 7px;
    font-size: 11px;
}

.product-carousel-track .sapphire-card > div h3 {
    font-size: clamp(14px, 1.15vw, 20px);
    line-height: 1.3;
}

.product-carousel-track .sapphire-card > div > div {
    margin-top: 8px;
}

.product-carousel-track .sapphire-card > div > div span:first-child {
    font-size: clamp(14px, 1.1vw, 18px);
}

.catalog-sort-form {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 13px;
    color: #57534e;
}

.catalog-sort-form select {
    appearance: none;
    max-width: 200px;
    padding: 0.45rem 1.85rem 0.45rem 0.75rem;
    border: 1px solid #e7e5e4;
    border-radius: 0.5rem;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2378716c' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 0.6rem center;
    color: #1c1917;
    font-size: 13px;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.catalog-sort-form select:hover,
.catalog-sort-form select:focus {
    border-color: #a8a29e;
    outline: none;
}

.view-toggles {
    display: flex;
    background: #f5f5f4;
    border-radius: 0.5rem;
    padding: 3px;
    gap: 2px;
}

.view-toggle {
    display: grid;
    width: 32px;
    height: 28px;
    place-items: center;
    border: none;
    border-radius: 0.35rem;
    background: transparent;
    color: #78716c;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.view-toggle svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.6;
}

.view-toggle.is-active {
    background: #fff;
    color: #451a03;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem 0.85rem;
}

.product-grid[data-columns="1"] {
    grid-template-columns: minmax(0, 1fr);
}

.product-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    background: #fff;
    border-radius: 1rem;
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 22px 44px -14px rgba(69, 26, 3, 0.16);
}

.product-image-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: #f5f5f4;
}

.product-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.5s ease,
                transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Subtle zoom on hover when no secondary image */
.product-card:hover .product-image-wrap > a > img:only-child,
.product-card:hover .product-image-wrap > a > img:first-child:last-child {
    transform: scale(1.05);
}

/* Badges — fade slightly on hover for cleaner look */
.product-type-badge,
.product-fabric-badge,
.product-sale-badge {
    display: inline-block;
    max-width: min(48vw, 160px);
    overflow: hidden;
    padding: 0.28rem 0.55rem;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border-radius: 9999px;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.product-card:hover .product-type-badge,
.product-card:hover .product-fabric-badge,
.product-card:hover .product-sale-badge {
    opacity: 0.85;
}

.product-type-badge {
    background: rgba(255, 255, 255, 0.94);
    color: #451a03;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.product-fabric-badge {
    background: rgba(69, 26, 3, 0.88);
    color: #fef3c7;
    backdrop-filter: blur(6px);
}

.product-sale-badge {
    background: #991b1b;
    color: #fff;
}

/* Quick Add — slides up from bottom */
.quick-add-wrap {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.35s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    pointer-events: none;
}

.product-card:hover .quick-add-wrap {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.quick-add-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    width: 100%;
    padding: 0.7rem;
    border: 0;
    border-radius: 0.7rem;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
    color: #451a03;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.quick-add-btn:hover {
    background: #451a03;
    color: #fffbeb;
    transform: scale(1.02);
}

.quick-add-btn:active {
    transform: scale(0.98);
}

/* Title color shift on card hover */
.product-card:hover .product-title a {
    color: #78350f;
}

/* =========================================================
   Sapphire-style cards (shop + homepage)
   Image hover animations
   ========================================================= */
.sapphire-card {
    position: relative;
    background: #fff;
    overflow: hidden;
    transition: box-shadow 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.sapphire-card:hover {
    box-shadow: 0 16px 40px -12px rgba(0, 0, 0, 0.12);
}

.sapphire-card .sapphire-img-wrap {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: #f0ebe3;
}

/* Base image styles */
.sapphire-card .sapphire-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    will-change: transform, opacity;
}

/* Primary image — slow elegant zoom */
.sapphire-card .sapphire-img-wrap img.primary {
    transition:
        transform 0.85s cubic-bezier(0.22, 1, 0.36, 1),
        opacity 0.55s ease,
        filter 0.55s ease;
    transform: scale(1);
    filter: brightness(1);
}

.sapphire-card:hover .sapphire-img-wrap img.primary {
    transform: scale(1.08);
    filter: brightness(1.03);
}

/* When secondary exists, primary fades out instead of staying */
.sapphire-card:hover .sapphire-img-wrap img.primary.has-secondary {
    opacity: 0;
    transform: scale(1.06);
}

/* Secondary image — crossfade + gentle zoom in */
.sapphire-card .sapphire-img-wrap img.secondary {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.06);
    transition:
        opacity 0.55s ease,
        transform 0.85s cubic-bezier(0.22, 1, 0.36, 1);
}

.sapphire-card:hover .sapphire-img-wrap img.secondary {
    opacity: 1;
    transform: scale(1);
}

/* Soft vignette overlay on hover for depth */
.sapphire-card .sapphire-img-wrap::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.12) 0%,
        transparent 40%
    );
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    z-index: 2;
}

.sapphire-card:hover .sapphire-img-wrap::after {
    opacity: 1;
}

/* ADD TO BAG bar slides up from bottom */
.sapphire-hover-bar {
    position: absolute;
    inset-inline: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.9rem 1rem;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    z-index: 5;
}

.sapphire-card:hover .sapphire-hover-bar {
    transform: translateY(0);
}

.sapphire-hover-bar .add-btn {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #1c1917;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: color 0.2s ease, letter-spacing 0.2s ease;
}

.sapphire-hover-bar .add-btn:hover {
    color: #78350f;
    letter-spacing: 0.22em;
}

.sapphire-hover-bar .wish-btn {
    color: #a8a29e;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: color 0.2s ease, transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.sapphire-hover-bar .wish-btn:hover {
    color: #1c1917;
    transform: scale(1.15);
}

/* Prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
    .sapphire-card .sapphire-img-wrap img,
    .sapphire-hover-bar {
        transition-duration: 0.01ms !important;
    }
    .sapphire-card:hover .sapphire-img-wrap img.primary {
        transform: none;
    }
}

/* Product Info */
.product-info {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    padding: 0.9rem 0.2rem 0.4rem;
}

.product-subtitle {
    color: #78716c;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.product-title {
    margin: 0;
    color: #1c1917;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    line-height: 1.35;
}

.product-title a {
    color: inherit;
    transition: color 0.2s ease;
}

.product-title a:hover {
    color: #78350f;
}

.product-price-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.product-price {
    color: #1c1917;
    font-size: 0.9rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.product-price .sale-price {
    color: #991b1b;
}

.product-price .original-price {
    color: #a8a29e;
    font-size: 0.78rem;
    font-weight: 400;
    text-decoration: line-through;
}

.product-details-link {
    color: #78716c;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    transition: color 0.2s ease;
}

.product-details-link:hover {
    color: #451a03;
}

/* Responsive catalog */
@media (min-width: 640px) {
    .catalog-container {
        padding-right: 24px;
        padding-left: 24px;
    }
    .product-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 1.75rem 1.15rem;
    }
    .product-grid[data-columns="1"] {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .product-title {
        font-size: 1.05rem;
    }

    .product-carousel-track .sapphire-card {
        flex-basis: calc((100% - 8px) / 3);
    }
}

@media (min-width: 1024px) {
    .product-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 1.85rem 1.25rem;
    }
    .product-grid[data-columns="1"] {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .product-carousel-track .sapphire-card {
        flex-basis: calc((100% - 12px) / 4);
    }

}

@media (max-width: 480px) {
    .catalog-container {
        padding-right: 14px;
        padding-left: 14px;
    }
    .filter-sort-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    .product-carousel-track .sapphire-card {
        flex-basis: calc((100% - 4px) / 2);
    }
    .product-carousel-track .sapphire-card > div {
        padding: 9px 10px 12px;
    }
    .product-carousel-track .sapphire-card > div > p:first-child {
        margin-bottom: 4px;
        font-size: 9px;
        letter-spacing: 0.08em;
    }
    .product-carousel-track .sapphire-card > div > p:nth-child(2) {
        margin-bottom: 5px;
        font-size: 10px;
    }
    .product-carousel-track .sapphire-card > div h3 {
        font-size: 12px;
        line-height: 1.3;
    }
    .product-carousel-track .sapphire-card > div > div {
        margin-top: 5px;
    }
    .product-carousel-track .sapphire-card > div > div span:first-child {
        font-size: 12px;
    }
    .catalog-toolbar-actions {
        width: 100%;
        justify-content: space-between;
    }
    .product-grid {
        gap: 1.25rem 0.65rem;
    }
}

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer {
    margin-top: auto;
    padding-top: 0;
    border-top: 1px solid #e7e5e4;
    background-color: #fafaf9;
    color: #1c1917;
}

.footer-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-around;
    gap: 24px;
    padding: 28px 5%;
    border-bottom: 1px solid #e7e5e4;
    text-align: center;
    background: #fff;
}

.footer-badge-item a {
    display: flex;
    align-items: center;
    flex-direction: column;
    gap: 8px;
    color: #44403c;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-badge-item a:hover {
    color: #451a03;
}

.badge-icon {
    width: 26px;
    height: 26px;
    stroke: currentColor;
}

.footer-main {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 32px;
    max-width: 1280px;
    margin: 0 auto;
    padding: 48px 5%;
}

.footer-col h4 {
    margin: 0 0 16px;
    color: #451a03;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.footer-col p,
.footer-col li {
    color: #57534e;
    font-size: 13px;
    line-height: 1.85;
}

.footer-col p {
    margin: 0;
}

.footer-col ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer-col a {
    color: #57534e;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-col a:hover {
    color: #451a03;
}

.footer-col .hours {
    margin-top: 6px;
    color: #a8a29e;
    font-size: 12px;
}

.newsletter-link {
    display: inline-block;
    margin-top: 14px;
    padding: 0.7rem 1.15rem;
    border: 1px solid #451a03;
    border-radius: 0.5rem;
    color: #451a03 !important;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.12em;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.newsletter-link:hover {
    background: #451a03;
    color: #fffbeb !important;
}

.footer-social-icons {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 18px;
}

.footer-social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f5f5f4;
    color: #44403c;
    transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.footer-social-icons a:hover {
    background: #451a03;
    color: #fffbeb;
    transform: translateY(-2px);
}

.footer-social-icons svg {
    display: block;
    width: 16px;
    height: 16px;
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 18px 5%;
    border-top: 1px solid #e7e5e4;
    background: #fff;
    color: #78716c;
    font-size: 12px;
    letter-spacing: 0.04em;
}

@media (max-width: 768px) {
    .footer-top-bar {
        flex-direction: column;
        gap: 20px;
        padding: 24px 5%;
    }
    .footer-main {
        grid-template-columns: 1fr;
        gap: 28px;
        padding: 36px 5%;
    }
    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }
}

/* =========================================================
   UTILITY / MISC
   ========================================================= */
.navbar {
    /* kept for any remaining references */
    border-bottom: 1px solid #e7e5e4;
}

/* =========================================================
   SMALL-SCREEN POLISH
   ========================================================= */
@media (max-width: 380px) {
    .navbar .navbar-brand {
        font-size: 1rem;
        white-space: nowrap;
    }

    .navbar .navbar-brand + span {
        font-size: 7px;
        letter-spacing: 0.12em;
        white-space: nowrap;
    }

    .pdp-sticky-sidebar > div[class~="justify-between"] {
        align-items: flex-start;
        gap: 0.75rem;
        padding: 1rem;
    }

    .pdp-sticky-sidebar > div[class~="justify-between"] > div:first-child {
        flex: 1 1 100%;
        min-width: 0;
    }

    .pdp-sticky-sidebar > div[class~="justify-between"] > div:last-child {
        margin-left: auto;
    }

    .pdp-sticky-sidebar .pdp-price {
        font-size: 1.15rem;
    }
}

@media (max-width: 640px) {
    input:not([type="checkbox"]):not([type="radio"]),
    select,
    textarea {
        font-size: 16px;
    }

    .hero-content {
        width: 100%;
        padding-right: 48px;
        padding-left: 48px;
    }

    .hero-title {
        overflow-wrap: anywhere;
        text-wrap: balance;
    }

    .footer-bottom {
        padding-right: 1rem;
        padding-left: 1rem;
    }
}

@media (max-width: 1023px) {
    .checkout-summary {
        position: static;
    }
}

@media (hover: none) and (pointer: coarse) {
    .sapphire-hover-bar {
        transform: translateY(0);
    }

    .quick-add-wrap {
        opacity: 1;
        transform: none;
        pointer-events: auto;
    }

    .sapphire-card .sapphire-img-wrap img.primary {
        transform: none;
        filter: none;
    }

    .sapphire-card .sapphire-img-wrap::after {
        display: none;
    }
}

/* Homepage masthead overlays the hero, like an editorial fashion storefront. */
.homepage-body .site-announcement {
    display: none;
}

.homepage-body .homepage-header {
    position: absolute;
    inset: 0 0 auto;
    z-index: 20;
    width: 100%;
    border: 0;
    background: transparent;
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    color: #fff;
}

.homepage-header .max-w-7xl > .flex.items-center.justify-between {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    align-items: center;
    gap: 0 1.5rem;
    height: auto;
    min-height: 100px;
    padding-top: 12px;
    padding-bottom: 12px;
}

.homepage-header .home-menu-trigger {
    display: flex;
    grid-column: 1;
    grid-row: 1 / 3;
    margin-left: 0;
    color: #fff;
}

.homepage-header .home-menu-trigger + button {
    color: #fff;
}

.homepage-header .max-w-7xl > .flex.items-center.justify-between > div:first-child {
    display: flex !important;
}

.homepage-header .max-w-7xl > .flex.items-center.justify-between > div:nth-child(2) {
    grid-column: 2;
    grid-row: 1;
    text-align: left;
}

.homepage-header .navbar-brand {
    color: #fff;
    font-family: 'Plus Jakarta Sans', ui-sans-serif, system-ui, sans-serif;
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 700;
    letter-spacing: 0.15em;
    line-height: 1;
}

.homepage-header .navbar-brand + span {
    margin-top: 0.45rem;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.65rem;
    letter-spacing: 0.18em;
}

.homepage-header nav {
    display: flex;
    grid-column: 2;
    grid-row: 2;
    align-self: start;
    justify-content: flex-start;
    gap: 1.75rem;
    margin-top: 0.7rem;
    color: #fff;
}

.homepage-header nav > a {
    padding: 0.25rem 0;
    font-size: 0.75rem;
    letter-spacing: 0.12em;
}

.homepage-header .max-w-7xl > .flex.items-center.justify-between > div:last-child {
    grid-column: 3;
    grid-row: 1 / 3;
    align-self: start;
    justify-content: flex-end;
    gap: 0.5rem;
    padding-top: 0.25rem;
}

.homepage-header .max-w-7xl > .flex.items-center.justify-between > div:last-child > button,
.homepage-header .home-account-link {
    color: #fff;
}

.homepage-header .max-w-7xl > .flex.items-center.justify-between > div:last-child > a[href^="https://wa.me"] {
    display: none;
}

.homepage-header .max-w-7xl > .flex.items-center.justify-between > div:last-child > button[aria-label="Shopping Bag"] span {
    background: #fff;
    color: #451a03;
}

.homepage-header .border-t.border-stone-200 {
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(28, 25, 23, 0.76);
}

.homepage-header .border-t.border-stone-200 input {
    color: #1c1917;
}

.homepage-body .hero-slider-section {
    height: 100vh;
    height: 100svh;
    min-height: 580px;
    max-height: none;
}

@media (min-width: 1024px) {
    .homepage-header .home-menu-trigger + button {
        display: none;
    }
}

@media (max-width: 1023px) {
    .homepage-header .max-w-7xl > .flex.items-center.justify-between {
        display: flex;
        min-height: 76px;
        gap: 0;
        padding-top: 0;
        padding-bottom: 0;
    }

    .homepage-header .home-menu-trigger {
        grid-column: auto;
        grid-row: auto;
    }

    .homepage-header .max-w-7xl > .flex.items-center.justify-between > div:last-child > button[title="Search Suits"] {
        display: none;
    }

    .homepage-header .max-w-7xl > .flex.items-center.justify-between > div:nth-child(2) {
        flex: 1 1 auto;
        min-width: 0;
        text-align: center;
    }

    .homepage-header .navbar-brand {
        font-size: clamp(1.2rem, 4vw, 1.8rem);
        letter-spacing: 0.1em;
    }

    .homepage-header .navbar-brand + span {
        margin-top: 0.15rem;
        font-size: 0.45rem;
        letter-spacing: 0.12em;
    }

    .homepage-header nav {
        display: none;
    }

    .homepage-header .max-w-7xl > .flex.items-center.justify-between > div:last-child {
        align-self: center;
        gap: 0;
        padding-top: 0;
    }

    .homepage-header .home-account-link {
        display: flex;
    }

    .homepage-body .hero-slider-section {
        min-height: 500px;
    }
}

@media (max-width: 640px) {
    .navbar > .max-w-7xl > .flex.items-center.justify-between {
        height: 58px;
        min-height: 58px;
    }

    .homepage-header .max-w-7xl > .flex.items-center.justify-between {
        height: 58px;
        min-height: 58px;
        padding-top: 0;
        padding-bottom: 0;
    }

    .homepage-header .navbar-brand {
        font-size: clamp(1rem, 4vw, 1.2rem);
    }

    .homepage-body .hero-slider-section {
        height: 70vh;
        height: 70svh;
        min-height: 400px;
        max-height: 520px;
    }
}

@media (max-width: 380px) {
    .homepage-header .max-w-7xl > .flex.items-center.justify-between {
        height: 54px;
        min-height: 54px;
    }

    .homepage-body .hero-slider-section {
        height: 66vh;
        height: 66svh;
    }

    .homepage-header .navbar-brand {
        font-size: 0.95rem;
        letter-spacing: 0.08em;
    }

    .homepage-header .navbar-brand + span {
        font-size: 0.38rem;
        letter-spacing: 0.08em;
    }

    .homepage-header .max-w-7xl > .flex.items-center.justify-between > div:last-child svg {
        width: 1.25rem;
        height: 1.25rem;
    }
}
