/* === DESIGN TOKENS === */
:root {
    --color-bg: #0a0a0a;
    --color-bg-alt: #1a1a1a;
    --color-accent: #c4956a;
    --color-text: #e8d5c4;
    --color-text-muted: #999;
    --color-border: #333;
    --color-success: #2a5a2a;
    --color-success-text: #7cba7c;
    --color-error: #d63638;
    --font-heading: 'Georgia', 'Times New Roman', serif;
    --font-body: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    --container-max: 1200px;
    --spacing: 24px;
}

/* === RESET & BASE === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font-body); background: var(--color-bg); color: var(--color-text); line-height: 1.6; overflow-x: hidden; }
html { overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* === CONTAINER === */
.container { max-width: var(--container-max); margin: 0 auto; padding: 0 var(--spacing); }

/* === UTILITY BAR === */
.utility-bar { background: var(--color-bg-alt); padding: 8px 0; font-size: 13px; }
.utility-bar .container { display: flex; justify-content: space-between; align-items: center; }
.utility-email { color: var(--color-text-muted); }
.utility-social { display: flex; gap: 12px; }
.utility-social a { color: var(--color-text-muted); transition: color 0.2s; }
.utility-social a:hover { color: var(--color-accent); text-decoration: none; }

/* === MAIN NAV === */
.main-nav { background: var(--color-bg); border-bottom: 1px solid var(--color-border); padding: 16px 0; }
.main-nav .container { display: flex; justify-content: space-between; align-items: center; }
.site-logo { display: flex; align-items: center; }
.site-logo img { max-height: 55px; width: auto; filter: brightness(0) invert(1); }
.site-title { font-family: var(--font-heading); font-size: 24px; color: var(--color-text); }
.nav-menu { list-style: none; display: flex; gap: 32px; }
.nav-menu li a { color: var(--color-text); font-size: 14px; text-transform: uppercase; letter-spacing: 1px; transition: color 0.2s; }
.nav-menu li a:hover, .nav-menu li.current-menu-item a { color: var(--color-accent); text-decoration: none; }

/* === HAMBURGER (hidden on desktop) === */
.hamburger { display: none; background: none; border: none; cursor: pointer; padding: 4px; }
.hamburger span { display: block; width: 24px; height: 2px; background: var(--color-text); margin: 5px 0; transition: 0.3s; }

/* === MOBILE NAV OVERLAY === */
.nav-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 999; }
body.nav-open .nav-overlay { display: block; }

/* === FOOTER === */
.site-footer { background: var(--color-bg-alt); padding: 48px 0 0; margin-top: 64px; }
.footer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.footer-col strong { color: var(--color-text); display: block; margin-bottom: 8px; }
.footer-col, .footer-col p, .footer-col a { color: var(--color-text-muted); font-size: 14px; }
.footer-menu { list-style: none; }
.footer-menu li { margin-bottom: 4px; }
.footer-social a { display: block; margin-bottom: 4px; }
.footer-bottom { border-top: 1px solid var(--color-border); margin-top: 32px; padding: 16px 0; text-align: center; font-size: 12px; color: var(--color-text-muted); }


/* === BUTTONS === */
.btn { display: inline-block; padding: 12px 28px; font-size: 14px; font-weight: 600; border-radius: 4px; cursor: pointer; transition: all 0.2s; text-decoration: none; border: none; }
.btn-primary { background: var(--color-accent); color: var(--color-bg); }
.btn-primary:hover { background: #d4a57a; text-decoration: none; }
.btn-outline { border: 2px solid var(--color-accent); color: var(--color-accent); background: transparent; }
.btn-outline:hover { background: var(--color-accent); color: var(--color-bg); text-decoration: none; }
.btn-dark { background: var(--color-bg); color: var(--color-accent); }
.btn-dark:hover { background: #111; text-decoration: none; }

/* === HERO === */
.hero { background-size: cover; background-position: center center; background-repeat: no-repeat; background-color: #1a1208; min-height: 500px; display: flex; align-items: center; }
.hero-overlay { width: 100%; background: rgba(0,0,0,0.6); padding: 80px 0; }
.hero-content { text-align: center; }
.hero-subtitle { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: 3px; color: var(--color-accent); margin-bottom: 12px; }
.hero-title { font-family: var(--font-heading); font-size: 48px; margin-bottom: 12px; }
.hero-desc { font-size: 16px; color: var(--color-text-muted); margin-bottom: 24px; }

/* === SECTION HEADINGS === */
.section-title { font-family: var(--font-heading); font-size: 28px; text-align: center; margin-bottom: 4px; }
.section-subtitle, .page-subtitle { text-align: center; color: var(--color-text-muted); font-size: 14px; margin-bottom: 32px; }
.page-title { font-family: var(--font-heading); font-size: 32px; text-align: center; margin-bottom: 4px; padding-top: 48px; }
.section-cta { text-align: center; margin-top: 32px; }

/* === GUITAR GRID === */
.guitar-grid { display: grid; gap: 24px; }
.guitar-grid-3 { grid-template-columns: repeat(3, 1fr); }
.guitar-grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .guitar-grid-3, .guitar-grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 550px) { .guitar-grid-3, .guitar-grid-4 { grid-template-columns: 1fr; } }

/* === GUITAR CARD === */
.guitar-card { border: 1px solid var(--color-border); border-radius: 8px; overflow: hidden; background: var(--color-bg-alt); transition: transform 0.2s, box-shadow 0.2s; }
.guitar-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,0.3); }
.guitar-card-link { display: block; color: inherit; text-decoration: none; }
.guitar-card-image { position: relative; aspect-ratio: 1; overflow: hidden; }
.guitar-card-image img { width: 100%; height: 100%; object-fit: cover; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 12px; font-size: 11px; font-weight: 600; }
.guitar-card-image .badge-available { position: absolute; top: 10px; left: 10px; }
.badge-available { background: var(--color-success); color: var(--color-success-text); }
.badge-sold { background: #444; color: #999; }
.guitar-card-body { padding: 16px; }
.guitar-card-title { font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.guitar-card-specs { font-size: 13px; color: var(--color-text-muted); margin-bottom: 8px; }
.guitar-card-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; }
.guitar-card-price { font-size: 20px; font-weight: 700; color: var(--color-accent); }
.guitar-card-cta { font-size: 12px; color: var(--color-accent); }

/* === FEATURED SECTION === */
.section-featured { padding: 64px 0; }

/* === ABOUT + VIDEO SECTION === */
.section-about-video { padding: 64px 0; background: var(--color-bg-alt); }
.about-video-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.about-teaser h2 { font-family: var(--font-heading); font-size: 24px; margin-bottom: 12px; }
.about-teaser p { color: var(--color-text-muted); margin-bottom: 12px; }
.text-link { color: var(--color-accent); font-weight: 600; }
.video-responsive { position: relative; padding-bottom: 56.25%; height: 0; border-radius: 8px; overflow: hidden; }
.video-responsive iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }

/* === CTA BANNER === */
.section-cta-banner { background: var(--color-accent); padding: 48px 0; text-align: center; }
.section-cta-banner h2 { font-family: var(--font-heading); color: var(--color-bg); font-size: 28px; margin-bottom: 8px; }
.section-cta-banner p { color: #2c1810; margin-bottom: 20px; }

/* === TAG FILTER === */
.tag-filter { display: flex; gap: 8px; justify-content: center; margin-bottom: 32px; flex-wrap: wrap; }
.tag-pill { display: inline-block; padding: 6px 16px; border-radius: 20px; font-size: 13px; background: var(--color-bg-alt); color: var(--color-text-muted); transition: all 0.2s; text-decoration: none; }
.tag-pill:hover, .tag-pill.active { background: var(--color-accent); color: var(--color-bg); text-decoration: none; }

/* === ARCHIVE PAGE === */
.section-archive { padding: 0 0 64px; }
.pagination { text-align: center; margin-top: 48px; }
.pagination .nav-links a, .pagination .nav-links span { display: inline-block; padding: 8px 16px; margin: 0 2px; border-radius: 4px; font-size: 14px; }
.pagination .nav-links a { background: var(--color-bg-alt); color: var(--color-text-muted); }
.pagination .nav-links a:hover { background: var(--color-accent); color: var(--color-bg); text-decoration: none; }
.pagination .nav-links .current { background: var(--color-accent); color: var(--color-bg); }
.no-results { text-align: center; padding: 64px 0; color: var(--color-text-muted); }

/* === SINGLE GUITAR DETAIL === */
.section-single-guitar { padding: 32px 0 64px; }
.back-link { display: inline-block; color: var(--color-text-muted); font-size: 14px; margin-bottom: 24px; }
.back-link:hover { color: var(--color-accent); }
.guitar-detail-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; }

/* === GUITAR GALLERY === */
.gallery-main { margin-bottom: 12px; border-radius: 8px; overflow: hidden; cursor: pointer; }
.gallery-main-img { width: 100%; object-fit: contain; max-height: 700px; }
.gallery-thumbs { display: flex; gap: 8px; }
.gallery-thumb { border: 2px solid transparent; border-radius: 4px; overflow: hidden; cursor: pointer; background: none; padding: 0; width: 80px; height: 80px; }
.gallery-thumb.active { border-color: var(--color-accent); }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* === GUITAR DETAIL INFO === */
.guitar-detail-title { font-family: var(--font-heading); font-size: 28px; margin: 8px 0 4px; }
.guitar-detail-price { font-size: 24px; font-weight: 700; color: var(--color-accent); margin-bottom: 20px; }
.guitar-specs { border-top: 1px solid var(--color-border); padding-top: 16px; margin-bottom: 20px; }
.specs-heading { font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: var(--color-text-muted); margin-bottom: 12px; }
.specs-list { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; }
.specs-list dt { color: var(--color-text-muted); font-size: 14px; }
.specs-list dd { font-size: 14px; }
.guitar-description { border-top: 1px solid var(--color-border); padding-top: 16px; margin-bottom: 20px; }
.guitar-description h3 { font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: var(--color-text-muted); margin-bottom: 8px; }
.guitar-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 20px; }
.guitar-video { border-top: 1px solid var(--color-border); padding-top: 16px; margin-bottom: 20px; }
.video-embed { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; border-radius: 8px; }
.video-embed iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }

/* === INQUIRY FORM === */
.inquiry-section { margin-top: 24px; }
.waldrop-form-wrap { background: rgba(42, 90, 42, 0.1); border: 1px solid var(--color-success); border-radius: 8px; padding: 24px; }
.waldrop-form-wrap h3 { font-size: 18px; color: var(--color-success-text); margin-bottom: 16px; }
.waldrop-form-field { margin-bottom: 12px; }
.waldrop-form-field label { display: block; font-size: 13px; margin-bottom: 4px; color: var(--color-text-muted); }
.waldrop-form-field label span { color: var(--color-accent); }
.waldrop-form-field input, .waldrop-form-field textarea { width: 100%; padding: 10px 12px; background: var(--color-bg); border: 1px solid var(--color-border); border-radius: 4px; color: var(--color-text); font-size: 14px; font-family: var(--font-body); }
.waldrop-form-field input:focus, .waldrop-form-field textarea:focus { outline: none; border-color: var(--color-accent); }
.waldrop-field-error { display: block; color: var(--color-error); font-size: 12px; margin-top: 4px; min-height: 16px; }
.waldrop-submit { width: 100%; padding: 12px; background: var(--color-accent); color: var(--color-bg); border: none; border-radius: 4px; font-size: 15px; font-weight: 600; cursor: pointer; transition: background 0.2s; }
.waldrop-submit:hover { background: #d4a57a; }
.waldrop-submit:disabled { opacity: 0.6; cursor: not-allowed; }
.waldrop-form-message { margin-top: 12px; padding: 10px; border-radius: 4px; font-size: 14px; text-align: center; }
.waldrop-form-message.success { background: rgba(42, 90, 42, 0.2); color: var(--color-success-text); }
.waldrop-form-message.error { background: rgba(214, 54, 56, 0.1); color: var(--color-error); }
.waldrop-form-message:empty { display: none; }

/* === GALLERY PAGE === */
.section-gallery { padding: 0 0 64px; }
.gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.gallery-item { position: relative; aspect-ratio: 1; overflow: hidden; border-radius: 4px; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.gallery-item:hover img { transform: scale(1.05); }
.gallery-caption { position: absolute; bottom: 0; left: 0; right: 0; background: rgba(0,0,0,0.7); padding: 6px 10px; font-size: 12px; color: var(--color-text-muted); }
.gallery-lightbox-trigger { display: block; text-decoration: none; }
@media (max-width: 900px) { .gallery-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 550px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); } }

/* === LIGHTBOX === */
.lightbox-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.95); z-index: 9999; display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity 0.2s; pointer-events: none; }
.lightbox-overlay.active { opacity: 1; pointer-events: all; }
.lightbox-img { max-width: 90vw; max-height: 90vh; object-fit: contain; }
.lightbox-close { position: absolute; top: 20px; right: 20px; background: none; border: none; color: #fff; font-size: 32px; cursor: pointer; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; }
.lightbox-prev, .lightbox-next { position: absolute; top: 50%; transform: translateY(-50%); background: none; border: none; color: #fff; font-size: 36px; cursor: pointer; padding: 20px; }
.lightbox-prev { left: 10px; }
.lightbox-next { right: 10px; }
.lightbox-prev:hover, .lightbox-next:hover, .lightbox-close:hover { color: var(--color-accent); }

/* === PAGE CONTENT === */
.section-page { padding: 0 0 64px; }
.page-content { max-width: 800px; margin: 0 auto; line-height: 1.8; }
.page-content p { margin-bottom: 16px; }
.section-404 { text-align: center; padding-top: 64px; }

/* === GENERAL === */
section { padding-bottom: 0; }

/* ==========================================================================
   MOBILE — must be LAST to override desktop rules
   ========================================================================== */
@media (max-width: 768px) {
    /* Nav */
    .hamburger { display: block; z-index: 1001; }
    .nav-menu {
        display: none; position: fixed; top: 0; right: 0; bottom: 0; width: 280px;
        background: var(--color-bg-alt); flex-direction: column;
        padding: 80px 32px 32px; gap: 0; z-index: 1000;
        box-shadow: -4px 0 24px rgba(0,0,0,0.4);
        overflow-y: auto;
    }
    .nav-menu li { border-bottom: 1px solid var(--color-border); }
    .nav-menu li a { display: block; padding: 16px 0; font-size: 16px; }
    body.nav-open .nav-menu { display: flex; }
    body.nav-open .hamburger span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
    body.nav-open .hamburger span:nth-child(2) { opacity: 0; }
    body.nav-open .hamburger span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

    /* Utility bar */
    .utility-bar .container { flex-wrap: wrap; justify-content: center; gap: 8px; }
    .utility-email { font-size: 12px; }
    .utility-social { display: none; }

    /* Logo */
    .site-logo img { max-height: 42px; }

    /* Container */
    .container { padding: 0 16px; }

    /* Hero */
    .hero { min-height: 350px; }
    .hero-title { font-size: 28px; }
    .hero-desc { font-size: 14px; }
    .hero-overlay { padding: 48px 0; }

    /* Section headings */
    .section-title { font-size: 22px; }
    .page-title { font-size: 26px; padding-top: 32px; }

    /* Guitar detail page */
    .guitar-detail-grid { grid-template-columns: 1fr !important; gap: 24px !important; }
    .guitar-detail-title { font-size: 22px; }
    .guitar-detail-price { font-size: 20px; }
    .section-single-guitar { padding: 20px 0 40px; }
    .back-link { margin-bottom: 16px; }

    /* Gallery — constrain to viewport */
    .guitar-detail-gallery { max-width: 100%; overflow: hidden; }
    .gallery-main { margin-bottom: 8px; }
    .gallery-main-img { max-height: 450px; width: 100%; object-fit: contain; }

    /* Gallery thumbs — horizontal scroll */
    .gallery-thumbs { overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; flex-wrap: nowrap; }
    .gallery-thumb { flex-shrink: 0; width: 64px; height: 64px; }

    /* Specs */
    .specs-list { gap: 4px 12px; }

    /* Description */
    .guitar-description p { font-size: 14px; word-wrap: break-word; overflow-wrap: break-word; }

    /* About + Video grid */
    .about-video-grid { grid-template-columns: 1fr !important; gap: 24px !important; }

    /* CTA banner */
    .section-cta-banner { padding: 32px 0; }
    .section-cta-banner h2 { font-size: 22px; }

    /* Footer */
    .footer-grid { grid-template-columns: 1fr !important; gap: 24px; text-align: center; }
    .site-footer { margin-top: 32px; padding: 32px 0 0; }

    /* Forms */
    .waldrop-form-wrap { padding: 16px; }
    .waldrop-form-wrap h3 { font-size: 16px; }

    /* Featured section */
    .section-featured { padding: 40px 0; }

    /* Guitar grid */
    .guitar-grid-3, .guitar-grid-4 { grid-template-columns: 1fr !important; }

    /* Gallery page */
    .gallery-grid { grid-template-columns: repeat(2, 1fr) !important; }

    /* Lightbox */
    .lightbox-prev { left: 4px; padding: 12px; font-size: 28px; }
    .lightbox-next { right: 4px; padding: 12px; font-size: 28px; }
    .lightbox-close { top: 10px; right: 10px; }
}
