/* ==========================================
   BAuto VIP — Premium Auto Tuning Store
   Colors: White, Gray, Black + Red accent
   ========================================== */

:root {
    --white: #ffffff;
    --light-gray: #f5f5f5;
    --medium-gray: #e0e0e0;
    --dark-gray: #333333;
    --darker-gray: #1a1a1a;
    --black: #111111;
    --accent: #e63946;
    --accent-hover: #c62828;
    --success: #2e7d32;
    --warning: #f57f17;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --shadow: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
    --radius: 8px;
    --transition: all 0.3s ease;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 70px; }
body {
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.6;
    color: var(--dark-gray);
    background: var(--white);
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea, select { font-family: inherit; font-size: inherit; }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==========================================
   TOP BAR
   ========================================== */
.top-bar {
    background: var(--black);
    color: var(--medium-gray);
    font-size: 13px;
    padding: 8px 0;
}
.top-bar .container { display: flex; justify-content: space-between; align-items: center; }
.top-bar-left { display: flex; gap: 20px; }
.top-bar-link { display: flex; align-items: center; gap: 6px; color: var(--medium-gray); transition: var(--transition); }
.top-bar-link:hover { color: var(--white); }
.top-bar-right { display: flex; align-items: center; gap: 8px; }
.lang-switch { color: var(--medium-gray); font-weight: 500; transition: var(--transition); padding: 2px 6px; border-radius: 3px; }
.lang-switch.active { color: var(--white); background: rgba(255,255,255,0.15); }
.lang-switch:hover { color: var(--white); }
.lang-sep { color: #555; }

/* ==========================================
   NAVBAR
   ========================================== */
.navbar {
    background: var(--white);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: box-shadow 0.3s ease;
}
.navbar.scrolled { box-shadow: 0 2px 20px rgba(0,0,0,0.1); }
.navbar .container { display: flex; align-items: center; justify-content: space-between; }

.logo { font-size: 24px; font-weight: 800; letter-spacing: -0.5px; }
.logo-b { color: var(--accent); }
.logo-auto { color: var(--black); }
.logo-vip { color: var(--dark-gray); font-weight: 600; font-size: 20px; }

.nav-links { display: flex; gap: 28px; }

/* Search in navbar */
.search-form { display: flex; align-items: center; gap: 8px; margin-left: 20px; }
.search-input {
    padding: 8px 14px;
    border: 1px solid var(--medium-gray);
    border-radius: 24px;
    width: 320px;
    max-width: 38vw;
    font-size: 14px;
    transition: var(--transition);
    background: white;
}
.search-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 4px 18px rgba(230,57,70,0.08); }
.search-button { background: transparent; border: none; display: inline-flex; align-items: center; justify-content: center; padding: 6px; color: var(--dark-gray); }
.search-button svg { width: 18px; height: 18px; }
.nav-link {
    font-weight: 500;
    font-size: 15px;
    color: var(--dark-gray);
    position: relative;
    transition: var(--transition);
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s ease;
}
.nav-link:hover { color: var(--accent); }
.nav-link:hover::after { width: 100%; }

.cart-link {
    position: relative;
    display: flex;
    align-items: center;
    color: var(--dark-gray);
    transition: var(--transition);
}
.cart-link:hover { color: var(--accent); }
.cart-count {
    position: absolute;
    top: -8px;
    right: -10px;
    background: var(--accent);
    color: white;
    font-size: 11px;
    font-weight: 700;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cart-count.bounce { animation: cartBounce 0.5s ease; }
@keyframes cartBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.4); }
}

/* Hamburger */
.hamburger { display: none; flex-direction: column; gap: 5px; padding: 5px; }
.hamburger span { width: 24px; height: 2px; background: var(--dark-gray); transition: var(--transition); }
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ==========================================
   HERO SECTION
   ========================================== */
.hero {
    background: linear-gradient(135deg, var(--black) 0%, #1a1a2e 50%, var(--darker-gray) 100%);
    color: var(--white);
    padding: 100px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="40" fill="none" stroke="rgba(255,255,255,0.03)" stroke-width="0.5"/><circle cx="50" cy="50" r="30" fill="none" stroke="rgba(255,255,255,0.03)" stroke-width="0.5"/><circle cx="50" cy="50" r="20" fill="none" stroke="rgba(255,255,255,0.03)" stroke-width="0.5"/></svg>') center/200px repeat;
}
.hero-content { position: relative; z-index: 1; }
.hero h1 {
    font-size: 52px;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 16px;
    line-height: 1.1;
}
.hero p {
    font-size: 20px;
    color: rgba(255,255,255,0.7);
    margin-bottom: 36px;
    font-weight: 300;
}
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 15px;
    transition: var(--transition);
    cursor: pointer;
    border: none;
}
.btn-primary {
    background: var(--accent);
    color: var(--white);
}
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-2px); box-shadow: 0 4px 15px rgba(230,57,70,0.4); }
.btn-secondary {
    background: transparent;
    color: var(--dark-gray);
    border: 2px solid var(--medium-gray);
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }
.btn-sm { padding: 8px 18px; font-size: 13px; }
.btn-lg { padding: 16px 40px; font-size: 17px; }
.btn-block { width: 100%; justify-content: center; }

/* ==========================================
   SECTIONS
   ========================================== */
.section { padding: 80px 0; }
.section-gray { background: var(--light-gray); }
.section-title {
    font-size: 32px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 48px;
    color: var(--black);
}

/* ==========================================
   CATEGORY CARDS
   ========================================== */
.categories-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.category-card {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    height: 280px;
    cursor: pointer;
    transition: var(--transition);
}
.category-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.category-card-bg {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #2d2d2d, #1a1a1a);
    display: flex;
    align-items: center;
    justify-content: center;
}
.category-card-bg img { width: 100%; height: 100%; object-fit: cover; }
.category-bg-img { filter: blur(1.5px) brightness(0.65); transform: scale(1.05); }
.category-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: var(--white);
}
.category-card-overlay h3 { font-size: 22px; font-weight: 700; margin-bottom: 8px; }
.category-card-overlay .browse-link {
    font-size: 14px;
    color: var(--accent);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* ==========================================
   PRODUCT GRID
   ========================================== */
.products-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
/* spacing for product lists */
.products-grid { margin-top: 30px; }
.product-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.product-card-image {
    width: 100%;
    height: 220px;
    background: var(--light-gray);
    overflow: hidden;
    position: relative;
}
.product-card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.product-card:hover .product-card-image img { transform: scale(1.05); }
.product-card-body { padding: 16px; }
.product-card-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--dark-gray);
    margin-bottom: 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.product-card-price { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.price-current { font-size: 18px; font-weight: 700; color: var(--black); }
.price-old { font-size: 14px; color: #999; text-decoration: line-through; }
.product-card .btn { width: 100%; justify-content: center; font-size: 13px; padding: 10px; }

/* Featured badge */
.badge-featured {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--accent);
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
}

/* ==========================================
   WHY CHOOSE US
   ========================================== */
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; text-align: center; }
.feature-item { padding: 30px; }
.feature-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--light-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}
.feature-item h3 { font-size: 18px; font-weight: 600; margin-bottom: 10px; }
.feature-item p { color: #666; font-size: 14px; }

/* ==========================================
   CATALOG PAGE
   ========================================== */
.catalog-header {
    padding: 40px 0 20px;
    border-bottom: 1px solid var(--medium-gray);
    margin-bottom: 30px;
}
.catalog-header h1 { font-size: 28px; font-weight: 700; margin-bottom: 8px; }
.catalog-meta { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
.catalog-count { color: #666; font-size: 14px; }
.catalog-sort select {
    padding: 8px 16px;
    border: 1px solid var(--medium-gray);
    border-radius: var(--radius);
    background: var(--white);
    font-size: 14px;
    cursor: pointer;
}

/* Breadcrumb */
.breadcrumb {
    padding: 16px 0;
    font-size: 13px;
    color: #999;
}
.breadcrumb a { color: #666; transition: var(--transition); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb span { margin: 0 8px; }

/* Pagination */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 40px; }
.pagination a, .pagination span {
    padding: 8px 14px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
}
.pagination a { border: 1px solid var(--medium-gray); color: var(--dark-gray); }
.pagination a:hover { border-color: var(--accent); color: var(--accent); }
.pagination .active { background: var(--accent); color: white; border: 1px solid var(--accent); }

/* ==========================================
   PRODUCT DETAIL
   ========================================== */
.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; padding: 40px 0; }
.product-gallery { align-self: start; }
.product-gallery-main {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: var(--radius);
    background: var(--light-gray);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.product-gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 12px;
}
.product-gallery-thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.product-gallery-thumb {
    width: 72px;
    height: 72px;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    background: var(--light-gray);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}
.product-gallery-thumb.active, .product-gallery-thumb:hover { border-color: var(--accent); }
.product-gallery-thumb img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }

.product-info h1 { font-size: 28px; font-weight: 700; margin-bottom: 8px; }
.product-sku { color: #999; font-size: 13px; margin-bottom: 16px; }
.product-price { display: flex; flex-direction: column; gap: 4px; margin-bottom: 24px; }
.price-per-unit { font-size: 13px; color: #999; }
.price-per-unit span { font-weight: 600; color: #666; }
.product-price .price-current { font-size: 32px; font-weight: 700; line-height: 1; }
.product-price .price-old { font-size: 18px; }
.product-stock {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    margin-bottom: 24px;
    padding: 6px 14px;
    border-radius: 20px;
}
.product-stock.in-stock { background: #e8f5e9; color: var(--success); }
.product-stock.out-of-stock { background: #ffebee; color: var(--accent); }

/* ==========================================
   PRODUCT VARIANTS
   ========================================== */
.product-variants { margin-bottom: 24px; display: flex; flex-direction: column; gap: 16px; }
.variant-group {}
.variant-label { font-size: 13px; font-weight: 600; color: var(--dark-gray); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.05em; }
.variant-selected-val { font-weight: 400; color: var(--accent); text-transform: none; letter-spacing: 0; }
.variant-options { display: flex; flex-wrap: wrap; gap: 8px; }
.variant-btn {
    padding: 7px 14px;
    border: 1.5px solid var(--medium-gray);
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--dark-gray);
    background: var(--white);
    cursor: pointer;
    transition: var(--transition);
    line-height: 1;
}
.variant-btn:hover { border-color: var(--dark-gray); }
.variant-btn.active {
    border-color: var(--black);
    background: var(--black);
    color: var(--white);
}
.variant-hint { font-size: 12px; color: #999; margin-top: 8px; }

/* Cart variant label */
.cart-item-variant { display: block; font-size: 12px; color: #888; margin-top: 3px; }

.quantity-selector { display: flex; align-items: center; gap: 0; margin-bottom: 24px; }
.qty-btn {
    width: 40px;
    height: 40px;
    border: 1px solid var(--medium-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    background: var(--light-gray);
    transition: var(--transition);
}
.qty-btn:hover { background: var(--medium-gray); }
.qty-btn:first-child { border-radius: var(--radius) 0 0 var(--radius); }
.qty-btn:last-child { border-radius: 0 var(--radius) var(--radius) 0; }
.qty-input {
    width: 60px;
    height: 40px;
    border: 1px solid var(--medium-gray);
    border-left: none;
    border-right: none;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
}
.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button { -webkit-appearance: none; }

.product-description { margin-top: 32px; padding-top: 32px; border-top: 1px solid var(--medium-gray); }
.product-description h3 { font-size: 18px; font-weight: 600; margin-bottom: 16px; }
.product-description p { color: #555; line-height: 1.8; }

/* ==========================================
   CART
   ========================================== */
.cart-page { padding: 40px 0 80px; }
.cart-page h1 { font-size: 28px; font-weight: 700; margin-bottom: 32px; }
.cart-empty { text-align: center; padding: 60px 0; }
.cart-empty p { color: #666; font-size: 18px; margin-bottom: 24px; }

.cart-table { width: 100%; border-collapse: collapse; }
.cart-table th { text-align: left; padding: 12px 16px; font-size: 13px; font-weight: 600; color: #999; text-transform: uppercase; letter-spacing: 0.5px; border-bottom: 2px solid var(--medium-gray); }
.cart-table td { padding: 20px 16px; border-bottom: 1px solid var(--light-gray); vertical-align: middle; }
.cart-item-info { display: flex; align-items: center; gap: 16px; }
.cart-item-image { width: 80px; height: 80px; border-radius: 6px; overflow: hidden; flex-shrink: 0; background: var(--light-gray); }
.cart-item-image img { width: 100%; height: 100%; object-fit: cover; }
.cart-item-name { font-weight: 600; font-size: 14px; }
.cart-remove { color: #999; transition: var(--transition); padding: 8px; }
.cart-remove:hover { color: var(--accent); }

.cart-summary { display: flex; justify-content: flex-end; margin-top: 32px; }
.cart-summary-box { width: 360px; }
.cart-total-row { display: flex; justify-content: space-between; padding: 16px 0; font-size: 22px; font-weight: 700; border-top: 2px solid var(--black); }
.cart-actions { display: flex; gap: 16px; margin-top: 24px; }

/* ==========================================
   CHECKOUT
   ========================================== */
.checkout-page { padding: 40px 0 80px; }
.checkout-page h1 { font-size: 28px; font-weight: 700; margin-bottom: 32px; }
.checkout-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 48px; }
.checkout-form h3, .checkout-summary h3 { font-size: 18px; font-weight: 600; margin-bottom: 20px; padding-bottom: 12px; border-bottom: 1px solid var(--medium-gray); }

.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 6px; color: var(--dark-gray); }
.form-group label .required { color: var(--accent); }
.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--medium-gray);
    border-radius: var(--radius);
    font-size: 15px;
    transition: var(--transition);
}
.form-control:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(230,57,70,0.1); }
textarea.form-control { min-height: 100px; resize: vertical; }

.checkout-items { margin-bottom: 20px; }
.checkout-item { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--light-gray); font-size: 14px; }
.checkout-item-name { flex: 1; }
.checkout-item-qty { color: #999; margin: 0 12px; }
.checkout-total { display: flex; justify-content: space-between; padding: 16px 0; font-size: 20px; font-weight: 700; border-top: 2px solid var(--black); margin-top: 8px; }

.payment-info { background: var(--light-gray); border-radius: var(--radius); padding: 20px; margin-top: 20px; }
.payment-info p { font-size: 13px; color: #666; margin-bottom: 12px; }
.payment-badges { display: flex; gap: 8px; flex-wrap: wrap; }

/* Success page */
.success-page { text-align: center; padding: 80px 0; }
.success-icon { width: 80px; height: 80px; border-radius: 50%; background: #e8f5e9; display: flex; align-items: center; justify-content: center; margin: 0 auto 24px; }
.success-page h1 { font-size: 32px; margin-bottom: 16px; }
.success-page p { color: #666; font-size: 18px; margin-bottom: 32px; }
.order-number { font-size: 24px; font-weight: 700; color: var(--accent); }

/* ==========================================
   LEGAL / STATIC PAGES
   ========================================== */
.page-content { max-width: 800px; margin: 0 auto; padding: 40px 0 80px; }
.page-content h1 { font-size: 28px; font-weight: 700; margin-bottom: 32px; }
.page-content h2 { font-size: 22px; font-weight: 700; margin: 32px 0 16px; }
.page-content h3 { font-size: 18px; font-weight: 600; margin: 24px 0 12px; }
.page-content p { margin-bottom: 16px; line-height: 1.8; color: #444; }
.page-content ul { margin-bottom: 16px; padding-left: 24px; }
.page-content ul li { margin-bottom: 8px; list-style: disc; color: #444; }
.page-content strong { color: var(--dark-gray); }

/* ==========================================
   FOOTER
   ========================================== */
.footer {
    background: var(--black);
    color: var(--medium-gray);
    padding: 60px 0 0;
}
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 40px; }
.footer-title { color: var(--white); font-size: 16px; font-weight: 600; margin-bottom: 20px; }
.footer-text { font-size: 14px; line-height: 1.7; margin-bottom: 12px; display: flex; align-items: flex-start; gap: 8px; }
.footer-links li { margin-bottom: 10px; }
.footer-links a { font-size: 14px; transition: var(--transition); }
.footer-links a:hover { color: var(--white); }

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 0;
    margin-top: 40px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 13px;
}
.payment-logos { display: flex; gap: 8px; }
.payment-badge {
    padding: 4px 12px;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    color: rgba(255,255,255,0.6);
}

/* ==========================================
   404
   ========================================== */
.error-page { text-align: center; padding: 100px 0; }
.error-page h1 { font-size: 80px; font-weight: 800; color: var(--medium-gray); }
.error-page h2 { font-size: 24px; margin-bottom: 16px; }
.error-page p { color: #666; margin-bottom: 32px; }

/* ==========================================
   ANIMATIONS
   ========================================== */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================
   ADMIN STYLES
   ========================================== */
.admin-sidebar {
    width: 250px;
    background: #1a1a2e;
    color: var(--white);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    padding: 24px 0;
    overflow-y: auto;
    z-index: 100;
}
.admin-sidebar-logo {
    padding: 0 24px 24px;
    font-size: 18px;
    font-weight: 700;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 16px;
}
.admin-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    color: rgba(255,255,255,0.6);
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
}
.admin-nav-link:hover, .admin-nav-link.active { color: var(--white); background: rgba(255,255,255,0.08); }
.admin-nav-link svg { width: 18px; height: 18px; }

.admin-main {
    margin-left: 250px;
    min-height: 100vh;
    background: var(--light-gray);
}
.admin-topbar {
    background: var(--white);
    padding: 16px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
}
.admin-topbar-user { font-size: 14px; color: #666; }
.admin-content { padding: 32px; }

/* Admin cards */
.admin-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 32px; }
.stat-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    border-top: 3px solid var(--accent);
}
.stat-card.green { border-top-color: var(--success); }
.stat-card.orange { border-top-color: var(--warning); }
.stat-card.blue { border-top-color: #1565c0; }
.stat-number { font-size: 28px; font-weight: 700; color: var(--black); margin-bottom: 4px; }
.stat-label { font-size: 13px; color: #999; font-weight: 500; text-transform: uppercase; letter-spacing: 0.5px; }

/* Admin table */
.admin-card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.admin-card-header { padding: 20px 24px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--light-gray); }
.admin-card-header h3 { font-size: 16px; font-weight: 600; }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th { text-align: left; padding: 12px 20px; font-size: 12px; font-weight: 600; color: #999; text-transform: uppercase; letter-spacing: 0.5px; background: var(--light-gray); }
.admin-table td { padding: 14px 20px; border-bottom: 1px solid var(--light-gray); font-size: 14px; }
.admin-table tr:hover td { background: #fafafa; }
.admin-table-img { width: 50px; height: 50px; border-radius: 6px; object-fit: cover; background: var(--light-gray); }

/* Status badges */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}
.status-new { background: #e3f2fd; color: #1565c0; }
.status-processing { background: #fff3e0; color: #e65100; }
.status-shipped { background: #f3e5f5; color: #7b1fa2; }
.status-delivered { background: #e8f5e9; color: #2e7d32; }
.status-cancelled { background: #ffebee; color: #c62828; }
.status-pending { background: #fff3e0; color: #e65100; }
.status-paid { background: #e8f5e9; color: #2e7d32; }
.status-refunded { background: #ffebee; color: #c62828; }

/* Toggle switch */
.toggle { position: relative; display: inline-block; width: 44px; height: 24px; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--medium-gray);
    border-radius: 24px;
    transition: var(--transition);
}
.toggle-slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--white);
    top: 3px;
    left: 3px;
    transition: var(--transition);
}
.toggle input:checked + .toggle-slider { background: var(--success); }
.toggle input:checked + .toggle-slider::before { transform: translateX(20px); }

/* Admin form */
.admin-form { padding: 24px; }
.admin-form .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.admin-form .form-actions { display: flex; gap: 12px; margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--light-gray); }

/* Admin login */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a1a2e, var(--black));
}
.login-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 40px;
    width: 100%;
    max-width: 400px;
    box-shadow: var(--shadow-lg);
}
.login-card h2 { text-align: center; margin-bottom: 32px; font-size: 24px; }
.login-error { background: #ffebee; color: var(--accent); padding: 12px; border-radius: var(--radius); margin-bottom: 20px; font-size: 14px; text-align: center; }

/* Admin search/filter bar */
.admin-filters { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.admin-filters .form-control { width: auto; padding: 8px 14px; font-size: 14px; }
.admin-filters select.form-control { min-width: 150px; }

/* Alert */
.alert { padding: 14px 20px; border-radius: var(--radius); margin-bottom: 20px; font-size: 14px; }
.alert-success { background: #e8f5e9; color: var(--success); }
.alert-error { background: #ffebee; color: var(--accent); }

/* Image upload */
.image-upload-zone {
    border: 2px dashed var(--medium-gray);
    border-radius: var(--radius);
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}
.image-upload-zone:hover { border-color: var(--accent); }
.image-upload-zone p { color: #999; margin-top: 8px; }
.image-previews { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 16px; }
.image-preview {
    width: 100px;
    height: 100px;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}
.image-preview img { width: 100%; height: 100%; object-fit: cover; }
.image-preview-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 22px;
    height: 22px;
    background: var(--accent);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    cursor: pointer;
}

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 1024px) {
    .products-grid { grid-template-columns: repeat(3, 1fr); }
    .admin-stats { grid-template-columns: repeat(2, 1fr); }
    .checkout-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .hamburger { display: flex; }

    /* Nav drawer + overlay */
    .nav-links {
        display: flex;
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--white);
        flex-direction: column;
        padding: 80px 30px 30px;
        gap: 20px;
        box-shadow: var(--shadow-lg);
        transition: right 0.3s ease;
        z-index: 1001;
        overflow-y: auto;
    }
    .nav-links.open { right: 0; }
    .nav-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.45);
        z-index: 1000;
    }
    .nav-overlay.open { display: block; }

    .hero h1 { font-size: 28px; }
    .hero p { font-size: 15px; }
    .hero { padding: 52px 0; }

    .categories-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .category-card { height: 180px; }
    .category-card-overlay h3 { font-size: 16px; }

    .products-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .product-card-image { height: 180px; }

    .product-detail { grid-template-columns: 1fr; gap: 20px; }
    .product-gallery-main { aspect-ratio: 1 / 1; height: auto; }
    .product-info h1 { font-size: 22px; }
    .product-price .price-current { font-size: 26px; }

    /* qty buttons: touch-friendly */
    .qty-btn { width: 44px; height: 44px; font-size: 20px; }
    .qty-input { height: 44px; }

    /* Cart table mobile */
    .cart-table { display: block; }
    .cart-table thead { display: none; }
    .cart-table tbody { display: block; }
    .cart-table tr { display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; gap: 8px; padding: 16px 0; border-bottom: 1px solid var(--light-gray); }
    .cart-table td { display: block; padding: 0; border: none; }
    .cart-table td:nth-child(1) { grid-column: 1; grid-row: 1; }
    .cart-table td:nth-child(2) { grid-column: 1; grid-row: 2; font-weight: 700; font-size: 15px; }
    .cart-table td:nth-child(3) { grid-column: 1; grid-row: 3; }
    .cart-table td:nth-child(4) { grid-column: 2; grid-row: 2; font-weight: 700; font-size: 15px; text-align: right; }
    .cart-table td:nth-child(5) { grid-column: 2; grid-row: 1; text-align: right; }

    .footer-grid { grid-template-columns: 1fr; gap: 32px; }
    .footer-bottom { flex-direction: column; gap: 16px; text-align: center; }

    .top-bar-left { display: none; }
    .features-grid { grid-template-columns: 1fr; gap: 20px; }

    .section { padding: 40px 0; }
    .section-title { font-size: 22px; margin-bottom: 28px; }

    .checkout-page h1, .cart-page h1 { font-size: 22px; }
    .breadcrumb { font-size: 12px; }
}

@media (max-width: 480px) {
    .container { padding: 0 14px; }
    .categories-grid { grid-template-columns: 1fr; }
    .products-grid { grid-template-columns: 1fr; }
    .product-card-image { height: 220px; }
    .cart-actions { flex-direction: column; }
    .cart-summary-box { width: 100%; }
    .hero h1 { font-size: 24px; }
    .btn-lg { padding: 14px 24px; font-size: 15px; }
}

/* Admin mobile */
@media (max-width: 768px) {
    .admin-sidebar { transform: translateX(-100%); transition: transform 0.3s ease; }
    .admin-sidebar.open { transform: translateX(0); }
    .admin-main { margin-left: 0; }
    .admin-topbar { padding: 16px; }
    .admin-content { padding: 16px; }
    .admin-stats { grid-template-columns: 1fr; }
}

/* No-image placeholder */
.no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--light-gray);
    color: #ccc;
    font-size: 40px;
}
