/* Hay Jewels — Luxury Catalog */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600&family=Playfair+Display:ital,wght@0,400;0,600;1,400&display=swap');

* { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Card watermark — sparse positioned marks like reference ── */
.product-card {
    position: relative;
    overflow: hidden;
}
.product-card::after {
    content: "";
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='280'%3E%3Ctext transform='rotate(-40 150 140)' x='150' y='140' text-anchor='middle' font-family='Montserrat,sans-serif' font-size='14' font-weight='400' letter-spacing='3' fill='rgba(185,155,55,0.15)'%3EHAY LUXURY%3C/text%3E%3C/svg%3E");
    background-repeat: repeat;
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
    z-index: 10;
}

:root {
    --gold: #C9A84C;
    --gold-light: #E8D5A0;
    --gold-dark: #8B7330;
    --bg: #FAFAF8;
    --surface: #FFFFFF;
    --surface-hover: #F5F3EE;
    --border: #E8E4DC;
    --text: #1A1A1A;
    --text-muted: #999;
    --white: #FFFFFF;
    --black: #0A0A0A;
    --green: #2E7D32;
    --red: #C62828;
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Montserrat', sans-serif;
}

body {
    font-family: var(--font-body);
    color: var(--text);
    background: var(--bg);
    min-height: 100vh;
    font-weight: 300;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    user-select: none;
}

a { text-decoration: none; color: inherit; transition: all 0.3s; }
ul { list-style: none; }
img { -webkit-user-drag: none; pointer-events: none; }

/* ── QA Banner ── */
.qa-banner {
    background: var(--black);
    color: var(--gold);
    text-align: center;
    padding: 10px 40px;
    font-size: 10px;
    font-weight: 400;
    letter-spacing: 2px;
    text-transform: uppercase;
    position: relative;
}
.qa-highlight { font-weight: 600; }
.qa-close {
    position: absolute; right: 15px; top: 50%; transform: translateY(-50%);
    background: none; border: none; color: var(--bg); font-size: 18px; cursor: pointer;
}

/* ── Header ── */
header {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 100;
}
.top-bar {
    display: flex; justify-content: center; align-items: center;
    padding: 20px 40px;
}
.logo-container { text-align: center; }
.logo {
    font-family: var(--font-heading);
    font-size: 28px; letter-spacing: 8px;
    text-transform: uppercase; color: var(--black);
}
.logo span { color: var(--gold); font-style: italic; }

nav {
    border-top: 1px solid var(--border);
    padding: 0 40px;
    overflow-x: auto;
}
nav ul {
    display: flex; justify-content: center; gap: 0;
    white-space: nowrap;
}
nav ul li a {
    display: block; padding: 14px 20px;
    font-size: 10px; letter-spacing: 2.5px;
    text-transform: uppercase; color: var(--text-muted);
    border-bottom: 2px solid transparent;
    transition: all 0.3s;
}
nav ul li a:hover, nav ul li a.active {
    color: var(--black);
    border-bottom-color: var(--black);
}

/* ── Status Bar ── */
.status-bar {
    display: flex; justify-content: center; gap: 30px;
    padding: 12px 40px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    font-size: 10px; letter-spacing: 2px;
    text-transform: uppercase; color: var(--text-muted);
}

/* ── Search ── */
.search-container {
    padding: 25px 40px;
    max-width: 600px;
    margin: 0 auto;
}
.search-container form { position: relative; }
.search-icon {
    position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
    color: var(--text-muted); font-size: 14px;
}
.search-input {
    width: 100%;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 0;
    padding: 14px 20px 14px 44px;
    color: var(--text);
    font-family: var(--font-body);
    font-size: 12px;
    letter-spacing: 1px;
    outline: none;
    transition: border-color 0.3s;
}
.search-input:focus { border-color: var(--text); }
.search-input::placeholder { color: var(--text-muted); letter-spacing: 1.5px; }

/* ── Filters ── */
.filter-section { padding: 0 40px 20px; text-align: center; }
.filter-tags {
    display: flex; flex-wrap: wrap; gap: 8px;
    justify-content: center;
}
.filter-tag {
    padding: 8px 18px;
    border: 1px solid var(--text);
    border-radius: 0;
    font-size: 10px; letter-spacing: 1.5px;
    color: var(--text);
    transition: all 0.25s;
    cursor: pointer;
}
.filter-tag:hover { background: var(--text); color: var(--white); }
.filter-tag.active {
    background: var(--text);
    color: var(--white);
    border-color: var(--text);
    font-weight: 500;
}

/* ── Product Grid ── */
.product-grid-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    padding: 0 40px 60px;
    max-width: 1400px;
    margin: 0 auto;
}

.product-card {
    background: var(--white);
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
}
.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.08);
    border-color: var(--gold-light);
}

/* Card Image */
.card-image {
    position: relative;
    aspect-ratio: 1 / 1;
    background: var(--surface);
    overflow: hidden;
}
.card-image img {
    width: 100%; height: 100%;
    object-fit: contain;
    pointer-events: none;
    transition: transform 0.5s;
    padding: 12px;
    background: transparent;
    mix-blend-mode: multiply;
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
}
.product-card:hover .card-image img { transform: scale(1.08); }
.image-protection-overlay {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: transparent; z-index: 2;
}
.img-count {
    position: absolute; bottom: 10px; right: 10px;
    background: rgba(0,0,0,0.6); color: #fff;
    padding: 4px 10px; border-radius: 12px;
    font-size: 10px; z-index: 3;
}
.status-dot {
    position: absolute; top: 12px; right: 12px;
    width: 10px; height: 10px;
    border-radius: 50%; z-index: 3;
}
.status-dot.available { background: var(--green); box-shadow: 0 0 8px rgba(76,175,80,0.5); }
.status-dot.sold-out { background: var(--red); }
.status-dot.reserved { background: var(--gold); }

/* Card Body */
.card-body { padding: 16px; flex: 1; }
.card-brand {
    font-size: 11px; font-weight: 500;
    color: var(--text);
    letter-spacing: 2.5px;
    text-transform: uppercase;
    margin-bottom: 2px;
}
.card-type {
    font-family: var(--font-heading);
    font-size: 15px; color: var(--text);
    font-weight: 400; margin-bottom: 10px;
    font-style: italic;
}
.card-details {
    display: flex; justify-content: space-between;
    font-size: 11px; color: var(--text-muted);
    letter-spacing: 1px;
}
.card-ref { font-family: var(--font-body); }
.card-weight { color: var(--text-muted); }
.card-diamond {
    margin-top: 8px;
    font-size: 11px; color: var(--text-muted);
    letter-spacing: 0.5px;
}
.card-diamond i { color: var(--gold-light); margin-right: 4px; font-size: 10px; }

/* Card Inquire Button */
.card-inquire {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px;
    background: var(--black);
    color: var(--white);
    font-size: 10px; font-weight: 500;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    transition: all 0.3s;
    text-decoration: none;
}
.card-inquire:hover {
    background: var(--gold-dark);
    color: var(--white);
}

/* No Results */
.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 40px;
    color: var(--text-muted);
    font-size: 14px;
    letter-spacing: 2px;
}

/* ── Brand Tag (legacy) ── */
.brand-tag {
    font-weight: 500; color: var(--gold);
    font-size: 12px; letter-spacing: 1px;
}

/* ── Status Badges ── */
.status-badge {
    display: inline-block;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
}
.status-badge.available {
    background: rgba(76, 175, 80, 0.15);
    color: var(--green);
    border: 1px solid rgba(76, 175, 80, 0.3);
}
.status-badge.sold-out {
    background: rgba(211, 47, 47, 0.15);
    color: var(--red);
    border: 1px solid rgba(211, 47, 47, 0.3);
}
.status-badge.reserved {
    background: rgba(201, 168, 76, 0.15);
    color: var(--gold);
    border: 1px solid rgba(201, 168, 76, 0.3);
}

/* ── WhatsApp Button ── */
.whatsapp-btn-small {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: #fff;
    border-radius: 20px;
    font-size: 11px; font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: all 0.3s;
    white-space: nowrap;
}
.whatsapp-btn-small:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

/* ── Lightbox ── */
#lightbox {
    display: none;
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    justify-content: center; align-items: center;
    flex-direction: column;
}
.lightbox-content-wrapper {
    display: flex; flex-direction: column;
    align-items: center; max-width: 90vw;
}
#lightbox-img {
    max-width: 80vw; max-height: 70vh;
    object-fit: contain;
    border-radius: 4px;
    pointer-events: auto;
    cursor: zoom-in;
    transition: transform 0.3s;
}
#lightbox-img.zoomed { transform: scale(1.8); cursor: zoom-out; }
.close {
    position: absolute; top: 20px; right: 30px;
    font-size: 36px; color: var(--text-muted);
    cursor: pointer; z-index: 1001;
    transition: color 0.3s;
}
.close:hover { color: var(--gold); }
.lightbox-nav-btn {
    position: absolute; top: 50%; transform: translateY(-50%);
    font-size: 30px; color: var(--text-muted);
    cursor: pointer; padding: 20px;
    transition: color 0.3s; z-index: 1001;
    user-select: none;
}
.lightbox-nav-btn:hover { color: var(--gold); }
.lightbox-nav-btn.prev { left: 20px; }
.lightbox-nav-btn.next { right: 20px; }
.lightbox-thumbs {
    display: flex; gap: 8px; margin-top: 15px;
    justify-content: center; flex-wrap: wrap;
}
.lightbox-thumb {
    width: 50px; height: 50px;
    object-fit: cover; border-radius: 4px;
    border: 2px solid transparent;
    cursor: pointer; opacity: 0.5;
    transition: all 0.3s;
    pointer-events: auto;
}
.lightbox-thumb.active { border-color: var(--gold); opacity: 1; }
.lightbox-thumb:hover { opacity: 0.8; }

/* ── Footer ── */
footer, .footer {
    text-align: center;
    padding: 40px;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 11px;
    letter-spacing: 2px;
    margin-top: auto;
}

/* ── Admin Styles ── */
.admin-container {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 30px;
}
.admin-nav {
    padding: 15px 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 30px;
}
.admin-nav a {
    display: inline-block;
    padding: 8px 16px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
}
.admin-nav a:hover { color: var(--gold); }
.form-group { margin-bottom: 15px; }
.form-group label {
    display: block; font-size: 10px;
    text-transform: uppercase; letter-spacing: 1px;
    margin-bottom: 6px; color: var(--text-muted);
}
.form-control {
    width: 100%; padding: 10px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text);
    font-family: var(--font-body);
    font-size: 13px;
    transition: border-color 0.3s;
}
.form-control:focus { border-color: var(--gold); outline: none; }
.btn {
    display: inline-block;
    padding: 10px 20px;
    background: var(--gold);
    color: var(--bg);
    font-family: var(--font-body);
    font-size: 11px; font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    border: none; border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}
.btn:hover { background: var(--gold-light); transform: translateY(-1px); }
.btn-danger { background: var(--red); color: var(--white); }
.btn-danger:hover { background: #E53935; }
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 10px;
    color: var(--white);
}

/* ── Desktop Hide ── */
.desktop-hide { }

/* ── Luxury Mobile Experience ── */

/* Scroll-driven header: glass morphism on scroll */
@supports (animation-timeline: scroll()) {
    header {
        animation: headerBlur linear both;
        animation-timeline: scroll(root);
        animation-range: 0px 80px;
    }
    @keyframes headerBlur {
        from { background: rgba(255,255,255,0.6); backdrop-filter: blur(0px); }
        to { background: rgba(255,255,255,0.92); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
    }
}

/* Scroll-driven product reveal */
@supports (animation-timeline: view()) {
    .product-card {
        animation: cardReveal 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
        animation-timeline: view();
        animation-range: entry 0% entry 30%;
    }
    @keyframes cardReveal {
        from { opacity: 0; transform: translateY(30px) scale(0.97); }
        to { opacity: 1; transform: translateY(0) scale(1); }
    }
}

/* Shimmer removed — was blocking images on mobile */
@keyframes shimmer { to { background-position: -200% 0; } }

/* Tablet */
@media (max-width: 1024px) {
    .product-grid-container { grid-template-columns: repeat(3, 1fr); padding: 0 20px 40px; }
}

/* ── MOBILE — World Class ── */
@media (max-width: 768px) {
    /* Header: compact, glassmorphism */
    header {
        background: rgba(255,255,255,0.88);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-bottom: none;
        box-shadow: 0 1px 0 rgba(0,0,0,0.04);
    }
    .top-bar { padding: 14px 16px; }
    .logo { font-size: 20px; letter-spacing: 6px; }

    /* Nav: horizontal scroll, pill style */
    nav { padding: 0; border-top: none; }
    nav ul {
        justify-content: flex-start;
        gap: 0;
        padding: 0 16px;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
    }
    nav ul::-webkit-scrollbar { display: none; }
    nav ul li { scroll-snap-align: start; }
    nav ul li a {
        padding: 10px 16px;
        font-size: 10px;
        letter-spacing: 2px;
        white-space: nowrap;
        border-bottom-width: 2px;
    }
    nav ul li a.active {
        color: var(--gold-dark);
        border-bottom-color: var(--gold);
    }

    /* QA Banner */
    .qa-banner { font-size: 8px; padding: 8px 30px 8px 12px; letter-spacing: 1.5px; }

    /* Status bar */
    .status-bar {
        gap: 12px; font-size: 8px; padding: 8px 16px;
        letter-spacing: 1.5px;
        background: rgba(250,250,248,0.8);
        backdrop-filter: blur(8px);
    }

    /* Search: floating, rounded */
    .search-container { padding: 12px 16px; }
    .search-input {
        border-radius: 28px;
        padding: 12px 18px 12px 42px;
        font-size: 13px;
        background: var(--surface);
        border: 1px solid rgba(0,0,0,0.06);
        box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    }
    .search-input:focus {
        border-color: var(--gold);
        box-shadow: 0 2px 16px rgba(201,168,76,0.15);
    }
    .search-icon { left: 16px; font-size: 13px; }

    /* Filters: horizontal scroll pills */
    .filter-section { padding: 0 0 12px; }
    .filter-tags {
        justify-content: flex-start;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding: 0 16px 6px;
        gap: 6px;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x proximity;
    }
    .filter-tags::-webkit-scrollbar { display: none; }
    .filter-tag {
        padding: 8px 16px;
        border-radius: 20px;
        font-size: 10px;
        letter-spacing: 1px;
        white-space: nowrap;
        scroll-snap-align: start;
        border-color: rgba(0,0,0,0.1);
        background: var(--surface);
        flex-shrink: 0;
    }
    .filter-tag.active {
        background: var(--black);
        color: var(--white);
        border-color: var(--black);
        box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    }

    /* ── Product Grid: editorial 2-col, hairline gaps ── */
    .product-grid-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 2px;
        padding: 0;
        background: rgba(0,0,0,0.03);
    }

    /* ── Product Card: clean, no border, full bleed ── */
    .product-card {
        border: none;
        border-radius: 0;
        background: var(--white);
    }
    .product-card:hover {
        transform: none;
        box-shadow: none;
        border-color: transparent;
    }
    /* Tap feedback instead of hover */
    .product-card:active {
        transform: scale(0.98);
        transition: transform 0.1s;
    }

    /* Tighter watermark for mobile */
    .product-card::after {
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='160'%3E%3Ctext transform='rotate(-40 90 80)' x='90' y='80' text-anchor='middle' font-family='Montserrat,sans-serif' font-size='12' font-weight='400' letter-spacing='2' fill='rgba(185,155,55,0.16)'%3EHAY LUXURY%3C/text%3E%3C/svg%3E");
    }

    /* Card image: square on mobile, edge to edge */
    .card-image {
        aspect-ratio: 1 / 1;
        background: var(--surface);
    }
    .card-image img {
        padding: 8px;
        transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    }

    /* Card body: tight, clean */
    .card-body {
        padding: 10px 12px 6px;
    }
    .card-brand {
        font-size: 10px;
        letter-spacing: 2px;
        color: var(--text);
        font-weight: 500;
    }
    .card-type {
        font-size: 13px;
        margin-bottom: 6px;
    }
    .card-details {
        font-size: 10px;
        color: var(--text-muted);
    }
    .card-diamond {
        margin-top: 4px;
        font-size: 10px;
    }

    /* Inquire button: full width, compact */
    .card-inquire {
        padding: 11px;
        font-size: 9px;
        letter-spacing: 2px;
        background: var(--black);
    }
    .card-inquire:active {
        background: var(--gold-dark);
    }

    /* Status dot: smaller on mobile */
    .status-dot { width: 8px; height: 8px; top: 8px; right: 8px; }

    /* Pagination: compact */
    .pagination { padding: 20px 16px 30px; gap: 4px; }
    .page-btn {
        min-width: 34px; height: 34px;
        font-size: 12px;
        border-radius: 17px;
    }
    .page-btn.active { border-radius: 17px; }

    /* Lightbox mobile */
    #lightbox-img { max-width: 95vw; max-height: 75vh; }
    .close { top: 12px; right: 16px; font-size: 28px; }
    .lightbox-nav-btn { font-size: 24px; padding: 12px; }
    .lightbox-nav-btn.prev { left: 8px; }
    .lightbox-nav-btn.next { right: 8px; }

    /* Footer */
    footer { padding: 30px 20px; margin-top: 0; }
}

/* ── Small phones ── */
@media (max-width: 380px) {
    .logo { font-size: 17px; letter-spacing: 3px; }
    .card-brand { font-size: 9px; }
    .card-type { font-size: 12px; }
    .card-inquire { font-size: 8px; letter-spacing: 1.5px; }
}

/* ── Reduce motion for accessibility ── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* ── Protected View ── */
.protected-view { position: relative; }
.protected-view .image-protection-overlay {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: transparent; z-index: 2;
}

/* ── Pagination ── */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    padding: 30px 0 10px;
}
.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 1px;
    text-decoration: none;
    transition: all 0.2s;
}
.page-btn:hover {
    border-color: var(--gold);
    color: var(--gold-dark);
}
.page-btn.active {
    background: var(--black);
    color: var(--white);
    border-color: var(--black);
}
.page-dots {
    color: var(--text-muted);
    font-size: 14px;
    padding: 0 4px;
}
