/* تم حذف @import الخاص بالخطوط ونقله إلى head في HTML لتسريع أول دخول */

:root{
  --olive-900:#0e1730; --olive-800:#16233f; --olive-700:#1d2f57; --olive-600:#2a407a;
  --olive-500:#3d5a9e; --olive-400:#8a9bc4; --olive-100:#e6eaf3; --olive-50:#f2f4f9;
  --sand-500:#b4883a; --sand-100:#f6eddb;
  --cream:#f5f6f7; --white:#fff; --ink-900:#14161c; --ink-700:#363a45; --ink-600:#5f6573; --ink-400:#8b91a0; --ink-300:#bcc1cc;
  --line:#e6e8ec; --line-strong:#d0d4dc; --danger:#c23b3b; --danger-bg:#fbeaea; --success:#3d5a9e;
  --radius-xl:28px; --radius-lg:20px; --radius-md:14px; --radius-sm:10px; --radius-pill:999px;
  --shadow-soft:0 8px 28px rgba(14,23,48,.06); --shadow-card:0 14px 38px rgba(14,23,48,.08); --shadow-lift:0 22px 55px rgba(14,23,48,.12);
  --font-display:'El Messiri','IBM Plex Sans Arabic',sans-serif; --font-body:'IBM Plex Sans Arabic','Tajawal',sans-serif; --container:1240px;
}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:var(--cream);color:var(--ink-900);font-family:var(--font-body);line-height:1.7;-webkit-font-smoothing:antialiased}img{max-width:100%;display:block}a{color:inherit;text-decoration:none}button,input,select,textarea{font:inherit}button{cursor:pointer}p{color:var(--ink-600);margin:0 0 1em}h1,h2,h3,h4{font-family:var(--font-display);line-height:1.25;margin:0 0 .5em;color:var(--ink-900)}h1{font-size:clamp(2rem,4vw,3.5rem);font-weight:800}h2{font-size:clamp(1.55rem,3vw,2.35rem);font-weight:800}h3{font-size:1.2rem;font-weight:700}.container{width:min(100%,var(--container));margin-inline:auto;padding-inline:22px}.visually-hidden{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}:focus-visible{outline:3px solid rgba(61,90,158,.3);outline-offset:3px}

/* Skeleton Loading للظهور الفوري في أول دخول */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.skeleton-card {
  min-height: 290px;
  background: #fff;
  border-radius: 20px;
  border: 1px solid var(--line);
  overflow: hidden;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.skeleton-box {
  background: linear-gradient(90deg, #eceff3 25%, #f7f9fa 50%, #eceff3 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 12px;
}
.skeleton-img { width: 100%; aspect-ratio: 1/1; }
.skeleton-text { height: 16px; width: 75%; }
.skeleton-price { height: 20px; width: 40%; margin-top: auto; }

/* Buttons */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:9px;min-height:46px;padding:11px 21px;border:1px solid transparent;border-radius:var(--radius-pill);font-weight:700;font-size:.95rem;transition:.2s ease}.btn svg{width:18px;height:18px}.btn-primary{background:var(--olive-700);color:#fff;box-shadow:0 8px 18px rgba(29,47,87,.18)}.btn-primary:hover{background:var(--olive-900);transform:translateY(-2px)}.btn-outline{background:#fff;border-color:var(--line-strong);color:var(--olive-800)}.btn-outline:hover{border-color:var(--olive-600);background:var(--olive-50)}.btn-whatsapp{background:#168a67;color:#fff}.btn-whatsapp:hover{background:#0f7255;transform:translateY(-2px)}.btn-sm{min-height:38px;padding:8px 15px;font-size:.85rem}.btn-block{width:100%}.btn:disabled{opacity:.45;cursor:not-allowed;transform:none!important}.btn-icon{position:relative;display:inline-flex;align-items:center;justify-content:center;width:42px;height:42px;border:1px solid var(--line);border-radius:50%;background:#fff;color:var(--olive-800);transition:.2s}.btn-icon:hover{background:var(--olive-100);border-color:var(--olive-400)}.btn-icon svg{width:19px;height:19px}

/* Header */
#site-header{position:sticky;top:0;z-index:100}.site-header{background:rgba(255,255,255,.94);backdrop-filter:blur(18px);border-bottom:1px solid rgba(230,232,236,.9)}.header-inner{min-height:76px;display:flex;align-items:center;gap:28px}.brand{display:flex;align-items:center;gap:11px;min-width:max-content}.brand img{width:48px;height:48px;border-radius:14px;object-fit:contain;background:#fff}.brand-name{font-weight:800;font-size:1.18rem;line-height:1.1;color:var(--olive-900)}.brand-name span{display:block;font-size:.68rem;font-weight:500;color:var(--ink-400);margin-top:4px}.main-nav{display:flex;align-items:center;justify-content:center;gap:4px;flex:1}.main-nav a{padding:9px 14px;border-radius:var(--radius-pill);font-size:.9rem;font-weight:600;color:var(--ink-600);transition:.2s}.main-nav a:hover,.main-nav a.active{color:var(--olive-800);background:var(--olive-100)}.header-actions{display:flex;align-items:center;gap:8px}.cart-link{position:relative}.cart-count{position:absolute;top:-3px;left:-4px;min-width:19px;height:19px;padding:0 5px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:var(--sand-500);color:#fff;font-size:.65rem;font-weight:800;border:2px solid #fff}.nav-toggle{display:none}

/* Search overlay */
.global-search-overlay{position:fixed;inset:0;z-index:1000;display:none;padding:18px;background:rgba(8,12,24,.62);backdrop-filter:blur(10px)}.global-search-overlay.open{display:flex;justify-content:center;align-items:flex-start}.global-search-container{width:min(100%,700px);margin-top:60px;padding:18px;background:#fff;border-radius:24px;box-shadow:var(--shadow-lift);max-height:82vh;display:flex;flex-direction:column}.global-search-header{display:flex;gap:10px;margin-bottom:14px}.global-search-results{overflow:auto;display:flex;flex-direction:column;gap:8px}.search-result-item{display:flex;gap:13px;align-items:center;padding:10px;border:1px solid var(--line);border-radius:14px;background:var(--cream);transition:.2s}.search-result-item:hover{border-color:var(--olive-400);background:var(--olive-50);transform:translateY(-1px)}.search-item-img{width:64px;height:64px;border-radius:11px;overflow:hidden;background:#fff;display:grid;place-items:center;flex:none}.search-item-img img{width:100%;height:100%;object-fit:cover}.search-item-info h4{margin:0 0 2px;font-size:.92rem}.search-item-info span{font-weight:800;color:var(--olive-700)}.empty-search{text-align:center;padding:32px;color:var(--ink-400)}

/* Hero */
.hero{position:relative;overflow:hidden;padding:48px 0 34px}.hero:before{content:"";position:absolute;inset:0 0 auto 0;height:410px;background:linear-gradient(135deg,#eef1f7 0%,#f5f6f7 58%,#f3f0e8 100%);z-index:-2}.hero:after{content:"";position:absolute;width:480px;height:480px;border-radius:50%;background:rgba(216,166,74,.09);left:-190px;top:-230px;z-index:-1}.hero-inner{display:grid;grid-template-columns:1.05fr .95fr;gap:44px;align-items:center}.hero-copy{padding:22px 0}.hero-eyebrow-free{display:inline-flex;align-items:center;gap:7px;padding:7px 12px;border-radius:var(--radius-pill);background:#fff;color:var(--olive-700);font-weight:700;font-size:.82rem;border:1px solid var(--line);box-shadow:var(--shadow-soft)}.hero-copy h1{max-width:700px;margin:17px 0 14px}.hero-copy>p{font-size:1.06rem;max-width:58ch}.hero-cta{display:flex;gap:10px;flex-wrap:wrap;margin-top:24px}.hero-trust{display:flex;gap:12px;margin-top:28px;flex-wrap:wrap}.hero-trust div{padding:10px 15px;background:rgba(255,255,255,.8);border:1px solid var(--line);border-radius:14px}.hero-trust strong{display:block;color:var(--olive-800);font-size:1.05rem}.hero-trust span{font-size:.75rem;color:var(--ink-400)}.hero-art{min-height:390px;border-radius:34px;overflow:hidden;background:var(--olive-900);box-shadow:var(--shadow-lift);display:grid;place-items:center;position:relative}.hero-art:before{content:"";position:absolute;width:310px;height:310px;border-radius:50%;border:1px solid rgba(255,255,255,.14)}.hero-art img{width:min(76%,390px);height:min(76%,390px);object-fit:contain;position:relative;z-index:1}.hero-art-default{width:80%;height:80%;display:grid;place-items:center}.hero-art-default img{width:55%;filter:drop-shadow(0 18px 28px rgba(0,0,0,.2))}

/* Sections */
.section{padding:62px 0}.section-alt{background:#fff}.section-head{display:flex;align-items:end;justify-content:space-between;gap:20px;margin-bottom:25px}.section-head p{margin:0;max-width:65ch}.section-head>div:first-child{min-width:0}.section-head h2{margin-bottom:7px}.cat-scroller{display:grid;grid-template-columns:repeat(4,1fr);gap:15px}.cat-chip{min-height:145px;padding:14px;border-radius:20px;border:1px solid var(--line);background:#fff;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;box-shadow:var(--shadow-soft);transition:.2s}.cat-chip:hover{transform:translateY(-4px);border-color:var(--olive-400);box-shadow:var(--shadow-card)}.cat-chip .cat-icon{width:66px;height:66px;border-radius:18px;background:var(--olive-100);display:grid;place-items:center;color:var(--olive-700)}.cat-chip .cat-icon svg{width:30px;height:30px}.cat-chip span.name{font-weight:700;color:var(--ink-700)}

/* Product cards */
.product-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px}.product-card{min-width:0;background:#fff;border:1px solid var(--line);border-radius:20px;overflow:hidden;box-shadow:var(--shadow-soft);transition:.22s ease;position:relative}.product-card:hover{transform:translateY(-5px);box-shadow:var(--shadow-card);border-color:#d3d8e0}.product-media{display:block;position:relative;aspect-ratio:1/1;background:#eff1f4;overflow:hidden}.product-media>img{width:100%;height:100%;object-fit:cover;transition:.35s}.product-card:hover .product-media>img{transform:scale(1.035)}.placeholder-icon{height:100%;display:grid;place-items:center;color:var(--olive-400)}.placeholder-icon svg{width:52px;height:52px}.badge{position:absolute;top:11px;right:11px;z-index:2;padding:5px 9px;border-radius:var(--radius-pill);font-size:.67rem;font-weight:800;background:#fff;color:var(--olive-800);box-shadow:0 4px 12px rgba(0,0,0,.08)}.badge-offer{background:var(--danger)!important;color:#fff!important}.badge-new{background:var(--olive-700);color:#fff}.badge-featured{background:var(--sand-500);color:#fff}.badge-out-abs{top:11px;left:11px;right:auto;background:var(--danger);color:#fff}.badge-variants{top:auto;bottom:10px;right:10px;background:rgba(255,255,255,.92)}.badge-variants svg{width:11px;height:11px;vertical-align:-2px;margin-left:3px}

/* دوائر الألوان تحت اسم المنتج */
.product-body-colors{
  display:flex;
  align-items:center;
  gap:5px;
  min-height:20px;
  margin:0 0 10px;
}
.card-color-dot{
  width:15px;
  height:15px;
  border-radius:50%;
  border:1.5px solid #fff;
  box-shadow:0 0 0 1px var(--line-strong,#d0d4dc);
  flex-shrink:0;
  display:inline-block;
}
.card-color-more{
  font-size:.72rem;
  font-weight:800;
  color:var(--ink-600,#5f6573);
  line-height:1;
  padding-inline:2px;
}

.product-body{padding:15px}.product-cat{display:block;color:var(--olive-500);font-size:.72rem;font-weight:700;margin-bottom:5px}.product-name{font-size:1rem;margin:0 0 7px;min-height:2.3em}.product-name a:hover{color:var(--olive-600)}.product-foot{display:flex;align-items:center;justify-content:space-between;gap:10px}.price,.detail-price{font-weight:800;color:var(--olive-800)}.price{font-size:1rem}.product-actions .btn{width:40px;height:40px;min-height:40px;padding:0;border-radius:50%}.product-desc{color:var(--ink-600);font-size:.82rem}.stock-line{display:flex;align-items:center;gap:7px;color:var(--ink-600);font-size:.8rem}.dot{width:8px;height:8px;border-radius:50%;background:#2ca66f;display:inline-block}.dot-out{background:var(--danger)}

/* Feature/contact */
.feature-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:15px}.feature-card{background:#fff;border:1px solid var(--line);border-radius:18px;padding:22px;box-shadow:var(--shadow-soft)}.feature-card .icon{width:48px;height:48px;border-radius:14px;background:var(--olive-100);display:grid;place-items:center;color:var(--olive-700);margin-bottom:14px}.feature-card .icon svg{width:23px;height:23px}.feature-card h3{font-size:1rem}.feature-card p{font-size:.83rem;margin:0}.contact-band{padding:30px;border-radius:26px;background:linear-gradient(135deg,var(--olive-900),var(--olive-700));color:#fff;display:flex;align-items:center;justify-content:space-between;gap:25px;box-shadow:var(--shadow-card)}.contact-band h2,.contact-band p{color:#fff}.contact-band p{opacity:.8}.social-row{display:flex;align-items:center;gap:8px}.social-row .btn{background:rgba(255,255,255,.1);border-color:rgba(255,255,255,.16);color:#fff}.social-row .btn:hover{background:rgba(255,255,255,.18)}

/* Footer */
.site-footer{margin-top:35px;background:var(--olive-900);color:#e1e5ee}.footer-grid{display:grid;grid-template-columns:1.5fr 1fr 1fr 1fr;gap:34px;padding:50px 0 35px}.footer-brand{display:flex;align-items:center;gap:10px;margin-bottom:13px}.footer-brand img{width:44px;height:44px;object-fit:contain;background:#fff;border-radius:12px}.footer-brand strong{font-size:1.15rem;color:#fff}.site-footer p{color:#a3abbd;font-size:.84rem}.site-footer h4{color:#fff;font-size:.95rem;margin-bottom:12px}.site-footer ul{list-style:none;padding:0;margin:0;display:grid;gap:7px}.site-footer li,.site-footer a{color:#a3abbd;font-size:.82rem}.site-footer a:hover{color:#fff}.footer-bottom{padding:17px 0;border-top:1px solid rgba(255,255,255,.09);font-size:.76rem;color:#8790a5;text-align:center}

/* Page headers */
.page-header{padding:38px 0 25px;background:linear-gradient(180deg,#eef1f7,#f5f6f7);border-bottom:1px solid var(--line)}.breadcrumb{font-size:.78rem;color:var(--ink-400);margin-bottom:10px}.breadcrumb a{color:var(--olive-600);font-weight:700}.page-header h1{font-size:clamp(1.8rem,3.5vw,2.6rem);margin-bottom:6px}.page-header p{margin:0;max-width:65ch}

/* Shop */
.shop-toolbar{display:grid;grid-template-columns:1fr 210px auto;gap:12px;align-items:center;margin-bottom:20px}.search-box{position:relative}.search-box input{width:100%;height:48px;border:1px solid var(--line-strong);border-radius:var(--radius-pill);background:#fff;padding:0 17px 0 46px;outline:none}.search-box input:focus{border-color:var(--olive-500);box-shadow:0 0 0 4px rgba(61,90,158,.08)}.search-box span{position:absolute;left:16px;top:50%;transform:translateY(-50%);color:var(--ink-400)}.search-box span svg{width:18px;height:18px}.sort-select{height:48px;border:1px solid var(--line-strong);border-radius:var(--radius-pill);background:#fff;padding:0 15px;color:var(--ink-700);outline:none}.shop-layout{display:grid;grid-template-columns:235px 1fr;gap:22px;align-items:start}.filter-panel{position:sticky;top:96px;background:#fff;border:1px solid var(--line);border-radius:20px;padding:18px;box-shadow:var(--shadow-soft)}.filter-panel h4{font-size:.95rem;margin:0 0 12px}.filter-panel>div+div{border-top:1px solid var(--line);margin-top:18px;padding-top:18px}.cat-list{display:flex;flex-direction:column;gap:5px}.cat-list button{border:0;background:transparent;color:var(--ink-600);padding:9px 10px;border-radius:10px;text-align:right;font-weight:600}.cat-list button:hover,.cat-list button.active{background:var(--olive-100);color:var(--olive-800)}.range-row{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:6px}.range-row input{width:100%;height:40px;border:1px solid var(--line);border-radius:10px;padding:0 9px}.empty-state{grid-column:1/-1;text-align:center;padding:55px 20px;background:#fff;border:1px dashed var(--line-strong);border-radius:18px;color:var(--ink-400)}.empty-state svg{width:45px;height:45px;margin:0 auto 10px}.empty-state p{margin-bottom:15px}.mobile-toggle-btn{display:none!important}

/* Product detail */
.detail-grid{display:grid;grid-template-columns:minmax(0,1.05fr) minmax(0,.95fr);gap:45px;align-items:start}.detail-media{position:sticky;top:102px;aspect-ratio:1/1;background:#eceff3;border-radius:26px;overflow:hidden;border:1px solid var(--line)}.detail-media>img{width:100%;height:100%;object-fit:cover}.detail-media .placeholder-icon{height:100%}.detail-info{padding:8px 0}.detail-info h1{font-size:clamp(2rem,4vw,3rem);margin:5px 0 10px}.detail-price{font-size:1.55rem;margin:13px 0}.detail-info>p{font-size:.95rem}.detail-actions{display:flex;gap:9px;flex-wrap:wrap;margin-top:20px}.detail-actions .btn{flex:1;min-width:170px}.detail-meta{display:flex;flex-wrap:wrap;gap:8px;margin-top:18px;padding-top:17px;border-top:1px solid var(--line);color:var(--ink-400);font-size:.78rem}.qty-stepper{display:inline-flex;align-items:center;border:1px solid var(--line-strong);border-radius:var(--radius-pill);overflow:hidden;background:#fff;margin-top:10px}.qty-stepper button{width:40px;height:40px;border:0;background:#fff;color:var(--olive-800);font-size:1.2rem}.qty-stepper input{width:48px;height:40px;border:0;border-inline:1px solid var(--line);text-align:center;outline:none}.color-swatch{box-shadow:0 0 0 3px #fff}.size-btn{min-width:46px!important;min-height:42px}.variant-chip{display:inline-flex;padding:8px 12px;border:1px solid var(--line);border-radius:var(--radius-pill)}

/* Cart */
.cart-layout{display:grid;grid-template-columns:1fr 340px;gap:22px;align-items:start}.cart-item{display:grid;grid-template-columns:82px 1fr auto auto;gap:15px;align-items:center;background:#fff;border:1px solid var(--line);border-radius:18px;padding:12px;margin-bottom:10px;box-shadow:var(--shadow-soft)}.cart-item>img,.cart-item>.placeholder-icon-wrap{width:82px;height:82px;border-radius:13px;overflow:hidden;background:#eceff3;display:grid;place-items:center}.cart-item>img{object-fit:cover}.cart-item h4{font-size:.95rem;margin:0 0 4px}.unit-price{font-size:.76rem;color:var(--ink-400)}.remove-btn{border:0;background:transparent;color:var(--danger);font-size:.75rem;padding:3px 0}.summary-card{position:sticky;top:100px;background:#fff;border:1px solid var(--line);border-radius:20px;padding:22px;box-shadow:var(--shadow-card)}.summary-card h3{margin-bottom:18px}.summary-row{display:flex;justify-content:space-between;gap:10px;padding:10px 0;border-bottom:1px solid var(--line);font-size:.88rem}.summary-row.total{font-size:1.1rem;font-weight:800;border:0;padding-top:17px}.setup-note{padding:13px 15px;background:var(--danger-bg);border:1px solid #f1cccc;color:#9f3838;border-radius:13px;margin-bottom:12px;font-size:.83rem}

/* Forms */
.form-card{width:min(100%,520px);margin-inline:auto;background:#fff;border:1px solid var(--line);border-radius:24px;padding:28px;box-shadow:var(--shadow-card)}.field{margin-bottom:15px}.field label{display:block;margin-bottom:7px;font-size:.82rem;font-weight:700;color:var(--ink-700)}.field input,.field select,.field textarea{width:100%;border:1px solid var(--line-strong);background:#fff;border-radius:12px;padding:11px 13px;color:var(--ink-900);outline:none}.field input:focus,.field select:focus,.field textarea:focus{border-color:var(--olive-500);box-shadow:0 0 0 4px rgba(61,90,158,.07)}.field textarea{min-height:110px;resize:vertical}.form-error{display:none;padding:10px 12px;border-radius:10px;background:var(--danger-bg);color:#9f3838;margin-bottom:13px;font-size:.82rem}.checkbox-row{display:flex;align-items:center;gap:8px}.checkbox-row input{width:auto}.checkbox-row label{margin:0}.field-hint{font-size:.72rem;color:var(--ink-400)}

/* About/contact */
.about-hero{display:grid;grid-template-columns:1fr 1fr;gap:28px;align-items:center}.about-hero .hero-art{min-height:330px}.value-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:15px}.detail-meta span{padding:7px 10px;border-radius:var(--radius-pill);background:var(--olive-50)}.contact-band .social-row{flex-wrap:wrap}.contact-band .social-row .btn{min-height:40px}

/* Admin */
.admin-shell{min-height:100vh;background:#f3f5f8;display:grid;grid-template-columns:250px 1fr}.admin-sidebar{background:var(--olive-900);color:#e1e5ee;padding:20px 15px;position:sticky;top:0;height:100vh;display:flex;flex-direction:column}.admin-sidebar .brand{padding:4px 8px 22px;border-bottom:1px solid rgba(255,255,255,.1);margin-bottom:17px}.admin-sidebar .brand-name,.admin-sidebar .brand-name span{color:#fff}.admin-nav{display:grid;gap:5px}.admin-nav button,.admin-logout button,.admin-logout a{width:100%;border:0;background:transparent;color:#aab3c7;padding:11px 12px;border-radius:11px;text-align:right;font-weight:600;display:flex;align-items:center;gap:9px}.admin-nav button:hover,.admin-nav button.active,.admin-logout button:hover,.admin-logout a:hover{background:rgba(255,255,255,.09);color:#fff}.admin-nav svg,.admin-logout svg{width:18px;height:18px}.admin-logout{margin-top:auto;padding-top:15px;border-top:1px solid rgba(255,255,255,.1)}.admin-main{min-width:0;padding:25px}.admin-topbar{min-height:58px;display:flex;align-items:center;margin-bottom:18px}.admin-topbar h2{font-size:1.5rem}.admin-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-bottom:18px}.stat-card{background:#fff;border:1px solid var(--line);border-radius:17px;padding:18px;box-shadow:var(--shadow-soft)}.stat-card .num{font-size:1.55rem;font-weight:800;color:var(--olive-800)}.stat-card .label{font-size:.78rem;color:var(--ink-400)}.admin-panel{background:#fff;border:1px solid var(--line);border-radius:18px;padding:18px;box-shadow:var(--shadow-soft);margin-bottom:16px}.panel-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:15px}.admin-table{width:100%;border-collapse:separate;border-spacing:0;font-size:.82rem}.admin-table th{background:var(--olive-50);color:var(--olive-800);font-weight:800}.admin-table th,.admin-table td{padding:12px;border-bottom:1px solid var(--line);text-align:right;vertical-align:middle}.admin-table tr:last-child td{border-bottom:0}.admin-table img{width:48px;height:48px;object-fit:cover;border-radius:9px}.row-actions{display:flex;gap:5px;flex-wrap:wrap}.row-actions .btn{min-height:34px;padding:6px 10px}.modal-overlay{position:fixed;inset:0;background:rgba(8,12,24,.62);backdrop-filter:blur(8px);z-index:10005;display:none;align-items:center;justify-content:center;padding:16px}.modal-overlay.open{display:flex}.modal-card{background:#fff;border-radius:22px;border:1px solid var(--line);box-shadow:var(--shadow-lift);padding:20px}.modal-head{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:17px}.close-modal{width:38px;height:38px;border:0;border-radius:50%;background:var(--olive-50);color:var(--olive-800)}.image-upload{border:1px dashed var(--line-strong);border-radius:15px;padding:12px;background:var(--cream)}.icon-picker{display:flex;flex-wrap:wrap;gap:7px}.icon-choice{width:42px;height:42px;border:1px solid var(--line);border-radius:10px;background:#fff;display:grid;place-items:center}.icon-choice.active{background:var(--olive-100);border-color:var(--olive-500)}

/* Toast */
.toast{position:fixed;bottom:22px;right:22px;z-index:20000;background:var(--olive-900);color:#fff;padding:11px 17px;border-radius:var(--radius-pill);box-shadow:var(--shadow-lift);font-size:.82rem;opacity:0;transform:translateY(12px);pointer-events:none;transition:.22s}.toast.show{opacity:1;transform:translateY(0)}

/* Homepage promotion slider */
.promo-slider-container{position:relative;width:100%;aspect-ratio:16/10;border-radius:28px;overflow:hidden;background:#eceff3;box-shadow:var(--shadow-lift)}
.promo-slider-track{display:flex;width:100%;height:100%;transition:transform .45s ease}
.promo-slide{flex:0 0 100%;height:100%;position:relative}
.promo-slide img{width:100%;height:100%;object-fit:cover}
.promo-dots{position:absolute;bottom:13px;left:50%;transform:translateX(-50%);display:flex;gap:6px;z-index:5}
.promo-dot{width:8px;height:8px;border-radius:50%;background:rgba(255,255,255,.55);cursor:pointer;transition:.2s}
.promo-dot.active{background:#fff;transform:scale(1.3)}
.hero-art-default{width:100%;height:100%;background:linear-gradient(135deg,var(--olive-900),var(--olive-700));display:grid;place-items:center}
.hero-art-default img{width:42%;height:auto;object-fit:contain;filter:drop-shadow(0 18px 25px rgba(0,0,0,.22))}

/* Existing inline slider/media helpers */
.ads-slider{border-radius:28px;overflow:hidden;box-shadow:var(--shadow-card)}.swiper-slide{border-radius:28px;overflow:hidden}.hero-image{width:100%;height:100%;object-fit:cover}.category-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:15px}.filter-chip{padding:7px 11px;border-radius:var(--radius-pill);background:var(--olive-50);color:var(--olive-800)}

/* --- NEW ADDITIONS FOR SIDEBAR, SCROLLING, AND MODAL --- */

.header-actions {
  margin-right: auto;
}

/* القائمة الجانبية (Sidebar) للمتجر العام تفتح من اليسار */
.sidebar-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: auto;
  width: 280px;
  max-width: 85vw;
  height: 100vh;
  background-color: #fff;
  box-shadow: 2px 0 15px rgba(0,0,0,0.15);
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 9999;
  overflow-y: auto;
  padding: 20px;
  text-align: right;
}

.sidebar-nav.active {
  transform: translateX(0);
}

.sidebar-nav svg {
  width: 24px !important;
  height: 24px !important;
  flex-shrink: 0;
  color: var(--olive-700);
}

/* الخلفية الشفافة المظلمة */
.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  display: none;
  z-index: 9998;
}
.sidebar-overlay.active {
  display: block;
}

@media (min-width: 901px) {
  .sidebar-overlay { display: none !important; }
}

.sidebar-submenu {
  display: none;
  padding-right: 15px;
}
.sidebar-submenu.active {
  display: block;
}

/* التمرير الأفقي للأقسام */
.cat-scroller, .category-grid {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  gap: 15px;
  padding: 10px 5px;
  scroll-snap-type: x mandatory;
}
.cat-scroller::-webkit-scrollbar, .category-grid::-webkit-scrollbar {
  display: none;
}
.cat-chip, .category-card {
  flex: 0 0 auto;
  width: 130px;
  scroll-snap-align: start;
}

/* إصلاح حجم الصور داخل نوافذ إضافة المنتجات */
.modal-card .preview img {
  max-width: 200px !important;
  max-height: 200px !important;
  object-fit: contain !important;
  margin: 0 auto !important;
  border-radius: 12px;
}
.modal-card .preview svg {
  width: 38px !important;
  height: 38px !important;
  color: var(--ink-300);
}

/* --- شريط تبويبات الأقسام والتفرعات في صفحة المنتجات --- */
.shop-cat-tabs-wrap {
  overflow-x: auto;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 4px 0 10px;
  margin-bottom: 6px;
  display: flex;
  gap: 8px;
}
.shop-cat-tabs-wrap::-webkit-scrollbar {
  display: none;
}

.shop-tab-btn {
  flex: 0 0 auto;
  padding: 8px 18px;
  border-radius: var(--radius-pill, 999px);
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-700);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.22s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.shop-tab-btn:hover {
  border-color: var(--olive-500);
  background: var(--olive-50);
}
.shop-tab-btn.active {
  background: var(--olive-700);
  color: #fff;
  border-color: var(--olive-700);
  box-shadow: 0 4px 12px rgba(13, 81, 68, 0.2);
}

/* تنسيق أزرار التفرعات الفرعية */
#subCategoryScroller {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 2px 14px;
  margin-bottom: 10px;
  scrollbar-width: none;
}
#subCategoryScroller::-webkit-scrollbar {
  display: none;
}

.cat-sub-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 15px;
  border-radius: var(--radius-pill, 999px);
  background: var(--olive-50, #f2f4f9);
  border: 1px solid var(--line-strong, #d0d4dc);
  color: var(--ink-700, #363a45);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  outline: none;
}
.cat-sub-chip:hover {
  background: var(--olive-100, #e6eaf3);
  border-color: var(--olive-500, #3d5a9e);
  color: var(--olive-900, #0e1730);
  transform: translateY(-1px);
}
.cat-sub-chip.active {
  background: var(--olive-700, #1d2f57) !important;
  color: #fff !important;
  border-color: var(--olive-700, #1d2f57) !important;
  box-shadow: 0 3px 10px rgba(13, 81, 68, 0.25);
}

/* تأثير انتقال وتحديث شبكة المنتجات */
#shopGrid {
  transition: opacity 0.2s ease, transform 0.2s ease;
}
#shopGrid.is-updating {
  opacity: 0.4;
  transform: translateY(4px);
}

/* --- إصلاح حجم أيقونات المكعب والصور الافتراضية في الجداول والبطاقات --- */
.admin-table-icon {
  width: 48px !important;
  height: 48px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: var(--olive-50) !important;
  border-radius: 9px !important;
  color: var(--olive-700) !important;
  flex-shrink: 0 !important;
}

.admin-table-icon svg {
  width: 24px !important;
  height: 24px !important;
  max-width: 24px !important;
  max-height: 24px !important;
}

.admin-table td:first-child {
  width: 60px !important;
  min-width: 60px !important;
}

.cat-card-img svg,
.placeholder-icon svg,
.placeholder-icon-wrap svg {
  width: 32px !important;
  height: 32px !important;
  max-width: 32px !important;
  max-height: 32px !important;
}

/* -------------------------------------------------------- */

@media(max-width:1050px){.main-nav{gap:0}.main-nav a{padding-inline:9px}.product-grid{grid-template-columns:repeat(3,1fr)}.feature-grid{grid-template-columns:repeat(2,1fr)}.admin-stats{grid-template-columns:repeat(2,1fr)}}

@media(max-width:900px){
  .header-inner{min-height:68px}
  .nav-toggle{display:inline-flex}
  .main-nav{position:absolute;top:calc(100% + 1px);right:0;left:0;display:none;background:#fff;border-bottom:1px solid var(--line);padding:10px 20px;box-shadow:var(--shadow-card);flex-direction:column;align-items:stretch}
  .main-nav.open{display:flex}
  .main-nav a{text-align:right}
  .hero-inner,.about-hero,.detail-grid{grid-template-columns:1fr}
  .hero-art{min-height:330px}
  .detail-media{position:relative;top:auto}
  .shop-layout{grid-template-columns:1fr}
  .filter-panel{position:relative;top:auto}
  .mobile-toggle-btn{display:flex!important}
  .filter-list-container{display:none!important}
  .filter-list-container.open{display:flex!important}
  .cart-layout{grid-template-columns:1fr}
  .summary-card{position:relative;top:auto}
  .footer-grid{grid-template-columns:repeat(2,1fr)}
  .admin-shell{grid-template-columns:1fr}
  .admin-sidebar{position:fixed;z-index:10000;top:0;bottom:0;right:-300px;width:280px;transition:right .25s ease}
  .admin-sidebar.open{right:0}
  .admin-main{padding:18px}
  #adminSidebarToggle{display:inline-flex!important}
  .admin-topbar .btn-icon{display:inline-flex!important}
  .detail-actions .btn{min-width:0}
  .shop-toolbar{grid-template-columns:1fr 180px}
  .shop-toolbar>#resultCount{grid-column:1/-1}
}

/* منع انكماش أزرار رأس الأقسام وضمان بقاء النص على سطر واحد */
.section-head .btn {
  white-space: nowrap !important;
  flex-shrink: 0 !important;
}

@media (max-width: 768px) {
  .section-head {
    align-items: center !important;
    gap: 12px !important;
  }
  .section-head .btn {
    min-height: 34px !important;
    padding: 6px 14px !important;
    font-size: 0.8rem !important;
  }
}

@media(min-width:901px){
  #adminSidebarToggle{display:none!important}
}

@media(max-width:650px){.container{padding-inline:15px}.section{padding:42px 0}.hero{padding-top:25px}.hero-art{min-height:270px;border-radius:24px}.hero-copy h1{font-size:2rem}.hero-trust{gap:7px}.hero-trust div{flex:1;min-width:130px}.cat-chip{min-height:125px}.product-grid{grid-template-columns:repeat(2,1fr);gap:10px}.product-body{padding:11px}.product-name{font-size:.88rem;min-height:2.3em;margin-bottom:5px;}.price{font-size:.9rem}.product-actions .btn{width:36px;height:36px;min-height:36px}.feature-grid{grid-template-columns:repeat(2,1fr);gap:10px}.feature-card{padding:15px}.contact-band{padding:22px;flex-direction:column;align-items:flex-start}.footer-grid{grid-template-columns:1fr 1fr;gap:22px}.shop-toolbar{grid-template-columns:1fr}.shop-toolbar>#resultCount{grid-column:auto}.cart-item{grid-template-columns:65px 1fr;gap:10px}.cart-item>img,.cart-item>.placeholder-icon-wrap{width:65px;height:65px}.cart-item .qty-stepper{grid-column:2}.cart-item>.price{grid-column:2}.form-card{padding:20px}.admin-stats{grid-template-columns:1fr 1fr}.admin-table{min-width:700px}.global-search-container{margin-top:20px}.page-header{padding:28px 0 20px}.detail-info h1{font-size:2rem}}
@media(max-width:420px){.header-actions{gap:4px}.brand img{width:42px;height:42px}.brand-name{font-size:1rem}.brand-name span{display:none}.header-inner{gap:8px}.product-grid{gap:8px}.product-body{padding:9px}.product-name{font-size:.82rem}.feature-card h3{font-size:.9rem}.feature-card p{font-size:.72rem}.footer-grid{grid-template-columns:1fr}.admin-stats{gap:8px}.stat-card{padding:13px}}

/* منتقي أيقونة القسم في لوحة التحكم */
.icon-picker{display:flex;flex-wrap:wrap;gap:8px}
.icon-choice{position:relative;cursor:pointer;color:var(--olive-700)}
.icon-choice input{position:absolute;opacity:0;pointer-events:none}
.icon-choice svg{width:20px;height:20px}
.icon-choice:hover{border-color:var(--olive-400)}
