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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: #1d1d1f;
    line-height: 1.6;
    background: #fff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

a { text-decoration: none; color: inherit; }

/* Header */
.header {
    position: sticky;
    top: 0;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid #e5e5e5;
    z-index: 100;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}

.logo {
    font-size: 1.25rem;
    font-weight: 700;
}

.nav { display: flex; gap: 28px; }
.nav a {
    font-size: 0.9rem;
    font-weight: 500;
    color: #555;
    transition: color 0.2s;
}
.nav a:hover { color: #0071e3; }

/* Theme Switcher */
.theme-switcher {
    margin-left: 8px;
}

.theme-switcher select {
    padding: 6px 12px;
    border: 1px solid #d2d2d7;
    border-radius: 6px;
    font-size: 0.8rem;
    font-family: inherit;
    background: #f5f5f7;
    cursor: pointer;
    transition: border-color 0.2s;
}

.theme-switcher select:focus {
    outline: none;
    border-color: #0071e3;
}

/* Button */
.btn {
    display: inline-block;
    padding: 12px 28px;
    background: #0071e3;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.btn:hover { background: #005bb5; }
.btn-sm { padding: 8px 20px; font-size: 0.85rem; }

/* Hero */
.hero {
    text-align: center;
    padding: 80px 24px 60px;
    background: linear-gradient(135deg, #f5f5f7 0%, #e8e8ed 100%);
}

.hero h1 {
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
}

.hero p {
    font-size: 1.25rem;
    color: #555;
    margin-bottom: 32px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* Filter Bar */
.filter-bar {
    padding: 40px 0 0;
}

.filter-bar h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 20px;
}

.filters {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 32px;
}

.filter-btn {
    padding: 8px 20px;
    border: 1px solid #d2d2d7;
    border-radius: 20px;
    background: #fff;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.filter-btn:hover {
    border-color: #0071e3;
    color: #0071e3;
}

.filter-btn.active {
    background: #0071e3;
    color: #fff;
    border-color: #0071e3;
}

/* Sort Bar */
.sort-bar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 16px;
}

.sort-bar label {
    font-size: 0.9rem;
    color: #555;
    font-weight: 500;
}

.sort-select {
    padding: 8px 16px;
    border: 1px solid #d2d2d7;
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: inherit;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.2s;
}

.sort-select:focus {
    outline: none;
    border-color: #0071e3;
}

/* Products */
.products {
    padding: 20px 0 80px;
}

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

.product-card {
    background: #f5f5f7;
    border-radius: 16px;
    padding: 28px;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
}

.badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background: #e34040;
    color: #fff;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
}

img.product-img {
    width: 100%;
    max-height: 200px;
    object-fit: contain;
    margin-bottom: 12px;
    border-radius: 8px;
}

.product-card h3 {
    font-size: 1.1rem;
    margin-bottom: 6px;
}

.specs {
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 8px;
}

.condition {
    font-size: 0.85rem;
    color: #555;
    margin-bottom: 12px;
}

.grade {
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
}

.grade-asnew { background: #d4edda; color: #155724; }
.grade-excellent { background: #cce5ff; color: #004085; }
.grade-verygood { background: #fff3cd; color: #856404; }
.grade-good { background: #f8d7da; color: #721c24; }

.pricing {
    margin-bottom: 8px;
}

.price {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1d1d1f;
    margin-right: 8px;
}

.rrp {
    font-size: 0.85rem;
    color: #999;
    text-decoration: line-through;
}

.sku {
    display: block;
    font-size: 0.75rem;
    color: #aaa;
    margin-bottom: 12px;
}

/* About */
.about {
    padding: 80px 0;
    background: #f5f5f7;
}

.about h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 20px;
}

.about > .container > p {
    text-align: center;
    max-width: 650px;
    margin: 0 auto 48px;
    color: #555;
    font-size: 1.05rem;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 32px;
}

.feature {
    text-align: center;
    padding: 24px;
}

.feature-icon { font-size: 2rem; display: block; margin-bottom: 12px; }
.feature h3 { font-size: 1.1rem; margin-bottom: 8px; }
.feature p { font-size: 0.9rem; color: #666; }

/* Contact */
.contact {
    padding: 80px 0;
}

.contact h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 12px;
}

.contact > .container > p {
    text-align: center;
    color: #555;
    margin-bottom: 40px;
}

.contact-form {
    max-width: 500px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
    padding: 12px 16px;
    border: 1px solid #d2d2d7;
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
    background: #fff;
    transition: border-color 0.2s;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: #0071e3;
}

/* Footer */
.footer {
    text-align: center;
    padding: 32px 0;
    border-top: 1px solid #e5e5e5;
    color: #888;
    font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 { font-size: 2rem; }
    .hero p { font-size: 1rem; }
    .nav { gap: 16px; }
    .nav a { font-size: 0.8rem; }
    .product-grid { grid-template-columns: 1fr; }
}
