@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --success: #10b981;
    --danger: #ef4444;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Inter', sans-serif; background-color: var(--bg-color); color: var(--text-main); line-height: 1.5; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.section { padding: 40px 0; }
.mt-10 { margin-top: 10px; } .mt-20 { margin-top: 20px; } .pb-10 { padding-bottom: 10px; }
.text-center { text-align: center; } .flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-end { display: flex; justify-content: flex-end; gap: 10px; }
.min-h-screen { min-height: 70vh; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 20px; border-radius: 8px; font-weight: 500; cursor: pointer; transition: all 0.2s; border: none; font-size: 1rem; }
.btn-primary { background: var(--primary-color); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); transform: translateY(-1px); box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1); }
.btn-outline { background: transparent; border: 1px solid var(--border-color); color: var(--text-main); }
.btn-outline:hover { border-color: var(--primary-color); color: var(--primary-color); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-block { width: 100%; }
.btn-sm { padding: 5px 10px; font-size: 0.875rem; }

/* Header */
.header { background: var(--card-bg); box-shadow: 0 1px 3px rgba(0,0,0,0.1); position: sticky; top: 0; z-index: 100; }
.header-container { display: flex; justify-content: space-between; align-items: center; height: 70px; }
.logo { display: flex; align-items: center; gap: 10px; font-size: 1.5rem; font-weight: 700; color: var(--primary-color); }
.search-bar { display: flex; flex: 1; max-width: 400px; margin: 0 20px; border: 1px solid var(--border-color); border-radius: 20px; overflow: hidden; }
.search-bar input { flex: 1; border: none; padding: 10px 15px; outline: none; }
.search-bar button { background: none; border: none; padding: 0 15px; cursor: pointer; color: var(--text-muted); }
.nav-actions { display: flex; align-items: center; gap: 15px; }
.cart-btn, .admin-btn { position: relative; font-size: 1.25rem; color: var(--text-main); transition: color 0.2s; }
.cart-btn:hover, .admin-btn:hover { color: var(--primary-color); }
.badge { position: absolute; top: -8px; right: -10px; background: var(--primary-color); color: #fff; font-size: 0.75rem; padding: 2px 6px; border-radius: 10px; font-weight: bold; }

/* Categories Bar */
.categories-bar { background: #fff; border-top: 1px solid var(--border-color); border-bottom: 1px solid var(--border-color); overflow-x: auto; }
#categories-container { display: flex; gap: 20px; padding: 12px 20px; white-space: nowrap; }
.cat-link { color: var(--text-muted); font-weight: 500; cursor: pointer; transition: color 0.2s; }
.cat-link:hover, .cat-link.active { color: var(--primary-color); }

/* Hero Banner */
.hero { background: linear-gradient(135deg, var(--primary-color), #4338ca); color: #fff; padding: 60px 20px; text-align: center; border-radius: 0 0 20px 20px; margin-bottom: 40px; }
.hero h1 { font-size: 2.5rem; margin-bottom: 10px; }
.hero p { font-size: 1.2rem; margin-bottom: 20px; opacity: 0.9; }

/* Product Grid */
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; flex-wrap: wrap; gap: 15px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 24px; }
.product-card { background: var(--card-bg); border-radius: 12px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,0.1); transition: all 0.3s; display: flex; flex-direction: column; cursor: pointer; }
.product-card:hover { transform: translateY(-5px); box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1); }
.product-img { width: 100%; height: 200px; object-fit: cover; background: #eee; }
.product-info { padding: 15px; display: flex; flex-direction: column; flex: 1; }
.product-cat { font-size: 0.8rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.product-title { font-size: 1.1rem; font-weight: 600; margin: 5px 0; color: var(--text-main); }
.product-price { font-size: 1.25rem; font-weight: 700; color: var(--primary-color); margin-bottom: 15px; }
.product-price-promo { font-size: 0.9rem; text-decoration: line-through; color: var(--text-muted); margin-left: 10px; }
.btn-add { margin-top: auto; }

/* Product Detail */
.product-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.gallery-main { border-radius: 12px; overflow: hidden; box-shadow: 0 4px 6px rgba(0,0,0,0.05); }
.product-detail-info h1 { font-size: 2rem; margin-bottom: 10px; }
.product-detail-info .price { font-size: 2rem; color: var(--primary-color); font-weight: bold; margin: 20px 0; }
.product-desc { color: var(--text-muted); margin-bottom: 20px; white-space: pre-wrap; }
.specs-list { margin-bottom: 20px; }
.specs-list li { padding: 8px 0; border-bottom: 1px solid var(--border-color); display: flex; }
.specs-list li strong { width: 150px; color: var(--text-main); }
.video-container iframe { width: 100%; height: 315px; border-radius: 12px; margin-top: 20px; }

/* Cart */
.cart-layout { display: grid; grid-template-columns: 2fr 1fr; gap: 30px; }
.cart-items { display: flex; flex-direction: column; gap: 15px; }
.cart-item { display: flex; align-items: center; background: var(--card-bg); padding: 15px; border-radius: 12px; box-shadow: 0 1px 2px rgba(0,0,0,0.05); gap: 15px; }
.cart-item img { width: 80px; height: 80px; object-fit: cover; border-radius: 8px; }
.cart-item-info { flex: 1; }
.cart-item-title { font-weight: 600; font-size: 1.1rem; }
.cart-qty { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.cart-qty button { width: 30px; height: 30px; border: 1px solid var(--border-color); background: #fff; border-radius: 4px; cursor: pointer; }
.cart-summary { background: var(--card-bg); padding: 25px; border-radius: 12px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); height: fit-content; }
.summary-line { display: flex; justify-content: space-between; margin-bottom: 15px; font-size: 1.1rem; }
.summary-line.total { font-weight: bold; font-size: 1.4rem; color: var(--primary-color); border-top: 1px solid var(--border-color); padding-top: 15px; margin-bottom: 25px; }

/* Footer */
.footer { background: #1e293b; color: #cbd5e1; padding: 60px 0 20px; margin-top: 60px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 40px; margin-bottom: 40px; }
.footer h3 { color: #fff; margin-bottom: 20px; }
.footer-links a, .footer-social a { display: block; margin-bottom: 10px; transition: color 0.2s; }
.footer-links a:hover, .footer-social a:hover { color: #fff; }
.footer-bottom { text-align: center; border-top: 1px solid #334155; padding-top: 20px; font-size: 0.9rem; }

/* Login */
.login-container { display: flex; justify-content: center; align-items: center; height: 100vh; }
.login-box { width: 100%; max-width: 400px; padding: 40px; }

/* Forms & Inputs */
.card { background: var(--card-bg); border-radius: 12px; box-shadow: 0 4px 6px rgba(0,0,0,0.05); padding: 20px; }
.form-group { margin-bottom: 15px; }
.form-group label { display: block; margin-bottom: 5px; font-weight: 500; font-size: 0.9rem; }
.input { width: 100%; padding: 10px 15px; border: 1px solid var(--border-color); border-radius: 8px; font-family: inherit; transition: border-color 0.2s; }
.input:focus { outline: none; border-color: var(--primary-color); }
select.input { appearance: none; background: #fff; }

/* Toasts */
.toast-container { position: fixed; bottom: 20px; right: 20px; display: flex; flex-direction: column; gap: 10px; z-index: 9999; }
.toast { background: #334155; color: #fff; padding: 12px 20px; border-radius: 8px; box-shadow: 0 4px 12px rgba(0,0,0,0.15); animation: slideIn 0.3s ease; }
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* Utils */
.loading { text-align: center; padding: 40px; color: var(--text-muted); width: 100%; grid-column: 1 / -1; }

@media (max-width: 768px) {
    .header-container { flex-wrap: wrap; height: auto; padding: 15px 20px; gap: 15px; }
    .search-bar { order: 3; max-width: 100%; margin: 0; }
    .product-layout, .cart-layout { grid-template-columns: 1fr; }
}
