@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Arabic:wght@300;400;500;600;700;800&display=swap');

/* ══ TOKENS ══ */
:root {
  --bg:#0a0a0f; --bg2:#0f0f1a; --bg3:#141420; --bg4:#1a1a2e;
  --glass:rgba(10,10,15,.94);
  --purple:#7c3aed; --purple2:#8b5cf6; --purple3:#a78bfa;
  --bsub:rgba(124,58,237,.12); --bord:rgba(124,58,237,.22); --bord2:rgba(139,92,246,.40);
  --text:#f0f0ff; --text2:#a0a0c0; --text3:#505080;
  --red:#ef4444; --green:#10b981; --amber:#f59e0b;
  --shadow:0 8px 32px rgba(124,58,237,.18); --sglow:0 0 28px rgba(124,58,237,.28);
  --r:14px; --rs:10px; --hh:58px; --nh:64px;
  --sidebar-w:230px;
}

*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth}
body{
  font-family:'IBM Plex Sans Arabic',sans-serif;
  background:var(--bg);color:var(--text);
  direction:rtl;min-height:100vh;overflow-x:hidden;
}
[lang="en"] body,[dir="ltr"]{direction:ltr}
a{text-decoration:none;color:inherit}
img{max-width:100%;display:block}
button{cursor:pointer;border:none;background:none;font-family:inherit}
input,textarea,select{font-family:inherit}
::-webkit-scrollbar{width:3px;height:3px}
::-webkit-scrollbar-track{background:var(--bg2)}
::-webkit-scrollbar-thumb{background:var(--purple);border-radius:2px}

/* ══ HEADER ══ */
#site-header{
  position:fixed;top:0;left:0;right:0;
  height:calc(var(--hh) + env(safe-area-inset-top,0px));
  z-index:500;
  background:rgba(10,10,15,.88);
  backdrop-filter:blur(24px) saturate(180%);
  -webkit-backdrop-filter:blur(24px) saturate(180%);
  border-bottom:1px solid var(--bord);
  display:flex;align-items:center;
  padding:0 14px;
  padding-top:env(safe-area-inset-top,0px);
  gap:8px;
  box-shadow:0 2px 16px rgba(124,58,237,.10);
}
.header-logo{flex:1;display:flex;align-items:center}
.header-logo img{height:34px;object-fit:contain}
.header-logo-text{
  font-size:21px;font-weight:800;letter-spacing:-0.5px;
  background:linear-gradient(135deg,var(--purple),var(--purple3));
  -webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text;
}
.header-actions{display:flex;align-items:center;gap:7px}
.hbtn{
  width:36px;height:36px;border-radius:10px;
  background:var(--bg3);border:1px solid var(--bord);
  display:flex;align-items:center;justify-content:center;
  color:var(--text2);font-size:14px;
  position:relative;cursor:pointer;flex-shrink:0;transition:all .18s;
  -webkit-tap-highlight-color:transparent;
}
.hbtn:hover{background:var(--bsub);border-color:var(--bord2);color:var(--purple3)}
.notif-dot{
  width:7px;height:7px;border-radius:50%;background:var(--red);
  border:1.5px solid var(--bg);position:absolute;top:5px;
  display:none;animation:pulsed 2s infinite;
}
[dir="rtl"] .notif-dot{left:5px}
[dir="ltr"] .notif-dot{right:5px}
.cart-badge{
  width:16px;height:16px;border-radius:50%;background:var(--purple);
  border:1.5px solid var(--bg);position:absolute;top:-3px;
  font-size:9px;font-weight:700;color:#fff;display:none;
  align-items:center;justify-content:center;
}
[dir="rtl"] .cart-badge{left:-3px}
[dir="ltr"] .cart-badge{right:-3px}
.cart-badge.show{display:flex}
@keyframes pulsed{0%,100%{transform:scale(1)}50%{transform:scale(1.4)}}

/* ══ LANG BADGE ══ */
.lang-btn{
  height:30px;padding:0 10px;border-radius:8px;
  background:var(--bg3);border:1px solid var(--bord);
  color:var(--text2);font-size:11px;font-weight:600;cursor:pointer;
  transition:all .18s;display:flex;align-items:center;gap:4px;
}
.lang-btn:hover{background:var(--bsub);color:var(--purple3);border-color:var(--bord2)}

/* ══ DESKTOP NAV — hidden (sidebar replaces it) ══ */
.desktop-nav{display:none !important}

/* ══ POPUPS ══ */
.popup-bd{position:fixed;inset:0;z-index:550;display:none}
.popup-bd.open{display:block}

/* Search & Notif — small popup */
.hpopup{
  position:fixed;
  top:calc(var(--hh) + env(safe-area-inset-top,0px) + 6px);
  left:8px;right:8px;max-height:78vh;overflow-y:auto;
  background:rgba(14,14,22,.97);
  backdrop-filter:blur(28px);-webkit-backdrop-filter:blur(28px);
  border:1px solid var(--bord2);border-radius:var(--r);
  box-shadow:var(--sglow),var(--shadow);
  z-index:600;visibility:hidden;opacity:0;pointer-events:none;
  transform:translateY(-12px) scale(.97);
  transition:all .22s cubic-bezier(.34,1.4,.64,1);
}
.hpopup.open{visibility:visible;opacity:1;pointer-events:all;transform:translateY(0) scale(1)}

/* Cart BD */
#cartBd{z-index:690 !important;background:rgba(0,0,0,.5);backdrop-filter:blur(4px)}

/* Cart — fullscreen panel slides up */
#cartPopup{
  position:fixed;
  top:0;left:0;right:0;bottom:0;
  max-height:100% !important;
  border-radius:0 !important;
  border:none !important;
  transform:translateY(100%) !important;
  transition:transform .35s cubic-bezier(.25,.46,.45,.94) !important;
  z-index:700;
  display:flex;flex-direction:column;
  background:var(--bg) !important;
  visibility:hidden;opacity:1;pointer-events:none;
}
#cartPopup.open{
  transform:translateY(0) !important;
  visibility:visible;pointer-events:all;
}
.popup-hd{
  display:flex;align-items:center;justify-content:space-between;
  padding:12px 14px 10px;border-bottom:1px solid var(--bord);
  font-size:12px;font-weight:700;color:var(--text2);
  position:sticky;top:0;background:rgba(14,14,22,.97);backdrop-filter:blur(28px);
}
.popup-close{
  width:25px;height:25px;border-radius:7px;
  background:var(--bg3);border:1px solid var(--bord);
  display:flex;align-items:center;justify-content:center;
  color:var(--text3);font-size:10px;cursor:pointer;transition:all .15s;
}
.popup-close:hover{color:var(--text);background:var(--bsub)}

/* search popup */
.search-wrap{padding:10px 13px}
.search-field{
  display:flex;align-items:center;gap:8px;
  background:var(--bg3);border:1px solid var(--bord);
  border-radius:var(--rs);padding:9px 13px;transition:border-color .18s;
}
.search-field:focus-within{border-color:var(--purple2)}
.search-field i{color:var(--text3);font-size:13px}
.search-field input{
  flex:1;background:none;border:none;outline:none;
  color:var(--text);font-size:13px;
}
.search-field input::placeholder{color:var(--text3)}
#searchResults{padding:0 13px 13px;display:grid;grid-template-columns:repeat(3,1fr);gap:9px}
.sr-empty{grid-column:1/-1;text-align:center;padding:24px;color:var(--text3);font-size:12px}
.sr-item{
  border-radius:10px;overflow:hidden;
  background:var(--bg3);border:1px solid var(--bord);cursor:pointer;transition:all .18s;
}
.sr-item:hover{border-color:var(--bord2);transform:translateY(-2px)}
.sr-item img,.sr-item .sr-nop{width:100%;aspect-ratio:3/4;object-fit:cover}
.sr-item .sr-nop{display:flex;align-items:center;justify-content:center;background:var(--bg4);color:var(--text3)}
.sr-item span{display:block;padding:5px 7px;font-size:10px;color:var(--text2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* ══ CART POPUP ══ */
#cartItems{
  flex:1;overflow-y:auto;
  scrollbar-width:thin;
  scrollbar-color:var(--bord) transparent;
}
.cp-empty{
  display:flex;flex-direction:column;align-items:center;
  justify-content:center;padding:60px 20px;gap:10px;
  color:var(--text3);
}
.cp-empty i{font-size:52px;opacity:.2}
.cp-empty span:first-of-type{font-size:15px;font-weight:700;color:var(--text2)}
.cp-empty span{font-size:12px}
.cp-item{
  display:flex;align-items:center;gap:12px;
  padding:12px 16px;
  border-bottom:1px solid rgba(124,58,237,.1);
  transition:background .15s;
}
.cp-item:last-child{border-bottom:none}
.cp-item:hover{background:var(--bsub)}
.cp-item-img{
  width:46px;height:62px;flex-shrink:0;
  border-radius:9px;overflow:hidden;
  background:var(--bg3);border:1px solid var(--bord);
}
.cp-item-img img{width:100%;height:100%;object-fit:cover}
.cp-item-img .cp-noimg{
  width:100%;height:100%;display:flex;align-items:center;
  justify-content:center;color:var(--text3);font-size:18px;
}
.cp-item-info{flex:1;min-width:0}
.cp-item-name{
  font-size:12px;font-weight:700;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
  margin-bottom:3px;color:var(--text);
}
.cp-item-cat{font-size:10px;color:var(--text3);margin-bottom:5px}
.cp-item-bottom{display:flex;align-items:center;justify-content:space-between;gap:6px}
.cp-item-price{font-size:13px;font-weight:800;color:var(--purple3)}
.cp-qty-wrap{display:flex;align-items:center;gap:5px}
.cp-qty-btn{
  width:22px;height:22px;border-radius:6px;
  background:var(--bg4);border:1px solid var(--bord);
  color:var(--text2);font-size:13px;font-weight:700;
  display:flex;align-items:center;justify-content:center;
  cursor:pointer;transition:all .15s;line-height:1;
}
.cp-qty-btn:hover{background:var(--purple);color:#fff;border-color:var(--purple)}
.cp-qty-num{font-size:12px;font-weight:700;min-width:18px;text-align:center;color:var(--text)}
.cp-item-del{
  width:26px;height:26px;border-radius:7px;flex-shrink:0;
  background:rgba(239,68,68,.08);border:1px solid rgba(239,68,68,.15);
  color:var(--red);font-size:10px;
  display:flex;align-items:center;justify-content:center;
  cursor:pointer;transition:all .15s;
}
.cp-item-del:hover{background:rgba(239,68,68,.18)}
.cart-popup-footer{
  padding:12px 16px calc(16px + env(safe-area-inset-bottom,0px));
  border-top:1px solid var(--bord);
  background:rgba(14,14,22,.98);
  flex-shrink:0;
}
.cart-popup-summary{
  display:flex;align-items:center;justify-content:space-between;
  margin-bottom:10px;
}
.cart-popup-summary .lbl{font-size:12px;color:var(--text3);font-weight:500}
.cart-popup-summary .val{font-size:15px;font-weight:800;color:var(--purple3)}
.btn-checkout-sm{
  display:flex;align-items:center;justify-content:center;gap:8px;
  width:100%;padding:13px;
  background:linear-gradient(135deg,#6d28d9,var(--purple2));
  border-radius:11px;color:#fff;font-size:13px;font-weight:700;
  transition:all .2s;cursor:pointer;border:none;font-family:inherit;
  box-shadow:0 4px 16px rgba(124,58,237,.35);
  text-decoration:none;
}
.btn-checkout-sm:hover{transform:translateY(-1px);box-shadow:0 6px 22px rgba(124,58,237,.5)}
.cart-total-val{font-size:20px;font-weight:800;color:var(--purple3)}

/* notif popup */
#notifList{padding:8px 0}
/* notif-item styles moved to end of file */
.notif-icon{
  width:36px;height:36px;border-radius:9px;flex-shrink:0;
  background:var(--bsub);border:1px solid var(--bord);
  display:flex;align-items:center;justify-content:center;font-size:14px;color:var(--purple3);
}
.notif-title{font-size:12px;font-weight:700;margin-bottom:2px}
.notif-body{font-size:11px;color:var(--text3);line-height:1.5}
.notif-time{font-size:10px;color:var(--text3);margin-top:2px}

/* ══ BOTTOM NAVBAR ══ */
/* ══ BOTTOM NAVBAR — mobile only ══ */
#site-navbar{
  position:fixed;bottom:0;left:0;right:0;
  height:calc(var(--nh) + env(safe-area-inset-bottom,0px));
  z-index:500;
  background:rgba(10,10,15,.92);
  backdrop-filter:blur(24px) saturate(180%);
  -webkit-backdrop-filter:blur(24px) saturate(180%);
  border-top:1px solid var(--bord);
  display:flex;align-items:flex-start;justify-content:space-around;
  padding-top:6px;padding-bottom:env(safe-area-inset-bottom,0px);
  box-shadow:0 -2px 16px rgba(124,58,237,.12);
}
.nav-item{
  display:flex;flex-direction:column;align-items:center;gap:3px;
  flex:1;padding:5px 4px;cursor:pointer;color:var(--text3);
  text-align:center;-webkit-tap-highlight-color:transparent;transition:color .18s;
  text-decoration:none;outline:none;
}
.nav-item:visited,.nav-item:link{ color:var(--text3); }
.nav-item i{font-size:20px;transition:all .22s cubic-bezier(.34,1.56,.64,1)}
.nav-item span{font-size:10px;font-weight:500}
.nav-item.active{color:var(--purple3)}
.nav-item.active i{transform:translateY(-2px);filter:drop-shadow(0 0 8px rgba(139,92,246,.6))}

/* Desktop: hide bottom navbar */
@media(min-width:900px){
  #site-navbar{display:none}
}

/* ══ MAIN ══ */
#main-content{
  padding-top:calc(var(--hh) + env(safe-area-inset-top,0px) + 8px);
  padding-bottom:calc(var(--nh) + env(safe-area-inset-bottom,0px) + 12px);
  min-height:100vh;
  transition:margin .3s ease;
}
@media(min-width:900px){
  #main-content{
    margin-inline-start:var(--dsb-w,240px);
    padding-top:calc(var(--hh) + env(safe-area-inset-top,0px) + 8px);
    padding-bottom:24px;
  }
}
.page{
  display:none;
}
.page.active{
  display:block;
  min-height:calc(100vh - var(--hh) - var(--nh));
  /* Prevent height collapse that causes scroll jumps */
  contain:layout style;
}

/* Home page: hero goes full-bleed, overlap the main-content padding */
#page-home{
  margin-top:calc(-1 * (var(--hh) + env(safe-area-inset-top,0px) + 8px));
  contain:layout style;
}

/* ══ HERO CAROUSEL ══ */
.hero-carousel{
  position:relative;overflow:hidden;background:var(--bg2);
  height:calc(240px + var(--hh) + env(safe-area-inset-top,0px));
}
@media(min-width:600px){
  .hero-carousel{height:calc(320px + var(--hh) + env(safe-area-inset-top,0px))}
}
@media(min-width:1024px){
  .hero-carousel{height:calc(420px + var(--hh) + env(safe-area-inset-top,0px))}
}
.hero-track{display:flex;transition:transform .5s cubic-bezier(.25,.46,.45,.94);height:100%}
.hero-slide{
  min-width:100%;height:100%;position:relative;overflow:hidden;
  display:flex;align-items:flex-end;
}
.hero-slide img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:center top}
.hero-slide-overlay{
  position:absolute;inset:0;
  background:linear-gradient(to top,rgba(10,10,15,.92) 0%,rgba(10,10,15,.4) 50%,transparent 100%);
}
.hero-slide-content{
  position:relative;z-index:2;
  /* Push content below the header that overlaps hero */
  padding:calc(var(--hh) + env(safe-area-inset-top,0px) + 12px) 18px 20px;
  width:100%;
}
.hero-slide-tag{
  display:inline-block;padding:3px 10px;border-radius:20px;
  background:var(--bsub);border:1px solid var(--bord2);
  font-size:10px;font-weight:600;color:var(--purple3);margin-bottom:8px;
}
.hero-slide-title{font-size:18px;font-weight:900;line-height:1.2;margin-bottom:5px}
@media(min-width:600px){.hero-slide-title{font-size:24px}}
.hero-slide-desc{font-size:11px;color:var(--text2);margin-bottom:12px;line-height:1.5;max-width:400px}
.hero-slide-btns{display:flex;gap:8px;flex-wrap:wrap}
.hero-btn-primary{
  padding:9px 16px;border-radius:10px;
  background:linear-gradient(135deg,#6d28d9,var(--purple2));
  color:#fff;font-size:12px;font-weight:700;
  box-shadow:0 4px 14px rgba(124,58,237,.45);
  transition:all .18s;display:inline-flex;align-items:center;gap:6px;cursor:pointer;
}
.hero-btn-primary:hover{transform:translateY(-1px);box-shadow:0 6px 20px rgba(124,58,237,.55)}
.hero-btn-save{
  width:36px;height:36px;border-radius:10px;
  background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.2);
  backdrop-filter:blur(8px);color:#fff;font-size:14px;
  display:inline-flex;align-items:center;justify-content:center;cursor:pointer;transition:all .18s;
}
.hero-btn-save:hover,.hero-btn-save.saved{background:var(--bsub);border-color:var(--purple2);color:var(--purple3)}
.hero-dots{
  position:absolute;bottom:10px;left:50%;transform:translateX(-50%);
  display:flex;gap:5px;z-index:3;
}
.hero-dot{
  width:6px;height:6px;border-radius:3px;background:rgba(255,255,255,.35);
  transition:all .3s;cursor:pointer;
}
.hero-dot.active{width:18px;background:var(--purple3)}
.hero-arrow{
  position:absolute;top:50%;transform:translateY(-50%);
  width:34px;height:34px;border-radius:10px;
  background:rgba(10,10,15,.6);border:1px solid var(--bord);
  backdrop-filter:blur(10px);color:var(--text2);font-size:13px;
  display:flex;align-items:center;justify-content:center;
  cursor:pointer;z-index:3;transition:all .18s;
}
.hero-arrow:hover{background:var(--bsub);color:var(--purple3);border-color:var(--bord2)}
.hero-arrow.prev{right:10px}
.hero-arrow.next{left:10px}
[dir="ltr"] .hero-arrow.prev{left:10px;right:auto}
[dir="ltr"] .hero-arrow.next{right:10px;left:auto}

/* ══ SECTIONS ══ */
.section{margin-bottom:26px}
.section-header{
  display:flex;align-items:center;gap:9px;
  padding:0 14px;margin-bottom:11px;
}
.section-icon-wrap{
  width:29px;height:29px;border-radius:8px;flex-shrink:0;
  background:var(--bsub);border:1px solid var(--bord);
  display:flex;align-items:center;justify-content:center;
  font-size:13px;color:var(--purple3);
}
.section-title{font-size:13px;font-weight:700;flex:1}
.section-arrows{display:none;gap:6px;align-items:center}
@media(min-width:768px){.section-arrows{display:flex}}
.section-arrow-btn{
  width:28px;height:28px;border-radius:8px;
  background:var(--bg3);border:1px solid var(--bord);
  color:var(--text2);display:flex;align-items:center;justify-content:center;
  font-size:11px;cursor:pointer;transition:all .18s;padding:0;
}
.section-arrow-btn:hover{
  background:var(--purple);color:#fff;border-color:var(--purple);
  transform:translateY(-1px);box-shadow:0 3px 12px rgba(124,58,237,.35);
}
.section-more{font-size:11px;color:var(--purple3);display:flex;align-items:center;gap:3px;cursor:pointer}
.cards-scroll{
  display:flex;
  gap:11px;
  padding:0 14px 4px;
  overflow-x:auto;
  overflow-y:visible;
  scrollbar-width:none;
  scroll-snap-type:x proximity;
  -webkit-overflow-scrolling:touch;
}
.cards-scroll::-webkit-scrollbar{display:none}

/* ══ PRODUCT CARD ══ */
.product-card{
  min-width:130px;width:130px;border-radius:12px;overflow:hidden;
  background:var(--bg2);border:1px solid var(--bord);
  flex-shrink:0;scroll-snap-align:start;cursor:pointer;
  transition:all .2s;box-shadow:0 2px 10px rgba(124,58,237,.08);
}
@media(min-width:768px){.product-card{min-width:160px;width:160px}}
.product-card:hover{border-color:var(--bord2);transform:translateY(-3px);box-shadow:0 8px 24px rgba(124,58,237,.15)}
.pc-img{position:relative;aspect-ratio:3/4;overflow:hidden;background:var(--bg4)}
.pc-img img{width:100%;height:100%;object-fit:cover;transition:transform .3s}
.product-card:hover .pc-img img{transform:scale(1.05)}
.pc-noimg{
  width:100%;height:100%;display:flex;align-items:center;justify-content:center;
  color:var(--text3);font-size:24px;
  background:linear-gradient(135deg,var(--bg3),var(--bg4));
}
.pc-save{
  position:absolute;top:7px;width:27px;height:27px;border-radius:8px;
  background:rgba(10,10,15,.7);backdrop-filter:blur(8px);
  border:1px solid var(--bord);color:var(--text3);font-size:11px;
  display:flex;align-items:center;justify-content:center;
  transition:all .18s;z-index:2;cursor:pointer;
}
[dir="rtl"] .pc-save{left:7px}
[dir="ltr"] .pc-save{right:7px}
.pc-save:hover,.pc-save.saved{background:var(--bsub);color:var(--purple3);border-color:var(--purple2)}
.pc-disc{
  position:absolute;top:7px;background:var(--red);border-radius:5px;
  padding:2px 6px;font-size:9px;font-weight:700;color:#fff;
}
[dir="rtl"] .pc-disc{right:7px}
[dir="ltr"] .pc-disc{left:7px}
.pc-info{padding:8px 9px 10px}
.pc-name{font-size:11px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-bottom:3px;line-height:1.3}
.pc-cat{font-size:10px;color:var(--text3);margin-bottom:5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pc-price-row{display:flex;align-items:center;gap:5px}
.pc-price{font-size:11px;font-weight:800;color:var(--purple3)}
.pc-price-old{font-size:10px;color:var(--text3);text-decoration:line-through}
.pc-add-btn{
  width:100%;padding:6px 4px;margin-top:7px;
  background:var(--bsub);border:1px solid var(--bord);border-radius:7px;
  color:var(--purple3);font-size:10px;font-weight:700;
  display:flex;align-items:center;justify-content:center;gap:3px;
  transition:all .18s;cursor:pointer;font-family:inherit;
}
.pc-add-btn:hover,.pc-add-btn:active{background:var(--purple);color:#fff;border-color:var(--purple)}

/* ══ CATEGORIES PAGE ══ */
.cat-search-wrap{padding:14px 14px 0}
.cat-chips{
  display:flex;gap:7px;padding:10px 14px 0;
  overflow-x:auto;scrollbar-width:none;-webkit-overflow-scrolling:touch;
}
.cat-chips::-webkit-scrollbar{display:none}
.cat-chip{
  flex-shrink:0;padding:6px 13px;border-radius:20px;
  font-size:11px;font-weight:600;
  border:1.5px solid var(--bord2);color:var(--text2);
  background:var(--bg3);cursor:pointer;transition:all .18s;white-space:nowrap;
  display:flex;align-items:center;gap:5px;
}
.cat-chip:hover,.cat-chip.active{
  background:var(--purple);border-color:var(--purple);color:#fff;
  box-shadow:0 3px 12px rgba(124,58,237,.4);
}
#catResults{
  padding:13px 14px;
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:12px;
}
@media(min-width:480px){#catResults{grid-template-columns:repeat(3,1fr)}}
@media(min-width:700px){#catResults{grid-template-columns:repeat(4,1fr)}}
@media(min-width:1000px){#catResults{grid-template-columns:repeat(5,1fr)}}

/* Grid product card - overrides carousel fixed width */
#catResults .product-card,
#favGrid .product-card,
.offers-grid .product-card,
.fav-grid .product-card{
  min-width:0 !important;
  width:100% !important;
}

/* ══ OFFERS PAGE ══ */
.offers-banners{margin:0 14px 16px;border-radius:var(--r);overflow:hidden;position:relative;height:120px}
@media(min-width:600px){.offers-banners{height:180px}}
.offers-banner-track{display:flex;transition:transform .5s;height:100%}
.offers-banner-slide{min-width:100%;height:100%}
.offers-banner-slide img{width:100%;height:100%;object-fit:cover}
.offers-grid{
  padding:0 14px;display:grid;
  grid-template-columns:repeat(2,1fr);gap:13px;
}
@media(min-width:600px){.offers-grid{grid-template-columns:repeat(3,1fr)}}
@media(min-width:900px){.offers-grid{grid-template-columns:repeat(4,1fr)}}
.offer-card{
  border-radius:14px;border:1px solid var(--bord);background:var(--bg2);
  overflow:hidden;cursor:pointer;transition:all .2s;
  box-shadow:0 2px 10px rgba(124,58,237,.06);
}
.offer-card:hover{border-color:var(--bord2);transform:translateY(-2px);box-shadow:0 8px 24px rgba(124,58,237,.14)}
.offer-img{aspect-ratio:3/4;overflow:hidden;background:var(--bg4);position:relative}
.offer-img img{width:100%;height:100%;object-fit:cover}
.offer-badge{
  position:absolute;top:8px;background:var(--red);color:#fff;
  padding:3px 9px;border-radius:20px;font-size:10px;font-weight:700;
}
[dir="rtl"] .offer-badge{right:8px}
[dir="ltr"] .offer-badge{left:8px}
.offer-info{padding:10px}
.offer-name{font-size:12px;font-weight:700;margin-bottom:5px;line-height:1.3}
.offer-prices{display:flex;align-items:center;gap:6px}
.offer-new{font-size:14px;font-weight:800;color:var(--purple3)}
.offer-old{font-size:11px;color:var(--text3);text-decoration:line-through}

/* ══ FAVORITES ══ */
.fav-grid{
  padding:13px 14px;display:grid;
  grid-template-columns:repeat(2,1fr);gap:12px;
}
@media(min-width:480px){.fav-grid{grid-template-columns:repeat(3,1fr)}}
@media(min-width:700px){.fav-grid{grid-template-columns:repeat(4,1fr)}}

/* ══ PAGE HEAD ══ */
.page-head{padding:16px 14px 10px}
.page-head h2{font-size:18px;font-weight:800;margin-bottom:3px}
.page-head p{font-size:12px;color:var(--text3)}

/* ══ EMPTY STATE ══ */
.empty-state{
  display:flex;flex-direction:column;align-items:center;
  justify-content:center;padding:60px 24px;text-align:center;gap:13px;
}
.empty-state i{font-size:44px;color:var(--text3)}
.empty-state h3{font-size:16px;font-weight:700;color:var(--text2)}
.empty-state p{font-size:12px;color:var(--text3);line-height:1.7}

/* ══ ACCOUNT ══ */
.account-page{padding:14px}
.profile-section{display:flex;flex-direction:column;align-items:center;padding:18px}
.profile-avatar{
  width:84px;height:84px;border-radius:50%;object-fit:cover;
  border:3px solid var(--purple2);box-shadow:0 0 20px rgba(124,58,237,.4);
}
.profile-avatar-wrap{position:relative;margin-bottom:13px}
.profile-avatar-edit{
  position:absolute;bottom:0;width:26px;height:26px;border-radius:50%;
  background:var(--purple);border:2px solid var(--bg);
  display:flex;align-items:center;justify-content:center;
  font-size:10px;color:#fff;cursor:pointer;
}
[dir="rtl"] .profile-avatar-edit{left:0}
[dir="ltr"] .profile-avatar-edit{right:0}
.profile-name{font-size:17px;font-weight:800;margin-bottom:3px}
.profile-email{font-size:11px;color:var(--text3)}
.stats-row{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;padding:0 14px;margin-bottom:14px}
.stat-box{
  background:var(--bg3);border:1px solid var(--bord);border-radius:12px;
  padding:13px;text-align:center;
}
.stat-num{font-size:21px;font-weight:800;color:var(--purple3)}
.stat-label{font-size:10px;color:var(--text3);margin-top:2px}
.settings-card{
  background:var(--bg2);border:1px solid var(--bord);
  border-radius:var(--r);overflow:hidden;margin-bottom:12px;
  box-shadow:0 2px 10px rgba(124,58,237,.06);
}
.settings-item{
  display:flex;align-items:center;gap:10px;padding:12px 14px;
  border-bottom:1px solid var(--bord);cursor:pointer;transition:background .15s;
}
.settings-item:last-child{border-bottom:none}
.settings-item:hover{background:var(--bsub)}
.si-icon{
  width:29px;height:29px;border-radius:7px;background:var(--bsub);
  display:flex;align-items:center;justify-content:center;
  color:var(--purple3);font-size:12px;flex-shrink:0;
}
.si-text{flex:1;font-size:13px;font-weight:500}
.si-arrow{color:var(--text3);font-size:10px}
.btn-logout{
  width:100%;padding:13px;
  background:rgba(239,68,68,.08);border:1px solid rgba(239,68,68,.22);
  border-radius:var(--rs);color:var(--red);font-size:13px;font-weight:700;
  display:flex;align-items:center;justify-content:center;gap:8px;
  cursor:pointer;font-family:inherit;transition:all .18s;
}
.btn-logout:hover{background:rgba(239,68,68,.15)}

/* ══ AUTH ══ */
.auth-page{
  min-height:100vh;display:flex;flex-direction:column;
  align-items:center;justify-content:center;padding:24px 16px;
  background:var(--bg);
  background-image:radial-gradient(ellipse 80% 55% at 50% -5%,rgba(124,58,237,.14) 0%,transparent 60%);
}
.auth-logo{
  font-size:30px;font-weight:800;margin-bottom:5px;text-align:center;
  background:linear-gradient(135deg,var(--purple),var(--purple3));
  -webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text;
}
.auth-sub{font-size:12px;color:var(--text3);margin-bottom:26px;text-align:center}
.auth-card{
  width:100%;max-width:370px;background:var(--bg2);
  border:1px solid var(--bord);border-radius:18px;
  padding:26px 22px;box-shadow:var(--shadow);
}
.auth-card h2{font-size:17px;font-weight:800;margin-bottom:18px}
.form-group{margin-bottom:14px}
.form-group label,.form-label{display:block;font-size:12px;font-weight:500;color:var(--text2);margin-bottom:6px}
.form-input{
  width:100%;padding:11px 13px;background:var(--bg3);
  border:1px solid var(--bord);border-radius:var(--rs);
  color:var(--text);font-size:13px;outline:none;transition:all .18s;
}
.form-input:focus{border-color:var(--purple2);box-shadow:0 0 0 3px rgba(124,58,237,.12)}
.form-input::placeholder{color:var(--text3)}
select.form-input{cursor:pointer}
textarea.form-input{resize:vertical}
.btn-primary{
  width:100%;padding:12px;
  background:linear-gradient(135deg,#6d28d9,var(--purple2));
  border-radius:var(--rs);color:#fff;font-size:14px;font-weight:700;
  margin-top:5px;transition:all .18s;
  box-shadow:0 4px 18px rgba(124,58,237,.4);cursor:pointer;border:none;font-family:inherit;
}
.btn-primary:hover{box-shadow:0 6px 22px rgba(124,58,237,.55);transform:translateY(-1px)}
.auth-switch{text-align:center;margin-top:16px;font-size:12px;color:var(--text3)}
.auth-switch a{color:var(--purple3);font-weight:600}
.form-error{
  background:rgba(239,68,68,.08);border:1px solid rgba(239,68,68,.22);
  border-radius:8px;padding:9px 13px;font-size:12px;color:#fca5a5;
  margin-bottom:12px;display:none;
}
.form-error.show{display:block}
.form-success{
  background:rgba(16,185,129,.08);border:1px solid rgba(16,185,129,.22);
  border-radius:8px;padding:9px 13px;font-size:12px;color:#6ee7b7;
  margin-bottom:12px;display:none;
}
.form-success.show{display:block}
.form-row{display:grid;gap:14px;margin-bottom:14px}
@media(min-width:600px){.form-row.cols2{grid-template-columns:repeat(2,1fr)}}

/* ══ PRODUCT DETAIL ══ */
.product-page{padding-bottom:24px}
.product-cover-wrap{
  position:relative;overflow:hidden;
  background:var(--bg2);
  min-height:260px;display:flex;justify-content:center;align-items:center;
}
@media(min-width:600px){.product-cover-wrap{min-height:360px}}
.product-cover-bg{
  position:absolute;inset:0;background-size:cover;background-position:center;
  filter:blur(30px) brightness(.4);transform:scale(1.1);
}
.product-cover-img{
  position:relative;z-index:2;width:140px;border-radius:14px;
  box-shadow:0 16px 48px rgba(0,0,0,.6);border:3px solid rgba(255,255,255,.1);
  margin:30px 0 80px;
}
@media(min-width:600px){.product-cover-img{width:190px}}
.product-cover-overlay{
  position:absolute;bottom:0;left:0;right:0;height:100px;z-index:3;
  background:linear-gradient(to top,var(--bg),transparent);
}
.product-info{padding:0 14px 20px;margin-top:-30px;position:relative;z-index:4}
.product-title{font-size:22px;font-weight:900;line-height:1.2;margin-bottom:6px}
.product-cat-tag{
  display:inline-flex;align-items:center;gap:5px;
  padding:3px 12px;border-radius:20px;font-size:11px;font-weight:600;
  background:var(--bsub);border:1px solid var(--bord2);color:var(--purple3);
  margin-bottom:12px;
}
.product-price-row{display:flex;align-items:center;gap:10px;margin-bottom:18px}
.product-price{font-size:26px;font-weight:800;color:var(--purple3)}
.product-price-old{font-size:16px;color:var(--text3);text-decoration:line-through}
.product-disc-badge{
  background:var(--red);color:#fff;padding:3px 10px;
  border-radius:20px;font-size:11px;font-weight:700;
}
.product-badges{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:16px}
.product-badge{
  display:flex;align-items:center;gap:5px;
  padding:4px 11px;border-radius:20px;font-size:11px;color:var(--text2);
  background:var(--bg3);border:1px solid var(--bord);
}
.product-badge i{color:var(--purple3);font-size:10px}
.product-actions-sticky{
  position:sticky;bottom:calc(var(--nh) + env(safe-area-inset-bottom,0px) + 8px);
  z-index:10;padding:0 14px;
  display:flex;gap:9px;
}
.btn-buy{
  flex:1;padding:14px;
  background:linear-gradient(135deg,#6d28d9,var(--purple2));
  border-radius:12px;color:#fff;font-size:14px;font-weight:800;
  display:flex;align-items:center;justify-content:center;gap:8px;
  box-shadow:0 4px 20px rgba(124,58,237,.45);transition:all .2s;cursor:pointer;
  border:none;font-family:inherit;
}
.btn-buy:hover{transform:translateY(-1px);box-shadow:0 6px 26px rgba(124,58,237,.55)}
.btn-cart{
  flex:1;padding:14px;
  background:var(--bg3);border:1.5px solid var(--bord2);
  border-radius:12px;color:var(--purple3);font-size:14px;font-weight:700;
  display:flex;align-items:center;justify-content:center;gap:8px;
  transition:all .2s;cursor:pointer;border:none;font-family:inherit;
}
.btn-cart:hover{background:var(--bsub)}

/* ══ PRODUCT PLANS ══ */
.plans-section{margin-bottom:18px}
.plans-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:8px}
@media(min-width:480px){.plans-grid{grid-template-columns:repeat(3,1fr)}}
.plan-card{
  padding:11px 10px;border-radius:10px;
  background:var(--bg3);border:1.5px solid var(--bord);
  cursor:pointer;transition:all .18s;text-align:center;
}
.plan-card:hover{border-color:var(--bord2)}
.plan-card.selected{
  background:var(--bsub);border-color:var(--purple2);
  box-shadow:0 0 0 2px rgba(124,58,237,.2);
}
.plan-name{font-size:11px;font-weight:700;margin-bottom:4px}
.plan-duration{font-size:10px;color:var(--text3);margin-bottom:5px}
.plan-price{font-size:14px;font-weight:800;color:var(--purple3)}
.plan-price-old{font-size:10px;color:var(--text3);text-decoration:line-through}

/* ══ ORDER SUCCESS ══ */
.success-page{
  min-height:100vh;display:flex;flex-direction:column;
  align-items:center;justify-content:center;
  padding:28px 20px;text-align:center;
  background:var(--bg);
  background-image:radial-gradient(ellipse 80% 55% at 50% 0%,rgba(16,185,129,.10) 0%,transparent 60%);
}
.success-icon{
  width:90px;height:90px;border-radius:50%;
  background:rgba(16,185,129,.12);border:3px solid rgba(16,185,129,.3);
  display:flex;align-items:center;justify-content:center;
  font-size:38px;color:#10b981;margin-bottom:20px;
  animation:successPop .5s cubic-bezier(.34,1.56,.64,1);
}
@keyframes successPop{from{transform:scale(.5);opacity:0}to{transform:scale(1);opacity:1}}
.success-order-num{
  display:inline-block;padding:5px 16px;
  background:var(--bsub);border:1px solid var(--bord2);
  border-radius:20px;font-size:12px;font-weight:700;color:var(--purple3);
  margin:12px 0;
}
.invoice-card{
  width:100%;max-width:420px;margin:18px auto;
  background:var(--bg2);border:1px solid var(--bord);border-radius:16px;
  overflow:hidden;
}
.invoice-head{
  background:linear-gradient(135deg,#6d28d9,var(--purple2));
  padding:18px 20px;display:flex;align-items:center;gap:12px;
}
.invoice-head img{height:36px;filter:brightness(10)}
.invoice-head-text{color:#fff}
.invoice-head-text h3{font-size:14px;font-weight:800}
.invoice-head-text p{font-size:11px;opacity:.8}
.invoice-body{padding:16px 20px}
.invoice-row{
  display:flex;justify-content:space-between;
  font-size:12px;padding:5px 0;border-bottom:1px solid var(--bord);color:var(--text2);
}
.invoice-row:last-child{border-bottom:none}
.invoice-row.total{font-weight:800;font-size:14px;color:var(--purple3)}
.invoice-actions{display:flex;gap:9px;margin-top:16px;padding:0 20px 20px}
.btn-dl{
  flex:1;padding:11px;border-radius:10px;font-size:12px;font-weight:700;
  display:flex;align-items:center;justify-content:center;gap:6px;cursor:pointer;
  border:none;font-family:inherit;transition:all .18s;
}
.btn-dl.pdf{background:rgba(239,68,68,.1);border:1px solid rgba(239,68,68,.25);color:#fca5a5}
.btn-dl.jpg{background:rgba(16,185,129,.1);border:1px solid rgba(16,185,129,.25);color:#6ee7b7}
.btn-dl:hover{transform:translateY(-1px)}

/* ══ TOAST ══ */
.toast{
  position:fixed;bottom:calc(var(--nh) + env(safe-area-inset-bottom,0px) + 16px);
  left:50%;transform:translateX(-50%) translateY(20px);
  background:rgba(30,30,50,.95);backdrop-filter:blur(20px);
  border:1px solid var(--bord2);border-radius:10px;
  padding:11px 18px;font-size:13px;font-weight:500;color:var(--text);
  z-index:9000;opacity:0;transition:all .3s;pointer-events:none;white-space:nowrap;
  max-width:90vw;text-align:center;
}
.toast.show{opacity:1;transform:translateX(-50%) translateY(0)}

/* ══ LOADING ══ */
.loading{
  display:flex;flex-direction:column;align-items:center;
  justify-content:center;padding:40px;gap:12px;color:var(--text3);
}
.spinner{
  width:32px;height:32px;border-radius:50%;
  border:3px solid var(--bord);border-top-color:var(--purple2);
  animation:spin .7s linear infinite;
}
@keyframes spin{to{transform:rotate(360deg)}}

/* ══ MODALS ══ */
.modal-bd{
  position:fixed;inset:0;z-index:2000;
  background:rgba(0,0,0,.65);backdrop-filter:blur(8px);
  display:none;align-items:center;justify-content:center;padding:18px;
}
.modal-bd.open{display:flex}
.modal-box{
  background:var(--bg2);border:1px solid var(--bord2);
  border-radius:18px;padding:24px 20px;width:100%;max-width:340px;
  animation:modalPop .25s cubic-bezier(.34,1.4,.64,1);
}
@keyframes modalPop{from{transform:scale(.9);opacity:0}to{transform:scale(1);opacity:1}}
.modal-box h3{font-size:15px;font-weight:800;margin-bottom:17px}
.modal-btns{display:flex;gap:9px;margin-top:16px}

/* ══ PWA PROMPT ══ */
.pwa-prompt{
  position:fixed;bottom:calc(var(--nh) + env(safe-area-inset-bottom,0px) + 10px);
  left:12px;right:12px;z-index:800;
  background:rgba(14,14,22,.97);backdrop-filter:blur(24px);
  border:1px solid var(--bord2);border-radius:16px;
  padding:13px 14px;
  display:flex;align-items:center;gap:11px;
  box-shadow:var(--shadow),var(--sglow);
  transform:translateY(120%);opacity:0;
  transition:all .4s cubic-bezier(.34,1.4,.64,1);
  pointer-events:none;
}
.pwa-prompt.show{transform:translateY(0);opacity:1;pointer-events:all}
.pwa-prompt-icon{
  width:42px;height:42px;border-radius:11px;flex-shrink:0;
  overflow:hidden;background:var(--bsub);border:1px solid var(--bord);
}
.pwa-prompt-icon img{width:100%;height:100%;object-fit:cover}
.pwa-prompt-text{flex:1;min-width:0}
.pwa-prompt-text strong{display:block;font-size:13px;font-weight:700;margin-bottom:2px}
.pwa-prompt-text span{font-size:11px;color:var(--text3)}
.pwa-prompt-btns{display:flex;flex-direction:column;gap:5px;flex-shrink:0}
.pwa-install-cta{
  padding:7px 14px;border-radius:8px;
  background:var(--purple);color:#fff;font-size:11px;font-weight:700;
  border:none;cursor:pointer;font-family:inherit;white-space:nowrap;
}
.pwa-dismiss{
  padding:6px 10px;border-radius:7px;
  background:none;border:1px solid var(--bord);
  color:var(--text3);font-size:10px;font-weight:500;
  cursor:pointer;font-family:inherit;
}

/* ══ ADMIN LAYOUT ══ */
.admin-layout{display:flex;min-height:100vh;direction:rtl}
[lang="en"] .admin-layout{direction:ltr}
.admin-sidebar{
  position:fixed;top:0;bottom:0;width:var(--sidebar-w);
  background:var(--bg2);border-inline-end:1px solid var(--bord);
  z-index:400;overflow-y:auto;
  display:flex;flex-direction:column;
  padding-bottom:20px;
}
[dir="rtl"] .admin-sidebar{right:0}
[dir="ltr"] .admin-sidebar{left:0}
.admin-sidebar-logo{
  padding:18px 18px 14px;
  font-size:18px;font-weight:800;
  background:linear-gradient(135deg,var(--purple),var(--purple3));
  -webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text;
  border-bottom:1px solid var(--bord);margin-bottom:8px;
  display:flex;align-items:center;gap:9px;
}
.admin-sidebar-logo img{height:28px;filter:drop-shadow(0 0 8px rgba(124,58,237,.4))}
.admin-nav-item{
  display:flex;align-items:center;gap:10px;
  padding:11px 18px;font-size:12.5px;font-weight:500;
  color:var(--text2);cursor:pointer;transition:all .18s;
  border-inline-start:3px solid transparent;text-decoration:none;
}
.admin-nav-item:hover{background:var(--bsub);color:var(--purple3)}
.admin-nav-item.active{
  background:var(--bsub);color:var(--purple3);
  border-inline-start-color:var(--purple2);font-weight:700;
}
.admin-nav-item i{font-size:14px;width:18px;text-align:center}
.admin-nav-sep{
  font-size:10px;font-weight:700;text-transform:uppercase;
  color:var(--text3);padding:14px 18px 4px;letter-spacing:.08em;
}
.admin-main{
  margin-inline-start:var(--sidebar-w);padding:24px;
  min-height:100vh;background:var(--bg);flex:1;
}
.admin-header-bar{
  display:flex;align-items:center;gap:12px;margin-bottom:22px;
  flex-wrap:wrap;
}
.admin-header-bar h1{font-size:19px;font-weight:800;flex:1}
.admin-card{
  background:var(--bg2);border:1px solid var(--bord);
  border-radius:var(--r);padding:20px;margin-bottom:16px;
}
.admin-card h2{font-size:14px;font-weight:700;margin-bottom:16px;display:flex;align-items:center;gap:7px}
.admin-card h2 i{color:var(--purple3)}
.stat-cards{display:grid;grid-template-columns:repeat(2,1fr);gap:13px;margin-bottom:18px}
@media(min-width:900px){.stat-cards{grid-template-columns:repeat(4,1fr)}}
.stat-card{
  background:var(--bg2);border:1px solid var(--bord);
  border-radius:var(--r);padding:16px;
  display:flex;align-items:center;gap:13px;
}
.stat-card-icon{
  width:46px;height:46px;border-radius:12px;flex-shrink:0;
  background:var(--bsub);display:flex;align-items:center;justify-content:center;
  font-size:20px;color:var(--purple3);
}
.stat-card-info .num{font-size:22px;font-weight:800}
.stat-card-info .lbl{font-size:11px;color:var(--text3);margin-top:1px}
.admin-table{width:100%;border-collapse:collapse;font-size:12.5px}
.admin-table th{
  background:var(--bg3);color:var(--text3);font-weight:600;font-size:11px;
  padding:9px 12px;text-align:inherit;border-bottom:1px solid var(--bord);
}
.admin-table td{
  padding:10px 12px;border-bottom:1px solid var(--bord);
  vertical-align:middle;color:var(--text2);
}
.admin-table tr:hover td{background:var(--bsub)}
.admin-table tr:last-child td{border-bottom:none}
.tbl-img{width:36px;height:36px;border-radius:7px;object-fit:cover;background:var(--bg4)}
.tbl-badge{
  padding:3px 9px;border-radius:20px;font-size:10px;font-weight:700;
  display:inline-block;
}
.tbl-badge.green{background:rgba(16,185,129,.12);color:#6ee7b7;border:1px solid rgba(16,185,129,.25)}
.tbl-badge.red{background:rgba(239,68,68,.12);color:#fca5a5;border:1px solid rgba(239,68,68,.25)}
.tbl-badge.amber{background:rgba(245,158,11,.12);color:#fcd34d;border:1px solid rgba(245,158,11,.25)}
.tbl-badge.purple{background:rgba(124,58,237,.12);color:var(--purple3);border:1px solid var(--bord2)}
.tbl-badge.blue{background:rgba(59,130,246,.12);color:#93c5fd;border:1px solid rgba(59,130,246,.25)}
.btn-sm{
  padding:5px 11px;border-radius:7px;font-size:11px;font-weight:600;
  cursor:pointer;border:none;font-family:inherit;transition:all .15s;
  display:inline-flex;align-items:center;gap:5px;text-decoration:none;
}
.btn-sm.edit{background:rgba(124,58,237,.12);color:var(--purple3);border:1px solid var(--bord)}
.btn-sm.del{background:rgba(239,68,68,.10);color:#fca5a5;border:1px solid rgba(239,68,68,.2)}
.btn-sm.view{background:rgba(59,130,246,.10);color:#93c5fd;border:1px solid rgba(59,130,246,.2)}
.btn-sm.ok{background:rgba(16,185,129,.10);color:#6ee7b7;border:1px solid rgba(16,185,129,.2)}
.btn-sm.amber{background:rgba(245,158,11,.10);color:#fcd34d;border:1px solid rgba(245,158,11,.2)}
.btn-sm:hover{transform:translateY(-1px)}
.btn-add{
  padding:10px 18px;border-radius:10px;
  background:linear-gradient(135deg,#6d28d9,var(--purple2));
  color:#fff;font-size:13px;font-weight:700;
  display:inline-flex;align-items:center;gap:7px;cursor:pointer;
  border:none;font-family:inherit;transition:all .18s;
  box-shadow:0 4px 14px rgba(124,58,237,.35);text-decoration:none;
}
.btn-add:hover{transform:translateY(-1px);box-shadow:0 6px 20px rgba(124,58,237,.48)}
.admin-search{
  display:flex;align-items:center;gap:8px;
  background:var(--bg3);border:1px solid var(--bord);
  border-radius:10px;padding:9px 12px;flex:1;max-width:280px;
}
.admin-search i{color:var(--text3);font-size:13px;flex-shrink:0}
.admin-search input{background:none;border:none;outline:none;color:var(--text);font-size:13px;font-family:inherit;flex:1;width:100%}
.admin-search input::placeholder{color:var(--text3)}
.tbl-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch}
.tbl-desktop{display:block}
.tbl-mobile{display:none;flex-direction:column;gap:10px}
@media(max-width:768px){.tbl-desktop{display:none}.tbl-mobile{display:flex}}
.m-card{background:var(--bg2);border:1px solid var(--bord);border-radius:12px;padding:12px 14px;transition:border-color .18s}
.m-card:hover{border-color:var(--bord2)}
.m-card-head{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:8px;gap:8px}
.m-card-body{display:flex;flex-direction:column;gap:5px;margin-bottom:8px}
.m-card-row{display:flex;justify-content:space-between;align-items:center;font-size:12px;gap:8px}
.m-card-row .lbl{color:var(--text3);flex-shrink:0}
.m-card-row .val{font-weight:600;word-break:break-all;text-align:left}
.m-card-foot{display:flex;gap:6px;padding-top:8px;border-top:1px solid var(--bord);flex-wrap:wrap;align-items:center}
.admin-toggle{display:flex;align-items:center;justify-content:space-between;padding:11px 0;border-bottom:1px solid var(--bord)}
.admin-toggle:last-child{border-bottom:none}
.toggle-sw{position:relative;width:42px;height:24px;flex-shrink:0;display:inline-block}
.toggle-sw input{opacity:0;width:0;height:0;position:absolute}
.toggle-sw span{position:absolute;inset:0;border-radius:12px;background:var(--bg4);border:1px solid var(--bord);cursor:pointer;transition:.3s}
.toggle-sw span::before{content:'';position:absolute;width:18px;height:18px;border-radius:50%;background:var(--text3);bottom:2px;right:2px;transition:.3s}
.toggle-sw input:checked + span{background:var(--purple);border-color:var(--purple2)}
.toggle-sw input:checked + span::before{background:#fff;right:calc(100% - 20px)}
.rich-img-upload{display:flex;gap:12px;align-items:flex-start;flex-wrap:wrap;margin-bottom:4px}
.rich-img-box{width:90px;height:90px;border:2px dashed var(--bord2);border-radius:10px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;cursor:pointer;transition:all .2s;position:relative;overflow:hidden;flex-shrink:0}
.rich-img-box:hover{border-color:var(--purple2);background:var(--bsub)}
.rich-img-box img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;border-radius:8px}
.rich-img-box i{font-size:20px;color:var(--text3)}
.rich-img-box span{font-size:9px;color:var(--text3)}
.form-hint{font-size:11px;color:var(--text3);margin-top:3px}
.color-preview{width:30px;height:30px;border-radius:7px;border:1px solid var(--bord);cursor:pointer;display:inline-block;vertical-align:middle}
.pwa-install-btn{padding:8px 14px;border-radius:9px;background:var(--bg3);border:1px solid var(--bord);color:var(--text2);font-size:12px;font-weight:600;display:inline-flex;align-items:center;gap:6px;cursor:pointer;font-family:inherit;transition:all .18s}
.pwa-install-btn:hover{background:var(--bsub);color:var(--purple3);border-color:var(--bord2)}
.select-check{width:16px;height:16px;accent-color:var(--purple);cursor:pointer}

/* Admin Mobile */
@media(max-width:768px){
  .admin-sidebar{
    position:fixed;top:0;right:0;bottom:0;
    transform:translateX(110%);z-index:300;
    transition:transform .3s ease;
  }
  .admin-sidebar.open{transform:translateX(0)}
  .admin-main{margin-inline-start:0;width:100%;padding:12px}
  .admin-header-bar h1{font-size:15px}
  .mob-menu-btn{display:flex !important}
}
.mob-menu-btn{
  display:none;
  width:36px;height:36px;border-radius:9px;
  background:var(--bg3);border:1px solid var(--bord);
  align-items:center;justify-content:center;
  color:var(--text2);font-size:15px;cursor:pointer;flex-shrink:0;
}
.modal-full{
  position:fixed;top:0;right:0;bottom:0;
  width:90%;max-width:540px;
  background:var(--bg2);
  border-left:1px solid var(--bord2);
  overflow-y:auto;z-index:300;
  transform:translateX(110%);
  transition:transform .3s ease;
  display:flex;flex-direction:column;
}
.modal-full.open{transform:translateX(0)}
.modal-full-head{
  position:sticky;top:0;
  background:var(--bg2);border-bottom:1px solid var(--bord);
  padding:14px 16px;display:flex;align-items:center;gap:10px;
  z-index:2;flex-shrink:0;
}
.modal-full-body{padding:16px 18px 40px;flex:1}
@media(max-width:768px){.modal-full{width:100%;max-width:100%;border:none}}
.admin-overlay,.admin-overlay-bg{
  display:none;position:fixed;inset:0;
  background:rgba(0,0,0,.55);z-index:190;
}
.admin-overlay.open{display:block}

/* ══ NOTIFICATIONS — dismiss button ══ */
.notif-item {
  position: relative;
  border-bottom: 1px solid var(--bord);
  transition: background .15s;
}
.notif-item:last-child { border-bottom: none; }
.notif-item-inner {
  display: flex;
  gap: 10px;
  padding: 10px 42px 10px 14px;
  cursor: pointer;
}
.notif-item-inner:hover { background: var(--bsub); }
.notif-dismiss-btn {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  right: 10px;
  width: 24px; height: 24px;
  border-radius: 6px;
  background: var(--bg3);
  border: 1px solid var(--bord);
  color: var(--text3);
  font-size: 10px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all .15s;
  flex-shrink: 0;
}
[dir="ltr"] .notif-dismiss-btn { right: auto; left: 10px; }
[dir="ltr"] .notif-item-inner { padding: 10px 14px 10px 42px; }
.notif-dismiss-btn:hover {
  background: rgba(239,68,68,.15);
  border-color: rgba(239,68,68,.3);
  color: var(--red);
}

/* ══ CAT CARDS responsive fix ══ */
.cat-item-img {
  /* Fallback for browsers without color-mix */
  background: var(--bg3);
}

/* ══ CART PAGE ══ */
.cart-page {
  padding: calc(var(--hh) + env(safe-area-inset-top,0px) + 8px) 14px 16px;
  max-width: 600px;
  margin: 0 auto;
}
.cart-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--bord);
}
.cart-item:last-child { border-bottom: none; }
.cart-item-img {
  width: 64px;
  height: 82px;
  border-radius: 11px;
  overflow: hidden;
  background: var(--bg3);
  border: 1px solid var(--bord);
  flex-shrink: 0;
}
.cart-item-img img {
  width: 100%; height: 100%; object-fit: cover;
}
.cart-item-info {
  flex: 1;
  min-width: 0;
}
.cart-item-name {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 3px;
  line-height: 1.3;
}
.cart-item-cat {
  font-size: 10px;
  color: var(--text3);
  margin-bottom: 5px;
}
.cart-item-price {
  font-size: 14px;
  font-weight: 800;
  color: var(--purple3);
  margin-bottom: 8px;
}
.cart-qty {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}
.qty-btn {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: var(--bg3);
  border: 1px solid var(--bord);
  color: var(--text2);
  font-size: 16px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all .15s;
  line-height: 1;
}
.qty-btn:hover { background: var(--purple); color: #fff; border-color: var(--purple); }
.qty-num {
  font-size: 14px;
  font-weight: 700;
  min-width: 24px;
  text-align: center;
  color: var(--text);
}
.cart-del {
  width: 34px; height: 34px;
  border-radius: 10px;
  background: rgba(239,68,68,.08);
  border: 1px solid rgba(239,68,68,.2);
  color: var(--red);
  font-size: 13px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all .15s;
  flex-shrink: 0;
}
.cart-del:hover { background: rgba(239,68,68,.18); }
.cart-summary {
  background: var(--bg2);
  border: 1px solid var(--bord);
  border-radius: var(--r);
  padding: 16px;
  margin-top: 16px;
}
.cart-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  font-size: 13px;
  border-bottom: 1px solid var(--bord);
  color: var(--text2);
}
.cart-summary-row:last-child { border-bottom: none; }
.cart-summary-row.total {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  padding-top: 12px;
}
.cart-summary-row.total span:last-child { color: var(--purple3); }
.btn-checkout {
  width: 100%;
  padding: 14px;
  margin-top: 14px;
  background: linear-gradient(135deg, #6d28d9, var(--purple2));
  border: none;
  border-radius: var(--r);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 18px rgba(124,58,237,.4);
  transition: all .2s;
}
.btn-checkout:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(124,58,237,.55);
}

/* ══════════════════════════════════════
   DESKTOP SIDEBAR
   ══════════════════════════════════════ */
:root { --dsb-w: 240px; }

#desktop-sidebar {
  display: none; /* mobile: hidden */
}

@media (min-width: 900px) {
  #desktop-sidebar {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    width: var(--dsb-w);
    z-index: 480;
    background: rgba(10,10,15,.97);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border-inline-end: 1px solid var(--bord);
    overflow: hidden;
    transition: width .28s cubic-bezier(.4,0,.2,1);
  }
  /* RTL: sidebar on right */
  [dir="rtl"] #desktop-sidebar { right: 0; }
  [dir="ltr"] #desktop-sidebar { left: 0; }

  /* Collapsed state */
  #desktop-sidebar.collapsed {
    width: 64px;
  }
  #desktop-sidebar.collapsed .dsb-logo-text,
  #desktop-sidebar.collapsed .dsb-item span,
  #desktop-sidebar.collapsed .dsb-badge,
  #desktop-sidebar.collapsed .dsb-user-info,
  #desktop-sidebar.collapsed .dsb-orders-btn span,
  #desktop-sidebar.collapsed .dsb-cart-btn span:not(.dsb-cart-count),
  #desktop-sidebar.collapsed .dsb-login-btn span {
    opacity: 0;
    width: 0;
    overflow: hidden;
    white-space: nowrap;
  }
  #desktop-sidebar.collapsed #main-content {
    margin-inline-start: 64px;
  }

  /* Logo */
  .dsb-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: calc(var(--hh) / 2 - 14px) 16px;
    height: calc(var(--hh) + env(safe-area-inset-top,0px));
    border-bottom: 1px solid var(--bord);
    cursor: pointer;
    flex-shrink: 0;
    overflow: hidden;
    text-decoration: none;
  }
  .dsb-logo img {
    height: 30px;
    width: 30px;
    object-fit: contain;
    flex-shrink: 0;
    border-radius: 8px;
  }
  .dsb-logo-text {
    font-size: 17px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--purple), var(--purple3));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    white-space: nowrap;
    transition: opacity .2s, width .28s;
  }

  /* Nav */
  .dsb-nav {
    padding: 10px 0;
    flex: 1;
    overflow-y: auto;
    scrollbar-width: none;
  }
  .dsb-nav::-webkit-scrollbar { display: none; }

  .dsb-item {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 11px 16px;
    cursor: pointer;
    color: var(--text3);
    border-inline-start: 3px solid transparent;
    transition: all .18s;
    position: relative;
    -webkit-tap-highlight-color: transparent;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
  }
  .dsb-item:hover {
    background: var(--bsub);
    color: var(--purple3);
  }
  .dsb-item.active {
    background: linear-gradient(90deg, rgba(124,58,237,.18) 0%, transparent 100%);
    color: var(--purple3);
    border-inline-start-color: var(--purple2);
    font-weight: 700;
  }
  .dsb-item span {
    font-size: 13px;
    font-weight: 500;
    transition: opacity .2s, width .28s;
    flex: 1;
  }
  .dsb-item.active span { font-weight: 700; }

  .dsb-icon {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    background: rgba(124,58,237,.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
    transition: background .18s;
  }
  .dsb-item:hover .dsb-icon,
  .dsb-item.active .dsb-icon {
    background: rgba(124,58,237,.22);
    color: var(--purple3);
  }

  .dsb-badge {
    font-size: 9px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 20px;
    background: linear-gradient(135deg, #6d28d9, var(--purple2));
    color: #fff;
    flex-shrink: 0;
    transition: opacity .2s;
  }

  /* Bottom section */
  .dsb-bottom {
    border-top: 1px solid var(--bord);
    padding: 10px 0 calc(10px + env(safe-area-inset-bottom,0px));
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex-shrink: 0;
  }

  .dsb-cart-btn,
  .dsb-orders-btn {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 16px;
    cursor: pointer;
    color: var(--text3);
    transition: all .18s;
    border-inline-start: 3px solid transparent;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
  }
  .dsb-cart-btn:hover,
  .dsb-orders-btn:hover {
    background: var(--bsub);
    color: var(--purple3);
  }
  .dsb-cart-btn span,
  .dsb-orders-btn span {
    font-size: 13px;
    transition: opacity .2s, width .28s;
  }

  .dsb-cart-count {
    margin-inline-start: auto;
    background: var(--purple);
    color: #fff;
    border-radius: 20px;
    padding: 2px 8px;
    font-size: 10px;
    font-weight: 700;
    flex-shrink: 0 !important;
    width: auto !important;
    opacity: 1 !important;
  }

  .dsb-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    overflow: hidden;
    flex-shrink: 0;
  }
  .dsb-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--bord2);
    flex-shrink: 0;
  }
  .dsb-avatar-letter {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bsub);
    color: var(--purple3);
    font-size: 14px;
    font-weight: 800;
  }
  .dsb-user-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    transition: opacity .2s, width .28s;
  }
  .dsb-user-name {
    font-size: 12px;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .dsb-user-email {
    font-size: 10px;
    color: var(--text3);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .dsb-login-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 4px 12px;
    padding: 10px 14px;
    background: linear-gradient(135deg, rgba(124,58,237,.18), rgba(139,92,246,.1));
    border: 1px solid var(--bord2);
    border-radius: 11px;
    color: var(--purple3);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: all .18s;
    overflow: hidden;
    white-space: nowrap;
  }
  .dsb-login-btn:hover {
    background: linear-gradient(135deg, rgba(124,58,237,.28), rgba(139,92,246,.18));
    box-shadow: 0 4px 14px rgba(124,58,237,.25);
  }

  /* Collapse toggle button */
  .dsb-collapse-btn {
    position: absolute;
    top: calc(var(--hh)/2 - 13px + env(safe-area-inset-top,0px)/2);
    inset-inline-end: -13px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--bg3);
    border: 1px solid var(--bord2);
    color: var(--text3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    cursor: pointer;
    z-index: 10;
    transition: all .2s;
    box-shadow: 0 2px 8px rgba(0,0,0,.3);
  }
  .dsb-collapse-btn:hover {
    background: var(--purple);
    color: #fff;
    border-color: var(--purple);
  }
  #desktop-sidebar.collapsed .dsb-collapse-btn i {
    transform: rotate(180deg);
  }
  [dir="rtl"] #desktop-sidebar.collapsed .dsb-collapse-btn i {
    transform: rotate(0deg);
  }
  [dir="rtl"] #desktop-sidebar:not(.collapsed) .dsb-collapse-btn i {
    transform: rotate(180deg);
  }

  /* Adjust main-content when collapsed */
  body.sidebar-collapsed #main-content {
    margin-inline-start: 64px;
  }
}

@media (min-width: 900px) and (max-width: 1100px) {
  /* Auto-collapse on medium screens */
  :root { --dsb-w: 64px; }
  #desktop-sidebar { width: 64px; }
  .dsb-logo-text,
  .dsb-item span,
  .dsb-badge,
  .dsb-user-info,
  .dsb-orders-btn span,
  .dsb-cart-btn span:not(.dsb-cart-count),
  .dsb-login-btn span {
    display: none;
  }
  .dsb-item { justify-content: center; padding: 12px; }
  .dsb-cart-btn,
  .dsb-orders-btn { justify-content: center; padding: 12px; }
  .dsb-user { justify-content: center; }
  .dsb-login-btn { justify-content: center; padding: 10px; }
  .dsb-collapse-btn { display: none; }
}

@media (min-width: 1100px) {
  :root { --dsb-w: 240px; }
}
