:root {
    --primary: #8B0000;
    --primary-light: #a52a2a;
    --gold: #D4AF37;
    --gold-light: #e6c860;
    --dark: #1a1a1a;
    --dark-lighter: #2a2a2a;
    --beige: #faf8f5;
    --text: #333;
    --text-light: #666;
    --text-muted: #888;
    --border: #e5e5e5;
    --white: #fff;
    --shadow: 0 2px 8px rgba(0,0,0,0.1);
    --shadow-lg: 0 4px 16px rgba(0,0,0,0.15);
    --radius: 0.5625rem;
    --radius-sm: 0.375rem;
}

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

body {
    font-family: 'Open Sans', sans-serif;
    color: var(--text);
    background: var(--white);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: var(--primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--primary-light); }

img { max-width: 100%; height: auto; }

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

/* Header */
.site-header {
    background: var(--primary);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: white;
    text-decoration: none;
}

.header-logo img { height: 40px; width: auto; }
.header-logo span { font-weight: 700; font-size: 1.25rem; letter-spacing: 0.5px; }

.nav-links { display: flex; gap: 1.5rem; align-items: center; }
.nav-links a {
    color: rgba(255,255,255,0.85);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s;
    text-decoration: none;
}
.nav-links a:hover, .nav-links a.active { color: var(--gold); }

.cart-btn {
    position: relative;
    color: white;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    font-size: 1.25rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.cart-btn:hover { color: var(--gold); }

.cart-badge {
    position: absolute;
    top: -2px;
    right: -8px;
    background: var(--gold);
    color: var(--dark);
    font-size: 0.7rem;
    font-weight: 700;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

/* Hero */
.hero {
    position: relative;
    min-height: 500px;
    display: flex;
    align-items: center;
    background: linear-gradient(rgba(0,0,0,0.45), rgba(0,0,0,0.45)),
                url('https://images.unsplash.com/photo-1518531933037-91b2f5f229cc?w=1600') center/cover no-repeat;
    color: white;
    text-align: center;
}

.hero-content { max-width: 700px; margin: 0 auto; padding: 3rem 1rem; }

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(212,175,55,0.2);
    border: 1px solid var(--gold);
    color: var(--gold);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.hero h1 {
    font-family: Georgia, serif;
    font-size: 3rem;
    line-height: 1.15;
    margin-bottom: 1rem;
}

.hero p { font-size: 1.1rem; opacity: 0.9; margin-bottom: 2rem; }

.hero-btns { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.95rem;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    line-height: 1.4;
}

.btn-primary { background: var(--primary); color: white; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-light); border-color: var(--primary-light); color: white; }

.btn-gold { background: var(--gold); color: var(--dark); border-color: var(--gold); }
.btn-gold:hover { background: var(--gold-light); border-color: var(--gold-light); color: var(--dark); }

.btn-outline { background: transparent; color: white; border-color: white; }
.btn-outline:hover { background: white; color: var(--primary); }

.btn-outline-primary { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline-primary:hover { background: var(--primary); color: white; }

.btn-sm { padding: 0.5rem 1rem; font-size: 0.85rem; }
.btn-lg { padding: 1rem 2rem; font-size: 1.1rem; }
.btn-block { width: 100%; }

/* Features bar */
.features-bar { background: var(--beige); padding: 3rem 0; }

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.feature-item { text-align: center; }

.feature-icon {
    width: 60px; height: 60px;
    background: rgba(139,0,0,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: var(--primary);
    font-size: 1.5rem;
}

.feature-item h3 { font-size: 1rem; margin-bottom: 0.5rem; }
.feature-item p { font-size: 0.85rem; color: var(--text-light); }

/* Sections */
.section { padding: 4rem 0; }
.section-title {
    text-align: center;
    font-size: 2rem;
    font-family: Georgia, serif;
    margin-bottom: 0.5rem;
    color: var(--text);
}
.section-subtitle { text-align: center; color: var(--text-light); margin-bottom: 2.5rem; }

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.product-card {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

.product-image {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    background: #f5f5f5;
}
.product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 0.5rem;
    transition: transform 0.3s;
}
.product-card:hover .product-image img { transform: scale(1.05); }

.sale-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    background: var(--primary);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 700;
}

.product-info { padding: 1rem; flex: 1; display: flex; flex-direction: column; }

.product-category {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

.product-name {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    color: var(--text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.product-name a { color: inherit; text-decoration: none; }
.product-name a:hover { color: var(--primary); }

.product-desc {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.product-price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
}

.product-price { font-weight: 700; color: var(--primary); font-size: 1.05rem; }
.product-price .original {
    text-decoration: line-through;
    color: var(--text-muted);
    font-weight: 400;
    font-size: 0.85rem;
    margin-left: 0.5rem;
}

/* Category Tabs */
.category-tabs {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 2rem;
}

.category-tab {
    padding: 0.5rem 1.25rem;
    border-radius: 2rem;
    border: 1px solid var(--border);
    background: white;
    color: var(--text);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s;
    text-decoration: none;
}
.category-tab:hover { border-color: var(--primary); color: var(--primary); }
.category-tab.active { background: var(--primary); color: white; border-color: var(--primary); }

/* About section */
.about-section {
    background: var(--primary);
    color: white;
    padding: 4rem 0;
    text-align: center;
}
.about-section h2 { font-family: Georgia, serif; font-size: 2rem; margin-bottom: 1rem; }
.about-section p { max-width: 700px; margin: 0 auto 2rem; opacity: 0.9; }

/* Product Detail */
.product-detail { padding: 3rem 0; }

.product-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.product-detail-image {
    background: #f5f5f5;
    border-radius: var(--radius);
    padding: 2rem;
    text-align: center;
}
.product-detail-image img { max-height: 400px; object-fit: contain; }

.product-detail-info h1 { font-size: 1.75rem; margin-bottom: 0.5rem; }
.product-detail-info .category-label {
    color: var(--text-muted);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
}
.product-detail-info .price-display { font-size: 1.75rem; font-weight: 700; color: var(--primary); margin-bottom: 1.5rem; }
.product-detail-info .price-display .original-price {
    text-decoration: line-through; color: var(--text-muted); font-size: 1.2rem; font-weight: 400; margin-left: 0.75rem;
}
.product-detail-info .description { line-height: 1.8; color: var(--text-light); margin-bottom: 2rem; }

.qty-control {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}
.qty-control button {
    width: 36px; height: 36px; border: 1px solid var(--border); background: white;
    border-radius: var(--radius-sm); cursor: pointer; font-size: 1.1rem;
    display: flex; align-items: center; justify-content: center;
}
.qty-control button:hover { border-color: var(--primary); color: var(--primary); }
.qty-control input {
    width: 60px; text-align: center; border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: 0.5rem; font-size: 1rem;
}

/* Cart */
.cart-page { padding: 3rem 0; }

.cart-table { width: 100%; border-collapse: collapse; margin-bottom: 2rem; }
.cart-table th {
    text-align: left; padding: 1rem; border-bottom: 2px solid var(--border);
    font-size: 0.85rem; text-transform: uppercase; color: var(--text-muted);
}
.cart-table td { padding: 1rem; border-bottom: 1px solid var(--border); vertical-align: middle; }

.cart-item-info { display: flex; align-items: center; gap: 1rem; }
.cart-item-img { width: 60px; height: 60px; object-fit: contain; border-radius: var(--radius-sm); background: #f5f5f5; }

.cart-summary {
    background: var(--beige); border-radius: var(--radius); padding: 2rem;
    max-width: 400px; margin-left: auto;
}
.cart-summary-row { display: flex; justify-content: space-between; padding: 0.5rem 0; }
.cart-summary-total { font-weight: 700; font-size: 1.25rem; border-top: 2px solid var(--primary); padding-top: 1rem; margin-top: 0.5rem; }
.cart-summary-total .total-amount { color: var(--primary); }

.cart-empty { text-align: center; padding: 4rem 0; }
.cart-empty p { font-size: 1.1rem; color: var(--text-light); margin-bottom: 1.5rem; }

/* Checkout */
.checkout-page { padding: 3rem 0; }

.checkout-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 3rem;
    align-items: start;
}

.checkout-form-section { margin-bottom: 2rem; }
.checkout-form-section h3 {
    font-size: 1.1rem; margin-bottom: 1rem;
    padding-bottom: 0.5rem; border-bottom: 2px solid var(--gold);
}

.form-group { margin-bottom: 1rem; }
.form-group label {
    display: block; font-weight: 600; font-size: 0.85rem; margin-bottom: 0.375rem;
}
.form-group input, .form-group select, .form-group textarea {
    width: 100%; padding: 0.75rem; border: 1px solid var(--border);
    border-radius: var(--radius-sm); font-size: 0.95rem;
    transition: border-color 0.2s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(139,0,0,0.1);
}
.form-group .error { border-color: #dc3545; }
.error-text { color: #dc3545; font-size: 0.8rem; margin-top: 0.25rem; }

.radio-group { display: flex; gap: 1rem; flex-wrap: wrap; }

.radio-option {
    flex: 1;
    min-width: 200px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}
.radio-option:hover { border-color: var(--primary); }
.radio-option.selected { border-color: var(--primary); background: rgba(139,0,0,0.03); }
.radio-option input[type="radio"] { margin-top: 3px; accent-color: var(--primary); }
.radio-option .radio-label { font-weight: 600; }
.radio-option .radio-desc { font-size: 0.8rem; color: var(--text-light); }

.mpesa-instructions {
    background: #e8f5e9;
    border: 1px solid #a5d6a7;
    border-radius: var(--radius);
    padding: 1.5rem;
    margin: 1rem 0;
}
.mpesa-instructions h4 { color: #2e7d32; margin-bottom: 0.75rem; }
.mpesa-instructions ol { padding-left: 1.25rem; }
.mpesa-instructions li { margin-bottom: 0.5rem; font-size: 0.9rem; }
.mpesa-instructions .mpesa-number { font-weight: 700; font-size: 1.1rem; color: #1b5e20; }

.order-summary-card {
    background: var(--beige);
    border-radius: var(--radius);
    padding: 1.5rem;
    position: sticky;
    top: 80px;
}
.order-summary-card h3 { margin-bottom: 1rem; border-bottom: 2px solid var(--gold); padding-bottom: 0.5rem; }
.summary-item { display: flex; justify-content: space-between; padding: 0.5rem 0; font-size: 0.9rem; }
.summary-item .item-name { flex: 1; }
.summary-item .item-qty { color: var(--text-muted); margin: 0 1rem; }

/* Confirmation */
.order-confirmation {
    text-align: center;
    padding: 4rem 2rem;
    max-width: 600px;
    margin: 0 auto;
}
.confirmation-icon {
    width: 80px; height: 80px; border-radius: 50%;
    background: #e8f5e9; color: #2e7d32;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 1.5rem; font-size: 2.5rem;
}
.order-number-display {
    background: var(--beige); border-radius: var(--radius); padding: 1.5rem; margin: 1.5rem 0;
}
.order-number-display .label { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 0.25rem; }
.order-number-display .number { font-size: 1.5rem; font-weight: 700; color: var(--primary); }

/* Contact */
.contact-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-bottom: 3rem; }

.contact-card {
    background: white;
    border-radius: var(--radius);
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow);
}
.contact-card .avatar {
    width: 80px; height: 80px; border-radius: 50%;
    background: var(--primary); color: white;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 1rem; font-size: 1.75rem; font-weight: 700;
}
.contact-card h3 { margin-bottom: 0.5rem; }
.contact-card .role { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 1rem; }
.contact-card a { display: block; color: var(--primary); margin: 0.25rem 0; font-size: 0.9rem; }

.social-links { display: flex; gap: 1rem; justify-content: center; margin-top: 2rem; }
.social-link {
    width: 48px; height: 48px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 1.25rem; transition: transform 0.2s;
    text-decoration: none;
}
.social-link:hover { transform: scale(1.1); color: white; }
.social-link.facebook { background: #1877f2; }
.social-link.instagram { background: #e4405f; }
.social-link.tiktok { background: #010101; }
.social-link.youtube { background: #ff0000; }

/* Footer */
.site-footer { background: var(--dark); color: rgba(255,255,255,0.7); padding: 3rem 0 1.5rem; margin-top: auto; }

.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 3rem; margin-bottom: 2rem; }

.footer-brand p { margin-bottom: 1rem; font-size: 0.9rem; }
.footer-brand .footer-socials { display: flex; gap: 0.75rem; }
.footer-brand .footer-socials a {
    width: 36px; height: 36px; border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.3);
    display: flex; align-items: center; justify-content: center;
    color: rgba(255,255,255,0.7); transition: all 0.2s;
    text-decoration: none; font-size: 0.9rem;
}
.footer-brand .footer-socials a:hover { border-color: var(--gold); color: var(--gold); }

.footer-section h4 { color: white; margin-bottom: 1rem; font-size: 1rem; }
.footer-section ul { list-style: none; }
.footer-section li { margin-bottom: 0.5rem; }
.footer-section a { color: rgba(255,255,255,0.7); font-size: 0.9rem; transition: color 0.2s; text-decoration: none; }
.footer-section a:hover { color: var(--gold); }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 1.5rem;
    text-align: center;
    font-size: 0.8rem;
}

/* WhatsApp Button */
.whatsapp-float {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 56px;
    height: 56px;
    background: #25d366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.75rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    z-index: 999;
    transition: transform 0.2s;
    text-decoration: none;
}
.whatsapp-float:hover { transform: scale(1.1); color: white; }

/* About page */
.about-page { padding: 3rem 0; }
.about-content { max-width: 800px; margin: 0 auto; }
.about-content h2 { font-family: Georgia, serif; color: var(--primary); margin-bottom: 1rem; }
.about-content p { margin-bottom: 1rem; line-height: 1.8; color: var(--text-light); }

/* Alert messages */
.alert {
    padding: 1rem 1.5rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}
.alert-success { background: #e8f5e9; color: #2e7d32; border: 1px solid #a5d6a7; }
.alert-error { background: #fce4ec; color: #c62828; border: 1px solid #ef9a9a; }
.alert-info { background: #e3f2fd; color: #1565c0; border: 1px solid #90caf9; }

/* Page title */
.page-header {
    background: var(--primary);
    color: white;
    padding: 2.5rem 0;
    text-align: center;
}
.page-header h1 { font-family: Georgia, serif; font-size: 2rem; margin-bottom: 0.25rem; }
.page-header p { opacity: 0.85; font-size: 0.95rem; }

/* Loading spinner */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Responsive */
@media (max-width: 992px) {
    .product-grid { grid-template-columns: repeat(3, 1fr); }
    .checkout-grid { grid-template-columns: 1fr; }
    .product-detail-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
}

@media (max-width: 768px) {
    .product-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
    .features-grid { grid-template-columns: 1fr; gap: 1.5rem; }
    .contact-cards { grid-template-columns: 1fr; }
    .hero h1 { font-size: 2rem; }
    .hero { min-height: 400px; }
    .section-title { font-size: 1.5rem; }
    .footer-grid { grid-template-columns: 1fr; }
    .cart-summary { max-width: 100%; }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--primary);
        flex-direction: column;
        padding: 1rem;
        gap: 0;
        box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    }
    .nav-links.open { display: flex; }
    .nav-links a { padding: 0.75rem 1rem; border-bottom: 1px solid rgba(255,255,255,0.1); width: 100%; }
    .mobile-toggle { display: block; }
}

@media (max-width: 480px) {
    .product-grid { grid-template-columns: 1fr; }
    .radio-group { flex-direction: column; }
    .radio-option { min-width: unset; }
}
