﻿.collection-page {
    --ink: #08284a;
    --ink-soft: #415066;
    --gold: #c8a25a;
    --gold-deep: #8a6a2f;
    --paper: #fbf9f5;
    --paper-soft: #f4eee5;
    --line: rgba(8, 40, 74, 0.12);
    --serif: 'Playfair Display', Georgia, serif;
    --sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--paper);
    color: var(--ink);
}

.collection-page h1,
.collection-page h2,
.collection-page h3 {
    text-wrap: balance;
}

.collection-page button,
.collection-page input,
.collection-page select {
    font-family: var(--sans);
}

.collection-page .eyebrow {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin: 0 0 1rem;
    color: var(--gold-deep);
    font-size: 0.66rem;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

.collection-page .eyebrow::before {
    content: '';
    width: 2.2rem;
    height: 1px;
    background: currentColor;
}

/* Transparent navbar over the editorial hero */
@media (min-width: 992px) {
    .collection-page .navbar-custom:not(.is-scrolled) {
        border-bottom-color: transparent;
        background: linear-gradient(180deg, rgba(4, 18, 34, 0.78), rgba(4, 18, 34, 0)) !important;
        box-shadow: none;
    }

    .collection-page .navbar-custom:not(.is-scrolled) .navbar-brand,
    .collection-page .navbar-custom:not(.is-scrolled) .navbar-nav .nav-link {
        color: #fff !important;
    }

    .collection-page .navbar-custom:not(.is-scrolled) .navbar-nav .nav-link:hover,
    .collection-page .navbar-custom:not(.is-scrolled) .navbar-nav .nav-link.active {
        color: var(--gold) !important;
    }

    .collection-page .navbar-custom:not(.is-scrolled) .navbar-brand img {
        filter: brightness(0) invert(1);
    }

    .collection-page .navbar-custom:not(.is-scrolled) .nav-link::after {
        background: var(--gold);
    }
}

/* Hero */
.collection-hero {
    position: relative;
    height: 76vh;
    min-height: 580px;
    max-height: 900px;
    overflow: hidden;
    background: #06182d;
    color: #fff;
}

@supports (height: 100svh) {
    .collection-hero {
        height: 76svh;
    }
}

.collection-hero-media {
    position: absolute;
    inset: 0;
}

.collection-hero-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 38%;
    animation: collectionZoom 16s ease-out both;
}

@keyframes collectionZoom {
    from { transform: scale(1.08); }
    to { transform: scale(1); }
}

.collection-hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(4, 18, 34, 0.92) 0%, rgba(4, 18, 34, 0.58) 47%, rgba(4, 18, 34, 0.16) 100%),
        linear-gradient(0deg, rgba(4, 18, 34, 0.78) 0%, rgba(4, 18, 34, 0.05) 58%, rgba(4, 18, 34, 0.24) 100%);
}

.collection-hero-inner {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    height: 100%;
    padding-top: 8rem;
    padding-bottom: 4.5rem;
}

.collection-side-label {
    position: absolute;
    z-index: 2;
    top: 50%;
    right: 1.5rem;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.58rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    transform: translateY(-50%) rotate(180deg);
    writing-mode: vertical-rl;
}

.collection-eyebrow {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin: 0 0 1.3rem;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.64rem;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

.collection-eyebrow span {
    width: 2.4rem;
    height: 1px;
    background: var(--gold);
}

.collection-hero h1 {
    max-width: 12ch;
    margin: 0 0 1.4rem;
    color: #fff;
    font-family: var(--serif);
    font-size: clamp(3.2rem, 7.5vw, 7rem);
    font-weight: 500;
    letter-spacing: -0.05em;
    line-height: 0.94;
}

.collection-hero h1 em {
    color: var(--gold);
    font-style: italic;
    font-weight: 400;
}

.collection-lede {
    max-width: 540px;
    margin: 0 0 2rem;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.98rem;
    line-height: 1.85;
}

.collection-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 2.5rem;
    margin-bottom: 2.2rem;
}

.collection-hero-meta span {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    color: rgba(255, 255, 255, 0.52);
    font-size: 0.58rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.collection-hero-meta strong {
    color: #fff;
    font-family: var(--serif);
    font-size: 1.5rem;
    font-weight: 500;
    letter-spacing: 0;
}

.collection-scroll {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    width: fit-content;
    color: rgba(255, 255, 255, 0.62);
    font-size: 0.6rem;
    letter-spacing: 0.18em;
    text-decoration: none;
    text-transform: uppercase;
    transition: color 0.3s ease;
}

.collection-scroll:hover {
    color: #fff;
}

.collection-scroll span {
    position: relative;
    display: inline-block;
    width: 2.8rem;
    height: 1px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.3);
}

.collection-scroll span::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gold);
    animation: collectionScrollLine 2.2s ease-in-out infinite;
}

@keyframes collectionScrollLine {
    0% { transform: translateX(-100%); }
    55% { transform: translateX(0); }
    100% { transform: translateX(100%); }
}

/* Toolbar */
.collection-toolbar {
    position: sticky;
    z-index: 1020;
    top: var(--navbar-height, 64px);
    padding: 1rem 0 0.85rem;
    border-bottom: 1px solid var(--line);
    background: rgba(251, 249, 245, 0.94);
    backdrop-filter: blur(14px);
}

.toolbar-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.filter-pill {
    padding: 0.55rem 0.85rem;
    border: 1px solid transparent;
    border-radius: 999px;
    background: transparent;
    color: var(--ink-soft);
    font-size: 0.63rem;
    font-weight: 600;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    transition: background 0.25s ease, color 0.25s ease;
}

.filter-pill:hover {
    background: rgba(8, 40, 74, 0.06);
    color: var(--ink);
}

.filter-pill.active {
    background: var(--ink);
    color: #fff;
}

.filter-count {
    margin-left: 0.3rem;
    color: var(--ink-soft);
    font-size: 0.56rem;
    opacity: 1;
}

.filter-pill.active .filter-count {
    color: var(--gold);
    opacity: 1;
}

.toolbar-tools {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.search-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.85rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.search-wrap:focus-within {
    border-color: rgba(200, 162, 90, 0.7);
    box-shadow: 0 0 0 3px rgba(200, 162, 90, 0.12);
}

.search-wrap i {
    color: var(--gold);
    font-size: 0.9rem;
}

.search-wrap input {
    width: 150px;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--ink);
    font-size: 0.78rem;
}

.search-wrap input::placeholder {
    color: #9aa3af;
}

.search-clear {
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--ink-soft);
    line-height: 1;
}

.sort-wrap {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    color: var(--ink-soft);
    font-size: 0.58rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    white-space: nowrap;
}

.sort-wrap select {
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--ink);
    cursor: pointer;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    text-transform: none;
}

.toolbar-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 0.7rem;
    color: var(--ink-soft);
    font-size: 0.6rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

#activeFilterLabel {
    color: var(--gold-deep);
    font-weight: 600;
}

.reset-filters {
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--ink);
    font-size: 0.6rem;
    letter-spacing: 0.12em;
    text-decoration: underline;
    text-underline-offset: 4px;
    text-transform: uppercase;
}

.reset-filters i {
    margin-left: 0.3rem;
}

/* Main */
.collection-main {
    padding: clamp(3.5rem, 6vw, 5.5rem) 0 clamp(5rem, 9vw, 8rem);
    background: var(--paper);
}

.collection-header {
    max-width: 690px;
    margin-bottom: 2.5rem;
}

.collection-header h2 {
    margin: 0 0 0.8rem;
    font-family: var(--serif);
    font-size: clamp(2rem, 4vw, 3.4rem);
    font-weight: 500;
    letter-spacing: -0.035em;
    line-height: 1.08;
}

.collection-header h2 em {
    color: var(--gold-deep);
    font-style: italic;
    font-weight: 400;
}

.collection-header p:last-child {
    max-width: 540px;
    margin: 0;
    color: var(--ink-soft);
    line-height: 1.8;
}

.collection-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
    gap: clamp(2rem, 4vw, 3.4rem) clamp(1.2rem, 2.5vw, 2.2rem);
}

.product-card {
    animation: productCardIn 0.6s cubic-bezier(0.2, 0.6, 0.2, 1) both;
    animation-delay: calc(var(--index, 0) * 35ms);
}

.product-card.is-hidden {
    display: none;
}

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

.product-media {
    position: relative;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    background: var(--paper-soft);
}

.product-media::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 55%, rgba(4, 18, 34, 0.38));
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.product-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.9s cubic-bezier(0.2, 0.6, 0.2, 1);
}

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

.product-card:hover .product-media::after {
    opacity: 1;
}

.product-badge {
    position: absolute;
    z-index: 2;
    top: 0.9rem;
    left: 0.9rem;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    background: rgba(251, 249, 245, 0.92);
    color: var(--ink);
    font-size: 0.54rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    backdrop-filter: blur(8px);
}

.product-overlay {
    position: absolute;
    z-index: 3;
    inset: 0;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 1.1rem;
    opacity: 0;
    transition: opacity 0.35s ease;
}

.product-card:hover .product-overlay {
    opacity: 1;
}

.quick-view {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.8rem 1.1rem;
    border: 0;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(4, 18, 34, 0.18);
    color: var(--ink);
    font-size: 0.58rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    transform: translateY(8px);
    transition: background 0.3s ease, color 0.3s ease, transform 0.3s ease;
}

.product-card:hover .quick-view {
    transform: translateY(0);
}

.quick-view:hover {
    background: var(--gold);
    color: #081f38;
}

.product-info {
    padding-top: 0.95rem;
}

.product-topline {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    color: var(--ink-soft);
    font-size: 0.55rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.product-category {
    color: var(--gold-deep);
}

.product-code {
    opacity: 0.5;
}

.product-info h3 {
    margin: 0.45rem 0 0.65rem;
    font-family: var(--serif);
    font-size: 1.28rem;
    font-weight: 500;
    letter-spacing: -0.015em;
    line-height: 1.25;
}

.product-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.product-price {
    color: var(--ink-soft);
    font-size: 0.76rem;
    letter-spacing: 0.03em;
}

.product-link {
    display: grid;
    width: 2.25rem;
    height: 2.25rem;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    color: var(--ink);
    text-decoration: none;
    transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
}

.product-link:hover {
    border-color: var(--ink);
    background: var(--ink);
    color: #fff;
    transform: translate(1px, -1px);
}

/* Empty states */
.collection-empty {
    grid-column: 1 / -1;
    padding: 5rem 2rem;
    border: 1px dashed var(--line);
    text-align: center;
}

.collection-empty h3,
.collection-noresult h3 {
    margin: 0 0 0.6rem;
    font-family: var(--serif);
    font-size: 1.8rem;
    font-weight: 500;
}

.collection-empty p,
.collection-noresult p {
    color: var(--ink-soft);
}

.collection-noresult {
    padding: 4.5rem 2rem;
    border: 1px dashed var(--line);
    text-align: center;
}

.noresult-mark {
    display: grid;
    width: 3.5rem;
    height: 3.5rem;
    margin: 0 auto 1.2rem;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    color: var(--gold-deep);
    font-family: var(--serif);
    font-size: 1.4rem;
}

.noresult-reset {
    margin-top: 1.2rem;
    padding: 0.75rem 1.2rem;
    border: 1px solid var(--ink);
    border-radius: 999px;
    background: transparent;
    color: var(--ink);
    font-size: 0.6rem;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    transition: background 0.3s ease, color 0.3s ease;
}

.noresult-reset:hover {
    background: var(--ink);
    color: #fff;
}

/* Quick view */
.quick-modal {
    position: relative;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    background: var(--paper);
    box-shadow: 0 40px 100px rgba(4, 18, 34, 0.3);
}

.quick-close {
    position: absolute;
    z-index: 5;
    top: 1rem;
    right: 1rem;
    display: grid;
    width: 2.4rem;
    height: 2.4rem;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: rgba(251, 249, 245, 0.92);
    color: var(--ink);
    transition: background 0.3s ease, color 0.3s ease;
}

.quick-close:hover {
    background: var(--ink);
    color: #fff;
}

.quick-grid {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    min-height: 540px;
}

.quick-media {
    min-height: 360px;
    background: var(--paper-soft);
}

.quick-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.quick-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(2rem, 4.5vw, 4.5rem);
}

.quick-kicker {
    margin-bottom: 0.9rem;
    color: var(--gold-deep);
    font-size: 0.6rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.quick-body h2 {
    margin: 0 0 1rem;
    font-family: var(--serif);
    font-size: clamp(2rem, 3.5vw, 3rem);
    font-weight: 500;
    letter-spacing: -0.03em;
    line-height: 1.08;
}

.quick-price {
    margin-bottom: 1.5rem;
    color: var(--ink-soft);
    font-size: 0.95rem;
}

.quick-description {
    margin-bottom: 2rem;
    color: var(--ink-soft);
    font-size: 0.92rem;
    line-height: 1.8;
    white-space: pre-line;
}

.quick-link {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    width: fit-content;
    padding-bottom: 0.35rem;
    border-bottom: 1px solid var(--gold);
    color: var(--ink);
    font-size: 0.66rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-decoration: none;
    text-transform: uppercase;
    transition: color 0.3s ease, gap 0.3s ease;
}

.quick-link:hover {
    gap: 0.9rem;
    color: var(--gold);
}

/* Touch devices: keep the quick view action visible */
@media (hover: none) {
    .product-media::after,
    .product-overlay {
        opacity: 1;
    }

    .quick-view {
        transform: none;
    }
}

/* Responsive */
@media (max-width: 1199px) {
    .collection-grid {
        gap: 2.4rem 1.5rem;
    }

    .search-wrap input {
        width: 120px;
    }
}

@media (max-width: 991px) {
    .collection-hero {
        min-height: 560px;
    }

    .collection-side-label {
        display: none;
    }

    .collection-hero-inner {
        padding-bottom: 3.8rem;
    }

    .toolbar-main {
        flex-direction: column;
        align-items: stretch;
        gap: 0.9rem;
    }

    .toolbar-tools {
        justify-content: space-between;
    }

    .search-wrap {
        flex: 1;
    }

    .search-wrap input {
        width: 100%;
    }

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

    .quick-grid {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .quick-media {
        max-height: 420px;
    }
}

@media (max-width: 767px) {
    .collection-hero {
        min-height: 600px;
        height: 82vh;
    }

    .collection-hero-inner {
        padding-top: 7rem;
        padding-bottom: 3.4rem;
    }

    .collection-hero h1 {
        font-size: clamp(3rem, 12vw, 4.6rem);
    }

    .collection-lede {
        font-size: 0.92rem;
    }

    .collection-hero-meta {
        gap: 1.5rem;
        margin-bottom: 1.8rem;
    }

    .collection-hero-meta strong {
        font-size: 1.25rem;
    }

    .collection-toolbar {
        padding-top: 0.8rem;
    }

    .filter-pills {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 0.3rem;
        scrollbar-width: none;
    }

    .filter-pills::-webkit-scrollbar {
        display: none;
    }

    .filter-pill {
        flex: 0 0 auto;
    }

    .toolbar-tools {
        flex-direction: column;
        align-items: stretch;
        gap: 0.7rem;
    }

    .sort-wrap {
        justify-content: space-between;
        padding-top: 0.65rem;
        border-top: 1px solid var(--line);
    }

    .toolbar-meta {
        flex-wrap: wrap;
        gap: 0.4rem 1rem;
    }

    .collection-main {
        padding-top: 3rem;
    }

    .collection-header {
        margin-bottom: 1.8rem;
    }

    .collection-grid {
        gap: 2.2rem 1rem;
    }

    .product-info h3 {
        font-size: 1.12rem;
    }

    .quick-body {
        padding: 1.75rem;
    }

    .quick-body h2 {
        font-size: 2rem;
    }
}

@media (max-width: 575px) {
    .collection-grid {
        grid-template-columns: 1fr;
    }

    .collection-hero-meta {
        gap: 1.2rem;
    }

    .collection-hero-meta span {
        font-size: 0.54rem;
    }

    .product-media {
        aspect-ratio: 4 / 5;
    }

    .collection-noresult {
        padding: 3.5rem 1.5rem;
    }
}

@media (max-width: 420px) {
    .collection-hero h1 {
        font-size: 2.9rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .collection-hero-media img,
    .collection-scroll span::after,
    .product-card {
        animation: none;
    }
}
