/* =====================================================================
   MARKETPLACE DESIGN SYSTEM — Daraz-inspired (orange / white, 4K-ready)
   PRESENTATION LAYER ONLY. No markup, PHP, SQL or JS logic depends on it.
   Every selector below matches classes that already exist in templates.
   ===================================================================== */

:root {
    /* Brand — marketplace orange */
    --primary-red: #F85606;          /* kept var name: used across templates */
    --primary-red-dark: #D94802;
    --primary-red-deep: #A83600;
    --primary-red-light: #FFF3EC;
    --primary-red-soft: #FFE3D2;
    --brand: #F85606;
    --brand-2: #FF8A3D;
    --navy: #1A1A1A;
    --gold: #F5A623;
    --gold-light: #FFD37A;
    --ok: #16A34A;
    --info: #2E7EF7;

    --gray-soft: #F5F5F5;
    --gray-border: #E9E9EC;
    --text-dark: #212121;
    --text-muted: #757575;

    --radius: 10px;
    --radius-lg: 14px;
    --radius-pill: 999px;

    --grad-red: linear-gradient(135deg, #FF7A2F 0%, var(--brand) 55%, var(--primary-red-dark) 100%);
    --grad-red-deep: linear-gradient(135deg, var(--primary-red-dark) 0%, var(--primary-red-deep) 100%);
    --grad-gold: linear-gradient(135deg, var(--gold-light), var(--gold));
    --grad-glass: linear-gradient(135deg, rgba(255,255,255,.94), rgba(255,255,255,.78));
    --grad-sheen: linear-gradient(120deg, transparent 25%, rgba(255,255,255,.5) 50%, transparent 75%);

    --shadow-soft: 0 1px 2px rgba(0,0,0,.05), 0 6px 18px -12px rgba(17,17,17,.28);
    --shadow-card: 0 2px 10px -4px rgba(17,17,17,.12);
    --shadow-hover: 0 14px 30px -14px rgba(248, 86, 6, .38);
    --shadow-glow: 0 0 0 1px rgba(248,86,6,.16), 0 12px 30px -16px rgba(248,86,6,.4);
    --ease: cubic-bezier(.22,.86,.28,1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    font-family: 'Manrope', 'Poppins', 'Segoe UI', system-ui, sans-serif;
    background: var(--gray-soft);
    color: var(--text-dark);
    margin: 0;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    letter-spacing: -0.005em;
    font-size: 15px;
}

/* Page entrance */
body { opacity: 0; }
body.px-ready { opacity: 1; transition: opacity .32s var(--ease); }

h1, h2, h3, h4, h5, .fw-bold { font-weight: 800; letter-spacing: -0.02em; color: var(--navy); }
h1 { font-size: clamp(1.6rem, 2.6vw, 2.2rem); }
h2 { font-size: clamp(1.3rem, 2vw, 1.7rem); }
a { transition: color .2s var(--ease); color: var(--navy); }
a:hover { color: var(--brand); }
.text-danger { color: var(--brand) !important; }
.text-muted { color: var(--text-muted) !important; }
.text-success { color: var(--ok) !important; }

::selection { background: var(--brand); color: #fff; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #EFEFEF; }
::-webkit-scrollbar-thumb { background: #C9C9CF; border-radius: 999px; border: 2px solid #EFEFEF; }
::-webkit-scrollbar-thumb:hover { background: var(--brand); }

/* ============================ Animations ============================ */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes pxSlideIn { from { opacity: 0; transform: translateX(-14px); } to { opacity: 1; transform: none; } }
@keyframes floatSlow { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-10px) } }
@keyframes pulseGlow { 0%,100% { box-shadow: 0 0 0 0 rgba(248,86,6,.3) } 50% { box-shadow: 0 0 0 12px rgba(248,86,6,0) } }
@keyframes shimmer { 0% { background-position: -450px 0 } 100% { background-position: 450px 0 } }
@keyframes sheenSweep { 0% { transform: translateX(-120%) rotate(8deg) } 100% { transform: translateX(220%) rotate(8deg) } }
@keyframes auroraShift { 0%,100% { transform: translate3d(0,0,0) scale(1) } 50% { transform: translate3d(3%,-4%,0) scale(1.1) } }
@keyframes countUpIn { from { opacity: 0; transform: translateY(10px) scale(.97) } to { opacity: 1; transform: none } }
@keyframes borderSpin { to { transform: rotate(1turn) } }
@keyframes popIn { from { opacity: 0; transform: translateY(8px) scale(.98) } to { opacity: 1; transform: none } }

.animate-up { animation: fadeInUp .6s var(--ease) both; }
.delay-1 { animation-delay: .06s } .delay-2 { animation-delay: .12s }
.delay-3 { animation-delay: .18s } .delay-4 { animation-delay: .24s }

.reveal-on-scroll { opacity: 0; transform: translateY(18px); transition: opacity .55s var(--ease), transform .55s var(--ease); }
.reveal-on-scroll.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* ============================== Header ============================== */
.navbar-premium {
    position: sticky; top: 0; z-index: 1040;
    background: var(--grad-red);
    padding: 14px 0;
    box-shadow: 0 1px 0 rgba(0,0,0,.06);
    transition: padding .25s var(--ease), box-shadow .25s var(--ease);
}
.navbar-premium::after {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: radial-gradient(700px 200px at 12% -40%, rgba(255,255,255,.22), transparent 70%);
}
.navbar-premium.is-stuck { padding: 8px 0; box-shadow: 0 6px 20px -12px rgba(0,0,0,.45); }
.navbar-premium .container { position: relative; z-index: 1; }
.navbar-premium .brand {
    color: #fff; font-weight: 900; font-size: 1.32rem; letter-spacing: -0.03em;
    display: inline-flex; align-items: center; gap: .4rem;
    transition: transform .25s var(--ease), opacity .2s var(--ease);
}
.navbar-premium .brand:hover { color: #fff; transform: translateY(-1px); opacity: .95; }

/* Big Daraz-style search */
.navbar-premium .form-control-premium {
    height: 44px; border-radius: var(--radius-pill); border: 2px solid transparent;
    background: #fff; padding: 0 20px; font-size: .95rem; width: 100%;
    box-shadow: 0 6px 16px -12px rgba(0,0,0,.5);
    transition: box-shadow .25s var(--ease), border-color .25s var(--ease), transform .25s var(--ease);
}
.navbar-premium .form-control-premium:focus {
    border-color: var(--gold); box-shadow: 0 0 0 4px rgba(255,255,255,.28); transform: translateY(-1px);
}
#search_suggestions {
    margin-top: 8px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--gray-border);
    box-shadow: 0 22px 50px -22px rgba(17,17,17,.4); animation: popIn .22s var(--ease) both; background: #fff;
}
#search_suggestions .list-group-item { border: 0; border-bottom: 1px solid var(--gray-border); padding: 11px 16px; }
#search_suggestions .list-group-item:last-child { border-bottom: 0; }

.navbar-premium .btn-outline-premium {
    background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.4); color: #fff;
    backdrop-filter: blur(6px);
}
.navbar-premium .btn-outline-premium:hover { background: #fff; color: var(--brand); border-color: #fff; }
.navbar-premium .btn-premium { background: #fff; color: var(--brand); box-shadow: none; }
.navbar-premium .btn-premium:hover { background: var(--navy); color: #fff; }
.navbar-premium .badge { box-shadow: 0 0 0 2px var(--brand); }

/* ============================== Buttons ============================= */
.btn, .btn-premium, .btn-outline-premium, .btn-gold {
    position: relative; overflow: hidden;
    border-radius: var(--radius-pill);
    font-weight: 700; font-size: .9rem; letter-spacing: -0.01em;
    padding: 9px 20px; line-height: 1.35; border: 1px solid transparent;
    display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
    text-decoration: none; cursor: pointer;
    transition: transform .18s var(--ease), box-shadow .25s var(--ease), background .25s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.btn-premium { background: var(--grad-red); color: #fff; box-shadow: 0 8px 18px -10px rgba(248,86,6,.7); }
.btn-premium::after {
    content: ""; position: absolute; top: -60%; left: 0; width: 40%; height: 220%;
    background: var(--grad-sheen); opacity: 0; pointer-events: none;
}
.btn-premium:hover { color: #fff; transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.btn-premium:hover::after { opacity: 1; animation: sheenSweep .75s var(--ease); }
.btn-premium:active { transform: translateY(0) scale(.985); }

.btn-outline-premium {
    background: #fff; color: var(--navy); border: 1px solid var(--gray-border);
}
.btn-outline-premium:hover { color: var(--brand); border-color: var(--brand); transform: translateY(-2px); box-shadow: var(--shadow-glow); }

.btn-gold { background: var(--grad-gold); color: #4A3208; }
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 14px 28px -16px rgba(245,166,35,.75); }

.btn-primary, .btn-danger { background: var(--grad-red); border-color: transparent; color: #fff; }
.btn-primary:hover, .btn-danger:hover { background: var(--grad-red-deep); color: #fff; transform: translateY(-2px); }
.btn-success { background: linear-gradient(135deg,#22C55E,#15803D); border-color: transparent; color: #fff; }
.btn-secondary, .btn-outline-secondary { background: #fff; border: 1px solid var(--gray-border); color: var(--text-dark); }
.btn-outline-primary, .btn-outline-danger { background: #fff; border: 1px solid var(--brand); color: var(--brand); }
.btn-outline-primary:hover, .btn-outline-danger:hover { background: var(--brand); color: #fff; }
.btn:hover { transform: translateY(-2px); }
.btn-sm { padding: 6px 14px; font-size: .82rem; }

.px-ripple {
    position: absolute; width: 12px; height: 12px; border-radius: 50%;
    background: rgba(255,255,255,.55); transform: translate(-50%,-50%) scale(0);
    animation: rippleOut .6s var(--ease) forwards; pointer-events: none;
}
.btn-outline-premium .px-ripple, .btn-outline-primary .px-ripple { background: rgba(248,86,6,.28); }
@keyframes rippleOut { to { transform: translate(-50%,-50%) scale(24); opacity: 0; } }

/* =============================== Cards ============================== */
.card, .card-premium, .product-card, .store-card, .category-card, .stat-card {
    background: #fff;
    border: 1px solid var(--gray-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    transition: transform .25s var(--ease), box-shadow .3s var(--ease), border-color .25s var(--ease);
}
.card-premium { padding: 20px; position: relative; overflow: hidden; }
.card-premium::before {
    content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0;
    background: radial-gradient(420px 220px at var(--mx,50%) var(--my,0%), rgba(248,86,6,.07), transparent 70%);
    transition: opacity .3s var(--ease);
}
.card-premium:hover::before { opacity: 1; }
.card-premium:hover, .card:hover, .product-card:hover, .store-card:hover, .category-card:hover {
    transform: translateY(-4px);
    border-color: rgba(248,86,6,.45);
    box-shadow: 0 18px 36px -20px rgba(17,17,17,.35);
}
.card-body { padding: 18px; }
.card-header {
    background: #fff; border-bottom: 1px solid var(--gray-border);
    font-weight: 800; padding: 14px 18px; border-radius: var(--radius) var(--radius) 0 0;
}
.hover-lift { transition: transform .25s var(--ease), box-shadow .3s var(--ease); }
.hover-lift:hover { transform: translateY(-4px); box-shadow: 0 18px 36px -20px rgba(17,17,17,.35); }
.glass { background: var(--grad-glass); backdrop-filter: blur(14px); border: 1px solid rgba(255,255,255,.6); border-radius: var(--radius-lg); }

/* Images inside cards — zoom on hover */
.product-card img, .card img, .category-card img, .store-card img,
.card-premium img {
    transition: transform .5s var(--ease); will-change: transform; border-radius: 8px;
}
.product-card:hover img, .card:hover img, .category-card:hover img, .store-card:hover img,
.card-premium:hover img { transform: scale(1.06); }

/* Product card */
.product-card-premium {
    background: #fff; border: 1px solid var(--gray-border); border-radius: var(--radius);
    overflow: hidden; height: 100%; display: flex; flex-direction: column;
    transition: transform .25s var(--ease), box-shadow .3s var(--ease), border-color .25s var(--ease);
}
.product-card-premium .thumb {
    position: relative; overflow: hidden; aspect-ratio: 1/1; background: #FAFAFA;
    display: flex; align-items: center; justify-content: center;
    transition: transform .55s var(--ease);
}
.product-card-premium .thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 0; }
.product-card-premium .thumb::after {
    content: ""; position: absolute; inset: 0; opacity: 0;
    background: linear-gradient(180deg, transparent 55%, rgba(0,0,0,.14));
    transition: opacity .3s var(--ease);
}
.product-card-premium:hover { transform: translateY(-4px); border-color: rgba(248,86,6,.5); box-shadow: 0 20px 40px -22px rgba(17,17,17,.4); }
.product-card-premium:hover .thumb { transform: scale(1.03); }
.product-card-premium:hover .thumb::after { opacity: 1; }
.product-card-premium .body { padding: 12px 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.product-card-premium .price, .price, .product-price {
    color: var(--brand); font-weight: 800; font-size: 1.05rem; letter-spacing: -0.02em;
}
.product-card-premium .old-price, .price-old, .text-decoration-line-through {
    color: #9AA0A6; font-size: .82rem; font-weight: 500;
}
.thumb { border-radius: 8px; overflow: hidden; }

/* Category tiles */
.cat-tile {
    background: #fff; border: 1px solid var(--gray-border); border-radius: var(--radius);
    padding: 16px 10px; text-align: center; display: block; text-decoration: none;
    transition: transform .25s var(--ease), box-shadow .3s var(--ease), border-color .25s var(--ease);
}
.cat-tile .cat-icon {
    font-size: 1.6rem; display: block; margin-bottom: 6px;
    transition: transform .3s var(--ease);
}
.cat-tile:hover { transform: translateY(-4px); border-color: var(--brand); box-shadow: var(--shadow-glow); }
.cat-tile:hover .cat-icon { transform: scale(1.16) rotate(-4deg); }
.category-card { position: relative; overflow: hidden; }
.category-card::before {
    content: ""; position: absolute; inset: 0; opacity: 0;
    background: linear-gradient(135deg, rgba(248,86,6,.08), transparent 60%);
    transition: opacity .3s var(--ease);
}
.category-card:hover::before { opacity: 1; }

/* Store chips */
.store-strip { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
.store-chip {
    flex: 0 0 auto; background: #fff; border: 1px solid var(--gray-border);
    border-radius: var(--radius-pill); padding: 8px 16px; font-weight: 700; font-size: .86rem;
    text-decoration: none; transition: all .22s var(--ease);
}
.store-chip:hover { border-color: var(--brand); color: var(--brand); transform: translateY(-2px); }

/* ================================ Hero ============================== */
.hero-premium {
    position: relative; overflow: hidden;
    border-radius: var(--radius-lg);
    background: var(--grad-red);
    color: #fff; padding: clamp(28px, 5vw, 56px);
    margin-bottom: 22px;
    box-shadow: 0 20px 46px -28px rgba(248,86,6,.7);
}
.hero-premium::before {
    content: ""; position: absolute; width: 60%; aspect-ratio: 1; right: -12%; top: -40%;
    background: radial-gradient(circle, rgba(255,255,255,.28), transparent 62%);
    animation: auroraShift 14s ease-in-out infinite;
}
.hero-premium::after {
    content: ""; position: absolute; width: 40%; aspect-ratio: 1; left: -10%; bottom: -60%;
    background: radial-gradient(circle, rgba(255,211,122,.35), transparent 65%);
    animation: floatSlow 10s ease-in-out infinite;
}
.hero-premium > * { position: relative; z-index: 1; }
.hero-premium h1 { color: #fff; font-size: clamp(1.8rem, 4vw, 3rem); line-height: 1.08; }
.hero-premium h1 span, .text-gradient-red {
    background: var(--grad-gold); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-premium .lead, .hero-premium p.lead { color: rgba(255,255,255,.92); font-size: 1.02rem; max-width: 46ch; }
.hero-premium .hero-search { display: flex; gap: 8px; background: #fff; padding: 6px; border-radius: var(--radius-pill); max-width: 560px; box-shadow: 0 18px 40px -22px rgba(0,0,0,.6); }
.hero-premium .hero-search input { flex: 1; border: 0; outline: 0; padding: 0 18px; border-radius: var(--radius-pill); font-size: .95rem; background: transparent; }
.hero-premium .hero-search input:focus { outline: 0; }
.hero-premium .hero-search button { border: 0; background: var(--grad-red); color: #fff; padding: 10px 24px; border-radius: var(--radius-pill); font-weight: 800; cursor: pointer; transition: transform .2s var(--ease); }
.hero-premium .hero-search button:hover { transform: translateY(-1px) scale(1.02); }
.hero-premium .hero-cta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }

.section-premium { margin: 26px 0; }
.section-heading {
    font-size: 1.15rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em;
    padding-left: 12px; border-left: 4px solid var(--brand); margin-bottom: 14px;
}

/* Trust strip */
.trust-strip { display: grid; grid-template-columns: repeat(auto-fit,minmax(180px,1fr)); gap: 12px; }
.trust-item {
    background: #fff; border: 1px solid var(--gray-border); border-radius: var(--radius);
    padding: 14px 16px; display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: .9rem;
    transition: transform .25s var(--ease), box-shadow .3s var(--ease);
}
.trust-item .icon { font-size: 1.4rem; transition: transform .3s var(--ease); }
.trust-item:hover { transform: translateY(-3px); box-shadow: var(--shadow-soft); }
.trust-item:hover .icon { transform: scale(1.15); }

/* =============================== Forms ============================== */
.form-label { font-weight: 700; font-size: .84rem; color: #4A4A4A; margin-bottom: 6px; }
.form-control, .form-select, .form-control-premium {
    width: 100%; background: #fff; border: 1px solid var(--gray-border);
    border-radius: 8px; padding: 10px 14px; font-size: .93rem; color: var(--text-dark);
    transition: border-color .2s var(--ease), box-shadow .25s var(--ease), background .2s var(--ease);
}
.form-control::placeholder, .form-control-premium::placeholder { color: #A5A5AD; }
.form-control:focus, .form-select:focus, .form-control-premium:focus {
    outline: 0; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(248,86,6,.14); background: #fff;
}
.form-check-input:checked { background-color: var(--brand); border-color: var(--brand); }
.form-check-input:focus { box-shadow: 0 0 0 3px rgba(248,86,6,.16); border-color: var(--brand); }

.auth-wrapper {
    position: relative; max-width: 460px; margin: 42px auto; background: #fff;
    border: 1px solid var(--gray-border); border-radius: var(--radius-lg);
    padding: 30px; box-shadow: 0 26px 60px -34px rgba(17,17,17,.45);
    animation: fadeInUp .5s var(--ease) both;
}
.auth-wrapper::before {
    content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    background: var(--grad-red);
}
.role-toggle { display: flex; gap: 8px; background: var(--gray-soft); padding: 5px; border-radius: var(--radius-pill); }

/* =============================== Tables ============================= */
.table-responsive { border-radius: var(--radius); overflow: auto; background: #fff; border: 1px solid var(--gray-border); }
table { width: 100%; border-collapse: collapse; }
.table > :not(caption) > * > * { padding: 12px 14px; }
thead th {
    background: #FAFAFA; font-size: .76rem; text-transform: uppercase; letter-spacing: .05em;
    color: var(--text-muted); font-weight: 800; border-bottom: 1px solid var(--gray-border); white-space: nowrap;
}
tbody tr { border-bottom: 1px solid var(--gray-border); transition: background .18s var(--ease); }
tbody tr:last-child { border-bottom: 0; }
tbody tr:hover { background: var(--primary-red-light); }

/* =============================== Badges ============================= */
.badge {
    border-radius: 6px; font-weight: 700; font-size: .72rem; padding: .38em .62em; letter-spacing: .01em;
}
.bg-primary { background: var(--brand) !important; }
.bg-danger { background: var(--brand) !important; }
.discount-badge, .badge.bg-danger { box-shadow: 0 6px 14px -8px rgba(248,86,6,.8); }
.badge-verified {
    background: rgba(22,163,74,.12); color: var(--ok); border: 1px solid rgba(22,163,74,.28);
    border-radius: var(--radius-pill); padding: .3em .7em; font-weight: 800; font-size: .72rem;
}
.badge-verified::after { content: " ✓"; }

/* =============================== Alerts ============================= */
.alert-premium, .alert {
    border-radius: var(--radius); padding: 13px 16px; border: 1px solid var(--gray-border);
    background: #fff; font-weight: 600; font-size: .9rem; margin-bottom: 16px;
    border-left: 4px solid var(--brand);
    animation: fadeInUp .35s var(--ease) both; box-shadow: var(--shadow-soft);
}
.alert-success { background: #F1FBF4; border-left-color: var(--ok); color: #14532D; }
.alert-error, .alert-danger { background: #FFF3EF; border-left-color: var(--brand); color: #8A2B05; }
.alert-warning { background: #FFFBEB; border-left-color: var(--gold); color: #78440A; }
.alert-info { background: #EFF6FF; border-left-color: var(--info); color: #1E3A8A; }

/* ============================ Admin shell =========================== */
.admin-shell { display: flex; min-height: 100vh; background: var(--gray-soft); }
.admin-sidebar {
    position: relative; width: 250px; flex: 0 0 250px; padding: 22px 0;
    background: #16181D; color: #fff; overflow: hidden;
}
.admin-sidebar::after {
    content: ""; position: absolute; inset: auto 0 0 0; height: 3px; background: var(--grad-red);
}
.admin-sidebar .text-danger { color: #fff !important; letter-spacing: -.02em; }
.admin-sidebar a {
    position: relative; display: block; padding: 11px 22px; color: rgba(255,255,255,.78);
    text-decoration: none; font-size: .9rem; font-weight: 600;
    transition: color .2s var(--ease), background .2s var(--ease), padding-left .22s var(--ease);
}
.admin-sidebar a::before {
    content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px;
    background: var(--brand); border-radius: 0 3px 3px 0; transform: scaleY(0); transform-origin: center;
    transition: transform .25s var(--ease);
}
.admin-sidebar a:hover, .admin-sidebar a.active { color: #fff; background: rgba(255,255,255,.07); padding-left: 26px; }
.admin-sidebar a:hover::before, .admin-sidebar a.active::before, .seller-sidebar a:hover::before { transform: scaleY(1); }
.admin-main { flex: 1; padding: 26px clamp(16px, 3vw, 34px); min-width: 0; animation: fadeIn .35s var(--ease) both; }
.admin-main h1, .admin-main h2 { margin-top: 0; margin-bottom: 18px; }
.admin-sidebar-top { display: flex; align-items: center; justify-content: space-between; }
.admin-menu-toggle {
    display: none; background: rgba(255,255,255,.08); color: #fff; border: none;
    width: 36px; height: 36px; border-radius: 8px; font-size: 1.1rem; line-height: 1;
    cursor: pointer; margin: 0 16px 12px 0;
}

@media (max-width: 860px) {
    .admin-shell { flex-direction: column; }
    .admin-sidebar { width: 100%; flex: none; padding: 10px 0; }
    .admin-sidebar-top { padding: 0 4px 0 4px; }
    .admin-sidebar-top > div { padding-bottom: 0 !important; }
    .admin-menu-toggle { display: inline-flex; align-items: center; justify-content: center; }
    .admin-nav-links {
        display: none; flex-direction: column; gap: 2px; padding: 10px 10px 4px;
    }
    .admin-nav-links.is-open { display: flex; }
    .admin-sidebar a { white-space: nowrap; padding: 9px 14px; border-radius: var(--radius-pill); }
    .admin-sidebar a:hover, .admin-sidebar a.active { padding-left: 14px; }
    .admin-sidebar a::before { display: none; }
}

/* ============================== Misc UI ============================= */
.nav-tabs { border-bottom: 1px solid var(--gray-border); gap: 4px; }
.nav-tabs .nav-link {
    border: 0; border-bottom: 3px solid transparent; color: var(--text-muted);
    font-weight: 700; padding: 10px 16px; border-radius: 0;
    transition: color .2s var(--ease), border-color .25s var(--ease), background .2s var(--ease);
}
.nav-tabs .nav-link:hover { color: var(--brand); background: var(--primary-red-light); }
.nav-tabs .nav-link.active { color: var(--brand); border-bottom-color: var(--brand); background: transparent; }
.tab-pane.active { animation: fadeInUp .3s var(--ease) both; }

.dropdown-menu {
    border: 1px solid var(--gray-border); border-radius: var(--radius);
    box-shadow: 0 22px 50px -24px rgba(17,17,17,.45); padding: 6px;
    animation: popIn .2s var(--ease) both;
}
.dropdown-item { border-radius: 7px; font-size: .9rem; transition: background .18s var(--ease), color .18s var(--ease); }
.dropdown-item:hover { background: var(--primary-red-light); color: var(--brand); }

.modal-content {
    border: 0; border-radius: var(--radius-lg); overflow: hidden;
    box-shadow: 0 40px 90px -40px rgba(17,17,17,.6);
}
.modal.fade .modal-dialog { transition: transform .28s var(--ease), opacity .28s var(--ease); transform: translateY(16px) scale(.98); }
.modal.show .modal-dialog { transform: none; }

.list-group-item { border-color: var(--gray-border); transition: background .18s var(--ease), transform .18s var(--ease); }
.list-group-item-action:hover { background: var(--primary-red-light); }

.pagination .page-link {
    border: 1px solid var(--gray-border); color: var(--text-dark); border-radius: 8px; margin: 0 3px;
    font-weight: 700; transition: all .2s var(--ease);
}
.pagination .page-link:hover { border-color: var(--brand); color: var(--brand); }
.pagination .active > .page-link, .pagination .active { background: var(--brand); border-color: var(--brand); color: #fff; }

.progress { background: var(--gray-border); border-radius: var(--radius-pill); height: 8px; overflow: hidden; }
.progress-bar { background: var(--grad-red); transition: width .8s var(--ease); }

/* Stat cards */
.stat-card { padding: 18px; position: relative; overflow: hidden; }
.stat-card .value, .stat-value { font-size: 1.7rem; font-weight: 900; letter-spacing: -.03em; animation: countUpIn .5s var(--ease) both; }

/* Image load fade */
.px-img { opacity: 0; transition: opacity .45s var(--ease), transform .5s var(--ease); }
.px-img.is-loaded { opacity: 1; }

/* Top loading bar */
.px-progress {
    position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 2000;
    background: linear-gradient(90deg, var(--gold), var(--brand));
    box-shadow: 0 0 12px rgba(248,86,6,.7);
    transition: width .5s var(--ease), opacity .4s var(--ease);
}
.px-progress.is-mid { width: 72%; }
.px-progress.is-done { width: 100%; opacity: 0; }

/* Back to top */
.px-top {
    position: fixed; right: 18px; bottom: 18px; z-index: 1050;
    width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer;
    background: var(--grad-red); color: #fff; font-size: 1.1rem;
    box-shadow: 0 14px 30px -14px rgba(248,86,6,.9);
    opacity: 0; pointer-events: none; transform: translateY(14px) scale(.9);
    transition: opacity .3s var(--ease), transform .3s var(--ease);
}
.px-top.is-on { opacity: 1; pointer-events: auto; transform: none; }
.px-top:hover { transform: translateY(-3px); }

/* Skeleton loading */
.skeleton {
    background: linear-gradient(90deg,#EEE 25%,#F7F7F7 50%,#EEE 75%);
    background-size: 900px 100%; animation: shimmer 1.4s infinite linear; border-radius: 8px; color: transparent;
}

/* Footer */
.footer-premium {
    position: relative; margin-top: 40px; padding: 26px 16px; text-align: center;
    background: #16181D; color: rgba(255,255,255,.7); font-size: .86rem;
}
.footer-premium::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--grad-red); }

/* Responsive polish */
@media (max-width: 767.98px) {
    body { font-size: 14.5px; }
    .navbar-premium { padding: 10px 0; }
    .navbar-premium .container { gap: 8px !important; }
    .navbar-premium form { order: 3; margin: 0 !important; max-width: 100% !important; width: 100%; }
    .navbar-premium .btn, .navbar-premium .btn-outline-premium, .navbar-premium .btn-premium { padding: 8px 12px; font-size: .82rem; min-height: 40px; }
    .card-premium { padding: 15px; }
    .btn, .btn-premium, .btn-outline-premium { min-height: 42px; }
    .hero-premium { border-radius: var(--radius); }
    .px-top { right: 12px; bottom: 12px; }
}

/* Badge alignment inside product bodies */
.product-card-premium .body .badge, .product-card-premium .body .badge-verified { align-self: flex-start; }

/* ============================ Mobile bottom tab bar (Daraz-style) =========================== */
.mobile-tabbar { display: none; }

@media (max-width: 767.98px) {
    body { padding-bottom: calc(58px + env(safe-area-inset-bottom, 0px)); }
    .mobile-tabbar {
        display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 1040;
        background: #fff; border-top: 1px solid var(--gray-border);
        box-shadow: 0 -2px 10px rgba(0,0,0,.06);
        padding-bottom: env(safe-area-inset-bottom, 0px);
    }
    .mobile-tabbar a {
        flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
        gap: 2px; padding: 8px 4px 7px; text-decoration: none; color: var(--text-muted);
        font-size: .68rem; font-weight: 600; position: relative;
    }
    .mobile-tabbar a .icon { font-size: 1.25rem; line-height: 1; }
    .mobile-tabbar a.active { color: var(--brand); }
    .mobile-tabbar .tabbar-badge {
        position: absolute; top: 3px; right: calc(50% - 20px); background: var(--brand); color: #fff;
        font-size: .6rem; font-weight: 700; min-width: 16px; height: 16px; border-radius: 8px;
        display: flex; align-items: center; justify-content: center; padding: 0 3px;
    }
}
