:root {
    --black: #0a0a0b;
    --near-black: #131315;
    --charcoal: #1c1c1f;
    --gold: #c9a24b;
    --gold-light: #e8cc86;
    --gold-dim: #8a6f34;
    --white: #f7f6f3;
    --grey: #9a9a9f;
    --line: #2a2a2e;
    --radius: 10px;
    --max-width: 1240px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

/*
 * Site-wide fixed backdrop: one persistent athlete photo + dark gradient
 * pinned behind every public page. Content scrolls over it in normal flow;
 * cards/sections use translucent backgrounds (see .glass-panel) so the
 * backdrop reads through consistently from the homepage to the last page.
 * Pinning is dropped on small screens and for reduced-motion — a plain
 * static image there costs nothing extra and avoids known mobile jank
 * with fixed backgrounds.
 */
body {
    margin: 0;
    color: var(--white);
    font-family: "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    background-color: var(--black);
    background-image:
        linear-gradient(180deg, rgba(10,10,11,0.90) 0%, rgba(10,10,11,0.93) 45%, rgba(10,10,11,0.97) 100%),
        url('/public/assets/images/athletes/athlete-deadlift.webp');
    background-repeat: no-repeat;
    background-position: center 15%;
    background-size: cover;
    background-attachment: fixed;
}
@media (max-width: 900px), (prefers-reduced-motion: reduce) {
    body { background-attachment: scroll; }
}

#globalSystemCanvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: -2; /* Behind everything else but above body background */
    pointer-events: none;
    opacity: 0;
    transition: opacity 1.2s ease;
}
#globalSystemCanvas.loaded {
    opacity: 0.15;
}

/* Translucent "floating over the backdrop" surface used by cards/sections. */
.glass-panel {
    background: rgba(19,19,21,0.78);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}

img { max-width: 100%; display: block; }
a { color: inherit; }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }
@media (max-width: 640px) {
    .container { padding: 0 18px; }
}

.text-center { text-align: center; }
.gold-series-header { text-align: center; margin-bottom: 24px; }
.gold-series-header .section-subtitle { margin-left: auto; margin-right: auto; text-align: center; }
.filter-bar-center { justify-content: center; }

/* ---------- Header ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10,10,11,0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.site-logo { font-size: 20px; font-weight: 700; letter-spacing: 2px; text-decoration: none; display: inline-flex; align-items: center; }
.site-logo span { color: var(--gold-light); }
.site-logo-img { height: 34px; width: auto; display: block; }
.site-footer .site-logo-img { height: 30px; }
.site-nav { display: flex; gap: 32px; }
.site-nav a { text-decoration: none; font-size: 13px; letter-spacing: 1px; text-transform: uppercase; color: #d8d8d8; transition: color .2s; }
.site-nav a:hover, .site-nav a.active { color: var(--gold-light); }
.nav-toggle { display: none; background: none; border: none; color: var(--white); font-size: 24px; cursor: pointer; }

@media (max-width: 860px) {
    .site-nav { position: fixed; top: 76px; left: 0; right: 0; background: var(--near-black); flex-direction: column; padding: 20px 24px; gap: 18px; border-bottom: 1px solid var(--line); display: none; }
    .site-nav.open { display: flex; }
    .nav-toggle { display: block; }
}

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 50px 0 30px; margin-top: 80px; background: rgba(19,19,21,0.88); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; margin-bottom: 30px; }
.footer-grid h4 { color: var(--gold-light); font-size: 13px; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 14px; }
.footer-grid a { display: block; color: #b7b7bb; text-decoration: none; font-size: 14px; margin-bottom: 8px; }
.footer-grid a:hover { color: var(--gold-light); }
.footer-bottom { border-top: 1px solid var(--line); padding-top: 20px; font-size: 12px; color: #7c7c80; text-align: center; display: flex; flex-direction: column; gap: 8px; }
.footer-credit { display: flex; align-items: center; justify-content: center; gap: 6px; }
.social-icons-row { display: flex; gap: 12px; margin-top: 18px; }
.social-icon-link {
    display: inline-flex; align-items: center; justify-content: center;
    color: var(--gold-dim);
    transition: all .25s ease;
    text-decoration: none;
    padding: 0;
}
.social-icon-link svg {
    display: block;
    margin: auto;
}
.social-icon-link:hover { color: var(--gold-light); transform: translateY(-2px); }
.social-icon-instagram:hover {
    transform: translateY(-3px) scale(1.08);
    color: #e6683c !important;
}
.social-icon-facebook:hover {
    transform: translateY(-3px) scale(1.08);
    color: #1877f2 !important;
}
.social-icon-linkedin:hover {
    transform: translateY(-3px) scale(1.08);
    color: #0a66c2 !important;
}
.footer-credit .social-icon-link { width: 26px; height: 26px; }

/* ---------- Floating action buttons (contact / lab report) ---------- */
.floating-actions {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 90;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}
.floating-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-radius: 30px;
    background: rgba(19,19,21,0.92);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    border: 1px solid var(--gold-dim);
    color: var(--white);
    text-decoration: none;
    font-size: 13px;
    letter-spacing: 0.3px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
    transition: transform .2s, border-color .2s;
}
.floating-action-btn:hover { transform: translateY(-2px); border-color: var(--gold); }
.floating-action-btn-gold { background: var(--gold); color: #14100a; border-color: var(--gold); font-weight: 600; }
.floating-action-btn span { white-space: nowrap; }
@media (max-width: 640px) {
    .floating-actions { right: 14px; bottom: 14px; }
    .floating-action-btn span { display: none; }
    .floating-action-btn { padding: 12px; }
}
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Generic layout ---------- */
.page-hero { position: relative; padding: 60px 0 40px; border-bottom: 1px solid var(--line); overflow: hidden; }
.page-hero-accent {
    position: absolute;
    right: -60px;
    top: 50%;
    transform: translateY(-50%);
    width: 420px;
    height: 420px;
    max-width: 50%;
    opacity: 0;
    transition: opacity 1.4s ease;
    pointer-events: none;
}
.page-hero-accent.loaded { opacity: 0.7; }
@media (max-width: 800px) { .page-hero-accent { display: none; } }
.page-hero h1 { font-size: 34px; margin: 0 0 8px; letter-spacing: 0.5px; }
.page-hero p { color: var(--grey); max-width: 600px; }
.product-hero-strip { padding: 22px 0; }
.btn-small { padding: 8px 16px; font-size: 11px; }
.section { padding: 60px 0; }
.section-title { font-size: 26px; margin-bottom: 8px; }
.section-subtitle { color: var(--grey); margin-bottom: 32px; max-width: 620px; }
.eyebrow { color: var(--gold-light); font-size: 12px; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 10px; }

.btn { display: inline-block; padding: 13px 26px; border-radius: 4px; text-decoration: none; font-size: 13px; letter-spacing: 1px; text-transform: uppercase; cursor: pointer; border: 1px solid var(--gold); font-family: inherit; }
.btn-gold { background: var(--gold); color: #14100a; font-weight: 700; }
.btn-gold:hover { background: var(--gold-light); }
.btn-outline { background: transparent; color: var(--white); }
.btn-outline:hover { border-color: var(--gold-light); color: var(--gold-light); }

/* ---------- Product grid ---------- */
.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 34px; }
.filter-bar a, .filter-bar button { padding: 8px 16px; border: 1px solid var(--line); border-radius: 20px; text-decoration: none; font-size: 13px; color: var(--grey); background: transparent; font-family: inherit; cursor: pointer; }
.filter-bar a.active, .filter-bar a:hover, .filter-bar button.active, .filter-bar button:hover { border-color: var(--gold); color: var(--gold-light); }

.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 26px; }

/* Homepage product section only (products.php keeps the plain grid above) —
   a responsive horizontal sliding strip instead of a fixed grid. */
#homeProductGrid {
    display: flex;
    grid-template-columns: none;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 26px;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
}
#homeProductGrid .product-card {
    scroll-snap-align: start;
    flex: 0 0 260px;
}
@media (max-width: 640px) {
    #homeProductGrid .product-card { flex: 0 0 220px; }
}
.product-card { background: rgba(19,19,21,0.78); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); border: 1px solid var(--line); border-top: 2px solid var(--gold-dim); border-radius: var(--radius); overflow: hidden; text-decoration: none; transition: border-color .2s, transform .2s; display: block; }
.product-card:hover { border-color: var(--gold-dim); transform: translateY(-3px); }
.product-card .thumb { aspect-ratio: 1/1; background: #0d0d0e; overflow: hidden; padding: 18px; }
.product-card .thumb img { width: 100%; height: 100%; object-fit: contain; }
.product-card .body { padding: 16px 18px 20px; }
.product-card .category { font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: var(--gold-light); margin-bottom: 6px; }
.product-card h3 { font-size: 16px; margin: 0 0 6px; }
.product-card p { font-size: 13px; color: var(--grey); margin: 0; }
.featured-tag { display: inline-block; margin-top: 10px; font-size: 11px; color: var(--gold-light); border: 1px solid var(--gold-dim); padding: 2px 8px; border-radius: 10px; }
.empty-state { color: var(--grey); padding: 60px 0; text-align: center; }

/* ---------- Product detail ---------- */
.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; padding: 50px 0; align-items: start; }
.product-gallery { position: sticky; top: 96px; }
@media (max-width: 900px) {
    .product-detail { grid-template-columns: 1fr; }
    .product-gallery { position: static; }
}

.gallery-main { aspect-ratio: 1/1; background: var(--near-black); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); margin-bottom: 14px; padding: 28px; }
.gallery-main img { width: 100%; height: 100%; object-fit: contain; }
.gallery-thumbs { display: flex; gap: 10px; flex-wrap: wrap; }
.gallery-thumbs img { width: 68px; height: 68px; object-fit: contain; background: var(--near-black); padding: 6px; border-radius: 6px; border: 1px solid var(--line); cursor: pointer; opacity: 0.65; }
.gallery-thumbs img.active, .gallery-thumbs img:hover { opacity: 1; border-color: var(--gold); }

.product-info .category { color: var(--gold-light); font-size: 12px; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 10px; }
.product-info h1 { font-size: 32px; margin: 0 0 14px; }
.product-info .short-desc { color: var(--grey); margin-bottom: 24px; }

.option-group { margin-bottom: 20px; }
.option-group label { display: block; font-size: 12px; letter-spacing: 1px; text-transform: uppercase; color: var(--grey); margin-bottom: 8px; }
.option-pill { display: inline-block; padding: 7px 16px; border: 1px solid var(--line); border-radius: 20px; margin: 0 8px 8px 0; font-size: 13px; }

.spec-table { width: 100%; border-collapse: collapse; margin: 14px 0; }
.spec-table td { padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.spec-table td:last-child { text-align: right; color: var(--gold-light); font-weight: 600; }

.tabs { margin-top: 40px; border-top: 1px solid var(--line); padding-top: 30px; }
.tab-block { margin-bottom: 28px; }
.tab-block h3 { color: var(--gold-light); font-size: 15px; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 10px; }
.tab-block p, .tab-block div { color: #c9c9cc; font-size: 14px; white-space: pre-line; }

.lab-link { display: inline-block; margin-top: 20px; padding: 10px 18px; background: var(--charcoal); border: 1px solid var(--gold-dim); border-radius: 6px; text-decoration: none; font-size: 13px; color: var(--gold-light); }

/* ---------- Lab Report two-column interface ---------- */
.lab-report-columns { display: grid; grid-template-columns: 280px 1fr; gap: 30px; align-items: start; margin-bottom: 40px; }
.lab-column-title { font-size: 12px; letter-spacing: 2px; text-transform: uppercase; color: var(--gold-light); margin: 0 0 16px; }
.lab-product-list { background: rgba(19,19,21,0.78); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); border: 1px solid var(--line); border-top: 2px solid var(--gold-dim); border-radius: var(--radius); padding: 20px; }
.lab-product-buttons { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.lab-product-btn {
    width: 100%; text-align: left; padding: 12px 14px; border-radius: 6px;
    background: transparent; border: 1px solid var(--line); color: var(--grey);
    font-family: inherit; font-size: 14px; cursor: pointer; transition: border-color .2s, color .2s, box-shadow .2s;
}
.lab-product-btn:hover { color: var(--white); border-color: var(--gold-dim); }
.lab-product-btn.active {
    border-color: var(--gold); color: var(--gold-light); font-weight: 600;
    box-shadow: 0 0 14px rgba(201,162,75,0.25);
}
/* ---------- Lab Report 2-Dropdown Certificate Lookup (Exact Card UI) ---------- */
.batch-lookup-card {
    background: rgba(19, 19, 21, 0.85);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 34px 38px;
    max-width: 820px;
    margin: 0 auto;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

.batch-lookup-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 24px;
}

.batch-lookup-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6366f1;
    margin-top: 3px;
    flex-shrink: 0;
}

.batch-lookup-title {
    font-size: 21px;
    font-weight: 700;
    color: var(--white);
    margin: 0 0 6px 0;
    letter-spacing: -0.2px;
}

.batch-lookup-subtitle {
    font-size: 13.5px;
    color: #9a9a9f;
    margin: 0;
    line-height: 1.5;
}

.batch-lookup-controls {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
}

.batch-select-wrap {
    position: relative;
    display: inline-block;
    min-width: 230px;
    flex: 1;
}

.batch-select {
    width: 100%;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 12px;
    padding: 13px 40px 13px 18px;
    color: #e4e4e7;
    font-size: 14px;
    font-family: inherit;
    font-weight: 500;
    cursor: pointer;
    transition: border-color .2s, background-color .2s, box-shadow .2s;
}

.batch-select:hover:not(:disabled) {
    border-color: rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.07);
}

.batch-select:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.22);
}

.batch-select:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    background: rgba(255, 255, 255, 0.02);
    border-color: rgba(255, 255, 255, 0.07);
    color: #71717a;
}

.batch-select option {
    background-color: #1a1a1e;
    color: #f4f4f5;
    padding: 8px 12px;
}

.select-chevron {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #a1a1aa;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 640px) {
    .batch-lookup-card {
        padding: 24px 20px;
        border-radius: 16px;
    }
    .batch-lookup-controls {
        flex-direction: column;
        align-items: stretch;
    }
    .batch-select-wrap {
        width: 100%;
        min-width: 100%;
    }
}

.lab-batch-list { min-height: 200px; }
.lab-batch-card {
    background: rgba(19,19,21,0.78); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
    border: 1px solid var(--line); border-top: 2px solid var(--gold-dim); border-radius: var(--radius);
    padding: 24px; margin-bottom: 16px;
}
.lab-batch-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; gap: 10px; flex-wrap: wrap; }
.lab-batch-number { font-size: 15px; font-weight: 700; letter-spacing: 0.5px; }
.lab-batch-card-action { margin-top: 12px; }
.lab-manual-search { max-width: 760px; margin: 40px auto 0; padding-top: 24px; border-top: 1px solid var(--line); }

/* ---------- Forms (contact, lab lookup, admin) ---------- */
.form-card { background: rgba(19,19,21,0.82); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); border: 1px solid var(--line); border-top: 2px solid var(--gold-dim); border-radius: var(--radius); padding: 32px; max-width: 680px; margin-left: auto; margin-right: auto; }
.form-field { margin-bottom: 18px; }
.form-field label { display: block; font-size: 13px; margin-bottom: 6px; color: var(--grey); }
.form-field input, .form-field textarea, .form-field select {
    width: 100%; padding: 12px 14px; background: var(--charcoal); border: 1px solid var(--line);
    border-radius: 6px; color: var(--white); font-family: inherit; font-size: 14px;
}
.form-field textarea { min-height: 120px; resize: vertical; }
.hint { font-size: 12px; color: var(--grey); }
.alert { padding: 14px 18px; border-radius: 6px; margin-bottom: 20px; font-size: 14px; }
.alert-success { background: rgba(30,126,52,0.15); border: 1px solid #1e7e34; color: #7ed49a; }
.alert-error { background: rgba(179,38,30,0.15); border: 1px solid #b3261e; color: #f2a49e; }

@media (max-width: 640px) {
    .form-card { padding: 22px 18px; }
    .lab-batch-card { padding: 18px 16px; }
}

/* ---------- Blog ---------- */
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 30px; }
.blog-card { text-decoration: none; display: block; border: 1px solid var(--line); border-top: 2px solid var(--gold-dim); border-radius: var(--radius); overflow: hidden; background: rgba(19,19,21,0.78); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.blog-card .thumb { aspect-ratio: 16/9; background: #0d0d0e; overflow: hidden; padding: 10px; }
.blog-card .thumb img { width: 100%; height: 100%; object-fit: contain; }
.blog-card .body { padding: 18px 20px; }
.blog-card .meta { font-size: 11px; color: var(--gold-light); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px; }
.blog-card h3 { font-size: 17px; margin: 0 0 8px; }
.blog-card p { color: var(--grey); font-size: 13px; margin: 0; }
.blog-post-body { max-width: 760px; margin: 0 auto; font-size: 16px; color: #d8d8d8; }
.blog-post-body img { border-radius: var(--radius); margin: 20px 0; }

/* Utility */
.reduced-motion-hidden { display: none; }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
}
