:root{
  /* الهوية الأساسية — نفس لون العلامة المستخدم بباقي المشروع (تباين جيد للنصوص/الأزرار) */
  --pink:#c63c78;
  --pink-dark:#8b1a4a;
  --pink-light:#fce4ec;
  --bg:#f9f4f6;

  /* ألوان الشعار — للزخرفة والخلفيات فقط، وليست للنصوص (تباين ضعيف) */
  --brand-pink:#EF78AE;
  --brand-teal:#88CFD3;

  --text:#2b2029;
  --text-muted:#7a6b74;
  --border:#eddce3;
  --radius:14px;
  --shadow:0 4px 18px rgba(198,60,120,0.10);
}

*{box-sizing:border-box;}
body{
  margin:0;
  font-family:'IBM Plex Sans Arabic','Tahoma',sans-serif;
  background:var(--bg);
  color:var(--text);
  direction:rtl;
}
a{color:inherit;text-decoration:none;}
img{max-width:100%;display:block;}

.store-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:14px 20px;
  background:#fff;
  border-bottom:1px solid var(--border);
  position:sticky;
  top:0;
  z-index:10;
}
.header-start{display:flex;align-items:center;gap:14px;}
.menu-toggle{
  display:flex;align-items:center;justify-content:center;
  width:36px;height:36px;border:none;background:none;cursor:pointer;color:var(--text);padding:0;
}
.store-logo img{height:44px;width:auto;}
.cart-link{
  position:relative;
  display:flex;
  align-items:center;
  gap:6px;
  font-weight:bold;
  color:var(--pink);
  background:var(--pink-light);
  padding:8px 16px;
  border-radius:999px;
  transition:background .2s;
}
.cart-link:hover{background:var(--brand-teal);color:#fff;}
.cart-badge{
  position:absolute;
  top:-6px;
  left:-6px;
  min-width:18px;
  height:18px;
  padding:0 4px;
  border-radius:999px;
  background:var(--pink-dark);
  color:#fff;
  font-size:11px;
  font-weight:bold;
  display:flex;
  align-items:center;
  justify-content:center;
  line-height:1;
}

/* قائمة جانبية (البرقر) */
.side-menu-overlay{
  position:fixed;inset:0;background:rgba(0,0,0,.4);z-index:20;
  opacity:0;pointer-events:none;transition:opacity .2s;
}
.side-menu-overlay.open{opacity:1;pointer-events:auto;}
.side-menu{
  position:fixed;top:0;right:-280px;bottom:0;width:280px;
  background:#fff;z-index:21;box-shadow:-4px 0 20px rgba(0,0,0,.15);
  transition:right .25s;display:flex;flex-direction:column;padding:20px;
}
.side-menu.open{right:0;}
.side-menu .close-menu{align-self:flex-start;background:none;border:none;font-size:22px;cursor:pointer;color:var(--text-muted);padding:4px;}
.side-menu nav{display:flex;flex-direction:column;gap:4px;margin-top:16px;}
.side-menu nav a{padding:12px 10px;border-radius:10px;color:var(--text);font-weight:600;font-size:15px;}
.side-menu nav a:hover{background:var(--pink-light);color:var(--pink-dark);}

/* شريط تصنيفات */
.category-bar{
  display:flex;
  gap:10px;
  padding:14px 20px;
  overflow-x:auto;
  background:#fff;
  border-bottom:1px solid var(--border);
}
.category-chip{
  white-space:nowrap;
  padding:8px 16px;
  border-radius:999px;
  background:var(--brand-teal);
  color:#fff;
  font-size:14px;
  border:none;
  cursor:pointer;
  opacity:.85;
}
.category-chip.active,.category-chip:hover{opacity:1;background:var(--pink);}

/* شبكة المنتجات */
.product-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(180px,1fr));
  gap:18px;
  padding:20px;
  max-width:1200px;
  margin:0 auto;
}

/* بانر صور متحركة */
.banner-slider{
  position:relative;
  width:100%;
  max-width:1200px;
  margin:16px auto 0;
  aspect-ratio:16/6;
  border-radius:var(--radius);
  overflow:hidden;
  box-shadow:var(--shadow);
}
.banner-slider .slide{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
  opacity:0;
  transition:opacity .8s ease;
}
.banner-slider .slide.active{opacity:1;}

/* مسار التنقل (breadcrumb) */
.breadcrumb{
  display:flex;
  align-items:center;
  gap:6px;
  padding:14px 20px 0;
  max-width:1200px;
  margin:0 auto;
  font-size:13px;
  color:var(--text-muted);
}
.breadcrumb a{color:var(--pink);font-weight:bold;text-decoration:none;}
.breadcrumb a:hover{text-decoration:underline;}
.breadcrumb .sep{color:var(--text-muted);}
.breadcrumb .current{font-weight:bold;color:var(--text);}

/* شبكة التصنيفات */
.category-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(180px,1fr));
  gap:18px;
  padding:20px;
  max-width:1200px;
  margin:0 auto;
}
.category-card{
  display:block;
  background:#fff;
  border-radius:var(--radius);
  overflow:hidden;
  box-shadow:var(--shadow);
  border:1px solid var(--border);
  transition:transform .15s;
  text-decoration:none;
}
.category-card:hover{transform:translateY(-3px);}
.category-card .thumb{
  width:100%;
  aspect-ratio:1/1;
  object-fit:cover;
  background:var(--pink-light);
}
.category-card .name{
  padding:14px;
  text-align:center;
  font-weight:bold;
  font-size:16px;
  color:var(--text);
  background:var(--pink-light);
}
.category-back{
  display:inline-flex;
  align-items:center;
  gap:6px;
  margin:16px 20px 0;
  color:var(--pink);
  font-weight:bold;
  font-size:14px;
  text-decoration:none;
}
.product-card{
  background:#fff;
  border-radius:var(--radius);
  overflow:hidden;
  box-shadow:var(--shadow);
  border:1px solid var(--border);
  transition:transform .15s;
}
.product-card:hover{transform:translateY(-3px);}
.product-card .thumb-wrap{
  position:relative;
  background:var(--pink-light);
}
.product-card .thumb{
  width:100%;
  aspect-ratio:1/1;
  object-fit:cover;
  background:var(--pink-light);
}
.product-card .discount-badge{
  position:absolute;
  top:10px;
  right:10px;
  background:#e64a19;
  color:#fff;
  font-size:12px;
  font-weight:bold;
  padding:3px 9px;
  border-radius:8px;
}
.product-card .out-of-stock-badge{
  position:absolute;
  top:10px;
  right:10px;
  background:#b71c1c;
  color:#fff;
  font-size:12px;
  font-weight:bold;
  padding:3px 9px;
  border-radius:8px;
}
.product-card.out-of-stock .thumb{opacity:.5;}
.product-card .btn-add-fab:disabled{background:var(--text-muted);cursor:not-allowed;box-shadow:none;}
.product-card .btn-add-fab:disabled:hover{background:var(--text-muted);transform:none;}
.product-card .btn-add-fab{
  position:absolute;
  bottom:10px;
  left:10px;
  width:38px;
  height:38px;
  aspect-ratio:1/1;
  flex-shrink:0;
  padding:0;
  margin:0;
  border-radius:50%;
  background:var(--pink-dark);
  color:#fff;
  border:none;
  font-size:22px;
  line-height:1;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  box-shadow:0 2px 8px rgba(0,0,0,.2);
  transition:background .15s, transform .15s;
}
.product-card .btn-add-fab:hover{background:var(--pink);transform:scale(1.06);}
.product-card .qty-stepper{
  position:absolute;
  bottom:10px;
  left:10px;
  display:flex;
  align-items:center;
  gap:0;
  background:var(--pink-dark);
  color:#fff;
  border-radius:999px;
  box-shadow:0 2px 8px rgba(0,0,0,.2);
  overflow:hidden;
}
.product-card .qty-stepper button{
  width:30px;height:38px;border:none;background:transparent;color:#fff;
  font-size:18px;font-weight:bold;cursor:pointer;display:flex;align-items:center;justify-content:center;
}
.product-card .qty-stepper button:hover{background:rgba(255,255,255,.15);}
.product-card .qty-stepper .qty-value{min-width:20px;text-align:center;font-size:14px;font-weight:bold;}
.product-card .body{padding:12px;}
.product-card .name{font-size:13px;font-weight:bold;margin:0 0 6px;color:var(--text);min-height:34px;background:var(--pink-light);padding:6px 8px;border-radius:8px;}
.product-card .price-row{display:flex;align-items:baseline;gap:8px;margin:0 0 8px;}
.product-card .price{color:var(--pink);font-weight:bold;font-size:16px;}
.product-card .price.on-sale{color:#e64a19;}
.product-card .price-compare{color:var(--text-muted);font-size:13px;text-decoration:line-through;}
.product-card .stock-note{
  display:inline-block;
  font-size:11px;
  font-weight:bold;
  padding:2px 9px;
  border-radius:999px;
  background:var(--pink-light);
  color:var(--pink-dark);
}

.empty-state{
  text-align:center;
  color:var(--text-muted);
  padding:60px 20px;
}

/* هياكل تحميل (skeleton) */
@keyframes skeleton-pulse{
  0%{opacity:1;}
  50%{opacity:.55;}
  100%{opacity:1;}
}
.skeleton-card{
  background:#fff;
  border-radius:var(--radius);
  overflow:hidden;
  box-shadow:var(--shadow);
  border:1px solid var(--border);
}
.skeleton-thumb{
  width:100%;
  aspect-ratio:1/1;
  background:var(--pink-light);
  animation:skeleton-pulse 1.4s ease-in-out infinite;
}
.skeleton-line{
  height:16px;
  margin:12px;
  border-radius:6px;
  background:var(--pink-light);
  animation:skeleton-pulse 1.4s ease-in-out infinite;
}
.skeleton-line.short{width:50%;}
.skeleton-banner{
  width:100%;
  max-width:1200px;
  margin:16px auto 0;
  aspect-ratio:16/6;
  border-radius:var(--radius);
  background:var(--pink-light);
  animation:skeleton-pulse 1.4s ease-in-out infinite;
}
@media (max-width:640px){
  .skeleton-banner{aspect-ratio:16/9;margin-top:0;border-radius:0;}
}

/* صفحة تفاصيل المنتج */
.product-detail{
  display:grid;
  grid-template-columns:1.1fr 1fr;
  gap:30px;
  max-width:1000px;
  margin:24px auto;
  padding:0 20px;
}
@media (max-width:720px){
  .product-detail{grid-template-columns:1fr;}
}
.gallery{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.gallery-main{
  width:100%;
  aspect-ratio:1/1;
  border-radius:var(--radius);
  border:1px solid var(--border);
  overflow:hidden;
  background:var(--pink-light);
}
.gallery-main img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}
.gallery-thumbs{
  display:flex;
  gap:8px;
  overflow-x:auto;
  padding-bottom:2px;
}
.gallery-thumbs img{
  width:64px;
  height:64px;
  object-fit:cover;
  border-radius:10px;
  border:2px solid transparent;
  cursor:pointer;
  flex-shrink:0;
}
.gallery-thumbs img.active{border-color:var(--pink);}
.no-image{
  aspect-ratio:1/1;
  background:var(--pink-light);
  border-radius:var(--radius);
  display:flex;
  align-items:center;
  justify-content:center;
  color:var(--text-muted);
}
.info h1{font-size:22px;margin:0 0 10px;}
.info .price-row{display:flex;align-items:baseline;gap:10px;margin:0 0 10px;}
.info .price{font-size:22px;color:var(--pink);font-weight:bold;}
.info .price.on-sale{color:#e64a19;}
.info .price-compare{font-size:16px;color:var(--text-muted);text-decoration:line-through;}
.info .stock-note{margin-bottom:14px;}
.info .description{color:var(--text-muted);line-height:1.8;margin:14px 0 20px;}
.btn-add-cart{
  background:var(--pink);
  color:#fff;
  border:none;
  padding:14px 28px;
  border-radius:999px;
  font-size:16px;
  font-weight:bold;
  cursor:pointer;
}
.btn-add-cart:hover{background:var(--pink-dark);}
.btn-add-cart:disabled{opacity:.6;cursor:default;}

/* السلة */
.cart-page{max-width:700px;margin:24px auto;padding:0 20px;}
.cart-item{
  display:flex;
  align-items:center;
  gap:14px;
  background:#fff;
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:12px;
  margin-bottom:12px;
}
.cart-item img{width:70px;height:70px;object-fit:cover;border-radius:10px;}
.cart-item .name{font-weight:bold;flex:1;}
.qty-controls{display:flex;align-items:center;gap:8px;}
.qty-controls button{
  width:28px;height:28px;border-radius:50%;border:1px solid var(--border);
  background:#fff;cursor:pointer;font-weight:bold;
}
.cart-total{
  display:flex;
  justify-content:space-between;
  font-size:18px;
  font-weight:bold;
  padding:16px 0;
  border-top:2px solid var(--border);
  margin-top:10px;
}

/* الفوتر */
.store-footer{
  margin-top:48px;
  background:#fff;
  border-top:1px solid var(--border);
  padding:40px 20px 24px;
}
.footer-inner{
  max-width:1200px;
  margin:0 auto;
  display:grid;
  grid-template-columns:1.3fr 1fr 1fr;
  gap:32px;
}
.footer-brand .footer-logo{height:40px;width:auto;margin-bottom:12px;}
.footer-brand .footer-tagline{color:var(--text-muted);font-size:13px;line-height:1.8;max-width:280px;}
.footer-col h4{font-size:14px;font-weight:bold;margin:0 0 14px;color:var(--text);}
.footer-col ul{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:10px;}
.footer-col a{color:var(--text-muted);font-size:13px;text-decoration:none;}
.footer-col a:hover{color:var(--pink);}
.footer-social{display:flex;gap:10px;margin-top:4px;}
.footer-social a{
  width:34px;height:34px;border-radius:50%;
  background:var(--pink-light);color:var(--pink);
  display:flex;align-items:center;justify-content:center;
}
.footer-social a:hover{background:var(--pink);color:#fff;}
.footer-bottom{
  max-width:1200px;
  margin:32px auto 0;
  padding:20px 20px 0;
  border-top:1px solid var(--border);
  text-align:center;
  color:var(--text-muted);
  font-size:12px;
}
.footer-credit{
  display:inline-block;
  margin-top:6px;
  color:var(--text-muted);
  text-decoration:none;
}
.footer-credit:hover{color:var(--pink);}

/* ── الجوال — يجب أن يبقى هذا آخر شي بالملف (يفوز بالتسلسل على كل القواعد أعلاه) ── */
@media (max-width:640px){
  .product-grid{grid-template-columns:1fr 1fr !important;gap:12px;padding:14px;}
  .category-grid{grid-template-columns:1fr 1fr 1fr !important;gap:10px;padding:14px;}
  .category-card .name{padding:8px 4px;font-size:12px;}
  .banner-slider{aspect-ratio:16/9;margin-top:0;border-radius:0;}
  .store-footer{padding:32px 16px 20px;}
  .footer-inner{grid-template-columns:1fr;gap:24px;text-align:center;}
  .footer-brand .footer-tagline{max-width:none;margin:0 auto;}
  .footer-social{justify-content:center;}
  .product-card .btn-add-fab{width:34px;height:34px;aspect-ratio:1/1;font-size:20px;}
  .product-card .qty-stepper button{width:26px;height:34px;}
}
