:root {
    --primary: #1a1a2e;
    --accent: #e94560;
    --accent-2: #0f9d58;
    --bg: #f7f7fb;
    --card-bg: #ffffff;
    --text: #222;
    --muted: #777;
    --border: #e5e5e5;
    --radius: 10px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Segoe UI', Roboto, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
}

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

/* Header */
/* Header */
.site-header {
    background: #fff;
    color: var(--text);
    position: sticky;
    z-index: 100;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}
.topbar {
    background: #f5f5f5;
    border-bottom: 1px solid var(--border);
    font-size: 12px;
    color: #555;
}
.topbar-inner { display: flex; justify-content: space-between; align-items: center; padding: 7px 20px; flex-wrap: wrap; gap: 6px; }
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 12px; }
.topbar a { color: #555; text-decoration: none; }
.topbar a:hover { color: var(--accent-3, #333); }
.topbar-sep { color: #ccc; }
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    flex-wrap: wrap;
    gap: 16px;
}
.logo {
    font-size: 22px;
    font-weight: 700;
    color: #333;
    text-decoration: none;
}
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 22px;
    color: #333;
    cursor: pointer;
}
.main-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.main-nav a {
    color: #333;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: 20px;
}
.main-nav a:hover { background: #f5f5f5; }
.main-nav a.nav-active { background: #FFCC01; color: #333; }
.nav-dropdown { position: relative; }
.nav-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    min-width: 180px;
    padding: 6px;
    z-index: 50;
}
.nav-dropdown:hover .nav-dropdown-menu { display: block; }
.nav-dropdown-menu a {
    display: block;
    padding: 8px 12px;
    font-weight: 400;
    border-radius: 6px;
    white-space: nowrap;
}
.nav-dropdown-menu a:hover { background: #f5f5f5; }
.header-icons { display: flex; align-items: center; gap: 18px; }
.icon-link { position: relative; text-decoration: none; font-size: 19px; color: #333; }
.cart-link { font-weight: 600; }
.mobile-search-form { display: none; padding: 0 20px 12px; }
.nav-search-form {
    display: flex;
    align-items: center;
    background: #f5f5f5;
    border: 1px solid var(--border);
    border-radius: 24px;
    overflow: hidden;
    padding: 3px 4px 3px 16px;
}
.nav-search-input {
    background: transparent;
    border: none;
    outline: none;
    color: #333;
    font-size: 13px;
    width: 180px;
    padding: 6px 0;
}
.nav-search-input::placeholder { color: #999; }
.nav-search-btn {
    background: #FFCC01;
    border: none;
    color: #333;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.mobile-nav-drawer {
    display: none;
    flex-direction: column;
    background: #fff;
    border-top: 1px solid var(--border);
}
.mobile-nav-drawer.open { display: flex; }
.mobile-nav-drawer a {
    padding: 12px 20px;
    color: #333;
    text-decoration: none;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}
.mobile-nav-subitem { padding-left: 34px !important; color: #666 !important; font-size: 13px !important; }
@media (max-width: 900px) {
    .main-nav, .header-inner .nav-search-form { display: none; }
    .mobile-menu-toggle { display: block; }
    .mobile-search-form { display: block; }
    .header-inner { justify-content: space-between; }
}
.cart-count-badge {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 0px 5px;
    border-radius: 10px;
    position: absolute;
    top: -8px;
    right: -10px;
    line-height: 15px;
}

.badge {
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 20px;
}
.badge-wholesale { background: var(--accent-2); color: #fff; }
.badge-pending { background: #f5a623; color: #222; }

main { min-height: 70vh; padding: 30px 20px; }

/* Product grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 20px;
}
.product-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.15s, box-shadow 0.15s;
    text-decoration: none;
    color: var(--text);
    display: block;
}
.product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}
.product-card img {
    width: 100%;
    object-fit: cover;
    background: #eee;
    transition: transform 0.3s ease;
}
.product-card:hover img {
    transform: scale(1.08);
}
.product-card-body { padding: 14px; }
.product-card-body h3 { font-size: 15px; margin-bottom: 6px; }
.price { font-weight: 700; color: var(--accent); font-size: 16px; }
.price-old { text-decoration: line-through; color: var(--muted); font-size: 13px; margin-right: 6px; }
.wholesale-tag { font-size: 11px; background: var(--accent-2); color: #fff; padding: 2px 8px; border-radius: 20px; margin-left: 6px; }
.card-add-cart-form { margin-top: 10px; }
.card-add-cart-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 10px;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid var(--accent);
    background: transparent;
    color: var(--accent);
    border-radius: var(--radius);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.card-add-cart-btn:hover { background: var(--accent); color: #fff; }
.card-add-cart-btn.added { background: var(--accent-2); border-color: var(--accent-2); color: #fff; }

/* Forms */
.form-box {
    max-width: 480px;
    margin: 0 auto;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 30px;
}
.form-box h2 { margin-bottom: 20px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 600; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
}
.btn {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 11px 22px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
}
.btn:hover { opacity: 0.9; }
.btn-secondary { background: var(--primary); }
.btn-outline { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
.btn-block { width: 100%; text-align: center; }

.alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 14px;
}
.alert-success { background: #e6f7ec; color: #0f9d58; border: 1px solid #b7e4c7; }
.alert-error { background: #fdecea; color: #e94560; border: 1px solid #f5c2c7; }
.alert-info { background: #eef4fd; color: #2a6cd8; border: 1px solid #cfe0f7; }

/* Cart / table */
table { width: 100%; border-collapse: collapse; background: var(--card-bg); }
table th, table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    font-size: 14px;
}
table th { background: #fafafa; }

/* Category nav bar (Star Tech style) */
.category-nav {
    background: #fff;
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
    white-space: nowrap;
}
.category-nav .container { display: flex; gap: 32px; padding: 13px 20px; justify-content: flex-start; }
.category-nav a {
    color: var(--text);
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 500;
    flex-shrink: 0;
    padding-bottom: 4px;
    border-bottom: 2px solid transparent;
    transition: color 0.15s, border-color 0.15s;
}
.category-nav a:hover { color: var(--accent); border-bottom-color: var(--accent); }

/* Discount badge on product cards */
.product-card { position: relative; }
.discount-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #6a1b9a;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    z-index: 2;
}
.compare-toggle-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}
.compare-toggle-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* Quick links row */
.quick-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    margin: 24px 0;
}
.quick-link-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 14px 16px;
    text-decoration: none;
    color: var(--text);
}
.quick-link-card:hover { border-color: var(--accent); }
.quick-link-icon {
    width: 38px; height: 38px;
    background: #fdecea;
    color: var(--accent);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}
.quick-link-card .ql-title { font-size: 13px; font-weight: 600; }
.quick-link-card .ql-sub { font-size: 11px; color: var(--muted); }

/* Category icon grid */
.category-icon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 14px;
    margin: 16px 0 30px;
}
.category-icon-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 18px 8px;
    text-align: center;
    text-decoration: none;
    color: var(--text);
}
.category-icon-card:hover { border-color: var(--accent); box-shadow: 0 4px 10px rgba(0,0,0,0.06); }
.category-icon-circle {
    width: 46px; height: 46px;
    background: var(--bg);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 8px;
    font-size: 18px;
    font-weight: 700;
    color: var(--accent);
}
.category-icon-card span { font-size: 12px; }

/* Banner slider */
.banner-slider { position: relative; border-radius: var(--radius); overflow: hidden; margin-bottom: 20px; }
.banner-slide { display: none; }
.banner-slide.active { display: block; }
.banner-slider img { width: 100%; height: 320px; object-fit: cover; object-position: center; display: block; }
.banner-dots { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; }
.banner-dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.5); cursor: pointer; border: none; }
.banner-dot.active { background: #fff; }
@media (max-width: 600px) {
    .banner-slider img { height: auto; aspect-ratio: 27 / 9; }
}

/* Enriched footer */
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 24px;
    text-align: left;
    padding: 30px 0 20px;
}
.footer-grid h4 { color: #fff; font-size: 14px; margin-bottom: 12px; }
.footer-grid a { display: block; color: #aaa; text-decoration: none; font-size: 13px; margin-bottom: 8px; }
.footer-grid a:hover { color: #fff; }
.footer-bottom { text-align: center; padding-top: 16px; border-top: 1px solid rgba(255,255,255,0.1); }

/* WhatsApp floating button */
.whatsapp-float {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #25D366;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    z-index: 200;
    text-decoration: none;
}
.whatsapp-float:hover { transform: scale(1.06); }

/* Hero banner */
.hero-banner {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 30px;
}
.hero-banner img { width: 100%; height: 320px; object-fit: cover; display: block; }
.hero-banner-caption {
    position: absolute;
    left: 30px;
    bottom: 30px;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0,0,0,0.6);
}
.hero-banner-caption h2 { font-size: 26px; margin-bottom: 6px; }

/* Section headers */
.section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 34px 0 14px;
}
.section-title h2 { font-size: 20px; }
.section-title a { font-size: 13px; color: var(--accent); text-decoration: none; }

/* Brand strip */
.brand-strip {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding: 10px 0;
}
.brand-strip a {
    flex-shrink: 0;
    width: 110px;
    height: 70px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--text);
    font-size: 12px;
    text-align: center;
    padding: 6px;
}
.brand-strip img { max-width: 90%; max-height: 40px; object-fit: contain; }

/* Offers */
.offer-banner {
    background: linear-gradient(135deg, var(--accent), #ff7a8a);
    color: #fff;
    padding: 20px 24px;
    border-radius: var(--radius);
    margin-bottom: 14px;
}
.offer-banner h3 { font-size: 18px; margin-bottom: 4px; }

/* Reviews */
.review-item { border-bottom: 1px solid var(--border); padding: 14px 0; }
.review-stars { color: #f5a623; font-size: 16px; }
.rating-summary { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }

/* Spec table */
.spec-table td { padding: 8px 12px; font-size: 14px; }
.spec-table td:first-child { font-weight: 600; width: 40%; color: var(--muted); }

/* Products page: sidebar filters + subcategory tiles */
.products-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 24px;
    align-items: start;
}
.filter-sidebar {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
}
.filter-sidebar h3 {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 10px;
}
.filter-sidebar .filter-group { margin-bottom: 22px; }
.filter-sidebar .filter-group:last-child { margin-bottom: 0; }
.filter-sidebar input[type="number"] {
    width: 100%;
    padding: 7px 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 13px;
}
.filter-sidebar .price-inputs { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }
.filter-sidebar label.checkbox-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 8px;
    cursor: pointer;
}
.filter-sidebar label.checkbox-label input { width: auto; }

.subcategory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
    margin-bottom: 26px;
}
.subcategory-tile {
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none;
    color: var(--text);
    background: #fff;
    transition: box-shadow 0.15s;
}
.subcategory-tile:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.subcategory-collage {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px;
    height: 110px;
    background: var(--border);
}
.subcategory-collage img { width: 100%; height: 100%; object-fit: cover; display: block; }
.subcategory-collage.single-img { grid-template-columns: 1fr; }
.subcategory-tile-body { padding: 10px 12px; }
.subcategory-tile-body .sub-name { font-size: 13px; font-weight: 600; }
.subcategory-tile-body .sub-count { font-size: 12px; color: var(--muted); }

@media (max-width: 768px) {
    .products-layout { grid-template-columns: 1fr; }
}
.site-footer {
    background: var(--primary);
    color: #ccc;
    text-align: center;
    padding: 24px 20px;
    font-size: 13px;
    margin-top: 40px;

.footer-note { margin-top: 4px; color: #999; }

/* Admin */
.admin-layout { display: flex; min-height: 100vh; }
.admin-sidebar {
    width: 220px;
    background: var(--primary);
    color: #fff;
    padding: 20px 0;
    flex-shrink: 0;
}
.admin-sidebar a {
    display: block;
    color: #ddd;
    text-decoration: none;
    padding: 12px 20px;
    font-size: 14px;
}
.admin-sidebar a:hover, .admin-sidebar a.active { background: rgba(255,255,255,0.08); color: #fff; }
.admin-content { flex: 1; padding: 30px; }
.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px,1fr)); gap: 16px; margin-bottom: 30px; }
.stat-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.stat-card .num { font-size: 26px; font-weight: 700; color: var(--primary); }
.stat-card .label { font-size: 13px; color: var(--muted); }

@media (max-width: 768px) {
    .admin-layout { flex-direction: column; }
    .admin-sidebar { width: 100%; }
}
.promo-strip {
    background: linear-gradient(90deg, #1a1a2e, #2a4d8f);
    color: #fff;
    padding: 18px 24px;
    border-radius: var(--radius);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 24px 0;
    flex-wrap: wrap;
    gap: 12px;
}
.promo-strip h3 { font-size: 16px; margin-bottom: 2px; }
.promo-strip p { font-size: 12px; color: #cbd5e1; }
.promo-strip .btn { flex-shrink: 0; }
