/* ============================================================
   NexusCommerce - Main Stylesheet
   Clean, professional, responsive design
   ============================================================ */

:root {
    --primary: #111827;
    --primary-dark: #030712;
    --accent: #f59e0b;
    --success: #16a34a;
    --danger: #dc2626;
    --dark: #0f172a;
    --gray: #64748b;
    --light: #f8fafc;
    --border: #e2e8f0;
    --radius: 10px;
    --shadow: 0 2px 8px rgba(0,0,0,0.06);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--dark);
    background: var(--light);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.main-content { flex: 1; padding: 30px 20px; }

/* ---------- Header ---------- */
.site-header {
    background: #fff;
    border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 100;
}
.header-inner { display: flex; align-items: center; gap: 24px; padding: 14px 20px; }
.brand { font-size: 1.4rem; font-weight: 800; color: var(--primary); text-decoration: none; }
.main-nav { display: flex; gap: 4px; flex: 1; flex-wrap: nowrap; align-items: center; min-width: 0; overflow-x: auto; }
.main-nav a { color: var(--gray); text-decoration: none; font-weight: 500; }
.main-nav a:hover { color: var(--primary); }
.header-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.currency-form select {
    padding: 6px 8px; border: 1px solid var(--border); border-radius: 6px; background: #fff;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-block; padding: 10px 18px; border-radius: 8px;
    border: 1px solid transparent; cursor: pointer; font-weight: 600;
    text-decoration: none; font-size: .95rem; transition: all .15s;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-outline { background: #fff; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-success { background: var(--success); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-sm { padding: 6px 12px; font-size: .85rem; }
.btn-block { display: block; width: 100%; text-align: center; }

/* ---------- Alerts / Flash ---------- */
.alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; font-weight: 500; }
.alert-success { background: #dcfce7; color: #166534; }
.alert-error { background: #fee2e2; color: #991b1b; }
.alert-info { background: #e0f2fe; color: #075985; }

/* ---------- Cards & Grid ---------- */
.card {
    background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: var(--shadow); padding: 20px; margin-bottom: 20px;
}
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* ---------- Product cards ---------- */
.product-card { text-align: center; }
.product-card img { width: 100%; height: 200px; object-fit: cover; border-radius: 8px; margin-bottom: 12px; }
.product-card h3 { font-size: 1.05rem; margin-bottom: 6px; }
.product-card .price { color: var(--primary); font-weight: 700; font-size: 1.1rem; }
.product-card .stock-badge { font-size: .8rem; color: var(--gray); }

/* ---------- Forms ---------- */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-weight: 600; margin-bottom: 6px; }
.form-control {
    width: 100%; padding: 10px 12px; border: 1px solid var(--border);
    border-radius: 8px; font-size: 1rem; background: #fff;
}
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
textarea.form-control { min-height: 100px; resize: vertical; }
select.form-control { appearance: auto; }

/* ---------- Tables ---------- */
.table { width: 100%; border-collapse: collapse; background: #fff; }
.table th, .table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--border); }
.table th { background: var(--light); font-weight: 700; color: var(--gray); font-size: .85rem; text-transform: uppercase; }
.table tr:hover td { background: #f8fafc; }

/* ---------- Badges ---------- */
.badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: .78rem; font-weight: 700; }
.badge-success { background: #dcfce7; color: #166534; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-info { background: #e0f2fe; color: #075985; }
.badge-dark { background: #e2e8f0; color: #334155; }

/* ---------- Stats ---------- */
.stat-card { text-align: center; }
.stat-card .stat-value { font-size: 1.8rem; font-weight: 800; color: var(--dark); }
.stat-card .stat-label { color: var(--gray); font-size: .9rem; }
.stat-card .stat-icon { font-size: 1.6rem; }

/* ---------- Payment methods ---------- */
.payment-option {
    display: flex; align-items: center; gap: 12px; padding: 14px 16px;
    border: 2px solid var(--border); border-radius: 10px; cursor: pointer; margin-bottom: 10px;
    background: #fff; transition: border-color .15s;
}
.payment-option:hover { border-color: var(--primary); }
.payment-option input { margin-right: 4px; }
.payment-option .pm-icon { font-size: 1.5rem; }
.payment-option .pm-name { font-weight: 600; }
.payment-option.selected { border-color: var(--primary); background: #eff6ff; }

/* ---------- Footer ---------- */
.site-footer { background: #0b1220; color: #cbd5e1; margin-top: 48px; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1.4fr 1fr; gap: 36px; padding: 48px 20px 36px; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-grid h4 { color: #fff; margin: 0 0 14px; font-size: .95rem; letter-spacing: .02em; }
.footer-grid a { display: block; color: #94a3b8; text-decoration: none; margin-bottom: 9px; font-size: .9rem; transition: color .15s; }
.footer-grid a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid #1e293b; padding: 18px 20px; text-align: center; font-size: .85rem; color: #64748b; }

/* ---------- Cookie banner ---------- */
.cookie-banner {
    position: fixed; bottom: 0; left: 0; right: 0; background: var(--dark); color: #fff;
    padding: 16px 24px; z-index: 1000; display: flex; align-items: center; justify-content: space-between;
    gap: 20px; flex-wrap: wrap; box-shadow: 0 -4px 20px rgba(0,0,0,.3);
}
.cookie-banner p { flex: 1; min-width: 250px; }
.cookie-banner a { color: var(--accent); }
.cookie-actions { display: flex; gap: 10px; }

/* ---------- Hero ---------- */
.hero {
    background: linear-gradient(135deg, var(--primary), #7c3aed);
    color: #fff; border-radius: var(--radius); padding: 50px 30px; text-align: center; margin-bottom: 30px;
}
.hero h1 { font-size: 2.2rem; margin-bottom: 10px; }
.hero p { font-size: 1.1rem; opacity: .9; }

/* ---------- Misc ---------- */
.page-title { margin-bottom: 20px; font-size: 1.6rem; }
.muted { color: var(--gray); }
.text-right { text-align: right; }
.mt-2 { margin-top: 12px; }
.mb-2 { margin-bottom: 12px; }
.flex { display: flex; gap: 10px; align-items: center; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.legal-content h2 { margin: 24px 0 10px; font-size: 1.3rem; }
.legal-content p, .legal-content li { margin-bottom: 10px; }
.legal-content ul { padding-left: 20px; }

/* ---------- Product card actions (Add to Cart / Buy Now) ---------- */
.product-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.product-actions form { margin: 0; }
.old-price { text-decoration: line-through; color: var(--gray); font-weight: 400; font-size: .9rem; margin-right: 6px; }

/* ---------- Reviews ---------- */
.review-item { border-bottom: 1px solid var(--border); padding: 12px 0; }
.review-item:last-child { border-bottom: none; }
.stars { color: var(--accent); letter-spacing: 2px; }

/* ---------- Print styles ---------- */
@media print {
    .site-header, .site-footer, .cookie-banner, .btn, .currency-form, .main-nav,
    .header-actions, form, .no-print { display: none !important; }
    body { background: #fff; }
    .main-content { padding: 0; }
    .card { box-shadow: none; border: 1px solid #ccc; break-inside: avoid; }
    .container { max-width: 100%; }
    a { color: #000; text-decoration: none; }
}
/* ---------- Header admin dropdown ---------- */
.admin-menu { position: relative; }
.admin-dropdown {
    display: none; position: absolute; right: 0; top: 110%;
    background: #fff; border: 1px solid var(--border); border-radius: 8px;
    box-shadow: var(--shadow); min-width: 160px; z-index: 200; padding: 6px 0;
}
.admin-menu.open .admin-dropdown { display: block; }
.admin-dropdown a {
    display: block; padding: 8px 16px; color: var(--dark); text-decoration: none; font-weight: 500;
}
.admin-dropdown a:hover { background: var(--light); color: var(--primary); }

/* ---------- Hero Slider ---------- */
.hero-slider {
    position: relative; border-radius: 16px; overflow: hidden;
    margin-bottom: 32px; height: 320px; background: #1e293b;
}
.hero-slides { height: 100%; position: relative; }
.hero-slide {
    position: absolute; inset: 0; display: none; align-items: center; justify-content: center;
    padding: 40px; color: #fff; text-align: center;
}
.hero-slide.active { display: flex; }
.hero-content h1 { font-size: 2.2rem; margin-bottom: 12px; text-shadow: 0 2px 8px rgba(0,0,0,.2); }
.hero-content p { font-size: 1.1rem; opacity: .95; margin-bottom: 20px; max-width: 560px; margin-left: auto; margin-right: auto; }
.hero-content .btn { background: #fff; color: var(--primary); border: none; }
.hero-content .btn:hover { background: #f1f5f9; }
.hero-kicker {
    display: inline-block; font-size: .75rem; font-weight: 700; letter-spacing: .12em;
    text-transform: uppercase; color: rgba(255,255,255,.85);
    background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.25);
    padding: 4px 12px; border-radius: 999px; margin-bottom: 12px;
}
.hero-slider { min-height: 320px; }
@media (min-width: 768px) { .hero-slider { min-height: 380px; } }

.hero-nav {
    position: absolute; top: 50%; transform: translateY(-50%);
    background: rgba(255,255,255,.25); border: none; color: #fff;
    width: 40px; height: 40px; border-radius: 50%; font-size: 1.5rem; cursor: pointer;
    backdrop-filter: blur(4px);
}
.hero-nav:hover { background: rgba(255,255,255,.4); }
.hero-nav.prev { left: 12px; }
.hero-nav.next { right: 12px; }
.hero-dots { position: absolute; bottom: 14px; left: 0; right: 0; text-align: center; }
.hero-dot {
    width: 10px; height: 10px; border-radius: 50%; border: none;
    background: rgba(255,255,255,.45); margin: 0 4px; cursor: pointer;
}
.hero-dot.active { background: #fff; }

/* ---------- Checkout summary ---------- */
.summary-lines { margin-top: 16px; }
.summary-lines .flex-between { margin-bottom: 8px; }
.summary-hr {
    border: none; border-top: 2px solid var(--border);
    margin: 14px 0;
}
.total-row { font-size: 1.2rem; color: var(--primary); }

.old-price { text-decoration: line-through; color: var(--gray); font-size: .9rem; margin-right: 6px; }
.category-section { margin-bottom: 36px; }
.product-actions { display: grid; gap: 8px; margin-top: 10px; }
.payment-option {
    display: flex; align-items: center; gap: 10px; padding: 12px;
    border: 1px solid var(--border); border-radius: 8px; margin-bottom: 8px; cursor: pointer;
}
.payment-option:has(input:checked) { border-color: var(--primary); background: #eff6ff; }

@media (max-width: 768px) {
    .hero-slider { height: 260px; }
    .hero-content h1 { font-size: 1.5rem; }
    .header-inner { flex-wrap: wrap; }
    .main-nav { order: 3; width: 100%; }
}

/* ---------- Smart header v2 ---------- */
.header-top {
    background: linear-gradient(90deg, #0f172a, #1e3a5f);
    color: #94a3b8;
    font-size: .8rem;
    padding: 6px 0;
}
.header-top-inner { display: flex; justify-content: space-between; align-items: center; padding: 0 20px; }
.header-top-links a { color: #cbd5e1; text-decoration: none; margin-left: 14px; }
.header-top-links a:hover { color: #fff; }

.site-header {
    background: #fff;
    border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 100;
    box-shadow: 0 1px 12px rgba(15,23,42,.06);
}
.header-inner { display: flex; align-items: center; gap: 20px; padding: 12px 20px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark {
    width: 36px; height: 36px; border-radius: 10px;
    background: #111827;
    color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center;
    letter-spacing: -0.02em;
}
.brand-text { font-size: 1.25rem; font-weight: 800; color: #0f172a; }

.main-nav { display: flex; gap: 4px; flex: 1; flex-wrap: nowrap; align-items: center; min-width: 0; overflow-x: auto; scrollbar-width: thin; }
.nav-link {
    color: #475569; text-decoration: none; font-weight: 600; font-size: .95rem;
    padding: 8px 12px; border-radius: 8px; transition: .15s;
}
.nav-link:hover { background: #f1f5f9; color: #111827; }

.nav-item { position: relative; }
.nav-sub {
    display: none; position: absolute; top: 100%; left: 0; min-width: 180px;
    background: #fff; border: 1px solid var(--border); border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,.1); padding: 8px 0; z-index: 50;
}
.nav-item.has-sub:hover .nav-sub { display: block; }
.nav-sub a {
    display: block; padding: 8px 16px; color: #334155; text-decoration: none; font-weight: 500;
}
.nav-sub a:hover { background: #f1f5f9; color: #111827; }

.btn-cart {
    background: #f1f5f9; color: #111827; border: 1px solid #e2e8f0;
    display: inline-flex; align-items: center; gap: 6px;
}
.btn-cart:hover { background: #e2e8f0; }
.cart-count {
    background: #111827; color: #fff; border-radius: 999px;
    font-size: .75rem; padding: 1px 7px; font-weight: 700;
}
.btn-accent { background: #111827; color: #fff; border: none; }
.btn-accent:hover { filter: brightness(1.05); color: #fff; }
.btn-ghost { background: transparent; color: #64748b; border: 1px solid transparent; }
.btn-ghost:hover { color: #0f172a; background: #f1f5f9; }

.category-section { scroll-margin-top: 100px; }

@media (max-width: 900px) {
    .header-top { display: none; }
    .site-header .main-nav { display: none !important; }
}


/* ---------- Dynamic category / submenu navigation ---------- */
.nav-item.has-sub { position: relative; }
.nav-sub { min-width: 210px; }
.nav-sub a { white-space: nowrap; }
.mobile-nav-group { border-bottom: 1px solid #f1f5f9; }
.mobile-nav-group > a { border-bottom: 0; }
.mobile-nav-drawer a.mobile-nav-child {
  padding: 10px 18px 10px 34px;
  font-size: .92rem;
  font-weight: 500;
  color: #475569;
  background: #f8fafc;
}
.mobile-nav-drawer a.mobile-nav-child:hover {
  color: #2563eb;
  background: #eff6ff;
}

/* ---------- Product detail page (PDP) ---------- */
.pdp-top { margin-bottom: 12px; }
.pdp-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 28px;
    margin-bottom: 28px;
}
@media (max-width: 800px) {
    .pdp-grid { grid-template-columns: 1fr; }
}
.pdp-gallery { padding: 12px; }
.pdp-main-img {
    width: 100%; max-height: 480px; object-fit: contain;
    border-radius: 12px; background: #f8fafc;
}
.pdp-title { font-size: 1.6rem; margin-bottom: 8px; line-height: 1.3; }
.pdp-rating { margin-bottom: 12px; }
.pdp-price-box { margin: 12px 0; }
.pdp-price { font-size: 1.75rem; font-weight: 800; color: #111827; }
.pdp-price-breakdown {
    display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline;
    margin-top: 6px; font-size: .86rem; color: #64748b;
}
.pdp-price-breakdown .pdp-price-total { color: #111827; font-weight: 700; }
.pc-plus { font-size: .74rem; color: #64748b; margin-left: 6px; white-space: nowrap; }
.pdp-stock { margin: 12px 0; }
.pdp-buy-box {
    margin-top: 16px; padding: 16px;
    border: 1px solid #bfdbfe; background: #f8fbff;
}
.pdp-actions {
    display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px;
}
.pdp-actions .qty-wrap { display: flex; flex-direction: column; gap: 4px; }
.pdp-actions .qty-wrap input { width: 80px; }
.btn-buy { min-width: 130px; padding: 12px 18px; font-weight: 700; }
.pdp-actions .btn-primary { background: #f97316; border-color: #f97316; }
.pdp-actions .btn-primary:hover { background: #ea580c; }
.pdp-perks {
    margin-top: 16px; padding-left: 18px; color: #64748b; font-size: .9rem;
}
.pdp-desc h2, .pdp-reviews h2 { font-size: 1.25rem; margin-bottom: 14px; }
.pdp-desc-body {
    display: grid; grid-template-columns: 200px 1fr; gap: 20px; align-items: start;
}
@media (max-width: 600px) {
    .pdp-desc-body { grid-template-columns: 1fr; }
}
.pdp-desc-img {
    width: 100%; border-radius: 10px; object-fit: cover; max-height: 220px;
}
.review-item {
    border-bottom: 1px solid var(--border); padding: 12px 0;
}
.review-head { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 4px; }
.review-form { max-width: 520px; }
.stars { color: #f59e0b; letter-spacing: 1px; }

.social-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.social-links a {
    display: inline-block; padding: 6px 12px; border-radius: 8px;
    background: #1e293b; color: #e2e8f0; text-decoration: none; font-size: .85rem; font-weight: 600;
}
.social-links a:hover { background: #2563eb; color: #fff; }

/* Social + payment icons (footer) */
.footer-tagline { color: #94a3b8; font-size: .92rem; line-height: 1.55; max-width: 280px; margin: 0 0 4px; }
.footer-pay-note { margin-top: 12px; font-size: .78rem; color: #64748b; }

.social-links { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.soc {
    width: 40px; height: 40px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    color: #fff; text-decoration: none;
    transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,.25);
}
.soc svg { display: block; }
.soc.fb { background: #1877f2; }
.soc.ig { background: linear-gradient(135deg, #f58529 0%, #dd2a7b 50%, #8134af 100%); }
.soc.yt { background: #ff0000; }
.soc.wa { background: #25d366; }
.soc:hover { transform: translateY(-2px) scale(1.06); filter: brightness(1.08); box-shadow: 0 6px 16px rgba(0,0,0,.35); }

.pay-icons { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.pay-chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 10px 6px 6px; border-radius: 8px;
    font-size: .72rem; font-weight: 700; letter-spacing: .2px;
    color: #fff; line-height: 1; white-space: nowrap;
    box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.pay-chip-mark {
    width: 22px; height: 22px; border-radius: 5px;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: .65rem; font-weight: 800; background: rgba(255,255,255,.22);
}
.pay-chip-name { padding-right: 2px; }
.pay-bkash { background: linear-gradient(135deg, #e2136e, #c40d5c); }
.pay-nagad { background: linear-gradient(135deg, #f59e0b, #d97706); color: #1a1a1a; }
.pay-nagad .pay-chip-mark { background: rgba(0,0,0,.12); }
.pay-rocket { background: linear-gradient(135deg, #8b5cf6, #6d28d9); }
.pay-visa { background: linear-gradient(135deg, #1a1f71, #0f1449); }
.pay-mc { background: linear-gradient(135deg, #eb001b, #f79e1b); }
.pay-cod { background: linear-gradient(135deg, #16a34a, #15803d); }


/* ---------- Ryan-style payment accept strip ---------- */
.accept-pay {
    display: flex; flex-direction: column; gap: 10px;
}
.accept-pay-label {
    font-size: .8rem; font-weight: 600; color: #94a3b8; letter-spacing: .04em;
}
.accept-pay-grid {
    display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
}
.pay-tile {
    display: inline-flex; align-items: center; justify-content: center;
    width: 52px; height: 36px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,.18);
    border: 1px solid rgba(255,255,255,.9);
    overflow: hidden;
    transition: transform .15s ease, box-shadow .15s ease;
}
.pay-tile:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,.25);
}
.pay-tile svg { display: block; width: 44px; height: 28px; }

/* light background variant (if used on white pages later) */
.accept-pay.on-light .accept-pay-label { color: #64748b; }
.accept-pay.on-light .pay-tile {
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 2px rgba(15,23,42,.06);
}

/* Legacy class names kept for safety */
.pay-logo { display: none; }
.pay-badge { display: none; }

/* Live chat FAB + panel */
.nx-chat-fab {
    position: fixed; right: 22px; bottom: 22px; z-index: 9999;
    width: 58px; height: 58px; border-radius: 50%; border: none;
    background: linear-gradient(135deg,#2563eb,#7c3aed); color: #fff;
    font-size: 1.5rem; cursor: pointer;
    box-shadow: 0 8px 24px rgba(37,99,235,.4);
}
.nx-chat-fab:hover { transform: scale(1.05); }
.nx-chat-panel {
    position: fixed; right: 22px; bottom: 90px; z-index: 9999;
    width: 340px; max-width: calc(100vw - 24px);
    background: #fff; border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0,0,0,.18);
    overflow: hidden; border: 1px solid #e2e8f0;
}
.nx-chat-head {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 14px; background: linear-gradient(135deg,#2563eb,#7c3aed); color: #fff;
}
.nx-chat-close {
    background: transparent; border: none; color: #fff; font-size: 1.4rem; cursor: pointer; line-height: 1;
}
.nx-chat-body { padding: 14px; }
.nx-chat-log {
    height: 220px; overflow-y: auto; margin-bottom: 10px;
    background: #f8fafc; border-radius: 10px; padding: 10px;
}
.nx-bubble {
    max-width: 85%; padding: 8px 12px; border-radius: 12px;
    margin-bottom: 8px; font-size: .9rem; line-height: 1.4;
}
.nx-bubble.user { background: #2563eb; color: #fff; margin-left: auto; }
.nx-bubble.bot { background: #e2e8f0; color: #0f172a; }
.nx-chat-compose { display: flex; gap: 8px; }

.pdp-thumbs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.pdp-thumb {
    width: 64px; height: 64px; object-fit: cover; border-radius: 8px;
    border: 2px solid transparent; cursor: pointer; background: #f1f5f9;
}
.pdp-thumb.active, .pdp-thumb:hover { border-color: #2563eb; }

/* Equal-height product cards (Daraz-style level) */
.grid.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    align-items: stretch;
}
@media (max-width: 1100px) {
    .grid.grid-4 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 750px) {
    .grid.grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
    .grid.grid-4 { grid-template-columns: 1fr; }
}

.product-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-align: left;
    padding: 0;
    overflow: hidden;
    transition: box-shadow .15s, transform .15s;
}
.product-card:hover {
    box-shadow: 0 8px 24px rgba(15,23,42,.1);
    transform: translateY(-2px);
}
.pc-img-wrap {
    display: block;
    background: #f8fafc;
    aspect-ratio: 1 / 1;
    overflow: hidden;
}
.pc-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    margin: 0;
    border-radius: 0;
}
.pc-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 12px 14px 14px;
}
.pc-title {
    font-size: .92rem;
    font-weight: 600;
    line-height: 1.35;
    margin: 0 0 8px;
    min-height: 2.7em; /* always 2 lines space */
    max-height: 2.7em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.pc-title a {
    color: #0f172a;
    text-decoration: none;
}
.pc-title a:visited { color: #0f172a; }
.pc-title a:hover { color: #111827; text-decoration: underline; }
.pc-price {
    margin-bottom: 6px;
    min-height: 1.6em;
    /* Wrap the price parts instead of letting them run together on narrow
       cards: old price + badge on one line, the new price below if needed. */
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0 6px;
}
.pc-amount {
    color: #111827;
    font-weight: 800;
    font-size: 1.05rem;
}
.pc-meta {
    margin-bottom: 10px;
    min-height: 1.2em;
}
.pc-stock { font-size: .78rem; color: #64748b; }
.pc-stock.out { color: #dc2626; }
.pc-actions {
    margin-top: auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.btn-cart-sm, .btn-buy-sm {
    width: 100%;
    padding: 8px 6px;
    font-size: .8rem;
    font-weight: 700;
    border-radius: 8px;
    border: none;
    cursor: pointer;
}
.btn-cart-sm {
    background: #f1f5f9;
    color: #111827;
    border: 1px solid #e2e8f0;
}
.btn-cart-sm:hover { background: #e2e8f0; }
.btn-buy-sm {
    background: #f97316;
    color: #fff;
}
.btn-buy-sm:hover { background: #ea580c; }
.pc-off {
    display: inline-block;
    margin-left: 6px;
    font-size: .78rem;
    font-weight: 700;
    color: #ea580c;
}
.pc-price .old-price { margin-right: 4px; }
/* Discount badge pinned to the product image. Rendered by the shared
   product card partial, so it appears on EVERY listing surface. */
.pc-img-wrap { position: relative; }
.pc-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 2;
    display: inline-block;
    padding: 3px 9px;
    border-radius: 6px;
    background: #dc2626;
    color: #fff;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .2px;
    box-shadow: 0 2px 6px rgba(15,23,42,.25);
}
/* Wishlist / compare grids reuse the shared card plus their own action row. */
.product-grid { margin-top: 4px; }
.wishlist-cell, .compare-cell { display: flex; flex-direction: column; }
.wishlist-cell .product-card, .compare-cell .product-card { flex: 1; }
.pc-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pc-sold { font-size: .78rem; color: #64748b; }
.pay-logos { gap: 8px; }
.pay-logo {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 64px; height: 36px; padding: 0 10px;
    border-radius: 6px; font-size: .72rem; font-weight: 800;
    letter-spacing: .3px; box-shadow: 0 1px 3px rgba(0,0,0,.08);
}
.pay-logo.pay-bkash { background: #e2136e; color: #fff; }
.pay-logo.pay-nagad { background: #f59e0b; color: #111; }
.pay-logo.pay-rocket { background: #7c3aed; color: #fff; }
.pay-logo.pay-visa { background: #1a1f71; color: #fff; }
.pay-logo.pay-mc { background: #eb001b; color: #fff; }
.pay-logo.pay-cod { background: #16a34a; color: #fff; }

.product-desc-box {
    margin-top: 8px;
    padding: 14px 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    line-height: 1.55;
    color: #334155;
}
.product-desc-list {
    margin: 0;
    padding-left: 18px;
}
.product-desc-list li {
    margin-bottom: 6px;
}
.product-desc-p { margin: 0; white-space: pre-wrap; }


/* ---------- Header icon bar (cart / wish / compare / account) ---------- */
.header-icons { display: flex; align-items: center; gap: 6px; }
.h-icon {
    position: relative;
    width: 40px; height: 40px;
    display: inline-flex; align-items: center; justify-content: center;
    color: #0f172a; text-decoration: none;
    border-radius: 10px; transition: background .15s, color .15s;
}
.h-icon:hover { background: #f1f5f9; color: #2563eb; }
.h-badge {
    position: absolute; top: 2px; right: 2px;
    min-width: 16px; height: 16px; padding: 0 4px;
    border-radius: 999px; background: #ef4444; color: #fff;
    font-size: 10px; font-weight: 700; line-height: 16px; text-align: center;
    box-shadow: 0 0 0 2px #fff;
}

/* ---------- Footer social title + hr ---------- */
.footer-social-title {
    margin-top: 18px !important;
    margin-bottom: 10px !important;
    font-size: .85rem !important;
    color: #e2e8f0 !important;
    letter-spacing: .04em;
}
.soc.tg { background: #229ED9; }
.footer-hr {
    border: none;
    height: 2px;
    margin: 0 auto 16px;
    max-width: 280px;
    border-radius: 2px;
    background: linear-gradient(90deg, transparent, #3b82f6, #a855f7, #ec4899, transparent);
}
.footer-bottom { border-top: none !important; padding-top: 8px !important; }
.accept-pay-label { display: none !important; }

/* ---------- Image-based hero slides ---------- */
.hero-slider {
    position: relative;
    width: 100%;
    height: 320px;
    overflow: hidden;
    border-radius: 0;
    background: #0f172a;
}
@media (min-width: 768px) {
    .hero-slider { height: 420px; }
}
.hero-slides { height: 100%; position: relative; }
.hero-slide {
    display: none;
    position: absolute; inset: 0;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}
.hero-slide.active { display: block; }
.hero-hit {
    position: absolute; inset: 0;
    display: block; text-indent: -9999px;
}
.hero-nav {
    position: absolute; top: 50%; transform: translateY(-50%);
    z-index: 5; width: 44px; height: 44px; border: none; border-radius: 50%;
    background: rgba(15,23,42,.45); color: #fff; font-size: 1.6rem; cursor: pointer;
    line-height: 1;
}
.hero-nav:hover { background: rgba(15,23,42,.7); }
.hero-nav.prev { left: 14px; }
.hero-nav.next { right: 14px; }
.hero-dots { position: absolute; bottom: 16px; left: 0; right: 0; text-align: center; z-index: 5; }
.hero-dot {
    width: 10px; height: 10px; border-radius: 50%; border: none;
    background: rgba(255,255,255,.45); margin: 0 4px; cursor: pointer;
}
.hero-dot.active { background: #fff; width: 22px; border-radius: 6px; }



/* ---------- Product image hero ---------- */
.hero-slider {
    position: relative; width: 100%; max-width: 100%;
    height: 280px; overflow: hidden; background: #0f172a; margin: 0 auto;
}
@media (min-width: 640px) { .hero-slider { height: 360px; } }
@media (min-width: 1024px) { .hero-slider { height: 420px; } }
.hero-slides { height: 100%; position: relative; }
.hero-slide {
    display: none; position: absolute; inset: 0;
    background-size: cover; background-position: center center; background-repeat: no-repeat;
}
.hero-slide.active { display: block; }
.hero-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(90deg, rgba(15,23,42,.75) 0%, rgba(15,23,42,.35) 55%, rgba(15,23,42,.15) 100%);
    display: flex; align-items: center;
}
.hero-content {
    padding: 24px 48px; color: #fff; max-width: 640px;
}
.hero-content h1 { font-size: clamp(1.4rem, 3.5vw, 2.4rem); margin: 0 0 10px; text-shadow: 0 2px 12px rgba(0,0,0,.35); }
.hero-content p { font-size: 1.05rem; opacity: .95; margin: 0 0 16px; }
.hero-content .btn { background: #fff; color: #1e3a8a; border: none; font-weight: 700; }
.hero-slide-fallback {
    display: flex !important; align-items: center; justify-content: center;
    background: linear-gradient(120deg, #1e3a8a, #3b82f6);
}
.hero-nav {
    position: absolute; top: 50%; transform: translateY(-50%); z-index: 6;
    width: 42px; height: 42px; border: none; border-radius: 50%;
    background: rgba(15,23,42,.5); color: #fff; font-size: 1.5rem; cursor: pointer;
}
.hero-nav:hover { background: rgba(15,23,42,.75); }
.hero-nav.prev { left: 12px; }
.hero-nav.next { right: 12px; }
.hero-dots { position: absolute; bottom: 14px; left: 0; right: 0; text-align: center; z-index: 6; }
.hero-dot {
    width: 10px; height: 10px; border-radius: 50%; border: none;
    background: rgba(255,255,255,.45); margin: 0 4px; cursor: pointer; vertical-align: middle;
}
.hero-dot.active { background: #fff; width: 22px; border-radius: 6px; }

/* ---------- Category horizontal carousel (6-ish per row, slide more) ---------- */
.cat-head { margin-bottom: 12px; align-items: center; }
.cat-carousel {
    position: relative; display: flex; align-items: center; gap: 6px;
}
.cat-track {
    display: flex; gap: 16px; overflow-x: auto; scroll-behavior: smooth;
    padding: 4px 2px 12px; flex: 1;
    scrollbar-width: thin;
}
.cat-track::-webkit-scrollbar { height: 6px; }
.cat-track::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
.cat-item {
    flex: 0 0 calc((100% - 80px) / 2);
    max-width: calc((100% - 80px) / 2);
}
@media (min-width: 640px) {
    .cat-item { flex-basis: calc((100% - 48px) / 3); max-width: calc((100% - 48px) / 3); }
}
@media (min-width: 900px) {
    .cat-item { flex-basis: calc((100% - 80px) / 6); max-width: calc((100% - 80px) / 6); }
}
.cat-item .product-card { height: 100%; margin: 0; }
.cat-nav {
    flex-shrink: 0; width: 36px; height: 36px; border-radius: 50%; border: 1px solid #e2e8f0;
    background: #fff; color: #0f172a; font-size: 1.3rem; cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
}
.cat-nav:hover { background: #f1f5f9; color: #2563eb; }

/* Pagination */
.pagination {
    display: flex; flex-wrap: wrap; gap: 8px; justify-content: center;
    margin: 28px 0 12px;
}
.page-btn {
    min-width: 36px; height: 36px; padding: 0 10px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 8px; border: 1px solid #e2e8f0;
    background: #fff; color: #0f172a; text-decoration: none; font-weight: 600; font-size: .9rem;
}
.page-btn:hover { border-color: #111827; color: #111827; }
.page-btn.active { background: #111827; border-color: #111827; color: #fff; }


/* Centered hero text */
.hero-overlay {
    justify-content: center !important;
    text-align: center;
    background: linear-gradient(180deg, rgba(15,23,42,.55) 0%, rgba(15,23,42,.45) 100%) !important;
}
.hero-content-center, .hero-content {
    margin: 0 auto;
    text-align: center;
    max-width: 720px;
    padding: 24px 56px !important;
}
.hero-content h1 { text-align: center; }
.hero-content p { text-align: center; }
.hero-content .btn { display: inline-block; }

/* Single Add to Cart button */
.pc-actions-single { display: block !important; }
.pc-add-form { margin: 0; }
.btn-add-cart {
    display: block; width: 100%;
    padding: 8px 12px; border: none; border-radius: 8px;
    background: #111827; color: #fff; font-weight: 600; font-size: .85rem;
    cursor: pointer; text-align: center; text-decoration: none;
}
.btn-add-cart:hover { background: #030712; color: #fff; }

/* Header mini-cart dropdown */
.h-cart-wrap { position: relative; }
.h-cart-dropdown {
    display: none; position: absolute; right: 0; top: calc(100% + 6px);
    width: 300px; max-width: 90vw; background: #fff; border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0,0,0,.15); border: 1px solid #e2e8f0;
    padding: 12px; z-index: 100;
}
.h-cart-wrap:hover .h-cart-dropdown { display: block; }
.h-cart-empty { margin: 8px; color: #64748b; font-size: .9rem; text-align: center; }
.h-cart-list { list-style: none; margin: 0 0 10px; padding: 0; max-height: 240px; overflow-y: auto; }
.h-cart-list li {
    display: flex; gap: 10px; align-items: center;
    padding: 8px 0; border-bottom: 1px solid #f1f5f9; font-size: .85rem;
}
.h-cart-list img { width: 40px; height: 40px; object-fit: cover; border-radius: 6px; background: #f1f5f9; }
.h-cart-list strong { display: block; color: #0f172a; font-size: .85rem; }
.h-cart-list span { color: #64748b; font-size: .8rem; }
.btn-block { display: block; width: 100%; text-align: center; }

/* Checkout polish */
.req { color: #dc2626; }
.opt { color: #94a3b8; font-weight: 400; font-size: .85em; }
.checkout-hint { font-size: .9rem; color: #64748b; margin: 4px 0 12px; }


/* ---------- PDP discount badge & tabs ---------- */
.pdp-off-badge {
    display: inline-block;
    margin-left: 8px;
    padding: 3px 10px;
    border-radius: 6px;
    background: #fee2e2;
    color: #dc2626;
    font-weight: 700;
    font-size: .85rem;
    vertical-align: middle;
}
.pdp-price-box .old-price {
    text-decoration: line-through;
    color: #94a3b8;
    margin-right: 6px;
    font-size: 1rem;
}
.pdp-thumb-btn {
    border: 2px solid transparent;
    padding: 0;
    background: none;
    border-radius: 8px;
    cursor: pointer;
    overflow: hidden;
}
.pdp-thumb-btn.active { border-color: #2563eb; }
.pdp-thumb-btn .pdp-thumb { display: block; width: 64px; height: 64px; object-fit: cover; }

.pdp-lower {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 20px;
    margin-top: 24px;
    align-items: start;
}
@media (max-width: 900px) {
    .pdp-lower { grid-template-columns: 1fr; }
}
.pdp-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    border-bottom: 2px solid #e2e8f0;
    margin-bottom: 16px;
}
.pdp-tab {
    border: none;
    background: transparent;
    padding: 12px 18px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}
.pdp-tab.active {
    color: #0f172a;
    border-bottom-color: #0f172a;
    background: #0f172a;
    color: #fff;
    border-radius: 6px 6px 0 0;
}
.pdp-tab-panel { padding: 8px 4px 12px; }
.pdp-spec-table {
    width: 100%;
    border-collapse: collapse;
}
.pdp-spec-table th,
.pdp-spec-table td {
    padding: 12px 14px;
    border-bottom: 1px solid #e2e8f0;
    text-align: left;
    font-size: .95rem;
}
.pdp-spec-table th {
    width: 34%;
    color: #64748b;
    font-weight: 600;
    background: #f8fafc;
}

.pdp-similar-title {
    font-size: 1rem;
    margin: 0 0 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #0f172a;
}
.pdp-similar-item {
    display: flex;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #f1f5f9;
    text-decoration: none;
    color: inherit;
}
.pdp-similar-item img {
    width: 56px; height: 56px; object-fit: cover; border-radius: 6px; background: #f1f5f9;
}
.pdp-similar-item strong {
    display: block; font-size: .85rem; color: #0f172a; margin-bottom: 4px;
}
.pdp-similar-price { color: #2563eb; font-weight: 700; font-size: .9rem; }

.review-form-box {
    margin-top: 20px;
    padding: 16px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fafafa;
}
.star-pick { display: flex; gap: 4px; margin-bottom: 12px; }
.star-btn {
    border: none; background: none; font-size: 1.6rem;
    color: #cbd5e1; cursor: pointer; padding: 0 2px; line-height: 1;
}
.star-btn.active { color: #f59e0b; }
.btn-success {
    background: #16a34a; color: #fff; border: none;
    padding: 10px 18px; border-radius: 8px; font-weight: 600; cursor: pointer;
}
.btn-success:hover { background: #15803d; }


/* PDP hover zoom */
.pdp-main-wrap {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    background: #f8fafc;
    cursor: zoom-in;
}
.pdp-main-wrap .pdp-main-img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 480px;
    object-fit: contain;
    transition: transform 0.12s ease-out;
    transform-origin: center center;
}
.pdp-main-wrap.is-zoom .pdp-main-img {
    /* transform set by JS */
}


/* PDP tabs — ensure switch works even if [hidden] is overridden */
.pdp-tab-panel { display: none; }
.pdp-tab-panel.active,
.pdp-tab-panel:not([hidden]) { display: block; }
.pdp-tab-panel[hidden] { display: none !important; }
.pdp-main-wrap { overflow: hidden; cursor: zoom-in; }
.pdp-main-img { transition: transform .12s ease; width: 100%; display: block; }
.brand-name { display: none !important; }

/* ============================================================
   Admin shell — fixed left sidebar (scrollable) + main content
   ============================================================ */
.admin-shell {
    display: flex;
    min-height: calc(100vh - 0px);
    background: #f1f5f9;
}
.admin-sidebar {
    width: 260px;
    flex-shrink: 0;
    background: #0f172a;
    color: #e2e8f0;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: hidden;
    z-index: 40;
    border-right: 1px solid #1e293b;
}
.admin-sidebar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid #1e293b;
    flex-shrink: 0;
}
.admin-sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #fff;
}
.admin-sidebar-mark {
    width: 34px; height: 34px; border-radius: 8px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 1rem;
}
.admin-sidebar-title { font-weight: 700; font-size: .95rem; }
.admin-sidebar-close {
    display: none;
    background: transparent; border: none; color: #94a3b8;
    font-size: 1.5rem; cursor: pointer; line-height: 1;
}
.admin-sidebar-user {
    padding: 12px 16px;
    border-bottom: 1px solid #1e293b;
    flex-shrink: 0;
    display: flex; flex-direction: column; gap: 4px;
}
.admin-sidebar-user strong { font-size: .9rem; color: #fff; }
.admin-role-badge {
    display: inline-block;
    font-size: .7rem;
    background: #1e293b;
    color: #93c5fd;
    padding: 2px 8px;
    border-radius: 999px;
    width: fit-content;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.admin-sidebar-nav {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 10px 8px 24px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #334155 transparent;
}
.admin-sidebar-nav::-webkit-scrollbar { width: 6px; }
.admin-sidebar-nav::-webkit-scrollbar-thumb { background: #334155; border-radius: 4px; }

.admin-nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    color: #cbd5e1;
    text-decoration: none;
    font-size: .9rem;
    font-weight: 500;
    margin-bottom: 2px;
    transition: background .12s, color .12s;
}
.admin-nav-link:hover { background: #1e293b; color: #fff; }
.admin-nav-link.active { background: #2563eb; color: #fff; }
.admin-nav-ico { opacity: .7; font-size: .75rem; width: 16px; text-align: center; }
.admin-nav-logout { color: #fca5a5; }
.admin-nav-logout:hover { background: #7f1d1d; color: #fff; }
.admin-nav-divider {
    height: 1px; background: #1e293b; margin: 12px 8px;
}

.admin-nav-group { margin-bottom: 2px; }
.admin-nav-group-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #cbd5e1;
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
}
.admin-nav-group-btn:hover { background: #1e293b; color: #fff; }
.admin-nav-chevron {
    margin-left: auto;
    font-size: .7rem;
    transition: transform .15s;
    opacity: .6;
}
.admin-nav-group.open .admin-nav-chevron { transform: rotate(180deg); }
.admin-nav-sub {
    display: none;
    padding: 2px 0 6px 12px;
    border-left: 2px solid #1e293b;
    margin: 0 0 4px 18px;
}
.admin-nav-group.open .admin-nav-sub { display: block; }
.admin-nav-sub a {
    display: block;
    padding: 7px 10px;
    border-radius: 6px;
    color: #94a3b8;
    text-decoration: none;
    font-size: .85rem;
    margin-bottom: 1px;
}
.admin-nav-sub a:hover { background: #1e293b; color: #fff; }
.admin-nav-sub a.active { color: #ffffff; background: #2563eb; font-weight: 600; box-shadow: inset 0 0 0 1px #3b82f6; }
.nav-badge {
    display: inline-block;
    background: #ef4444;
    color: #fff;
    font-size: .65rem;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 999px;
    margin-left: 4px;
    vertical-align: middle;
}

.admin-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}
.admin-content {
    flex: 1;
    padding: 20px 24px 40px;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
}

body.is-admin-shell .site-header .main-nav,
body.is-admin-shell .site-header .header-top,
body.is-admin-shell .site-header .h-search,
body.is-admin-shell .site-header .h-cart-wrap,
body.is-admin-shell .site-header .currency-form {
    display: none !important;
}
body.is-admin-shell .site-header {
    position: sticky;
    top: 0;
    z-index: 30;
    background: #fff;
    border-bottom: 1px solid var(--border);
}
body.is-admin-shell .site-header .header-inner {
    max-width: none;
    padding-left: 16px;
    padding-right: 16px;
}

.admin-sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .45);
    z-index: 35;
}
.admin-sidebar-backdrop.is-visible { display: block; }
.admin-sidebar-toggle { display: none; }

@media (max-width: 960px) {
    .admin-sidebar {
        position: fixed;
        left: 0; top: 0;
        transform: translateX(-100%);
        transition: transform .2s ease;
        box-shadow: 4px 0 24px rgba(0,0,0,.25);
    }
    .admin-sidebar.is-open { transform: translateX(0); }
    .admin-sidebar-close { display: block; }
    .admin-sidebar-toggle { display: inline-flex; }
    .admin-content { padding: 16px 14px 32px; }
}


/* ---------- Professional product / supplier polish ---------- */
.pdp-meta{display:flex;flex-wrap:wrap;gap:8px;margin:10px 0 8px}.pdp-meta span{background:#f8fafc;border:1px solid #e2e8f0;border-radius:999px;padding:6px 10px;font-size:.82rem;color:#475569}.pdp-tags{display:flex;flex-wrap:wrap;gap:6px;margin:8px 0 14px}.pdp-tags span{font-size:.78rem;color:#2563eb;background:#eff6ff;border:1px solid #bfdbfe;padding:4px 8px;border-radius:999px}.pdp-variants.card{padding:14px;margin-top:12px}.variant-live-info{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin-top:10px}.variant-live-info div{padding:9px 10px;background:#f8fafc;border:1px solid #e2e8f0;border-radius:8px}.variant-live-info span{display:block;font-size:.72rem;color:#64748b}.variant-live-info strong{display:block;margin-top:3px;font-size:.86rem;color:#0f172a}.product-editor{display:grid;gap:16px}.editor-card{padding:20px}.editor-section{display:grid;gap:8px}.section-title{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px}.section-title h3{margin:0}.section-title p{margin:4px 0 0;color:#64748b;font-size:.85rem}.input-action{display:flex;gap:6px;align-items:center}.input-action .form-control{flex:1}.tag-checks{display:flex;flex-wrap:wrap;gap:8px}.tag-checks label{background:#f8fafc;border:1px solid #e2e8f0;border-radius:8px;padding:7px 10px;font-weight:500}.variant-editor-list{display:grid;gap:10px}.variant-editor-row{position:relative;display:grid;grid-template-columns:1fr 1fr 1fr 1fr 1.25fr 1.25fr auto;gap:8px;padding:14px 42px 8px 10px;border:1px solid #e2e8f0;border-radius:12px;background:#fbfdff}.variant-editor-row .form-group{margin:0}.variant-editor-row label{font-size:.72rem;color:#64748b}.variant-remove{position:absolute;right:10px;top:10px;border:0;background:#fee2e2;color:#b91c1c;width:28px;height:28px;border-radius:8px;cursor:pointer;font-size:18px}.empty-variant{padding:18px;text-align:center;border:1px dashed #cbd5e1;border-radius:10px;color:#64748b}.empty-variant.hidden{display:none}.editor-actions{display:flex;justify-content:flex-end;gap:10px;padding-bottom:30px}.btn-lg{padding:11px 20px}.supplier-stats{grid-template-columns:repeat(4,1fr);margin:18px 0}.stat-card{padding:16px}.stat-card span{display:block;color:#64748b;font-size:.82rem}.stat-card strong{display:block;font-size:1.35rem;margin-top:5px}.supplier-two-col{grid-template-columns:1fr 1.4fr}.text-success{color:#15803d}.text-danger{color:#dc2626}@media(max-width:900px){.variant-editor-row{grid-template-columns:1fr 1fr}.variant-live-info{grid-template-columns:1fr 1fr}.supplier-stats{grid-template-columns:1fr 1fr}.supplier-two-col{grid-template-columns:1fr}}@media(max-width:620px){.supplier-stats{grid-template-columns:1fr}.editor-actions{flex-direction:column}.editor-actions .btn{width:100%}}

/* Cleaner single account action in the public header */
.header-account-only{width:40px;height:40px;border-radius:10px;display:inline-flex;align-items:center;justify-content:center;border:1px solid #e2e8f0;color:#334155;background:#fff;text-decoration:none}.header-account-only:hover{background:#eff6ff;color:#2563eb;border-color:#bfdbfe}

/* Final professional polish */
.admin-form-page .product-editor{display:flex!important;flex-direction:column!important;width:100%;min-width:0}.admin-form-page .editor-card{width:100%;box-sizing:border-box;min-width:0}.admin-form-page .grid{min-width:0}.admin-form-page input,.admin-form-page select,.admin-form-page textarea{box-sizing:border-box;max-width:100%}.variant-editor-row{grid-template-columns:repeat(3,minmax(0,1fr))!important}.managed-gallery{display:flex;flex-wrap:wrap;gap:12px}.managed-image{width:120px;border:1px solid #e2e8f0;border-radius:10px;padding:8px;background:#fff}.managed-image img{width:100%;height:90px;object-fit:cover;border-radius:7px;display:block;margin-bottom:6px}.managed-image span{font-size:.78rem}.code-ok{color:#15803d!important}.code-bad{color:#b91c1c!important}.brand-tag-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px}.manage-panel{padding:18px}.manage-add,.manage-edit{display:flex;gap:8px;align-items:center}.manage-add{margin-bottom:14px}.manage-list{display:grid;gap:8px}.manage-row{display:flex;gap:8px;align-items:center;padding:8px;border:1px solid #e2e8f0;border-radius:10px}.manage-edit{flex:1}.report-filter{display:flex;gap:8px;flex-wrap:wrap;margin:14px 0 18px}.report-filter .form-control{width:auto;min-width:150px}.report-cards{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-bottom:18px}.report-cards .card{padding:16px}.report-cards span{display:block;color:#64748b;font-size:.82rem}.report-cards strong{display:block;font-size:1.35rem;margin-top:4px}.tracking-form{display:grid;grid-template-columns:180px 1fr auto;gap:8px;align-items:center}.tracking-display{display:flex;gap:12px;flex-wrap:wrap;margin-top:10px;padding:10px 12px;border-radius:9px;background:#f8fafc;border:1px solid #e2e8f0}.employee-form{display:grid;grid-template-columns:1.4fr 1fr 1fr 1fr 1fr 1fr auto;gap:8px}.payroll-form{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.payroll-form .btn{grid-column:span 1}@media(max-width:1000px){.employee-form{grid-template-columns:1fr 1fr 1fr}.tracking-form{grid-template-columns:1fr}.payroll-form{grid-template-columns:1fr 1fr}}@media(max-width:760px){.brand-tag-grid,.report-cards{grid-template-columns:1fr}.variant-editor-row{grid-template-columns:1fr!important}.employee-form,.payroll-form{grid-template-columns:1fr}.manage-row{align-items:stretch;flex-direction:column}.manage-edit{width:100%}}

/* ========== Mobile Hamburger Menu ========== */
.mobile-nav-toggle {
  display: none;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
  font-size: 1.35rem;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.mobile-nav-drawer {
  position: fixed;
  top: 0; left: 0;
  width: 280px;
  max-width: 85vw;
  height: 100vh;
  background: #fff;
  z-index: 200;
  transform: translateX(-105%);
  transition: transform .25s ease;
  box-shadow: 4px 0 24px rgba(0,0,0,.15);
  overflow-y: auto;
  padding: 0 0 24px;
}
.mobile-nav-drawer.open { transform: translateX(0); }
.mobile-nav-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 18px;
  border-bottom: 1px solid #e2e8f0;
  font-size: 1.05rem;
}
.mobile-nav-head button {
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: #64748b;
}
.mobile-nav-drawer a {
  display: block;
  padding: 14px 18px;
  color: #0f172a;
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px solid #f1f5f9;
}
.mobile-nav-drawer a:hover { background: #eff6ff; color: #2563eb; }
.mobile-nav-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,.45);
  z-index: 199;
}
.mobile-nav-backdrop.open { display: block; }

@media (max-width: 900px) {
  .mobile-nav-toggle { display: inline-flex; }
  .main-nav { display: none !important; }
  .header-top { display: none; }
}

/* ========== Mobile product cards — smart compact (2 column) ========== */
/* ========== Mobile product slider — 2 card clean ========== */
@media (max-width: 600px) {
  /* Slider track — show ~2 cards */
  .product-slider,
  .cat-slider,
  .slider-track,
  .swiper-wrapper,
  [class*="slider"] .slick-track {
    gap: 10px !important;
  }

  .product-slider .product-card,
  .cat-slider .product-card,
  .slider-track .product-card,
  .swiper-slide .product-card {
    width: calc(50% - 6px) !important;
    min-width: calc(50% - 6px) !important;
    max-width: calc(50% - 6px) !important;
  }

  /* If slides are direct children */
  .product-slider > *,
  .cat-item {
    flex: 0 0 calc(50% - 6px) !important;
    max-width: calc(50% - 6px) !important;
  }

  /* Card compact */
  .product-card .pc-body {
    padding: 8px !important;
  }
  .product-card .pc-title {
    font-size: .78rem !important;
    line-height: 1.3 !important;
    min-height: 2.4em !important;
    max-height: 2.4em !important;
  }
  .product-card .pc-amount {
    font-size: .88rem !important;
  }
  .product-card .pc-stock,
  .product-card .pc-sold {
    font-size: .68rem !important;
  }
  .product-card .btn-add-cart {
    padding: 7px 4px !important;
    font-size: .72rem !important;
  }

  /* Header mobile clean */
  .header-inner {
    flex-wrap: wrap !important;
    gap: 8px !important;
  }
  .h-search input {
    width: 110px !important;
    font-size: .8rem !important;
  }
}

/* Professional print support */
@media print {
  .no-print, .site-header, .admin-sidebar, .nx-chat-fab, .nx-chat-panel, .cookie-banner, .admin-print-toolbar { display:none !important; }
  body, body.is-admin-shell { background:#fff !important; color:#000 !important; }
  .admin-shell, .admin-main, .admin-content, .container, .main-content { display:block !important; width:100% !important; max-width:none !important; margin:0 !important; padding:0 !important; box-shadow:none !important; }
  .card { box-shadow:none !important; border:1px solid #ddd !important; }
  a { color:#000 !important; text-decoration:none !important; }
  table { width:100% !important; }
  .print-document { max-width:900px !important; margin:0 auto !important; padding:0 !important; }
}
.admin-print-toolbar{display:flex;justify-content:flex-end;margin:0 0 8px}


/* ===== Salary Slip / Receipt ===== */
.salary-slip-page { padding: 20px 16px; max-width: 820px; margin: 0 auto; }
.slip-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.slip-toolbar-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.salary-slip {
  padding: 0;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.08);
  background: #fff;
}
.slip-header {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 24px 28px;
  background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 55%, #6366f1 100%);
  color: #fff;
}
.slip-brand { display: flex; align-items: center; gap: 12px; }
.slip-logo {
  width: 48px; height: 48px; border-radius: 12px;
  background: rgba(255,255,255,.2); color: #fff;
  font-weight: 800; font-size: 1.35rem;
  display: flex; align-items: center; justify-content: center;
}
.slip-company { font-size: 1.25rem; font-weight: 800; letter-spacing: -0.02em; }
.slip-tagline { opacity: .9; font-size: .9rem; }
.slip-meta { text-align: right; }
.slip-no, .slip-month { font-size: .9rem; opacity: .95; }
.slip-status {
  display: inline-block; margin-top: 8px; padding: 4px 12px; border-radius: 999px;
  font-size: .75rem; font-weight: 700; letter-spacing: .04em;
  background: rgba(255,255,255,.2);
}
.slip-status.slip-paid { background: #22c55e; color: #fff; }
.slip-status.slip-partial { background: #f59e0b; color: #111; }
.slip-status.slip-unpaid { background: #ef4444; color: #fff; }
.slip-parties {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
  padding: 22px 28px 8px;
}
.slip-box {
  background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 12px; padding: 14px 16px;
}
.slip-box h4 { margin: 0 0 8px; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: #64748b; }
.slip-name { font-size: 1.1rem; font-weight: 700; margin: 0 0 4px; color: #0f172a; }
.slip-box p { margin: 0 0 6px; color: #334155; font-size: .92rem; }
.slip-amounts, .slip-history { padding: 8px 28px 16px; }
.slip-table { width: 100%; border-collapse: collapse; }
.slip-table th, .slip-table td { padding: 12px 10px; border-bottom: 1px solid #e2e8f0; text-align: left; }
.slip-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.slip-table thead th { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: #64748b; background: #f8fafc; }
.slip-net th { font-size: 1.05rem; color: #1e3a8a; border-top: 2px solid #cbd5e1; }
.slip-table .ded { color: #dc2626; }
.slip-table .paid { color: #16a34a; font-weight: 700; }
.slip-table .due { color: #dc2626; font-weight: 700; }
.slip-table-sm th, .slip-table-sm td { padding: 8px 8px; font-size: .9rem; }
.slip-history h4 { margin: 8px 0 10px; color: #0f172a; }
.slip-note { margin: 0 28px 16px; padding: 12px 14px; background: #fffbeb; border-radius: 10px; border: 1px solid #fde68a; color: #78350f; }
.slip-footer {
  display: grid; grid-template-columns: 1fr 1fr; gap: 24px;
  padding: 28px 28px 12px; margin-top: 8px;
}
.slip-sign { text-align: center; color: #64748b; font-size: .85rem; }
.slip-sign-line { border-top: 1px solid #94a3b8; margin: 48px 16px 8px; }
.slip-disclaimer { text-align: center; color: #94a3b8; font-size: .78rem; padding: 0 28px 22px; }

/* Mobile */
@media (max-width: 768px) {
  .slip-parties, .slip-footer { grid-template-columns: 1fr; }
  .slip-meta { text-align: left; }
  .slip-header, .slip-amounts, .slip-history, .slip-parties { padding-left: 16px; padding-right: 16px; }
  .header-inner { flex-wrap: wrap; }
  .main-nav { width: 100%; order: 3; }
  .h-search input { width: 100px !important; }
  .admin-dropdown { max-height: 70vh; overflow: auto; }
  .footer-grid { grid-template-columns: 1fr 1fr !important; gap: 20px !important; }
  .product-grid, .pdp-grid { grid-template-columns: 1fr !important; }
  .table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr !important; }
  .brand-name { display: none !important; }
}

@media print {
  .slip-toolbar, .no-print, .site-header, .admin-sidebar, .site-footer,
  .nx-chat-fab, .nx-chat-panel, .cookie-banner, .admin-print-toolbar { display: none !important; }
  .salary-slip { box-shadow: none !important; border: 1px solid #cbd5e1 !important; }
  .slip-header { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  body { background: #fff !important; }
}


/* ===== Pro header & smooth submenu ===== */
.site-header {
  background: #0b1220;
  border-bottom: 1px solid rgba(255,255,255,.06);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 24px rgba(2,6,23,.25);
}
.site-header .header-inner { padding: 10px 20px; gap: 18px; }
.site-header .brand-mark {
  background: #111827;
  color: #fff;
  width: 40px; height: 40px; border-radius: 11px;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1.15rem;
  box-shadow: 0 2px 8px rgba(17,24,39,.2);
}
.site-header .main-nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.site-header .nav-link {
  color: #cbd5e1 !important;
  font-weight: 600;
  font-size: .9rem;
  padding: 8px 12px !important;
  border-radius: 8px;
  text-decoration: none;
  transition: background .18s ease, color .18s ease;
}
.site-header .nav-link:hover,
.site-header .nav-item:hover > .nav-link {
  background: rgba(255,255,255,.08);
  color: #fff !important;
}
.site-header .nav-caret { font-size: .65rem; opacity: .75; margin-left: 2px; }
.nav-item { position: relative; }
.nav-sub {
  display: none;
  position: absolute;
  left: 0; top: calc(100% + 6px);
  min-width: 220px;
  padding: 8px 0;
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 16px 40px rgba(15,23,42,.16);
  z-index: 120;
  animation: navFade .16s ease;
}
@keyframes navFade {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.nav-item.has-sub:hover > .nav-sub,
.nav-item.has-sub:focus-within > .nav-sub { display: block; }
.nav-sub a {
  display: block;
  padding: 9px 16px;
  color: #334155;
  text-decoration: none;
  font-size: .9rem;
  font-weight: 500;
  transition: background .15s, color .15s;
}
.nav-sub a:hover { background: #eff6ff; color: #1d4ed8; }
.nav-sub-all { border-bottom: 1px solid #f1f5f9; font-weight: 700 !important; color: #0f172a !important; }
.site-header .header-actions { gap: 8px; }
.site-header .h-icon { color: #e2e8f0; }
.site-header .form-control,
.site-header select {
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.12);
  color: #f8fafc;
}
.site-header .btn-outline {
  border-color: rgba(255,255,255,.2);
  color: #e2e8f0;
}
.site-header .btn-primary {
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  border: none;
}
@media (max-width: 900px) {
  .site-header .main-nav { display: none; }
}


/* ============================================================
   Customer UX upgrades (Header premium + Filters + Cart/Checkout mobile + WhatsApp + Trust)
   ============================================================ */

/* Premium header polish */
.site-header {
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 1px 0 rgba(15,23,42,.04);
}
.brand-text {
    font-size: 1.2rem;
    font-weight: 800;
    color: #111827;
    letter-spacing: -0.02em;
}
.header-top {
    background: #111827;
    color: #94a3b8;
}

/* Category filters */
.shop-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 24px;
    align-items: start;
}
.shop-filters {
    background: #fafaf9;
    border: 1px solid #e7e5e4;
    border-radius: 12px;
    padding: 18px 16px;
    position: sticky;
    top: 80px;
}
.shop-filters h3 {
    font-size: .95rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 14px;
    letter-spacing: .02em;
    text-transform: uppercase;
}
.filter-group { margin-bottom: 18px; }
.filter-group label.fg-title {
    display: block;
    font-size: .75rem;
    font-weight: 700;
    color: #78716c;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: 8px;
}
.filter-group label.opt {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .9rem;
    color: #334155;
    margin-bottom: 6px;
    cursor: pointer;
}
.filter-group input[type="number"] {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #e7e5e4;
    border-radius: 8px;
    font-size: .9rem;
    background: #fff;
}
.price-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.shop-filters .btn-apply {
    width: 100%;
    background: #111827;
    color: #fff;
    border: none;
    padding: 10px 14px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}
.shop-filters .btn-apply:hover { background: #030712; }
.shop-filters .btn-clear {
    display: block;
    text-align: center;
    margin-top: 10px;
    font-size: .85rem;
    color: #78716c;
    text-decoration: none;
}
.shop-filters .btn-clear:hover { color: #111827; }
.filter-toggle-mobile {
    display: none;
    width: 100%;
    margin-bottom: 12px;
    background: #fff;
    border: 1px solid #e7e5e4;
    padding: 10px 14px;
    border-radius: 8px;
    font-weight: 600;
    color: #111827;
    cursor: pointer;
}

/* Cart mobile cards */
.cart-desktop { display: block; }
.cart-mobile { display: none; }
.cart-item-card {
    display: flex;
    gap: 12px;
    padding: 14px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    margin-bottom: 12px;
}
.cart-item-card .ci-body { flex: 1; min-width: 0; }
.cart-item-card .ci-name { font-weight: 600; color: #111827; margin-bottom: 4px; }
.cart-item-card .ci-meta { font-size: .85rem; color: #64748b; margin-bottom: 8px; }
.cart-item-card .ci-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.cart-item-card .ci-price { font-weight: 700; color: #111827; }
.cart-summary-bar {
    position: sticky;
    bottom: 0;
    background: #fff;
    border-top: 1px solid #e5e7eb;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    box-shadow: 0 -4px 16px rgba(0,0,0,.06);
    z-index: 40;
}

/* Checkout mobile smooth */
.checkout-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 800px) {
    .checkout-grid { grid-template-columns: 1fr; }
    .order-summary { order: -1; }
    .checkout-sticky-btn {
        position: sticky;
        bottom: 12px;
        z-index: 30;
        box-shadow: 0 4px 20px rgba(0,0,0,.15);
    }
}

/* Trust badges on PDP */
.pdp-trust {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 14px;
}
.pdp-trust-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: .82rem;
    color: #475569;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px 10px;
}
.pdp-trust-item strong { display: block; color: #111827; font-size: .85rem; }

/* Floating WhatsApp */
.wa-float {
    position: fixed;
    /* Sit in the SAME right-hand column as the live-chat FAB, one button-height
       above it (FAB is 58px tall with a 22px bottom offset), so the two circles
       never overlap on desktop or mobile. */
    right: 16px;
    bottom: 92px;
    z-index: 10000;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #25D366;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(37, 211, 102, .45);
    text-decoration: none;
    transition: transform .15s ease, box-shadow .15s ease;
}
.wa-float:hover { transform: scale(1.06); box-shadow: 0 8px 24px rgba(37, 211, 102, .55); color: #fff; }
.wa-float svg { width: 28px; height: 28px; fill: currentColor; }

@media (max-width: 900px) {
    .shop-layout { grid-template-columns: 1fr; }
    .shop-filters {
        display: none;
        position: static;
        margin-bottom: 16px;
    }
    .shop-filters.open { display: block; }
    .filter-toggle-mobile { display: block; }
    .cart-desktop { display: none; }
    .cart-mobile { display: block; }
}


/* ============================================================
   Header usability fix — larger, readable, white premium
   (overrides older "Pro header" dark/small styles)
   ============================================================ */
.site-header {
  background: #ffffff !important;
  border-bottom: 1px solid #e5e7eb !important;
  box-shadow: 0 1px 8px rgba(15, 23, 42, 0.06) !important;
}
.site-header .header-inner {
  padding: 16px 24px !important;
  gap: 20px !important;
  min-height: 72px;
  align-items: center;
}
.site-header .brand-mark {
  width: 44px !important;
  height: 44px !important;
  border-radius: 12px !important;
  background: #111827 !important;
  font-size: 1.25rem !important;
  box-shadow: none !important;
}
.site-header .brand-text {
  font-size: 1.35rem !important;
  font-weight: 800 !important;
  color: #111827 !important;
}
.site-header .nav-link {
  color: #334155 !important;
  font-size: 1rem !important;
  font-weight: 600 !important;
  padding: 10px 14px !important;
}
.site-header .nav-link:hover,
.site-header .nav-item:hover > .nav-link {
  background: #f1f5f9 !important;
  color: #111827 !important;
}
.site-header .h-icon {
  width: 44px !important;
  height: 44px !important;
  color: #0f172a !important;
}
.site-header .h-icon:hover {
  background: #f1f5f9 !important;
  color: #111827 !important;
}
.site-header .form-control,
.site-header select,
.site-header .h-search input {
  background: #fff !important;
  border: 1px solid #e2e8f0 !important;
  color: #0f172a !important;
  min-height: 42px;
  font-size: 0.95rem !important;
  padding: 8px 12px !important;
}
.site-header .h-search input {
  width: 200px !important;
  max-width: 40vw;
}
.site-header .btn-outline {
  border-color: #e2e8f0 !important;
  color: #0f172a !important;
}
.site-header .btn-primary {
  background: #111827 !important;
  border: none !important;
  color: #fff !important;
}
.site-header .header-actions {
  gap: 10px !important;
}
.header-top {
  background: #111827 !important;
  font-size: 0.85rem !important;
  padding: 8px 0 !important;
}

@media (max-width: 900px) {
  .site-header .header-inner {
    padding: 12px 16px !important;
    min-height: 60px;
  }
  .site-header .h-search input {
    width: 120px !important;
  }
  .wa-float {
    bottom: 88px;
    right: 14px;
  }
}


/* ============================================================
   Header layout: single-row nav (no multi-line category wrap)
   ============================================================ */
.site-header .header-inner {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  gap: 16px !important;
}
.site-header .brand {
  flex-shrink: 0;
}
.site-header .main-nav {
  display: flex !important;
  flex-wrap: nowrap !important;
  flex: 1 1 auto;
  min-width: 0;
  overflow: visible; /* critical: allow submenu dropdowns */
  gap: 2px;
  align-items: center;
}
.site-header .main-nav::-webkit-scrollbar { height: 4px; }
.site-header .main-nav::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
.site-header .nav-item {
  flex-shrink: 0;
}
.site-header .nav-link {
  white-space: nowrap !important;
  padding: 10px 12px !important;
  font-size: 0.95rem !important;
}
.site-header .header-actions {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap !important;
}
.site-header .h-search input {
  width: 160px !important;
}

/* Desktop: show nav in one row; Mobile: hide (use hamburger drawer) */
@media (max-width: 900px) {
  .site-header .main-nav { display: none !important; }
  .site-header .header-inner { flex-wrap: nowrap !important; }
  .site-header .h-search input { width: 110px !important; }
}
@media (min-width: 901px) {
  .mobile-nav-toggle { display: none !important; }
}


/* Submenu must work (dropdown above content) */
.site-header .nav-item { position: relative; z-index: 50; }
.site-header .nav-item.has-sub:hover { z-index: 200; }
.site-header .nav-sub {
  display: none;
  position: absolute;
  left: 0;
  top: calc(100% + 4px);
  min-width: 200px;
  z-index: 300;
  background: #fff !important;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(15,23,42,.14);
  padding: 8px 0;
}
.site-header .nav-item.has-sub:hover > .nav-sub,
.site-header .nav-item.has-sub:focus-within > .nav-sub {
  display: block !important;
}


/* ============================================================
   Header layout FINAL — desktop nav + mobile responsive
   BDT stays in actions (right), never mixes into category menu
   ============================================================ */

.site-header .header-inner {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  gap: 12px !important;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 16px !important;
  min-height: 64px;
  box-sizing: border-box;
}

.site-header .brand {
  flex: 0 0 auto !important;
  order: 1;
}

.site-header .mobile-nav-toggle {
  order: 5;
  flex: 0 0 auto;
}

/* Category menu — own area, does not absorb BDT */
.site-header .main-nav {
  order: 2;
  flex: 1 1 auto !important;
  min-width: 0 !important;
  max-width: none;
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  gap: 2px !important;
  overflow-x: auto !important;
  overflow-y: visible !important;
  margin: 0 !important;
  padding: 0 4px !important;
}

.site-header .main-nav .nav-link,
.site-header .main-nav .nav-item {
  flex: 0 0 auto !important;
}

/* Actions: currency + search + icons — always on the right */
.site-header .header-actions {
  order: 3;
  flex: 0 0 auto !important;
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  gap: 8px !important;
  margin-left: 8px !important;
}

.site-header .currency-form {
  flex: 0 0 auto !important;
  margin: 0 !important;
}
.site-header .currency-form select {
  min-width: 72px;
  max-width: 88px;
  height: 40px;
  padding: 6px 8px !important;
  border-radius: 8px;
  border: 1px solid #e2e8f0 !important;
  background: #fff !important;
  color: #0f172a !important;
  font-weight: 600;
  font-size: 0.9rem;
}

.site-header .header-icons {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  gap: 4px !important;
}

.site-header .h-search {
  display: flex !important;
  align-items: center !important;
  gap: 4px !important;
  flex: 0 0 auto;
}
.site-header .h-search input.form-control,
.site-header .h-search input {
  width: 140px !important;
  min-width: 100px;
  max-width: 180px;
  height: 40px !important;
  box-sizing: border-box;
}

/* ===== Mobile / tablet ===== */
@media (max-width: 900px) {
  .site-header .header-inner {
    flex-wrap: wrap !important;
    row-gap: 10px !important;
    padding: 10px 12px !important;
    min-height: 0;
  }

  /* Row 1: logo | icons | hamburger */
  .site-header .brand { order: 1 !important; }
  .site-header .main-nav { display: none !important; }
  .site-header .header-actions {
    order: 2 !important;
    flex: 1 1 auto !important;
    margin-left: 0 !important;
    justify-content: flex-end !important;
    width: auto;
    min-width: 0;
  }
  .site-header .mobile-nav-toggle {
    order: 3 !important;
    display: inline-flex !important;
    margin-left: 4px;
  }

  /* Hide currency on narrow header — available in drawer if needed */
  .site-header .currency-form {
    display: none !important;
  }

  /* Search full width second row */
  .site-header .h-search {
    order: 10;
    flex: 1 1 100% !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  .site-header .header-icons {
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  .site-header .header-icons .h-search {
    flex: 1 1 100% !important;
    width: 100% !important;
    margin-top: 0;
  }
  .site-header .h-search input.form-control,
  .site-header .h-search input {
    width: 100% !important;
    max-width: none !important;
    flex: 1 1 auto !important;
  }

  /* Compact icons */
  .site-header .h-icon {
    width: 40px !important;
    height: 40px !important;
  }
}

@media (max-width: 480px) {
  .site-header .header-inner {
    padding: 8px 10px !important;
  }
  /* Hide less-critical labels on very small screens */
  .site-header .header-icons .btn,
  .site-header .header-icons a.btn {
    padding: 6px 8px;
    font-size: 0.8rem;
  }
}

@media (min-width: 901px) {
  .site-header .mobile-nav-toggle {
    display: none !important;
  }
}


/* Mobile: force search onto its own full-width row */
@media (max-width: 900px) {
  .site-header .header-actions {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: flex-end !important;
    gap: 6px !important;
  }
  .site-header .header-actions > .h-search {
    flex: 1 1 100% !important;
    order: 20 !important;
    width: 100% !important;
    display: flex !important;
  }
  .site-header .header-actions > .header-icons {
    order: 1 !important;
  }
  .site-header .header-actions > .btn,
  .site-header .header-actions > a.btn {
    order: 2 !important;
  }
  .site-header .h-search input {
    flex: 1 1 auto !important;
    width: auto !important;
    min-width: 0 !important;
  }
  /* Hide "Recent" text link on very small screens to reduce clutter */
  .site-header .h-recent {
    display: none !important;
  }
}
@media (max-width: 400px) {
  .site-header .header-actions > a.btn-ghost {
    display: none !important;
  }
}


/* ============================================================
   All phones (iPhone + Android) — touch & safe-area
   ============================================================ */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  overflow-x: hidden;
  max-width: 100vw;
}
img, video {
  max-width: 100%;
  height: auto;
}

/* iPhone notch / Android gesture bar */
.site-header {
  padding-left: env(safe-area-inset-left, 0);
  padding-right: env(safe-area-inset-right, 0);
}
.wa-float {
  bottom: calc(90px + env(safe-area-inset-bottom, 0px));
  right: calc(16px + env(safe-area-inset-right, 0px));
}
.nx-chat-fab {
  /* Stack the two floating buttons instead of colliding: the live-chat FAB sits
     at the bottom-right corner and the WhatsApp bubble rides directly above it.
     `.wa-float` must use the same 22px + 58px + gap column (see its rule). */
  bottom: calc(22px + env(safe-area-inset-bottom, 0px)) !important;
  right: calc(16px + env(safe-area-inset-right, 0px)) !important;
}

/* Minimum touch targets ~44px (Apple / Material guideline) */
@media (max-width: 900px) {
  .site-header .h-icon,
  .site-header .mobile-nav-toggle,
  .btn,
  .btn-add-cart,
  .page-btn {
    min-height: 44px;
    min-width: 44px;
  }
  .site-header .mobile-nav-toggle {
    width: 44px;
    height: 44px;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    font-size: 1.25rem;
  }
  .container {
    padding-left: max(12px, env(safe-area-inset-left, 0px));
    padding-right: max(12px, env(safe-area-inset-right, 0px));
  }
  .main-content {
    padding: 16px 12px 80px;
  }
  .grid.grid-4,
  .grid.grid-3,
  .grid.grid-2 {
    grid-template-columns: 1fr 1fr !important;
    gap: 12px !important;
  }
}
@media (max-width: 480px) {
  .grid.grid-4,
  .grid.grid-3 {
    grid-template-columns: 1fr 1fr !important;
  }
  .pdp-grid {
    grid-template-columns: 1fr !important;
  }
  .shop-layout {
    grid-template-columns: 1fr !important;
  }
}


/* ============================================================
   FINAL storefront design — header + home banner
   Inspired by clean BD e-com (search center, cat bar, ads)
   ============================================================ */

/* Hide old conflicting header pieces when new structure present */
.nx-header .header-inner,
.nx-header .main-nav,
.nx-header .mobile-nav-toggle { display: none !important; }

.nx-header {
  background: #fff !important;
  border-bottom: none !important;
  box-shadow: 0 1px 0 rgba(15,23,42,.06);
  position: sticky;
  top: 0;
  z-index: 200;
}

.nx-header .header-top {
  background: #0f172a !important;
  color: #94a3b8;
  font-size: .8rem;
  padding: 6px 0 !important;
}
.nx-header .header-top a { color: #cbd5e1; }
.nx-header .header-top a:hover { color: #fff; }

/* Main row */
.nx-header-main {
  display: flex !important;
  align-items: center !important;
  gap: 20px !important;
  padding: 14px 20px !important;
  flex-wrap: nowrap !important;
  max-width: 1200px;
  margin: 0 auto;
}
.nx-header .brand {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  flex: 0 0 auto !important;
  text-decoration: none !important;
}
.nx-header .brand-mark {
  width: 42px !important;
  height: 42px !important;
  border-radius: 12px !important;
  background: #111827 !important;
  color: #fff !important;
  font-weight: 800 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 1.2rem !important;
  box-shadow: none !important;
}
.nx-header .brand-text {
  font-size: 1.25rem !important;
  font-weight: 800 !important;
  color: #111827 !important;
}

/* Center search — like Ghorer Bazar / Ryans */
.nx-search {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
  height: 46px;
}
.nx-search input {
  flex: 1;
  border: none !important;
  background: transparent !important;
  padding: 0 18px !important;
  height: 100% !important;
  font-size: 0.95rem !important;
  outline: none !important;
  box-shadow: none !important;
  min-width: 0;
  color: #0f172a !important;
}
.nx-search button {
  border: none;
  background: #111827;
  color: #fff;
  width: 52px;
  height: 100%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.nx-search button:hover { background: #030712; }

.nx-header-actions {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  flex: 0 0 auto !important;
  margin-left: auto !important;
}
.nx-action {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 52px;
  min-height: 48px;
  padding: 4px 8px;
  color: #0f172a !important;
  text-decoration: none !important;
  border-radius: 10px;
}
.nx-action:hover { background: #f1f5f9; }
.nx-action-label {
  font-size: 0.68rem;
  font-weight: 600;
  color: #64748b;
  line-height: 1;
}
.nx-badge {
  position: absolute;
  top: 2px;
  right: 4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
}
.nx-currency-desktop select {
  height: 40px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  padding: 0 8px;
  font-weight: 600;
  background: #fff;
}
.nx-menu-btn {
  display: none;
  border: 1px solid #e2e8f0;
  background: #fff;
  border-radius: 10px;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* Category bar — second row; scrolls when many categories */
.nx-catbar {
  background: #111827;
  border-top: 1px solid rgba(255,255,255,.06);
}
.nx-catbar-inner {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 0 12px;
  overflow-x: auto;
  overflow-y: visible; /* allow submenu to show */
  scrollbar-width: thin;
  max-width: 1200px;
  margin: 0 auto;
  -webkit-overflow-scrolling: touch;
}
.nx-catbar {
  overflow: visible !important;
}
.nx-catbar-inner::-webkit-scrollbar { height: 3px; }
.nx-cat-item { position: relative; flex: 0 0 auto; }
.nx-cat-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 12px 14px;
  color: #e2e8f0 !important;
  text-decoration: none !important;
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
  border-radius: 0;
}
.nx-cat-link:hover,
.nx-cat-item:hover > .nx-cat-link {
  background: rgba(255,255,255,.08);
  color: #fff !important;
}
.nx-cat-sub {
  display: none;
  position: absolute;
  left: 0;
  top: 100%;
  min-width: 200px;
  background: #fff;
  border-radius: 0 0 10px 10px;
  box-shadow: 0 12px 28px rgba(0,0,0,.15);
  padding: 8px 0;
  z-index: 300;
}
.nx-cat-item.has-sub:hover > .nx-cat-sub { display: block; }
.nx-cat-sub a {
  display: block;
  padding: 9px 16px;
  color: #334155;
  text-decoration: none;
  font-size: 0.9rem;
}
.nx-cat-sub a:hover { background: #f1f5f9; color: #111827; }

/* Home banner grid */
.nx-home-banner {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 16px;
  padding: 20px 16px 8px !important;
  max-width: 1200px;
  margin: 0 auto;
}
.nx-banner-left {
  min-width: 0;
  border-radius: 16px;
  overflow: hidden;
  background: #0f172a;
}
.nx-banner-left .hero-slider {
  position: relative;
  height: 360px;
  margin: 0 !important;
  border-radius: 0 !important;
}
.nx-banner-left .hero-slide {
  height: 360px;
  background-size: cover;
  background-position: center;
}
.nx-banner-left .hero-content {
  text-align: left !important;
  padding: 28px !important;
  max-width: 80%;
}
.nx-banner-left .hero-content h1 {
  font-size: 1.6rem !important;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0,0,0,.35);
}
.nx-banner-left .hero-content p { color: #e2e8f0; }
.nx-banner-right {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 360px;
}
.nx-ad-card {
  flex: 1;
  border-radius: 16px;
  background-size: cover;
  background-position: center;
  background-color: #1e293b;
  text-decoration: none;
  overflow: hidden;
  position: relative;
  min-height: 170px;
  box-shadow: 0 4px 16px rgba(15,23,42,.08);
  transition: transform .2s ease;
}
.nx-ad-card:hover { transform: translateY(-2px); }
.nx-ad-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(15,23,42,.82) 0%, rgba(15,23,42,.35) 70%, transparent 100%);
  color: #fff;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 4px;
}
.nx-ad-overlay strong {
  font-size: 1.05rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.nx-ad-overlay span { font-size: 0.9rem; opacity: .9; }
.nx-ad-overlay em { font-style: normal; font-size: 0.85rem; font-weight: 700; color: #fbbf24; margin-top: 6px; }

/* Responsive */
@media (max-width: 980px) {
  .nx-home-banner {
    grid-template-columns: 1fr;
  }
  .nx-banner-left .hero-slider,
  .nx-banner-left .hero-slide { height: 280px; }
  .nx-banner-right {
    flex-direction: row;
    min-height: 0;
  }
  .nx-ad-card { min-height: 140px; }
}
@media (max-width: 900px) {
  .nx-header .brand-text-desktop { display: none !important; }
  .nx-action-label { display: none !important; }
  .nx-currency-desktop { display: none !important; }
  .nx-logout-desktop { display: none !important; }
  .nx-menu-btn { display: inline-flex !important; }
  .nx-catbar { display: none !important; } /* categories in hamburger on mobile */
  .nx-header-main {
    gap: 10px !important;
    padding: 10px 12px !important;
  }
  .nx-search {
    height: 42px;
    max-width: none;
    order: 0;
  }
  .nx-banner-right { flex-direction: column; }
}
@media (max-width: 480px) {
  .nx-banner-left .hero-slider,
  .nx-banner-left .hero-slide { height: 220px; }
  .nx-banner-left .hero-content h1 { font-size: 1.25rem !important; }
}


/* ============================================================
   Header polish: logo ALWAYS left, working search, compact mobile
   ============================================================ */
.nx-header-main {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: flex-start !important;
  direction: ltr !important;
}
.nx-header .brand {
  order: 1 !important;
  margin-right: 12px !important;
  margin-left: 0 !important;
}
.nx-search {
  order: 2 !important;
  flex: 1 1 auto !important;
  margin-left: 0 !important;
  margin-right: 12px !important;
}
.nx-header-actions {
  order: 3 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

@media (max-width: 900px) {
  .nx-header-main {
    flex-wrap: wrap !important;
    gap: 8px !important;
  }
  .nx-header .brand {
    order: 1 !important;
  }
  .nx-header-actions {
    order: 2 !important;
    margin-left: auto !important;
  }
  .nx-search {
    order: 3 !important;
    flex: 1 1 100% !important;
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;
  }
  .nx-action {
    min-width: 40px !important;
    min-height: 40px !important;
    padding: 4px !important;
  }
  .nx-action svg {
    width: 20px !important;
    height: 20px !important;
  }
  .nx-action-label {
    display: none !important;
  }
  .nx-badge {
    top: 0 !important;
    right: 0 !important;
    font-size: 9px !important;
    min-width: 14px !important;
    height: 14px !important;
    line-height: 14px !important;
  }
  .nx-menu-btn {
    width: 40px !important;
    height: 40px !important;
  }
  .nx-header .brand-mark {
    width: 36px !important;
    height: 36px !important;
  }
}


/* ============================================================
   Final UX: badges, menu/submenu, mini-cart hover, compact cart
   ============================================================ */

/* Red badges always visible (cart / wish / compare) */
.nx-badge {
  position: absolute !important;
  top: 0 !important;
  right: 2px !important;
  min-width: 16px !important;
  height: 16px !important;
  padding: 0 4px !important;
  border-radius: 999px !important;
  background: #ef4444 !important;
  color: #fff !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  line-height: 16px !important;
  text-align: center !important;
  z-index: 2;
  box-shadow: 0 0 0 2px #fff;
}

/* Category menu + submenu must work */
.nx-catbar {
  position: relative;
  z-index: 150;
  overflow: visible !important;
}
.nx-catbar-inner {
  overflow-x: auto;
  overflow-y: visible !important;
}
.nx-cat-item {
  position: relative;
  flex: 0 0 auto;
  z-index: 1;
}
.nx-cat-item.has-sub:hover,
.nx-cat-item.has-sub:focus-within {
  z-index: 200;
}
.nx-cat-link {
  pointer-events: auto !important;
  cursor: pointer;
}
.nx-cat-sub {
  display: none !important;
  position: absolute !important;
  left: 0 !important;
  top: 100% !important;
  min-width: 220px !important;
  background: #fff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 0 0 12px 12px !important;
  box-shadow: 0 16px 40px rgba(15,23,42,.18) !important;
  padding: 8px 0 !important;
  z-index: 400 !important;
}
.nx-cat-item.has-sub:hover > .nx-cat-sub,
.nx-cat-item.has-sub:focus-within > .nx-cat-sub {
  display: block !important;
}
.nx-cat-sub a {
  display: block !important;
  padding: 10px 16px !important;
  color: #334155 !important;
  text-decoration: none !important;
  font-size: 0.9rem !important;
  white-space: nowrap;
}
.nx-cat-sub a:hover {
  background: #f1f5f9 !important;
  color: #111827 !important;
}

/* Mini-cart dropdown: keep open when moving mouse to panel */
.h-cart-wrap {
  position: relative !important;
}
.h-cart-dropdown {
  display: none;
  position: absolute !important;
  right: 0 !important;
  top: calc(100% - 2px) !important;
  padding-top: 12px !important; /* hover bridge */
  width: 300px;
  max-width: 90vw;
  z-index: 500 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}
.h-cart-dropdown::before {
  content: "";
  display: block;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(15,23,42,.16);
  /* filled by inner content wrapper alternative: style children */
}
.h-cart-wrap:hover .h-cart-dropdown,
.h-cart-wrap:focus-within .h-cart-dropdown {
  display: block !important;
}
.h-cart-dropdown .h-cart-empty,
.h-cart-dropdown .h-cart-list,
.h-cart-dropdown .btn {
  position: relative;
  z-index: 1;
}
/* Solid panel behind mini-cart content */
.h-cart-dropdown {
  background: #fff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 12px !important;
  box-shadow: 0 12px 32px rgba(15,23,42,.16) !important;
  padding: 12px !important;
  margin-top: 8px;
}

/* Compact cart buttons */
.btn-xs {
  padding: 4px 8px !important;
  font-size: 0.75rem !important;
  line-height: 1.2 !important;
  border-radius: 6px !important;
  min-height: 0 !important;
}
.btn-icon-sm {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #0f172a;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  min-height: 0 !important;
  min-width: 0 !important;
}
.btn-icon-danger {
  background: #fee2e2;
  border-color: #fecaca;
  color: #b91c1c;
}
.ci-row-compact {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  margin-top: 8px;
}
.ci-qty-form {
  display: flex;
  align-items: center;
  gap: 4px;
}
.ci-qty {
  width: 52px !important;
  height: 32px !important;
  padding: 4px 6px !important;
  font-size: 0.85rem !important;
  min-height: 0 !important;
}
.ci-remove-form { margin: 0; }
.ci-price {
  margin-left: auto;
  font-weight: 700;
  font-size: 0.95rem;
}

/* Mobile: one compact header row + optional search row tight */
@media (max-width: 900px) {
  .nx-header-main {
    gap: 6px !important;
    padding: 8px 10px !important;
    min-height: 52px !important;
  }
  .nx-header .brand-mark {
    width: 34px !important;
    height: 34px !important;
    font-size: 1rem !important;
  }
  .nx-action {
    min-width: 36px !important;
    min-height: 36px !important;
    padding: 2px !important;
  }
  .nx-action svg {
    width: 18px !important;
    height: 18px !important;
  }
  .nx-badge {
    min-width: 14px !important;
    height: 14px !important;
    font-size: 9px !important;
    line-height: 14px !important;
  }
  .nx-menu-btn {
    width: 36px !important;
    height: 36px !important;
  }
  .nx-search {
    height: 38px !important;
  }
  .nx-search input {
    font-size: 0.85rem !important;
    padding: 0 12px !important;
  }
  .page-title { font-size: 1.15rem !important; }
  .btn-add-cart {
    padding: 8px 10px !important;
    font-size: 0.8rem !important;
  }
  /* Show category bar on larger phones landscape; keep drawer on narrow */
}
/* Keep desktop catbar submenu above page content */
.nx-header {
  overflow: visible !important;
}

/* Final submenu visibility fix: prevent the category bar from creating an unwanted scrollbar on desktop. */
@media (min-width: 769px) {
  .nx-catbar,
  .nx-catbar-inner {
    overflow: visible !important;
  }
  .nx-catbar-inner {
    scrollbar-width: none !important;
  }
  .nx-catbar-inner::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
  }
}
/* =====================================================
   MOBILE CHECKOUT ORDER
   Order Summary first, Shipping Details second
   ===================================================== */

@media (max-width: 800px) {

    /* Checkout columns become vertical */
    .checkout-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 18px !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    /* First column = Shipping Details */
    .checkout-grid > div:first-child {
        order: 2 !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }

    /* Second column = Order Summary */
    .checkout-grid > div:last-child {
        order: 1 !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }

    /* Cards fit mobile screen */
    .checkout-grid .card {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }

    /* Prevent page horizontal overflow */
    body {
        overflow-x: hidden !important;
    }

    /* Order summary table stays inside its card */
    .order-summary {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: auto !important;
        box-sizing: border-box !important;
    }

    .order-summary .table {
        width: 100% !important;
        min-width: 0 !important;
        table-layout: fixed !important;
    }

    .order-summary .table th,
    .order-summary .table td {
        word-break: break-word !important;
        overflow-wrap: anywhere !important;
        white-space: normal !important;
        padding: 10px 8px !important;
        font-size: 13px !important;
    }

    .order-summary .table th:first-child,
    .order-summary .table td:first-child {
        width: 58% !important;
    }

    .order-summary .table th:nth-child(2),
    .order-summary .table td:nth-child(2) {
        width: 15% !important;
        text-align: center !important;
    }

    .order-summary .table th:nth-child(3),
    .order-summary .table td:nth-child(3) {
        width: 27% !important;
        text-align: right !important;
    }
}
/* ==========================================================================
   Free shipping nudge (cart) + shared "smart" badges
   ========================================================================== */
.nx-freeship {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
    padding: 13px 16px;
    border-radius: 12px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
    font-size: .93rem;
    line-height: 1.45;
}
.nx-freeship strong { color: #1d4ed8; }
.nx-freeship.is-free {
    background: #ecfdf5;
    border-color: #a7f3d0;
    color: #047857;
}
.nx-freeship.is-free strong { color: #047857; }
.nx-freeship-bar {
    flex: 1 1 140px;
    height: 7px;
    min-width: 110px;
    border-radius: 999px;
    background: #dbeafe;
    overflow: hidden;
}
.nx-freeship-bar > span {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    transition: width .4s ease;
}
.nx-freeship.is-free .nx-freeship-bar > span { background: linear-gradient(90deg, #10b981, #34d399); }

/* Chart (admin dashboard) — pure inline SVG, no external library */
.nx-chart-card { margin-top: 22px; }
.nx-chart-head {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.nx-chart-switch { display: inline-flex; gap: 6px; }
.nx-chart-switch button {
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #334155;
    font: inherit;
    font-size: .84rem;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 8px;
    cursor: pointer;
}
.nx-chart-switch button.is-active {
    background: linear-gradient(135deg, #0ea5e9, #6366f1);
    border-color: transparent;
    color: #fff;
}
.nx-chart-wrap { width: 100%; overflow-x: auto; }
.nx-chart-wrap svg { display: block; width: 100%; height: auto; min-width: 480px; }
.nx-chart-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-top: 16px;
}
.nx-chart-stat {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 11px 14px;
}
.nx-chart-stat span { display: block; font-size: .78rem; color: #64748b; text-transform: uppercase; letter-spacing: .04em; }
.nx-chart-stat strong { display: block; font-size: 1.15rem; color: #0f172a; margin-top: 3px; }
.nx-chart-empty { padding: 34px 10px; text-align: center; color: #64748b; }

/* Product gallery (multi-image) */
.nx-gallery { display: flex; gap: 16px; align-items: flex-start; }
.nx-gallery-main {
    flex: 1 1 auto;
    max-width: 460px;
    aspect-ratio: 1 / 1;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}
.nx-gallery-main img { width: 100%; height: 100%; object-fit: contain; }
.nx-gallery-thumbs {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 460px;
    overflow-y: auto;
    padding-right: 4px;
}
.nx-gallery-thumb {
    width: 72px;
    height: 72px;
    padding: 0;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    overflow: hidden;
    flex: 0 0 auto;
}
.nx-gallery-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.nx-gallery-thumb.is-active { border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99,102,241,.18); }
@media (max-width: 640px) {
    .nx-gallery { flex-direction: column-reverse; }
    .nx-gallery-main { max-width: 100%; width: 100%; }
    .nx-gallery-thumbs { flex-direction: row; max-height: none; overflow-x: auto; width: 100%; }
}

/* Admin variant row with image */
.nx-variant-thumb {
    width: 44px; height: 44px; object-fit: cover;
    border-radius: 8px; border: 1px solid #e2e8f0; background: #fff;
}

/* ==========================================================================
   Shop toolbar (count + sort) and filter extras
   ========================================================================== */
.shop-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 4px 0 16px;
    padding: 12px 16px;
    background: #fff;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 12px;
}
.shop-count { font-weight: 600; color: #334155; font-size: .93rem; }
.shop-sort-form { display: flex; align-items: center; gap: 9px; margin: 0; }
.shop-sort-form label { font-size: .86rem; color: #64748b; white-space: nowrap; }
.shop-sort-form .form-control { min-width: 178px; }
.rating-star-row { display: flex; align-items: center; gap: 7px; }
.rating-star-row .stars { color: #f59e0b; letter-spacing: 1px; font-size: .95rem; }
.nx-newsletter-form { display: flex; gap: 8px; flex-wrap: wrap; }
.nx-newsletter-form .form-control { flex: 1 1 150px; min-width: 0; }
.nx-newsletter-msg { display: block; margin-top: 8px; font-size: .84rem; min-height: 1.2em; }
.nx-newsletter-msg.is-ok { color: #34d399; }
.nx-newsletter-msg.is-error { color: #fca5a5; }
@media (max-width: 640px) {
    .shop-toolbar { flex-direction: column; align-items: stretch; }
    .shop-sort-form { justify-content: space-between; }
    .shop-sort-form .form-control { flex: 1; min-width: 0; }
}

/* ============================================================
   v13 — Coupons, Offers, Ads/Banners, Shipping admin
   All colours come from the tokens defined at the top of this file
   so the storefront and admin stay visually consistent.
   ============================================================ */

/* ---------- Small pills / badges ---------- */
.nx-pill {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .01em;
    background: #e2e8f0;
    color: #475569;
    vertical-align: middle;
    white-space: nowrap;
}
.nx-pill-blue  { background: #dbeafe; color: #1d4ed8; }
.nx-pill-green { background: #d1fae5; color: #047857; }
.nx-pill-amber { background: #fef3c7; color: #b45309; }
.nx-pill-red   { background: #fee2e2; color: #b91c1c; }

/* ---------- Section tabs (Marketing / Shipping) ---------- */
.nx-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    border-bottom: 1px solid var(--border);
    margin: 0 0 20px;
    padding-bottom: 0;
}
.nx-tab {
    display: inline-block;
    padding: 10px 16px;
    border: 1px solid transparent;
    border-bottom: 2px solid transparent;
    border-radius: 8px 8px 0 0;
    color: #64748b;
    font-weight: 600;
    font-size: .92rem;
    text-decoration: none;
    margin-bottom: -1px;
    transition: color .15s, border-color .15s, background .15s;
}
.nx-tab:hover { color: var(--primary); background: #f1f5f9; }
.nx-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    background: #eff6ff;
}
/* Keep the active underline flush with the tab's own left edge. */
.nx-tab.active { position: relative; }
.nx-tab.active::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
}

/* ---------- Tiny form helpers used by the new admin screens ---------- */
.nx-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 14px 18px;
}
.nx-check {
    display: inline-flex;
    align-items: flex-start;
    gap: 8px;
    font-size: .92rem;
    cursor: pointer;
    line-height: 1.4;
}
.nx-check input[type="checkbox"],
.nx-check input[type="radio"] { margin-top: 3px; flex: 0 0 auto; }
.btn-xs { padding: 4px 10px; font-size: .78rem; border-radius: 6px; }
.req { color: var(--danger); }
.opt { color: var(--gray); font-weight: 400; font-size: .85em; }

/* ---------- Modal (edit zone) ---------- */
.nx-modal {
    position: fixed;
    inset: 0;
    z-index: 300;
    background: rgba(15, 23, 42, .55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.nx-modal[hidden] { display: none; }
.nx-modal-box {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, .25);
    padding: 22px;
    width: 100%;
    max-width: 540px;
    max-height: 90vh;
    overflow-y: auto;
}

/* ---------- Coupon box on the cart / checkout ---------- */
.nx-coupon-box {
    margin-top: 16px;
    padding: 16px 18px;
    border: 1px dashed #cbd5e1;
    background: #fbfdff;
}
.nx-coupon-box-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}
.nx-coupon-form { display: flex; gap: 10px; flex-wrap: wrap; }
.nx-coupon-form .form-control { flex: 1 1 220px; min-width: 0; letter-spacing: .04em; }
.nx-coupon-applied {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.nx-coupon-save { color: var(--success); font-weight: 700; font-size: .9rem; }

/* ---------- Public offers / coupons page ---------- */
.nx-coupon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 18px;
}
.nx-coupon-card {
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
    box-shadow: var(--shadow);
    transition: transform .15s, box-shadow .15s;
}
.nx-coupon-card:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(15, 23, 42, .1); }
.nx-coupon-head {
    display: flex;
    align-items: baseline;
    gap: 6px;
    padding: 16px 18px;
    background: linear-gradient(120deg, #111827, #334155);
    color: #fff;
}
.nx-coupon-value { font-size: 1.9rem; font-weight: 800; line-height: 1; }
.nx-coupon-off { font-size: .85rem; font-weight: 700; letter-spacing: .12em; opacity: .85; }
.nx-coupon-body { padding: 16px 18px; }
.nx-coupon-desc { font-size: .9rem; margin: 0 0 14px; line-height: 1.55; }
.nx-coupon-code {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 12px;
    border: 1px dashed #94a3b8;
    border-radius: 9px;
    background: #f8fafc;
}
.nx-coupon-code code {
    font-weight: 800;
    letter-spacing: .06em;
    color: var(--primary);
    font-size: .95rem;
}

/* ---------- Bill summary lines ---------- */
#freeShipSummary, #discountSummary { align-items: center; }

/* ---------- Admin dashboard chart legend ---------- */
.nx-legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 10px; font-size: .82rem; color: var(--gray); }
.nx-legend span { display: inline-flex; align-items: center; gap: 6px; }
.nx-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

/* ---------- Homepage ad slots (Admin → Marketing → Ads & Banners) ----------
   The homepage banner block is a 2-column grid, so any strip inserted inside
   it must claim the FULL width instead of becoming a third grid cell. */
.nx-ad-strip { grid-column: 1 / -1; }
.nx-ad-strip.nx-ad-strip-middle { margin: 22px auto 0; }
.nx-ad-strip-top {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}
.nx-ad-banner {
    display: block;
    flex: 1 1 260px;
    border-radius: 14px;
    overflow: hidden;
    background: linear-gradient(120deg, #111827, #334155);
    color: #fff;
    text-decoration: none;
    box-shadow: var(--shadow);
    transition: transform .15s, box-shadow .15s;
}
.nx-ad-banner:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(15, 23, 42, .14); }
.nx-ad-banner img { display: block; width: 100%; height: 120px; object-fit: cover; }
.nx-ad-banner-text {
    display: block;
    padding: 26px 20px;
    font-weight: 700;
    font-size: 1.05rem;
    text-align: center;
}

/* ---------- Homepage coupon strip ---------- */
.nx-coupon-strip {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 11px 16px;
    border-radius: 12px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    margin-bottom: 4px;
}
.nx-coupon-strip-title { font-weight: 700; font-size: .9rem; color: #92400e; }
.nx-coupon-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 12px;
    border-radius: 999px;
    background: #fff;
    border: 1px dashed #f59e0b;
    font-size: .82rem;
}
.nx-coupon-chip strong { letter-spacing: .05em; color: #92400e; }
.nx-coupon-chip em { font-style: normal; color: var(--gray); }
.nx-coupon-strip-link { margin-left: auto; font-weight: 600; font-size: .85rem; color: #92400e; }

/* ---------- v13 responsive (mobile) ---------- */
@media (max-width: 640px) {
    .nx-coupon-strip-link { margin-left: 0; }
    .nx-ad-banner img { height: 96px; }
    .nx-coupon-form .form-control { flex: 1 1 100%; }
    .nx-coupon-form .btn { width: 100%; }
    /* Wrap the section tabs onto a second row instead of a horizontal
       scroll: a scrolling bar shows the next tab clipped mid-word, which
       reads as a broken label rather than as \"scroll for more\". */
    .nx-tabs { flex-wrap: wrap; gap: 4px; }
    .nx-tab {
        flex: 1 1 auto;
        padding: 8px 10px;
        font-size: .78rem;
        text-align: center;
        white-space: normal;
    }
    /* On a 390px screen the admin data tables squash until headers AND cells
       get clipped mid-word ("DELIVERY TIME" -> "DELIVE TIME", "1-2 days" ->
       "1-2 day"). Give every cell a floor so the wrapper's overflow-x:auto can
       scroll horizontally instead of squeezing the text out of view. */
    .card > table { min-width: 640px; }
    .card > table th,
    .card > table td { white-space: nowrap; }
}
