/**
 * Orchard Recycle — Public Website Styles
 * Light mode, customer-facing, mobile-first
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Space+Grotesk:wght@500;600;700&display=swap');

/* ── Reset ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

a { color: #C41E2A; text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; }

/* ── Header ────────────────────────────────────────────── */
.site-header {
    background: #C41E2A;
    color: #fff;
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    text-decoration: none;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1.25rem;
}

.header-logo img {
    height: 36px;
    width: 36px;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 24px;
}

.header-nav a {
    color: rgba(255,255,255,0.9);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s;
}

.header-nav a:hover { color: #fff; text-decoration: none; }
.header-nav a.active { color: #fff; border-bottom: 2px solid #fff; padding-bottom: 2px; }

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
}

.mobile-menu-btn svg { width: 24px; height: 24px; }

/* ── Hero ──────────────────────────────────────────────── */
.hero {
    background: linear-gradient(135deg, #8B1A1A 0%, #C41E2A 50%, #8B1A1A 100%);
    color: #fff;
    text-align: center;
    padding: 60px 20px;
}

.hero h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.hero p {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

.hero .search-bar {
    margin-top: 30px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.hero .search-bar form {
    display: flex;
    gap: 0;
}

.hero .search-bar input {
    flex: 1;
    padding: 14px 18px;
    border: none;
    border-radius: 8px 0 0 8px;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
}

.hero .search-bar button {
    padding: 14px 24px;
    background: #4CAF50;
    color: #fff;
    border: none;
    border-radius: 0 8px 8px 0;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.hero .search-bar button:hover { background: #388E3C; }

/* ── Container ─────────────────────────────────────────── */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ── Filter Bar ────────────────────────────────────────── */
.filter-bar {
    display: flex;
    gap: 12px;
    padding: 20px 0;
    flex-wrap: wrap;
    align-items: center;
}

.filter-bar select, .filter-bar input {
    padding: 8px 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    background: #fff;
}

.filter-bar .results-count {
    margin-left: auto;
    color: #888;
    font-size: 0.9rem;
}

/* ── Item Grid ─────────────────────────────────────────── */
.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
    padding: 20px 0 40px;
}

.item-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
}

.item-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    text-decoration: none;
}

.item-card-image {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: #f0f0f0;
}

.item-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.item-card:hover .item-card-image img { transform: scale(1.05); }

.item-card-badges {
    position: absolute;
    top: 8px;
    left: 8px;
    display: flex;
    gap: 6px;
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-condition {
    background: rgba(0,0,0,0.7);
    color: #fff;
}

.badge-pickup {
    background: #4CAF50;
    color: #fff;
}

.item-card-body {
    padding: 16px;
}

.item-card-title {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 6px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.item-card-meta {
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 8px;
}

.item-card-price {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: #C41E2A;
}

/* ── Item Detail ───────────────────────────────────────── */
.item-detail {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 32px;
    padding: 32px 0;
}

.item-gallery {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.gallery-main {
    aspect-ratio: 4/3;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: zoom-in;
}

.gallery-main img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.gallery-thumbs {
    display: flex;
    gap: 8px;
    padding: 12px;
    overflow-x: auto;
}

.gallery-thumb {
    width: 72px;
    height: 72px;
    border-radius: 6px;
    overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer;
    flex-shrink: 0;
}

.gallery-thumb.active { border-color: #C41E2A; }

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.item-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.item-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.2;
}

.item-price-block {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.item-price {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: #C41E2A;
}

.item-condition {
    margin-top: 8px;
    font-size: 0.9rem;
    color: #666;
}

.item-ctas {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 16px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    font-family: 'Space Grotesk', sans-serif;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
    text-align: center;
}

.btn:hover { text-decoration: none; }

.btn-pickup {
    background: #4CAF50;
    color: #fff;
}
.btn-pickup:hover { background: #388E3C; color: #fff; }

.btn-ebay {
    background: #0064D2;
    color: #fff;
}
.btn-ebay:hover { background: #0050A8; color: #fff; }

.btn-secondary {
    background: #eee;
    color: #333;
}
.btn-secondary:hover { background: #ddd; }

.item-specs {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.item-specs h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.1rem;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
}

.specs-table {
    width: 100%;
}

.specs-table tr td {
    padding: 8px 0;
    border-bottom: 1px solid #f5f5f5;
}

.specs-table tr td:first-child {
    color: #888;
    width: 40%;
    font-size: 0.9rem;
}

.item-description {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    grid-column: 1 / -1;
}

.item-description h3 {
    font-family: 'Space Grotesk', sans-serif;
    margin-bottom: 12px;
}

.item-description .desc-content {
    white-space: pre-wrap;
    line-height: 1.8;
    color: #555;
}

/* ── Schedule Form ─────────────────────────────────────── */
.schedule-page {
    max-width: 600px;
    margin: 40px auto;
    padding: 0 20px;
}

.schedule-card {
    background: #fff;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.schedule-card h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.schedule-card .subtitle {
    color: #888;
    margin-bottom: 24px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-weight: 500;
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 4px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76,175,80,0.15);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.schedule-item-preview {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 20px;
}

.schedule-item-preview img {
    width: 60px;
    height: 60px;
    border-radius: 6px;
    object-fit: cover;
}

.schedule-item-preview .info h4 { font-size: 0.95rem; }
.schedule-item-preview .info .price {
    color: #C41E2A;
    font-weight: 700;
}

.schedule-success {
    text-align: center;
    padding: 40px 20px;
}

.schedule-success svg { color: #4CAF50; margin-bottom: 16px; }
.schedule-success h3 { margin-bottom: 8px; }

/* ── About Page ────────────────────────────────────────── */
.about-page {
    max-width: 800px;
    margin: 40px auto;
    padding: 0 20px;
}

.about-card {
    background: #fff;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.about-card h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2rem;
    color: #C41E2A;
    margin-bottom: 8px;
}

.about-card .tagline {
    font-size: 1.1rem;
    color: #4CAF50;
    font-weight: 600;
    margin-bottom: 24px;
}

.about-card h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.3rem;
    margin-top: 24px;
    margin-bottom: 8px;
}

.about-card p { margin-bottom: 12px; color: #555; }

/* ── Footer ────────────────────────────────────────────── */
.site-footer {
    background: #1a1a1a;
    color: #aaa;
    padding: 40px 20px;
    margin-top: 60px;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 40px;
}

.footer-col h4 {
    font-family: 'Space Grotesk', sans-serif;
    color: #fff;
    margin-bottom: 12px;
}

.footer-col a {
    color: #aaa;
    display: block;
    margin-bottom: 6px;
    font-size: 0.9rem;
}

.footer-col a:hover { color: #fff; }

.footer-bottom {
    max-width: 1200px;
    margin: 24px auto 0;
    padding-top: 24px;
    border-top: 1px solid #333;
    text-align: center;
    font-size: 0.85rem;
}

/* ── Lightbox ──────────────────────────────────────────── */
.lightbox {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.9);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
}

.lightbox.active { display: flex; }

.lightbox img {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    background: none;
    border: none;
}

/* ── Pagination ────────────────────────────────────────── */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    padding: 20px 0 40px;
}

.pagination a {
    padding: 8px 16px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.9rem;
}

.pagination a:hover { background: #f5f5f5; text-decoration: none; }

.pagination span { color: #888; font-size: 0.9rem; }

/* ── Empty State ───────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #888;
}

.empty-state h3 { color: #555; margin: 12px 0 8px; }

/* ── Mobile ────────────────────────────────────────────── */
@media (max-width: 768px) {
    .mobile-menu-btn { display: block; }

    .header-nav {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: #C41E2A;
        flex-direction: column;
        padding: 16px 20px;
        gap: 12px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    }

    .header-nav.open { display: flex; }

    .hero h1 { font-size: 1.75rem; }
    .hero p { font-size: 0.95rem; }

    .items-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }

    .item-detail { grid-template-columns: 1fr; gap: 20px; }
    .item-description { grid-column: 1; }

    .footer-inner { grid-template-columns: 1fr; gap: 24px; }

    .form-row { grid-template-columns: 1fr; }

    .filter-bar { flex-direction: column; align-items: stretch; }
    .filter-bar .results-count { margin-left: 0; }
}
