:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #f1f3f5;
    
    --text-primary: #111827;
    --text-secondary: #4b5563;
    --text-muted: #9ca3af;
    
    --accent: #000000;
    --accent-hover: #333333;
    --accent-text: #ffffff;
    
    --border: #e5e7eb;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    
    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
    --radius-full: 9999px;
    
    --transition: 0.3s ease;
    --transition-fast: 0.15s ease;
}

[data-theme="dark"] {
    --bg-primary: #0f1115;
    --bg-secondary: #1a1d24;
    --bg-tertiary: #2a2e37;
    
    --text-primary: #f9fafb;
    --text-secondary: #d1d5db;
    --text-muted: #6b7280;
    
    --accent: #ffffff;
    --accent-hover: #e5e7eb;
    --accent-text: #000000;
    
    --border: #374151;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.5);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color var(--transition), color var(--transition);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 { font-weight: 600; line-height: 1.2; color: var(--text-primary); }
a { color: inherit; text-decoration: none; transition: color var(--transition-fast); }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
img { max-width: 100%; height: auto; display: block; }

.w-100 { width: 100%; }
.center { text-align: center; }

.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0.75rem 1.5rem; font-weight: 500; border-radius: var(--radius-full);
    transition: all var(--transition-fast); font-size: 0.95rem;
}
.btn-primary { background-color: var(--accent); color: var(--accent-text); }
.btn-primary:hover { background-color: var(--accent-hover); transform: translateY(-2px); box-shadow: var(--shadow-md); }

.link-btn { font-weight: 500; color: var(--text-primary); position: relative; }
.link-btn::after {
    content: ''; position: absolute; width: 100%; height: 1px; bottom: -2px; left: 0;
    background-color: var(--text-primary); transform: scaleX(0); transform-origin: bottom right; transition: transform 0.3s ease-out;
}
.link-btn:hover::after { transform: scaleX(1); transform-origin: bottom left; }

.icon-btn {
    display: flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border-radius: 50%; color: var(--text-primary);
    transition: background-color var(--transition-fast); position: relative;
}
.icon-btn:hover { background-color: var(--bg-secondary); }

.fade-up { opacity: 0; transform: translateY(20px); animation: fadeUpAnim 0.8s ease forwards; }
.fade-in { opacity: 0; animation: fadeInAnim 1s ease forwards; }
.delay-1 { animation-delay: 0.2s; } .delay-2 { animation-delay: 0.4s; }

@keyframes fadeUpAnim { to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInAnim { to { opacity: 1; } }

.navbar {
    position: fixed; top: 0; left: 0; width: 100%; z-index: 100;
    background-color: rgba(var(--bg-primary-rgb), 0.8);
    backdrop-filter: blur(12px); border-bottom: 1px solid transparent; transition: all var(--transition);
}
.navbar.scrolled {
    background-color: var(--bg-primary); border-bottom: 1px solid var(--border); box-shadow: var(--shadow-sm);
}
.nav-container { max-width: 1200px; margin: 0 auto; padding: 1rem 2rem; display: flex; align-items: center; justify-content: space-between; }
.logo { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.05em; }
.nav-links { display: none; gap: 2rem; }
.nav-links a { font-size: 0.9rem; font-weight: 500; color: var(--text-secondary); }
.nav-links a:hover { color: var(--text-primary); }
.nav-actions { display: flex; gap: 0.5rem; }

.cart-count {
    position: absolute; top: 2px; right: 2px;
    background-color: var(--accent); color: var(--accent-text);
    font-size: 0.65rem; font-weight: 700; width: 16px; height: 16px;
    display: flex; align-items: center; justify-content: center; border-radius: 50%;
}

.hero { min-height: 100vh; display: flex; flex-direction: column; padding-top: 80px; }
.hero-content {
    flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center;
    text-align: center; padding: 4rem 2rem; max-width: 800px; margin: 0 auto;
}
.hero h1 { font-size: clamp(2.5rem, 8vw, 5rem); letter-spacing: -0.03em; margin-bottom: 1rem; }
.hero p { font-size: clamp(1rem, 2vw, 1.25rem); color: var(--text-secondary); margin-bottom: 2.5rem; max-width: 600px; }
.hero-image { width: 100%; height: 50vh; overflow: hidden; }
.hero-image img { width: 100%; height: 100%; object-fit: cover; }

.benefits {
    display: grid; grid-template-columns: 1fr; gap: 2rem;
    padding: 4rem 2rem; max-width: 1200px; margin: 0 auto; border-bottom: 1px solid var(--border);
}
.benefit-item {
    text-align: center; padding: 2rem; background-color: var(--bg-secondary);
    border-radius: var(--radius-lg); transition: transform var(--transition);
}
.benefit-item:hover { transform: translateY(-5px); }
.benefit-item i { width: 32px; height: 32px; margin-bottom: 1rem; color: var(--text-primary); }
.benefit-item h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.benefit-item p { color: var(--text-secondary); font-size: 0.9rem; }

.products-section { padding: 6rem 2rem; max-width: 1200px; margin: 0 auto; }
.section-header { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 3rem; }
.section-header h2 { font-size: 2rem; }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 2rem; }

.product-card { display: flex; flex-direction: column; cursor: pointer; }
.product-image-wrap {
    position: relative; border-radius: var(--radius-lg); overflow: hidden;
    aspect-ratio: 3/4; background-color: var(--bg-secondary); margin-bottom: 1rem;
}
.product-image-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.product-card:hover .product-image-wrap img { transform: scale(1.05); }

.quick-add-btn {
    position: absolute; bottom: 1rem; left: 50%; transform: translate(-50%, 20px);
    width: calc(100% - 2rem); opacity: 0; background-color: rgba(255, 255, 255, 0.9);
    color: #000; backdrop-filter: blur(4px);
}
.product-card:hover .quick-add-btn { opacity: 1; transform: translate(-50%, 0); }
[data-theme="dark"] .quick-add-btn { background-color: rgba(0, 0, 0, 0.8); color: #fff; }

.product-info { display: flex; justify-content: space-between; align-items: flex-start; }
.product-name { font-size: 1rem; font-weight: 500; margin-bottom: 0.25rem; }
.product-category { font-size: 0.85rem; color: var(--text-muted); }
.product-price { font-weight: 600; font-size: 1rem; }

.testimonials { background-color: var(--bg-tertiary); padding: 6rem 2rem; }
.testimonial-grid { max-width: 1200px; margin: 3rem auto 0; display: grid; grid-template-columns: 1fr; gap: 2rem; }
.testimonial-card { background-color: var(--bg-primary); padding: 2.5rem; border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.stars { margin-bottom: 1rem; font-size: 1rem; }
.testimonial-card p { font-size: 1.1rem; margin-bottom: 1.5rem; font-style: italic; }
.testimonial-card h4 { font-size: 0.9rem; color: var(--text-secondary); }

.newsletter { padding: 6rem 2rem; max-width: 800px; margin: 0 auto; text-align: center; }
.newsletter h2 { font-size: 2.5rem; margin-bottom: 1rem; }
.newsletter p { color: var(--text-secondary); margin-bottom: 2rem; }
.newsletter-form { display: flex; flex-direction: column; gap: 1rem; max-width: 500px; margin: 0 auto; }
.newsletter-form input {
    padding: 1rem 1.5rem; border-radius: var(--radius-full); border: 1px solid var(--border);
    background-color: var(--bg-primary); color: var(--text-primary); font-size: 1rem; outline: none; transition: border-color var(--transition);
}
.newsletter-form input:focus { border-color: var(--accent); }

.footer { background-color: var(--bg-secondary); padding: 5rem 2rem 2rem; border-top: 1px solid var(--border); }
.footer-grid { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 1fr; gap: 3rem; margin-bottom: 4rem; }
.footer-brand p { color: var(--text-secondary); margin: 1rem 0; }
.socials { display: flex; gap: 1rem; }
.socials a { color: var(--text-secondary); }
.socials a:hover { color: var(--text-primary); }
.footer-links { display: flex; flex-direction: column; gap: 1rem; }
.footer-links h3 { font-size: 1rem; margin-bottom: 0.5rem; }
.footer-links a { color: var(--text-secondary); font-size: 0.9rem; }
.footer-links a:hover { color: var(--text-primary); }
.footer-bottom { max-width: 1200px; margin: 0 auto; padding-top: 2rem; border-top: 1px solid var(--border); text-align: center; color: var(--text-muted); font-size: 0.85rem; }

.cart-overlay, .modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.5); backdrop-filter: blur(4px);
    z-index: 999; opacity: 0; visibility: hidden; transition: all 0.3s ease;
}
.cart-overlay.active, .modal-overlay.active { opacity: 1; visibility: visible; }

.cart-drawer {
    position: fixed; top: 0; right: -100%; width: 100%; max-width: 450px; height: 100vh;
    background-color: var(--bg-primary); z-index: 1000; display: flex; flex-direction: column;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1); transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.cart-drawer.active { right: 0; }
.cart-header { padding: 1.5rem 2rem; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--border); }
.cart-items { flex: 1; overflow-y: auto; padding: 2rem; display: flex; flex-direction: column; gap: 1.5rem; }
.empty-cart { text-align: center; color: var(--text-muted); margin-top: 2rem; }

.cart-item { display: flex; gap: 1rem; }
.cart-item-img { width: 80px; height: 100px; border-radius: var(--radius-sm); object-fit: cover; background-color: var(--bg-secondary); }
.cart-item-details { flex: 1; display: flex; flex-direction: column; }
.cart-item-title { font-weight: 500; font-size: 0.95rem; }
.cart-item-price { color: var(--text-secondary); font-size: 0.9rem; margin-top: 0.25rem; }
.cart-item-actions { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }
.qty-control { display: flex; align-items: center; border: 1px solid var(--border); border-radius: var(--radius-full); overflow: hidden; }
.qty-btn { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; background: transparent; color: var(--text-primary); transition: background var(--transition-fast); }
.qty-btn:hover { background: var(--bg-secondary); }
.qty-val { font-size: 0.85rem; width: 24px; text-align: center; }
.remove-btn { color: var(--text-muted); font-size: 0.85rem; text-decoration: underline; }
.remove-btn:hover { color: var(--text-primary); }

.cart-footer { padding: 2rem; border-top: 1px solid var(--border); background-color: var(--bg-secondary); }
.cart-total { display: flex; justify-content: space-between; font-size: 1.25rem; font-weight: 600; margin-bottom: 1.5rem; }

.product-modal {
    position: fixed; top: 50%; left: 50%; transform: translate(-50%, -48%) scale(0.95);
    width: 90%; max-width: 1000px; max-height: 90vh; background-color: var(--bg-primary); z-index: 1000;
    border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); opacity: 0; visibility: hidden;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1); overflow: hidden;
}
.product-modal.active { opacity: 1; visibility: visible; transform: translate(-50%, -50%) scale(1); }
.close-modal { position: absolute; top: 1rem; right: 1rem; z-index: 10; background-color: var(--bg-primary); box-shadow: var(--shadow-sm); }
.modal-content { display: grid; grid-template-columns: 1fr; height: 100%; max-height: 90vh; overflow-y: auto; }
.modal-gallery { aspect-ratio: 1; background-color: var(--bg-secondary); }
.modal-gallery img { width: 100%; height: 100%; object-fit: cover; }
.modal-info { padding: 2.5rem; display: flex; flex-direction: column; }
.modal-title { font-size: 2rem; margin-bottom: 0.5rem; }
.modal-price { font-size: 1.25rem; font-weight: 600; margin-bottom: 2rem; }
.modal-desc { color: var(--text-secondary); margin-bottom: 2rem; line-height: 1.7; }
.modal-reviews { margin-top: 2rem; padding-top: 2rem; border-top: 1px solid var(--border); }
.review-item { margin-top: 1rem; }
.review-item p { font-size: 0.9rem; color: var(--text-secondary); }

.toast {
    position: fixed; bottom: 2rem; left: 50%; transform: translateX(-50%) translateY(100px);
    background-color: var(--text-primary); color: var(--bg-primary); padding: 1rem 2rem;
    border-radius: var(--radius-full); box-shadow: var(--shadow-lg); z-index: 1100;
    font-weight: 500; opacity: 0; transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }

@media (min-width: 768px) {
    .nav-links { display: flex; }
    .benefits { grid-template-columns: repeat(3, 1fr); gap: 1rem; }
    .testimonial-grid { grid-template-columns: repeat(2, 1fr); }
    .hero-image { height: 70vh; }
    .newsletter-form { flex-direction: row; }
    .newsletter-form input { flex: 1; }
    .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
    .modal-content { grid-template-columns: 1fr 1fr; overflow: hidden; }
    .modal-gallery { height: 100%; }
    .modal-info { overflow-y: auto; }
}
@media (max-width: 767px) {
    .hero h1 { font-size: 2.5rem; }
    .section-header { flex-direction: column; align-items: flex-start; gap: 1rem; }
}
