:root {
    --primary: #232F3E; /* Amazon Dark */
    --secondary: #37475A;
    --accent: #FF9900; /* Amazon Orange */
    --bg-light: #F2F4F8;
    --white: #ffffff;
    --text: #333333;
    --sidebar-width: 260px;
    --shadow: 0 4px 6px rgba(0,0,0,0.06);
    --radius: 8px;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', system-ui, sans-serif; }
body { background-color: var(--bg-light); color: var(--text); }
a { text-decoration: none; color: inherit; }

/* --- FRONTEND STYLES --- */
.site-header {
    background: var(--primary); color: var(--white); padding: 10px 15px; /* Chhota Header */
    position: sticky; top: 0; z-index: 1000; box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    display: flex; justify-content: space-between; align-items: center;
}
.site-title { font-size: 1.2rem; font-weight: 700; letter-spacing: 0.5px; }
.site-title span { color: var(--accent); }

/* Slider */
.slider-container { width: 100%; max-width: 100%; height: 300px; overflow: hidden; position: relative; margin-bottom: 20px; background: #ddd; }
.slider-img { width: 100%; height: 100%; object-fit: cover; display: none; }
.slider-img.active { display: block; animation: fade 1s; }
@keyframes fade { from {opacity: .4} to {opacity: 1} }

/* Ads */
.ad-box { margin: 15px auto; text-align: center; max-width: 100%; overflow: hidden; }
.ad-box img { max-width: 100%; height: auto; border-radius: 4px; }
.ad-728 { max-width: 728px; height: 90px; background: #eee; line-height: 90px; margin: 10px auto; color: #999; font-size: 12px; }

/* Grid System */
.container { max-width: 1200px; margin: 0 auto; padding: 0 10px; }
.product-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; padding-bottom: 60px; }

@media(min-width: 768px) { .product-grid { grid-template-columns: repeat(4, 1fr); gap: 20px; } }

.product-card { background: var(--white); border-radius: var(--radius); padding: 10px; box-shadow: var(--shadow); transition: 0.2s; display: flex; flex-direction: column; }
.product-image { height: 160px; display: flex; align-items: center; justify-content: center; margin-bottom: 10px; }
.product-image img { max-height: 100%; max-width: 100%; }
.product-info h3 { font-size: 0.9rem; margin-bottom: 5px; line-height: 1.3; height: 38px; overflow: hidden; }
.product-price { color: #B12704; font-weight: 700; font-size: 1.1rem; }
.btn-buy { background: var(--accent); color: #111; display: block; text-align: center; padding: 8px; border-radius: 4px; font-weight: 600; margin-top: auto; font-size: 0.9rem; }

/* --- ADMIN DASHBOARD STYLES --- */
.admin-body { display: flex; min-height: 100vh; }
.sidebar {
    width: var(--sidebar-width); background: var(--primary); color: #ccc;
    display: flex; flex-direction: column; position: fixed; height: 100%; left: 0; top: 0;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1); z-index: 999;
}
.sidebar-header { padding: 20px; font-size: 1.2rem; color: var(--white); font-weight: bold; border-bottom: 1px solid rgba(255,255,255,0.1); }
.nav-link { padding: 15px 20px; display: block; color: #ccc; border-left: 4px solid transparent; transition: 0.2s; }
.nav-link:hover, .nav-link.active { background: var(--secondary); color: var(--accent); border-left-color: var(--accent); }
.main-content { margin-left: var(--sidebar-width); width: 100%; padding: 25px; transition: 0.3s; }

.card { background: var(--white); padding: 25px; border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 25px; border-top: 4px solid var(--accent); }
.card h2 { font-size: 1.2rem; margin-bottom: 20px; color: var(--primary); display: flex; align-items: center; justify-content: space-between; }
.form-group { margin-bottom: 15px; }
.form-group label { display: block; font-weight: 600; margin-bottom: 5px; color: var(--secondary); font-size: 0.9rem; }
.form-control { width: 100%; padding: 10px; border: 1px solid #ddd; border-radius: 4px; font-size: 14px; }
.btn-primary { background: var(--primary); color: white; border: none; padding: 10px 20px; border-radius: 4px; cursor: pointer; }
.btn-danger { background: #d9534f; color: white; padding: 5px 10px; border-radius: 4px; font-size: 12px; }

/* Mobile Admin */
@media(max-width: 768px) {
    .sidebar { transform: translateX(-100%); transition: 0.3s; }
    .sidebar.open { transform: translateX(0); }
    .main-content { margin-left: 0; }
    .mobile-menu-btn { display: block; font-size: 24px; cursor: pointer; color: white; }
    .slider-container { height: 200px; } /* Smaller slider on mobile */
}