:root {
    --bg-main: #fcf8f2;
    --header-bg: #4a2e1b;
    --accent: #d97736;
    --accent-hover: #b85d20;
    --text-dark: #2c1d11;
    --text-muted: #7d6b5d;
    --card-bg: #ffffff;
    --border-color: #eee0d5;
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-dark);
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header Navigation */
header {
    background-color: var(--header-bg);
    color: #ffffff;
    padding: 14px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo { 
    font-size: 22px; 
    font-weight: 800; 
    color: #f7d2b0; 
    text-decoration: none; 
    display: flex; 
    align-items: center; 
    gap: 6px; 
}

.header-right {
    display: flex;
    align-items: center;
    gap: 25px;
}

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

.nav-links a {
    color: #f7d2b0;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: color 0.2s;
}

.nav-links a:hover { color: #ffffff; }

.cart-btn {
    background-color: var(--accent);
    color: white;
    border: none;
    padding: 8px 18px;
    border-radius: 20px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    transition: background 0.2s;
}

.cart-btn:hover { background-color: var(--accent-hover); }

.cart-badge {
    background: white;
    color: var(--header-bg);
    border-radius: 50%;
    padding: 2px 7px;
    font-size: 12px;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: #f7d2b0;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
}

/* Notification Toast */
.toast-banner {
    position: fixed;
    top: 75px;
    right: 20px;
    background-color: var(--header-bg);
    color: #f7d2b0;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 14px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.25);
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    border: 1px solid var(--accent);
    transform: translateY(-10px);
}

.toast-banner.show {
    opacity: 1;
    transform: translateY(0);
}

/* Hero Banner */
.hero {
    background: linear-gradient(rgba(74, 46, 27, 0.8), rgba(74, 46, 27, 0.8)), 
                url('https://images.unsplash.com/photo-1558857563-b371033873b8?auto=format&fit=crop&q=80&w=1200') center/cover;
    color: white;
    text-align: center;
    padding: 50px 20px;
}

.hero h1 { margin: 0 0 10px 0; font-size: 34px; }
.hero p { margin: 0 0 20px 0; color: #fce3ce; font-size: 15px; }

.btn-cta {
    background-color: var(--accent);
    color: white;
    padding: 12px 26px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    display: inline-block;
    transition: background 0.2s;
}

.btn-cta:hover { background-color: var(--accent-hover); }

/* Container & Sections */
.main-container {
    max-width: 1100px;
    margin: 30px auto;
    padding: 0 20px;
    flex: 1;
    width: 100%;
    box-sizing: border-box;
}

.section-title {
    font-size: 22px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
    margin-bottom: 25px;
    color: var(--header-bg);
}

/* Product Cards & Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 25px;
}

.product-card {
    min-width: 0;
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s;
}

.product-card:hover { transform: translateY(-4px); }

.product-img { 
    width: 100%; 
    height: 180px; 
    object-fit: cover; 
    background: #f7f1eb; 
}

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

.product-name { font-size: 17px; font-weight: 700; margin: 0 0 6px 0; }

.product-desc { 
    font-size: 13px; 
    color: var(--text-muted); 
    margin: 0 0 15px 0; 
    flex: 1; 
    line-height: 1.4;
}

.product-bottom { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px dashed var(--border-color);
}

.product-price { font-size: 16px; font-weight: 800; color: var(--accent); }

.btn-view {
    background-color: var(--header-bg);
    color: white;
    border: none;
    padding: 8px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
}

.btn-view:hover { background-color: #362113; }

/* Info Section */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.info-card {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.info-card h3 { margin-top: 0; color: var(--header-bg); }

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1500;
    padding: 15px;
    box-sizing: border-box;
    overflow-y: auto;
}

.modal-content {
    background: white;
    padding: 25px;
    border-radius: 12px;
    max-width: 420px;
    width: 100%;
    position: relative;
    box-sizing: border-box;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-close {
    position: absolute;
    top: 15px; right: 15px;
    background: none; border: none;
    font-size: 22px; cursor: pointer; color: var(--text-muted);
}

.option-group { margin-bottom: 15px; }
.option-group label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 6px; }

select, input[type="email"], input[type="text"], textarea {
    width: 100%; padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 6px; box-sizing: border-box; font-size: 14px;
}

.btn-add-cart {
    width: 100%; background-color: var(--accent);
    color: white; border: none; padding: 12px;
    border-radius: 6px; font-weight: bold; font-size: 15px; cursor: pointer;
}

.btn-add-cart:hover { background-color: var(--accent-hover); }
.btn-add-cart:disabled { cursor: wait; opacity: 0.7; }

.success-modal { z-index: 1700; }
.success-modal-content { text-align: center; }
.success-modal-content h2 { margin: 0 0 10px; color: var(--header-bg); }
.success-modal-content p { color: var(--text-muted); line-height: 1.5; }
.success-home-btn {
    display: block;
    box-sizing: border-box;
    margin-top: 20px;
    text-decoration: none;
}

/* Slide-Out Cart Drawer */
.cart-drawer {
    position: fixed; top: 0; right: -400px;
    width: 360px; height: 100vh; height: 100dvh; max-height: 100dvh;
    background: white; box-shadow: -4px 0 12px rgba(0,0,0,0.15);
    z-index: 1600; transition: right 0.3s ease;
    display: flex; flex-direction: column; padding: 20px; box-sizing: border-box;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.cart-drawer.open { right: 0; }

.cart-header {
    display: flex; justify-content: space-between; align-items: center;
    border-bottom: 1px solid var(--border-color); padding-bottom: 15px;
}

.cart-items { flex: 1 1 auto; min-height: 80px; overflow-y: auto; margin: 15px 0; }

#checkoutForm { flex-shrink: 0; }

.cart-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 0; border-bottom: 1px dashed var(--border-color); font-size: 14px;
}

.cart-total {
    font-size: 18px; font-weight: bold;
    display: flex; justify-content: space-between; margin-bottom: 15px;
}

.btn-secondary {
    background-color: var(--header-bg);
    color: white;
    border: none;
    padding: 10px;
    border-radius: 6px;
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
    width: 100%;
    margin-bottom: 12px;
}

.alert { padding: 10px; border-radius: 6px; font-size: 13px; margin-top: 10px; display: none; }
.alert-success { background: #d4edda; color: #155724; }
.alert-error { background: #f8d7da; color: #721c24; }

/* Footer & Feedback */
footer {
    background-color: var(--header-bg);
    color: #d1c2b5;
    padding: 40px 20px 20px 20px;
    margin-top: 50px;
}

.footer-container {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid #63432d;
}

.footer-section h4 { color: #f7d2b0; margin-top: 0; font-size: 18px; }
.footer-email { color: var(--accent); font-weight: bold; text-decoration: none; }

.footer-bottom {
    text-align: center;
    font-size: 13px;
    padding-top: 20px;
    color: #a38c7c;
}

/* Mobile Breakpoints */
@media (max-width: 768px) {
    header { padding: 12px 15px; }

    .mobile-menu-btn { display: block; }

    .header-right { gap: 10px; }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--header-bg);
        flex-direction: column;
        padding: 15px 0;
        box-shadow: 0 6px 12px rgba(0,0,0,0.2);
    }

    .nav-links.mobile-open { display: flex; }

    .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .product-card { border-radius: 8px; }
    .product-img { height: 130px; }
    .product-info { padding: 10px; }
    .product-name { font-size: 14px; }
    .product-desc { font-size: 11px; margin-bottom: 8px; }
    .product-price { font-size: 14px; }
    .btn-view { padding: 6px 10px; font-size: 11px; }

    .cart-drawer { width: 100%; max-width: 100%; right: -100%; }
}

@media (max-width: 600px) {
    .product-grid { grid-template-columns: minmax(0, 1fr); }
    .product-card { flex-direction: row; }
    .product-img {
        width: 100px;
        height: auto;
        min-height: 120px;
        flex: 0 0 100px;
    }
    .product-info { min-width: 0; padding: 10px 12px; }
    .product-name { font-size: 15px; overflow-wrap: anywhere; }
    .product-desc {
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        overflow: hidden;
        font-size: 12px;
        line-height: 1.4;
        margin-bottom: 8px;
    }
    .product-bottom { gap: 8px; }
    .btn-view { min-height: 40px; padding: 8px 10px; font-size: 12px; }
}

@media (max-width: 480px) {
    .logo { font-size: 17px; }
    .header-right { gap: 8px; }
    .cart-btn { padding: 7px 11px; font-size: 13px; }
    .mobile-menu-btn { font-size: 22px; }

    .hero { padding: 40px 16px; }
    .hero h1 { font-size: clamp(25px, 8vw, 32px); }
    .main-container { padding: 0 15px; }
    .info-grid { grid-template-columns: minmax(0, 1fr); }

    .cart-drawer { padding: 16px 16px max(16px, env(safe-area-inset-bottom)); }
    .modal-content { padding: 22px 18px; }
}