/* ========== Reset & Base ========== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --color-bg: #faf8f5;
    --color-text: #2c2c2c;
    --color-text-light: #6b6b6b;
    --color-accent: #b8860b;
    --color-accent-hover: #9a7209;
    --color-dark: #1a1a1a;
    --color-card: #ffffff;
    --color-border: #e8e4df;
    --color-sold: #dc3545;
    --color-acoustic: #2e7d32;
    --color-electric: #1565c0;
    --color-acoustic-electric: #7b1fa2;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.15);
    --radius: 8px;
    --max-width: 1200px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif;
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ========== Hero ========== */
.hero {
    position: relative;
    background-image: url('../images/about/hero-bg.png');
    background-color: #1a0f05;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: #fff;
    text-align: left;
    padding: 5rem 1.5rem 4.5rem;
    min-height: 400px;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-overlay {
    display: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: var(--max-width);
    margin: 0 auto;
    width: 100%;
}

@media (max-width: 768px) {
    .hero {
        text-align: center;
        background-size: cover;
        background-position: center top;
        min-height: 280px;
    }
    .hero-overlay {
        background: rgba(10, 5, 0, 0.7);
    }
}

@media (min-width: 2560px) {
    .hero {
        background-size: 100% auto;
        background-position: center top;
    }
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 0.5rem;
    color: #f5e6c8;
}

.tagline {
    font-size: 1.1rem;
    color: #c8b99a;
    margin-bottom: 1.5rem;
    font-weight: 300;
}

.contact-btn {
    display: inline-block;
    background: var(--color-accent);
    color: #fff;
    text-decoration: none;
    padding: 0.75rem 2rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 1rem;
    transition: background 0.2s, transform 0.2s;
    border: none;
    cursor: pointer;
}

.contact-btn:hover {
    background: var(--color-accent-hover);
    transform: translateY(-1px);
}

/* ========== About Section ========== */
.about {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 3rem 1.5rem 2rem;
}

.about-content {
    display: flex;
    gap: 2.5rem;
    align-items: flex-start;
    margin-bottom: 2rem;
}

.about-portrait {
    flex-shrink: 0;
    width: 220px;
}

.about-portrait img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
}

.portrait-caption {
    text-align: center;
    font-size: 0.85rem;
    color: #9a9389;
    margin-top: 0.5rem;
    font-style: italic;
}

.about-text h2 {
    font-size: 1.6rem;
    color: var(--color-text);
    margin-bottom: 0.75rem;
    font-weight: 700;
}

.about-text p {
    color: var(--color-text-light);
    margin-bottom: 0.75rem;
    line-height: 1.7;
    font-size: 1rem;
}

.about-gallery {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.about-gallery img {
    width: 260px;
    height: 180px;
    object-fit: cover;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
}

/* Placeholder styles — remove these once real photos are added */
.placeholder-photo {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e8e4df 0%, #d5cfc6 100%);
    color: #9a9389;
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
    width: 100%;
    height: 100%;
    border-radius: var(--radius);
}

.gallery-ph {
    width: 260px;
    height: 180px;
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
}

@media (max-width: 768px) {
    .about-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .about-portrait {
        width: 180px;
        height: 230px;
    }
    .about-gallery {
        gap: 0.75rem;
    }
    .gallery-ph, .about-gallery img {
        width: 200px;
        height: 140px;
    }
}

/* ========== Filters ========== */
.filters {
    background: var(--color-card);
    border-bottom: 1px solid var(--color-border);
    padding: 1rem 1.5rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.filter-bar {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-buttons {
    display: flex;
    gap: 0.5rem;
}

.filter-btn {
    background: transparent;
    border: 1.5px solid var(--color-border);
    padding: 0.5rem 1.25rem;
    border-radius: 100px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-text-light);
    transition: all 0.2s;
}

.filter-btn:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

.filter-btn.active {
    background: var(--color-accent);
    color: #fff;
    border-color: var(--color-accent);
}

.count {
    font-size: 0.8em;
    opacity: 0.8;
}

.search-wrap {
    flex: 1;
    min-width: 180px;
}

.search-wrap input {
    width: 100%;
    padding: 0.5rem 1rem;
    border: 1.5px solid var(--color-border);
    border-radius: 100px;
    font-size: 0.9rem;
    background: var(--color-bg);
    color: var(--color-text);
    outline: none;
    transition: border-color 0.2s;
}

.search-wrap input:focus {
    border-color: var(--color-accent);
}

.availability-toggle {
    font-size: 0.9rem;
    color: var(--color-text-light);
    white-space: nowrap;
}

.availability-toggle input {
    margin-right: 0.3rem;
    accent-color: var(--color-accent);
}

/* ========== Guitar Grid ========== */
main {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.guitar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

/* ========== Guitar Card ========== */
.guitar-card {
    background: var(--color-card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
}

.guitar-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.card-img-wrap {
    position: relative;
    width: 100%;
    padding-top: 210%; /* ~1:2.1 portrait aspect to fit full guitar photos */
    overflow: hidden;
    background: #f0ebe3;
}

.card-img-wrap img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.guitar-card:hover .card-img-wrap img {
    transform: scale(1.03);
}

.sold-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--color-sold);
    color: #fff;
    padding: 0.25rem 0.75rem;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sold-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.35);
}

.card-body {
    padding: 1rem 1.25rem 1.25rem;
}

.card-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.4rem;
}

.type-badge {
    display: inline-block;
    padding: 0.15rem 0.6rem;
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.type-badge.acoustic {
    background: #e8f5e9;
    color: var(--color-acoustic);
}

.type-badge.electric {
    background: #e3f2fd;
    color: var(--color-electric);
}

.type-badge.acoustic-electric {
    background: #f3e5f5;
    color: var(--color-acoustic-electric);
}

.card-price {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--color-accent);
}

.card-body h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
    line-height: 1.3;
}

.card-desc {
    font-size: 0.85rem;
    color: var(--color-text-light);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.no-results {
    text-align: center;
    padding: 3rem;
    color: var(--color-text-light);
    font-size: 1.1rem;
}

/* ========== Lightbox ========== */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox[hidden] {
    display: none;
}

.lightbox-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.8);
}

.lightbox-content {
    position: relative;
    background: var(--color-card);
    border-radius: var(--radius);
    max-width: 900px;
    width: 92%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.lightbox-close {
    position: absolute;
    top: 0.75rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--color-text-light);
    z-index: 10;
    line-height: 1;
    transition: color 0.2s;
}

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

.lightbox-body {
    display: flex;
    flex-direction: column;
}

.lightbox-gallery {
    position: relative;
    width: 100%;
    padding-top: 66%;
    background: #f0ebe3;
}

.lightbox-gallery img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #f0ebe3;
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.9);
    border: none;
    font-size: 1.8rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    color: var(--color-text);
    box-shadow: var(--shadow-sm);
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: #fff;
}

.lightbox-prev { left: 0.75rem; }
.lightbox-next { right: 0.75rem; }

.lightbox-dots {
    position: absolute;
    bottom: 0.75rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.4rem;
}

.lightbox-dots .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: background 0.2s;
}

.lightbox-dots .dot.active {
    background: #fff;
}

.lightbox-info {
    padding: 1.5rem 2rem 2rem;
}

.lightbox-info h2 {
    font-size: 1.4rem;
    margin: 0.5rem 0 0.25rem;
}

.lightbox-price {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--color-accent);
    margin-bottom: 0.75rem;
}

.lightbox-desc {
    color: var(--color-text-light);
    margin-bottom: 1.25rem;
    line-height: 1.6;
}

/* ========== Footer ========== */
footer {
    background: var(--color-dark);
    color: #c8b99a;
    text-align: center;
    padding: 2.5rem 1.5rem;
    margin-top: 2rem;
}

.footer-content p {
    margin-bottom: 0.5rem;
}

.footer-content strong {
    color: #f5e6c8;
}

.contact-link {
    color: var(--color-accent);
    text-decoration: none;
    font-size: 1.15rem;
    font-weight: 600;
}

.contact-link:hover {
    text-decoration: underline;
}

.footer-note {
    font-size: 0.85rem;
    color: #8a7d6b;
    margin-top: 0.75rem;
}

/* ========== Responsive ========== */
@media (max-width: 768px) {
    .hero { padding: 2.5rem 1rem 2rem; }
    .filter-bar { flex-direction: column; align-items: stretch; }
    .filter-buttons { justify-content: center; }
    .guitar-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
    .lightbox-content { width: 96%; }
    .lightbox-info { padding: 1rem 1.25rem 1.5rem; }
}

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

/* ========== No-photo placeholder ========== */
.no-photo {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0ebe3;
    color: var(--color-text-light);
    font-size: 0.9rem;
}
