:root {
    --primary: #1a1a2e;
    --accent: #e94560;
    --light: #f8f9fa;
    --gray: #6c757d;
    --border: #dee2e6;
    --success: #28a745;
    --warning: #ffc107;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Segoe UI', sans-serif; color: #333; background: #fff; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; }

/* Navbar */
.navbar { background: var(--primary); padding: 0 2rem; display: flex; align-items: center; justify-content: space-between; height: 64px; position: sticky; top: 0; z-index: 100; }
.navbar .logo { color: #fff; font-size: 1.5rem; font-weight: 700; letter-spacing: 1px; }
.navbar .logo span { color: var(--accent); }
.nav-links { display: flex; gap: 1.5rem; align-items: center; }
.nav-links a { color: #ccc; font-size: 0.95rem; transition: color 0.2s; }
.nav-links a:hover, .nav-links a.active { color: #fff; }
.nav-links .btn-accent { background: var(--accent); color: #fff; padding: 0.4rem 1rem; border-radius: 4px; }
.cart-icon { position: relative; }
.cart-badge { position: absolute; top: -8px; right: -8px; background: var(--accent); color: #fff; font-size: 0.7rem; width: 18px; height: 18px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }

/* Hero Slider */
.slider { position: relative; overflow: hidden; height: 480px; background: #111; }
.slide { position: absolute; width: 100%; height: 100%; opacity: 0; transition: opacity 0.7s ease; }
.slide.active { opacity: 1; }
.slide img { width: 100%; height: 100%; object-fit: cover; opacity: 0.7; }
.slide-content { position: absolute; top: 50%; left: 8%; transform: translateY(-50%); color: #fff; }
.slide-content h2 { font-size: 2.5rem; margin-bottom: 0.5rem; }
.slide-content p { font-size: 1.1rem; margin-bottom: 1.2rem; color: #ddd; }
.slider-dots { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,0.5); cursor: pointer; border: none; }
.dot.active { background: var(--accent); }
.slider-btn { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(0,0,0,0.4); color: #fff; border: none; font-size: 1.5rem; padding: 0.5rem 0.8rem; cursor: pointer; z-index: 10; }
.slider-btn.prev { left: 10px; }
.slider-btn.next { right: 10px; }

/* Sections */
.section { padding: 3rem 2rem; }
.section-title { font-size: 1.6rem; font-weight: 700; margin-bottom: 0.3rem; }
.section-sub { color: var(--gray); margin-bottom: 2rem; }

/* Product Grid */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1.5rem; }
.product-card { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; transition: box-shadow 0.2s; }
.product-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.1); }
.product-card img { width: 100%; height: 260px; object-fit: cover; display: block; }
.product-info { padding: 0.8rem 1rem; }
.product-info h3 { font-size: 0.95rem; margin-bottom: 0.3rem; }
.product-price { display: flex; gap: 0.5rem; align-items: center; }
.price { font-weight: 700; color: var(--primary); }
.price-old { text-decoration: line-through; color: var(--gray); font-size: 0.85rem; }
.price-sale { color: var(--accent); font-weight: 700; }
.badge-sale { background: var(--accent); color: #fff; font-size: 0.7rem; padding: 2px 6px; border-radius: 3px; }
.btn { display: inline-block; padding: 0.5rem 1.2rem; border-radius: 4px; font-size: 0.9rem; cursor: pointer; border: none; transition: opacity 0.2s; }
.btn:hover { opacity: 0.85; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-accent { background: var(--accent); color: #fff; }
.btn-outline { border: 1px solid var(--primary); color: var(--primary); background: transparent; }
.btn-sm { padding: 0.3rem 0.8rem; font-size: 0.82rem; }
.btn-block { display: block; width: 100%; text-align: center; }

/* Forms */
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; margin-bottom: 0.3rem; font-size: 0.9rem; font-weight: 500; }
.form-control { width: 100%; padding: 0.55rem 0.8rem; border: 1px solid var(--border); border-radius: 4px; font-size: 0.95rem; }
.form-control:focus { outline: none; border-color: var(--accent); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* Auth pages */
.auth-wrap { min-height: calc(100vh - 64px); display: flex; align-items: center; justify-content: center; background: var(--light); }
.auth-box { background: #fff; padding: 2rem; border-radius: 8px; width: 100%; max-width: 420px; box-shadow: 0 2px 12px rgba(0,0,0,0.08); }
.auth-box h2 { margin-bottom: 1.5rem; font-size: 1.4rem; }

/* Cart */
.cart-table { width: 100%; border-collapse: collapse; }
.cart-table th, .cart-table td { padding: 0.8rem; border-bottom: 1px solid var(--border); text-align: left; }
.cart-table img { width: 60px; height: 70px; object-fit: cover; border-radius: 4px; }
.qty-input { width: 60px; padding: 0.3rem; border: 1px solid var(--border); border-radius: 4px; text-align: center; }

/* Order summary */
.summary-box { background: var(--light); border-radius: 8px; padding: 1.5rem; }
.summary-row { display: flex; justify-content: space-between; margin-bottom: 0.6rem; font-size: 0.95rem; }
.summary-row.total { font-weight: 700; font-size: 1.1rem; border-top: 1px solid var(--border); padding-top: 0.6rem; margin-top: 0.6rem; }

/* Admin */
.admin-layout { display: flex; min-height: 100vh; }
.admin-sidebar { width: 220px; background: var(--primary); color: #fff; padding: 1.5rem 0; flex-shrink: 0; }
.admin-sidebar .logo { padding: 0 1.2rem 1.5rem; font-size: 1.2rem; font-weight: 700; border-bottom: 1px solid rgba(255,255,255,0.1); }
.admin-sidebar a { display: block; padding: 0.7rem 1.2rem; color: #ccc; font-size: 0.9rem; transition: background 0.2s; }
.admin-sidebar a:hover, .admin-sidebar a.active { background: rgba(255,255,255,0.1); color: #fff; }
.admin-main { flex: 1; padding: 2rem; background: #f4f6f9; }
.admin-main h1 { font-size: 1.4rem; margin-bottom: 1.5rem; }
.card { background: #fff; border-radius: 8px; padding: 1.5rem; box-shadow: 0 1px 4px rgba(0,0,0,0.06); margin-bottom: 1.5rem; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.stat-card { background: #fff; border-radius: 8px; padding: 1.2rem; box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
.stat-card .value { font-size: 1.8rem; font-weight: 700; color: var(--accent); }
.stat-card .label { color: var(--gray); font-size: 0.85rem; }
.table { width: 100%; border-collapse: collapse; }
.table th { background: var(--light); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.5px; }
.table th, .table td { padding: 0.75rem 1rem; border-bottom: 1px solid var(--border); text-align: left; font-size: 0.9rem; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 12px; font-size: 0.78rem; font-weight: 600; }
.badge-success { background: #d4edda; color: #155724; }
.badge-warning { background: #fff3cd; color: #856404; }
.badge-danger { background: #f8d7da; color: #721c24; }
.badge-info { background: #d1ecf1; color: #0c5460; }

/* Alerts */
.alert { padding: 0.75rem 1rem; border-radius: 4px; margin-bottom: 1rem; font-size: 0.9rem; }
.alert-success { background: #d4edda; color: #155724; }
.alert-danger { background: #f8d7da; color: #721c24; }
.alert-info { background: #d1ecf1; color: #0c5460; }

/* Product detail */
.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; padding: 2rem; }
.product-images .main-img { width: 100%; height: 420px; object-fit: cover; border-radius: 8px; }
.thumb-row { display: flex; gap: 0.5rem; margin-top: 0.5rem; }
.thumb-row img { width: 70px; height: 80px; object-fit: cover; border-radius: 4px; cursor: pointer; border: 2px solid transparent; }
.thumb-row img.active { border-color: var(--accent); }
.size-options { display: flex; gap: 0.5rem; flex-wrap: wrap; margin: 0.5rem 0 1rem; }
.size-btn { padding: 0.3rem 0.8rem; border: 1px solid var(--border); border-radius: 4px; cursor: pointer; font-size: 0.85rem; background: #fff; }
.size-btn.selected { border-color: var(--accent); background: var(--accent); color: #fff; }

/* Footer */
footer { background: var(--primary); color: #aaa; padding: 2rem; text-align: center; font-size: 0.85rem; }
footer a { color: #ccc; }

/* Responsive */
@media (max-width: 768px) {
    .product-detail { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .admin-layout { flex-direction: column; }
    .admin-sidebar { width: 100%; }
    .slider { height: 280px; }
    .slide-content h2 { font-size: 1.5rem; }
    .nav-links { gap: 0.8rem; }
}
