/* Root Variables - Light Mode Default */
:root {
    --primary: #8b5cf6; /* Modern Purple */
    --primary-dark: #7c3aed;
    --secondary: #10b981; /* Success Green */
    --bg-light: #f8fafc;
    --text-dark: #1e293b;
    --text-muted: #64748b;
    --nav-bg: rgba(255, 255, 255, 0.85);
    --card-bg: #fff;
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.4);
    --accent-gradient: linear-gradient(135deg, #a855f7 0%, #8b5cf6 100%);
    --overlay-dark: rgba(0, 0, 0, 0.5);
}

/* Dark Mode Overrides */
body.dark-mode {
    --bg-light: #0f172a;
    --text-dark: #f1f5f9;
    --text-muted: #94a3b8;
    --nav-bg: rgba(15, 23, 42, 0.85);
    --card-bg: #1e293b;
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
}

/* Global Styles */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    transition: background-color 0.4s ease, color 0.4s ease;
    overflow-x: hidden;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
a { text-decoration: none; color: inherit; transition: var(--transition); }
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* Section Title */
.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    padding-bottom: 1rem;
}
.section-title::after {
    content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
    width: 60px; height: 4px; background: var(--primary); border-radius: 2px;
}

/* Navbar */
.navbar {
    position: fixed; top: 0; left: 0; width: 100%; height: 80px;
    background: var(--nav-bg); backdrop-filter: blur(12px);
    z-index: 1000; display: flex; align-items: center; border-bottom: 1px solid var(--glass-border);
    transition: var(--transition);
}
.navbar.scrolled { height: 70px; box-shadow: 0 4px 15px rgba(0,0,0,0.1); }

.nav-container { display: flex; justify-content: space-between; align-items: center; width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.logo { font-size: 1.8rem; font-weight: 800; letter-spacing: -1px; }
.logo span { color: var(--primary); }

.nav-links { display: flex; gap: 2rem; }
.nav-link { font-weight: 600; text-transform: uppercase; font-size: 0.9rem; position: relative; }
.nav-link.active, .nav-link:hover { color: var(--primary); }

.nav-actions { display: flex; align-items: center; gap: 1.2rem; }
.theme-btn, .menu-toggle { background: none; border: none; font-size: 1.2rem; color: var(--text-dark); cursor: pointer; transition: var(--transition); }
.cart-icon-container { position: relative; cursor: pointer; font-size: 1.2rem; }
.cart-count {
    position: absolute; top: -8px; right: -10px; background: var(--primary); color: #fff;
    font-size: 0.7rem; width: 18px; height: 18px; border-radius: 50%;
    display: flex; justify-content: center; align-items: center; font-weight: 700;
}

/* Sections */
.section { padding: 120px 0 80px; min-height: 100vh; display: none; }
.section.active { display: block; animation: fadeIn 0.6s ease; }

/* Hero Slideshow */
.hero { position: relative; height: 85vh; margin-bottom: 4rem; overflow: hidden; }
.slideshow { height: 100%; width: 100%; }
.slide {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    opacity: 0; transition: opacity 1s ease; display: flex; align-items: center; justify-content: center;
}
.slide::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 1; }
.slide.active { opacity: 1; z-index: 2; }
.slide img { width: 100%; height: 100%; object-fit: cover; }

.slide-content { position: relative; z-index: 3; color: #fff; text-align: left; max-width: 800px; padding: 0 2rem; animation: slideUp 1s ease; }
.slide-content h1 { font-size: 4rem; margin-bottom: 1.5rem; text-transform: uppercase; }
.slide-content p { font-size: 1.2rem; margin-bottom: 2.5rem; opacity: 0.9; }

.slideshow-controls button {
    position: absolute; top: 50%; transform: translateY(-50%);
    background: rgba(255,255,255,0.1); border: none; color: #fff; width: 50px; height: 50px;
    border-radius: 50%; cursor: pointer; z-index: 10; backdrop-filter: blur(5px);
}
.prev-slide { left: 2rem; } .next-slide { right: 2rem; }

.slideshow-dots { position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%); display: flex; gap: 10px; z-index: 10; }
.dot { width: 12px; height: 12px; border-radius: 50%; background: rgba(255,255,255,0.3); cursor: pointer; transition: var(--transition); }
.dot.active { background: var(--primary); width: 30px; border-radius: 10px; }

/* Category Grid */
.category-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }
.category-card { position: relative; border-radius: 20px; overflow: hidden; height: 380px; cursor: pointer; transition: var(--transition); }
.category-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.category-card:hover img { transform: scale(1.1); }
.category-info { position: absolute; bottom: 0; left: 0; width: 100%; padding: 2rem; background: linear-gradient(transparent, rgba(0,0,0,0.85)); color: #fff; }

/* Product Grid */
.product-filters { display: flex; justify-content: center; gap: 1rem; margin-bottom: 3rem; flex-wrap: wrap; }
.filter-btn { padding: 0.8rem 2rem; background: var(--card-bg); border: 1px solid var(--text-muted); border-radius: 50px; font-weight: 600; cursor: pointer; color: var(--text-dark); transition: var(--transition); }
.filter-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }

.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 2.5rem; }
.product-card { background: var(--card-bg); border-radius: 20px; overflow: hidden; box-shadow: var(--card-shadow); transition: var(--transition); border: 1px solid var(--glass-border); display: flex; flex-direction: column; }
.product-card:hover { transform: translateY(-10px); }
.product-img { height: 280px; width: 100%; object-fit: cover; }
.product-card-body { padding: 1.5rem; flex-grow: 1; display: flex; flex-direction: column; }
.product-category { font-size: 0.8rem; color: var(--primary); text-transform: uppercase; font-weight: 700; margin-bottom: 0.5rem; }
.product-price { font-size: 1.4rem; font-weight: 800; margin: 1rem 0; }

.btn-primary {
    background: var(--accent-gradient); color: #fff; border: none; padding: 1rem 1.5rem;
    border-radius: 12px; font-weight: 700; cursor: pointer; transition: var(--transition);
    text-transform: uppercase; letter-spacing: 1px; width: 100%; text-align: center;
}
.btn-primary:active { transform: scale(0.95); }

/* Cart and Summary */
.cart-container { display: grid; grid-template-columns: 2fr 1fr; gap: 3rem; }
.cart-item { display: flex; align-items: center; gap: 1.5rem; background: var(--card-bg); padding: 1.5rem; border-radius: 15px; margin-bottom: 1.5rem; box-shadow: var(--card-shadow); }
.cart-item img { width: 100px; height: 100px; object-fit: cover; border-radius: 10px; }
.cart-summary { background: var(--card-bg); padding: 2rem; border-radius: 20px; height: fit-content; box-shadow: var(--card-shadow); }

/* Order Tracking */
.tracking-container { background: var(--card-bg); padding: 3rem; border-radius: 25px; box-shadow: var(--card-shadow); max-width: 800px; margin: 0 auto; }
.step-ui { display: flex; justify-content: space-between; position: relative; margin: 4rem 0; }
.step-ui::before { content: ''; position: absolute; top: 25px; left: 5%; width: 90%; height: 4px; background: var(--text-muted); opacity: 0.3; }
.step-progress { position: absolute; top: 25px; left: 5%; height: 4px; background: var(--secondary); transition: width 0.8s ease; }
.step { position: relative; z-index: 2; width: 25%; display: flex; flex-direction: column; align-items: center; }
.step-circle { width: 54px; height: 54px; background: var(--card-bg); border: 4px solid var(--text-muted); border-radius: 50%; display: flex; justify-content: center; align-items: center; font-weight: 800; }
.step.active .step-circle { border-color: var(--secondary); color: var(--secondary); }
.step.completed .step-circle { background: var(--secondary); border-color: var(--secondary); color: #fff; }

/* Toast */
.toast {
    position: fixed; bottom: 2rem; right: 2rem; background: var(--text-dark); color: #fff;
    padding: 1.2rem 2.5rem; border-radius: 12px; transform: translateY(200%);
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275); z-index: 2000;
}
.toast.show { transform: translateY(0); }

/* Animations */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: translateY(0); } }
.reveal { opacity: 0; transform: translateY(30px); transition: all 0.8s ease-out; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* Footer */
.footer { background: #111; color: #aaa; padding: 6rem 0 2rem; margin-top: 5rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 4rem; margin-bottom: 4rem; }
.footer-logo-side .logo { color: #fff; font-size: 2.2rem; }

/* Responsive */
@media (max-width: 992px) { .cart-container, .footer-grid { grid-template-columns: 1fr; } }
@media (max-width: 768px) {
    .nav-links { display: none; position: absolute; top: 80px; left: 0; width: 100%; background: var(--nav-bg); flex-direction: column; padding: 2rem; transition: 0.3s; }
    .nav-links.mobile-active { display: flex; }
    .slide-content h1 { font-size: 2.5rem; }
}
