/* ═══════════════════════════════════════════════════════════════
   CATALOG.CSS — Sun Lens Catalog layout, grid, cards, modal
   ═══════════════════════════════════════════════════════════════ */

:root {
    --bg: #0b0e14;
    --surface: #13161e;
    --surface2: #1c2030;
    --border: rgba(255, 255, 255, 0.07);
    --accent: #4a9eff;
    --accent2: #f0a500;
    --text: #e8eaf0;
    --muted: #7a8099;
    --zeiss: #1a3a6e;
    --eclipse: #1a2e1a;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Barlow', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ── HEADER ── */
header {
    position: relative;
    padding: 60px 40px 50px;
    background: linear-gradient(135deg, #0d1525 0%, #0b0e14 60%);
    border-bottom: 1px solid var(--border);
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: -80px;
    right: -80px;
    width: 340px;
    height: 340px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(74, 158, 255, 0.12) 0%, transparent 70%);
    pointer-events: none;
}

header::after {
    content: '';
    position: absolute;
    bottom: -60px;
    left: 30%;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(240, 165, 0, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.header-inner {
    max-width: 1300px;
    margin: 0 auto;
    display: flex;
    align-items: flex-end;
    gap: 40px;
    flex-wrap: wrap;
}

.brand-badge {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--accent) 0%, #1a6fd4 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    font-size: 18px;
    letter-spacing: 1px;
    color: white;
}

.brand-name {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--muted);
}

h1 {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(38px, 5vw, 62px);
    font-weight: 300;
    line-height: 1.05;
    color: var(--text);
    flex: 1;
}

h1 em {
    font-style: normal;
    color: var(--accent);
}

.header-meta {
    font-size: 13px;
    color: var(--muted);
    letter-spacing: 0.5px;
    line-height: 1.7;
}

.header-meta strong {
    color: var(--text);
}

.header-cta {
    margin-left: auto;
    /* Pushes button to the far right */
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    background: rgba(74, 158, 255, 0.1);
    border: 1px solid rgba(74, 158, 255, 0.3);
    border-radius: 8px;
    color: var(--accent);
    text-decoration: none;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.header-cta:hover {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 0 30px rgba(74, 158, 255, 0.4);
    transform: translateY(-2px);
    border-color: var(--accent);
}

.header-cta span {
    font-size: 18px;
    line-height: 0;
    margin-bottom: 2px;
}

/* Mobile adjustment */
@media (max-width: 900px) {
    .header-cta {
        width: 100%;
        justify-content: center;
        margin-left: 0;
        margin-top: 10px;
    }
}

/* ── FILTER TABS ── */
.filter-bar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(11, 14, 20, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 0 40px;
}

.filter-inner {
    max-width: 1300px;
    margin: 0 auto;
    display: flex;
    gap: 4px;
    overflow-x: auto;
    scrollbar-width: none;
}

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

.tab {
    padding: 16px 22px;
    background: none;
    border: none;
    font-family: 'Barlow', sans-serif;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: var(--muted);
    cursor: pointer;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    transition: color 0.2s, border-color 0.2s;
}

.tab:hover {
    color: var(--text);
}

.tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.tab[data-brand="eclipse"].active {
    color: #5ec45e;
    border-bottom-color: #5ec45e;
}

/* ── MAIN ── */
main {
    max-width: 1300px;
    margin: 0 auto;
    padding: 50px 40px 80px;
}

/* ── SECTION ── */
.section {
    display: none;
}

.section.visible {
    display: block;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 40px;
}

.section-badge {
    padding: 5px 14px;
    border-radius: 4px;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.badge-zeiss {
    background: var(--zeiss);
    color: #82b4ff;
}

.badge-eclipse {
    background: var(--eclipse);
    color: #82d482;
}

.section-title {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 28px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text);
}

.section-divider {
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, var(--border), transparent);
}

/* ── CATEGORY GROUP ── */
.category-group {
    margin-bottom: 52px;
}

.category-label {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

/* ── LENS GRID ── */
.lens-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 16px;
}

/* ── LENS CARD ── */
.lens-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 22px 16px 18px;
    cursor: pointer;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease, background 0.22s ease;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.lens-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.04) 0%, transparent 50%);
    border-radius: 14px;
    pointer-events: none;
}

.lens-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
    border-color: rgba(74, 158, 255, 0.3);
    background: var(--surface2);
}

.lens-card.active-card {
    border-color: var(--accent);
    background: var(--surface2);
    box-shadow: 0 0 0 3px rgba(74, 158, 255, 0.15), 0 16px 40px rgba(0, 0, 0, 0.5);
}

/* ── LENS VISUAL ── */
.lens-visual {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    margin: 0 auto 16px;
    position: relative;
    transition: transform 0.3s ease;
}

.lens-card:hover .lens-visual {
    transform: scale(1.08);
}

.lens-visual::after {
    content: '';
    position: absolute;
    top: 8px;
    left: 8px;
    width: 28px;
    height: 14px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    transform: rotate(-40deg);
}

/* lens shape outline */
.lens-visual-oval {
    border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%;
    width: 100px;
    height: 76px;
    margin: 8px auto 16px;
}

/* Colors */
.l-gray { background: radial-gradient(circle at 35% 35%, #9ca0a8, #52575f); }
.l-brown { background: radial-gradient(circle at 35% 35%, #c0936a, #6b3e1e); }
.l-rose { background: radial-gradient(circle at 35% 35%, #d9909a, #9a4a55); }
.l-g15 { background: radial-gradient(circle at 35% 35%, #6fa878, #2d5c37); }
.l-gray-grad { background: linear-gradient(to bottom, #555a62 0%, #b0b5bd 100%); }
.l-brown-grad { background: linear-gradient(to bottom, #6b3e1e 0%, #c4a07a 100%); }
.l-g15-grad { background: linear-gradient(to bottom, #2d5c37 0%, #7ab88a 100%); }
.l-gray-yellow { background: linear-gradient(to bottom, #5a5d65 0%, #e8d868 100%); }
.l-blue-pink { background: linear-gradient(to bottom, #3a6ab0 0%, #d07090 100%); }
.l-skylet { background: radial-gradient(circle at 35% 35%, #c4b076, #8b6b28); box-shadow: inset 0 0 20px rgba(100, 150, 255, 0.3); }
.l-photochromic-brown { background: radial-gradient(circle at 35% 35%, #a07040, #5c3a10); opacity: 0.85; }
.l-photochromic-gray { background: radial-gradient(circle at 35% 35%, #8a8e96, #454850); opacity: 0.85; }
.l-blue-mirror { background: radial-gradient(circle at 30% 25%, #a0c8ff, #1a5fa0); }
.l-silver-mirror { background: radial-gradient(circle at 30% 25%, #e0e4f0, #7a8098); }
.l-bronze-mirror { background: radial-gradient(circle at 30% 25%, #d4a860, #7a5220); }
.l-rosegold-mirror { background: radial-gradient(circle at 30% 25%, #f0c4a0, #c06050); }
.l-blue-grad { background: linear-gradient(to bottom, #1a3a80 0%, #7ab0e8 100%); }
.l-polyamide-gray { background: radial-gradient(circle at 35% 35%, #8c9095, #40454a); }
.l-polyamide-brown { background: radial-gradient(circle at 35% 35%, #b08860, #5c3820); }
.l-amber-rose { background: radial-gradient(circle at 35% 35%, #c87060, #7a3030); }
.l-yellow { background: radial-gradient(circle at 35% 35%, #e8d840, #9c8a10); }
.l-black { background: radial-gradient(circle at 35% 35%, #505055, #18181c); }
.l-truegray { background: radial-gradient(circle at 35% 35%, #8a8e96, #44484f); }
.l-truebrown { background: radial-gradient(circle at 35% 35%, #b08055, #5c3018); }
.l-silver { background: radial-gradient(circle at 30% 25%, #e4e8f4, #888ca0); }
.l-bluenight { background: radial-gradient(circle at 30% 25%, #4070c8, #0a1840); }
.l-clear { background: radial-gradient(circle at 35% 35%, rgba(200, 220, 255, 0.5), rgba(160, 185, 220, 0.3)); border: 1px solid rgba(200, 220, 255, 0.3); }
.l-demo { background: radial-gradient(circle at 35% 35%, rgba(220, 225, 235, 0.6), rgba(185, 195, 215, 0.4)); border: 1px dashed rgba(200, 210, 230, 0.4); }
.l-blueprotect { background: radial-gradient(circle at 35% 35%, rgba(160, 200, 255, 0.7), rgba(80, 130, 220, 0.5)); }

/* polarized shimmer effect */
.polarized::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: repeating-linear-gradient(90deg,
        rgba(255, 255, 255, 0.0) 0px,
        rgba(255, 255, 255, 0.04) 1px,
        rgba(255, 255, 255, 0.0) 2px);
    pointer-events: none;
}

/* ── CARD TEXT ── */
.lens-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.3;
    margin-bottom: 5px;
}

.lens-desc {
    font-size: 11px;
    color: var(--muted);
    line-height: 1.5;
    margin-bottom: 8px;
}

.lens-price {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: var(--accent2);
    letter-spacing: 0.3px;
}

.lens-sku {
    font-size: 10px;
    color: rgba(120, 130, 155, 0.6);
    margin-top: 3px;
    letter-spacing: 0.5px;
}

/* ── PRICING VISIBILITY ── */
body.no-pricing .lens-price,
body.no-pricing #modal-price-prop,
body.no-pricing .category-label-price {
    display: none;
}

.lens-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 2px 7px;
    border-radius: 3px;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.lb-new {
    background: #1e3a20;
    color: #5fd45f;
}

.lb-pol {
    background: #1a2d40;
    color: #5ab0ff;
}

.lb-mir {
    background: #2a1e30;
    color: #c88cff;
}

/* ── MODAL OVERLAY ── */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(5, 7, 12, 0.85);
    backdrop-filter: blur(8px);
    z-index: 500;
    align-items: center;
    justify-content: center;
}

.modal-overlay.open {
    display: flex;
}

.modal {
    background: var(--surface);
    border: 1px solid rgba(74, 158, 255, 0.25);
    border-radius: 20px;
    padding: 40px;
    max-width: 460px;
    width: 90%;
    position: relative;
    animation: modalIn 0.25s ease;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.93) translateY(20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 18px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--muted);
    font-size: 22px;
    transition: color 0.2s;
}

.modal-close:hover {
    color: var(--text);
}

.modal-lens-visual {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin: 0 auto 24px;
}

.modal h3 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 26px;
    font-weight: 400;
    text-align: center;
    margin-bottom: 6px;
}

.modal-material {
    text-align: center;
    font-size: 12px;
    color: var(--muted);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 24px;
}

.modal-props {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.modal-prop {
    background: var(--surface2);
    border-radius: 10px;
    padding: 12px;
}

.modal-prop-label {
    font-size: 10px;
    color: var(--muted);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.modal-prop-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

.modal-features {
    background: var(--surface2);
    border-radius: 10px;
    padding: 14px 16px;
}

.modal-features ul {
    list-style: none;
    padding: 0;
}

.modal-features ul li {
    font-size: 13px;
    color: var(--muted);
    padding: 4px 0;
    padding-left: 16px;
    position: relative;
}

.modal-features ul li::before {
    content: '›';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-size: 14px;
}

/* ── FOOTER ── */
footer {
    border-top: 1px solid var(--border);
    padding: 28px 40px;
    text-align: center;
    font-size: 12px;
    color: var(--muted);
    letter-spacing: 0.5px;
}

footer a {
    color: var(--accent);
    text-decoration: none;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: #2a2e3a;
    border-radius: 3px;
}

@media (max-width: 640px) {

    header,
    main {
        padding-left: 20px;
        padding-right: 20px;
    }

    .filter-bar {
        padding: 0 16px;
    }

    .lens-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 12px;
    }
}
