:root {
    --green: #4CAF50;
    --green-dark: #388E3C;
    --green-light: #E8F5E9;
    --red: #D32F2F;
    --gold: #F9A825;
    --text: #333;
    --text-light: #666;
    --bg: #FAFAFA;
    --white: #FFF;
    --border: #E0E0E0;
    --radius: 8px;
    --shadow: 0 2px 8px rgba(0,0,0,0.1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

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

a { color: var(--green-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Header */
.header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    max-width: 1000px;
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo img {
    height: 48px;
    width: auto;
}

.nav {
    display: flex;
    gap: 20px;
    align-items: center;
}

.nav a {
    color: var(--text);
    font-weight: 500;
    font-size: 0.95rem;
}

.nav a:hover {
    color: var(--green-dark);
    text-decoration: none;
}

/* Hero */
.hero {
    background: linear-gradient(135deg, var(--green-light) 0%, var(--white) 100%);
    padding: 60px 20px;
    text-align: center;
}

.hero h1 {
    font-size: 2.2rem;
    color: var(--green-dark);
    margin-bottom: 12px;
}

.hero p {
    font-size: 1.15rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

/* Product Section */
.product {
    max-width: 1000px;
    margin: 40px auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

.product-gallery {
    position: relative;
}

.product-gallery img {
    width: 100%;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: block;
}

.product-gallery .gallery-thumbs {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.product-gallery .gallery-thumbs img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.product-gallery .gallery-thumbs img.active,
.product-gallery .gallery-thumbs img:hover {
    opacity: 1;
}

.product-info h2 {
    font-size: 1.8rem;
    margin-bottom: 8px;
}

.product-price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--green-dark);
    margin: 16px 0;
}

.product-description {
    color: var(--text-light);
    margin-bottom: 20px;
    line-height: 1.7;
}

.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.badge-available {
    background: var(--green-light);
    color: var(--green-dark);
}

.badge-sold-out {
    background: #FFEBEE;
    color: var(--red);
}

.badge-pickup {
    background: #FFF8E1;
    color: #F57F17;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 14px 32px;
    border: none;
    border-radius: var(--radius);
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    width: 100%;
}

.btn-primary {
    background: var(--green);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--green-dark);
    text-decoration: none;
}

.btn-primary:disabled {
    background: #BDBDBD;
    cursor: not-allowed;
}

.btn-secondary {
    background: transparent;
    color: var(--green-dark);
    border: 2px solid var(--green-dark);
}

.btn-secondary:hover {
    background: var(--green-light);
    text-decoration: none;
}

/* Waitlist */
.waitlist-form {
    display: none;
    margin-top: 16px;
}

.waitlist-form.visible {
    display: flex;
    gap: 8px;
}

.waitlist-form input {
    flex: 1;
    padding: 12px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
}

.waitlist-form button {
    padding: 12px 20px;
    white-space: nowrap;
}

/* Info Cards */
.info-section {
    max-width: 1000px;
    margin: 40px auto;
    padding: 0 20px;
}

.info-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.info-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
    box-shadow: var(--shadow);
}

.info-card-icon {
    font-size: 2rem;
    margin-bottom: 12px;
}

.info-card h3 {
    margin-bottom: 8px;
    font-size: 1.05rem;
}

.info-card p {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Auth / Account Pages */
.page-container {
    max-width: 480px;
    margin: 40px auto;
    padding: 0 20px;
}

.page-container.wide {
    max-width: 800px;
}

.card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 32px;
}

.card h2 {
    margin-bottom: 24px;
    text-align: center;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 4px;
    font-weight: 500;
    font-size: 0.9rem;
}

.form-group input {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--green);
}

.form-footer {
    text-align: center;
    margin-top: 16px;
    font-size: 0.9rem;
}

.alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    font-size: 0.9rem;
}

.alert-error {
    background: #FFEBEE;
    color: var(--red);
}

.alert-success {
    background: var(--green-light);
    color: var(--green-dark);
}

/* Orders Table */
.orders-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
}

.orders-table th,
.orders-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}

.orders-table th {
    font-weight: 600;
    color: var(--text-light);
    font-size: 0.8rem;
    text-transform: uppercase;
}

.status-completed { color: var(--green-dark); }
.status-cancelled { color: var(--red); }
.status-pending { color: var(--gold); }

/* Tabs */
.tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 24px;
    border-bottom: 2px solid var(--border);
}

.tab {
    padding: 10px 20px;
    cursor: pointer;
    border: none;
    background: none;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-light);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
}

.tab.active {
    color: var(--green-dark);
    border-bottom-color: var(--green-dark);
}

.tab-content { display: none; }
.tab-content.active { display: block; }

/* Footer */
.footer {
    background: var(--white);
    border-top: 1px solid var(--border);
    padding: 32px 20px;
    margin-top: 60px;
    text-align: center;
    color: var(--text-light);
    font-size: 0.85rem;
}

.footer-inner {
    max-width: 1000px;
    margin: 0 auto;
}

.footer p { margin-bottom: 4px; }
.footer a { color: var(--text-light); }
.footer a:hover { color: var(--green-dark); }

/* Spinner */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* Responsive */
@media (max-width: 768px) {
    .product {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .info-cards {
        grid-template-columns: 1fr;
    }
    .hero h1 { font-size: 1.6rem; }
    .hero p { font-size: 1rem; }
    .nav { gap: 12px; }
    .nav a { font-size: 0.85rem; }
    .orders-table { font-size: 0.8rem; }
    .orders-table th, .orders-table td { padding: 8px 6px; }
}
