/* ===== متجر الطباعة الرقمية ===== */
/* الهيدر: قائمة سطح المكتب */
.main-nav{ display:none; gap:6px; }
.main-nav a{ padding:9px 14px; border-radius:10px; font-size:14px; font-weight:700; color:var(--ink); }
.main-nav a:hover, .main-nav a.active{ background:var(--bg); color:var(--primary); }
@media (min-width:900px){ .main-nav{ display:flex; } .site-header .header-inner > .icon-btn:first-child{ display:none; } }

.site-header .badge{ top:-1px; left:-1px; }

/* إشعار */
.toast{
  position:fixed; top:76px; left:50%; transform:translateX(-50%);
  z-index:80; padding:12px 22px; border-radius:12px; font-size:14px; font-weight:700;
  box-shadow:0 10px 30px rgba(0,0,0,.18); max-width:90vw; text-align:center;
  animation:toast-in .3s ease, toast-out .4s ease 3.6s forwards;
}
.toast-ok{ background:#1e8e5a; color:#fff; }
.toast-err{ background:#d9534f; color:#fff; }
@keyframes toast-in{ from{ opacity:0; transform:translate(-50%,-10px); } to{ opacity:1; transform:translate(-50%,0); } }
@keyframes toast-out{ to{ opacity:0; visibility:hidden; } }

/* الهيرو */
.store-hero{ background:var(--ink); color:#fff; padding:46px 18px 42px; text-align:center; }
.store-hero h1{ font-size:30px; font-weight:800; line-height:1.5; margin:0 auto 10px; max-width:760px; }
.store-hero p{ font-size:15px; color:#c6cbe0; line-height:1.9; max-width:640px; margin:0 auto; }
.hero-search{ display:flex; gap:8px; max-width:520px; margin:22px auto 0; }
.hero-search input{ flex:1; min-width:0; padding:14px 16px; border-radius:12px; border:none; font-size:15px; font-family:inherit; }
.hero-search button{ padding:0 24px; border-radius:12px; border:none; background:var(--primary); color:#fff; font-weight:800; font-size:15px; }

.store-wrap{ max-width:1100px; width:100%; margin:0 auto; padding:24px 18px 48px; }
.store-title{ font-size:22px; font-weight:800; margin-bottom:14px; }
.section-head{ display:flex; align-items:baseline; justify-content:space-between; gap:10px; margin:34px 0 14px; }
.more-link{ color:var(--primary); font-weight:800; font-size:14px; }

.trust-row{ display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin-bottom:26px; }
.trust-row div{ background:#fff; border:1px solid var(--line); border-radius:14px; padding:14px 16px; }
.trust-row strong{ display:block; font-size:14px; margin-bottom:3px; }
.trust-row span{ font-size:12.5px; color:var(--muted); }

/* العرض الخاص */
.offer{
  display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:18px;
  background:linear-gradient(135deg,#2d6cdf,#1f56b8); color:#fff;
  border-radius:18px; padding:24px 26px; margin-bottom:30px;
  box-shadow:0 12px 30px rgba(45,108,223,.28);
}
.offer .tag{ display:inline-block; background:#fff; color:var(--primary-dark); font-size:12px; font-weight:800; padding:4px 12px; border-radius:999px; margin-bottom:10px; }
.offer h2{ font-size:22px; font-weight:800; margin-bottom:6px; }
.offer p{ font-size:14px; color:#dbe6fb; line-height:1.8; }
.offer .offer-price{ display:flex; align-items:baseline; gap:10px; margin-top:8px; }
.offer .offer-price b{ font-size:34px; font-weight:800; }
.offer .offer-price s{ font-size:16px; color:#b9cdf5; }
.btn-offer{ background:#fff; color:var(--primary-dark); border:none; border-radius:12px; padding:14px 30px; font-size:15px; font-weight:800; min-height:48px; }

/* التصنيفات */
.cat-grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); gap:12px; }
.cat-card{ background:#fff; border:1px solid var(--line); border-radius:16px; padding:18px 12px; text-align:center; display:flex; flex-direction:column; align-items:center; gap:6px; transition:transform .15s, box-shadow .15s; }
.cat-card:hover{ transform:translateY(-2px); box-shadow:0 10px 24px rgba(20,30,60,.08); }
.cat-card .ico{ width:52px; height:52px; border-radius:14px; background:#eaf0fc; color:var(--primary); display:flex; align-items:center; justify-content:center; }
.cat-card .ico svg{ width:26px; height:26px; }
.cat-card strong{ font-size:14px; }
.cat-card small{ font-size:12px; color:var(--muted); }

/* الفلاتر */
.filter-bar{ display:flex; gap:8px; flex-wrap:wrap; margin-bottom:14px; }
.filter-bar input[type=search]{ flex:1 1 220px; min-width:0; padding:12px 14px; border:1.5px solid var(--line); border-radius:10px; font-size:15px; font-family:inherit; background:#fff; }
.filter-bar select{ padding:12px 10px; border:1.5px solid var(--line); border-radius:10px; font-family:inherit; font-size:14px; background:#fff; }
.filter-bar button{ padding:0 22px; min-height:44px; border:none; border-radius:10px; background:var(--primary); color:#fff; font-weight:800; }
.chips{ display:flex; flex-wrap:wrap; gap:10px; margin-bottom:20px; }
.chip{ min-height:44px; padding:10px 18px; border-radius:999px; border:1.5px solid var(--line); background:#fff; color:var(--ink); font-size:14px; font-weight:800; display:inline-flex; align-items:center; }
.chip.active{ background:var(--primary); border-color:var(--primary); color:#fff; }

/* بطاقات المنتجات */
.grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(230px,1fr)); gap:16px; }
.pcard{ background:#fff; border:1px solid var(--line); border-radius:16px; overflow:hidden; display:flex; flex-direction:column; box-shadow:0 6px 22px rgba(20,30,60,.05); }
.pcard .thumb{ position:relative; height:130px; background:#eaf0fc; color:var(--primary); display:flex; align-items:center; justify-content:center; overflow:hidden; }
.pcard .thumb svg{ width:44px; height:44px; }
.pcard .thumb img{ width:100%; height:100%; object-fit:cover; }
.pbadge{ position:absolute; top:10px; right:10px; background:#e6303f; color:#fff; font-size:11px; font-weight:800; padding:4px 10px; border-radius:999px; z-index:1; }
.pcard .body{ padding:16px; display:flex; flex-direction:column; gap:8px; flex:1; }
.pcard .cat{ font-size:12px; color:var(--muted); font-weight:700; }
.pcard h3{ font-size:16px; font-weight:800; line-height:1.5; }
.pcard .desc{ font-size:13px; color:var(--muted); line-height:1.7; flex:1; }
.price{ display:flex; align-items:baseline; gap:6px; flex-wrap:wrap; }
.price b{ font-size:20px; font-weight:800; color:var(--primary); }
.price span{ font-size:12px; color:var(--muted); }
.price s{ font-size:13px; color:#999; }
.price.big b{ font-size:30px; }
.btn-sm{ padding:12px 14px; font-size:14px; min-height:44px; width:100%; }
.btn-primary:disabled{ background:#b8c2d6; box-shadow:none; cursor:not-allowed; transform:none; }
.btn-secondary{ background:#fff; color:var(--primary); border:1.5px solid var(--primary); border-radius:12px; padding:13px 24px; font-size:15px; font-weight:800; min-height:48px; }

/* صفحة المنتج */
.pdetail{ display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.2fr); gap:28px; background:#fff; border:1px solid var(--line); border-radius:18px; padding:24px; }
.pd-media{ position:relative; background:#eaf0fc; color:var(--primary); border-radius:14px; min-height:280px; display:flex; align-items:center; justify-content:center; overflow:hidden; }
.pd-media svg{ width:96px; height:96px; }
.pd-media img{ width:100%; height:100%; object-fit:cover; }
.pd-info{ display:flex; flex-direction:column; gap:12px; }
.pd-info .cat a{ color:var(--primary); font-weight:800; font-size:13px; }
.pd-info h2{ font-size:24px; font-weight:800; line-height:1.5; }
.pd-desc{ color:var(--muted); line-height:1.9; font-size:15px; }
.pd-form{ display:flex; flex-direction:column; gap:10px; margin-top:6px; }
.pd-form label{ font-size:13px; font-weight:800; }
.pd-actions{ display:flex; gap:10px; flex-wrap:wrap; }
.pd-actions .btn-primary{ width:auto; flex:1 1 180px; }
.pd-actions .btn-secondary{ flex:1 1 140px; }
.pd-details h3{ font-size:15px; margin-bottom:6px; }
.pd-details ul{ padding-right:20px; color:#444; font-size:14px; line-height:1.9; }
.pd-policy{ font-size:13px; color:var(--muted); }
.pd-policy a{ color:var(--primary); font-weight:700; }
.muted-note{ font-size:13px; color:var(--muted); line-height:1.7; }
.info-note{ background:#eaf0fc; border:1px solid #cddcf8; color:#1f3a73; border-radius:12px; padding:12px 14px; font-size:13.5px; line-height:1.8; }
.info-note a{ color:var(--primary); font-weight:800; }

/* خطوات الكمية */
.stepper{ display:flex; align-items:center; gap:8px; }
.stepper button{ width:44px; height:44px; border-radius:10px; font-size:20px; font-weight:800; border:1.5px solid var(--line); background:#fff; color:var(--ink); }
.stepper button.plus{ background:var(--primary); border-color:var(--primary); color:#fff; }
.stepper input{ width:76px; height:44px; text-align:center; font-weight:800; font-size:16px; border:1.5px solid var(--line); border-radius:10px; font-family:inherit; }

/* السلة والدفع */
.cart-layout{ display:grid; grid-template-columns:minmax(0,1.6fr) minmax(0,1fr); gap:20px; align-items:start; position:relative; }
.cart-lines{ display:flex; flex-direction:column; gap:14px; }
.cart-line{ background:#fff; border:1px solid var(--line); border-radius:14px; padding:14px; display:grid; grid-template-columns:52px minmax(0,1fr) auto auto auto; gap:12px; align-items:center; }
.cl-ico{ width:52px; height:52px; border-radius:12px; background:#eaf0fc; color:var(--primary); display:flex; align-items:center; justify-content:center; overflow:hidden; }
.cl-ico svg{ width:26px; height:26px; } .cl-ico img{ width:100%; height:100%; object-fit:cover; }
.cl-info{ display:flex; flex-direction:column; gap:3px; min-width:0; }
.cl-info strong{ font-size:15px; } .cl-info span{ font-size:12.5px; color:var(--muted); }
.cl-total{ font-weight:800; font-size:16px; white-space:nowrap; } .cl-total small{ font-size:11px; color:var(--muted); font-weight:600; }
.cl-remove, .link-btn{ background:none; border:none; color:#d9534f; font-weight:800; font-size:13px; min-height:44px; padding:0 8px; }
.link-btn{ display:block; margin:8px auto 0; }
.cart-actions{ display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap; }
.link-inline{ color:var(--primary); font-weight:800; font-size:14px; }
.summary-card{ background:#fff; border:1px solid var(--line); border-radius:16px; padding:20px; box-shadow:0 6px 22px rgba(20,30,60,.05); position:sticky; top:84px; }
.summary-card h3{ font-size:17px; margin-bottom:12px; }
.summary-card hr{ border:none; border-top:1px solid var(--line); margin:10px 0; }
.sum-row, .sum-item{ display:flex; justify-content:space-between; gap:10px; padding:7px 0; font-size:14px; }
.sum-row.muted, .sum-row.muted b{ color:var(--muted); font-weight:600; font-size:13px; }
.sum-item small{ color:var(--muted); }
.sum-total{ display:flex; justify-content:space-between; align-items:center; padding:14px 0; margin-top:6px; border-top:1px solid var(--line); font-size:16px; font-weight:800; }
.sum-total b{ font-size:22px; color:var(--primary); }
.summary-card .btn-primary{ width:100%; text-align:center; display:block; }

/* النماذج */
.form-card{ background:#fff; border:1px solid var(--line); border-radius:16px; padding:20px; }
.form-card h3{ font-size:16px; margin-bottom:10px; } .form-card h3 small, .form-card label small{ font-weight:500; color:var(--muted); font-size:12px; }
.form-card label{ display:block; font-size:13px; font-weight:800; margin:12px 0 6px; }
.form-card input[type=text], .form-card input[type=tel], .form-card input[type=email], .form-card input[type=number], .form-card input[type=password], .form-card textarea, .form-card select{
  width:100%; padding:13px 14px; border:1.5px solid var(--line); border-radius:10px; font-size:15px; font-family:inherit; background:#f9fafc; box-sizing:border-box;
}
.form-card input[type=file]{ width:100%; font-size:14px; padding:10px; border:1.5px dashed var(--line); border-radius:10px; background:#f9fafc; }
.form-card input:focus, .form-card textarea:focus{ outline:2px solid var(--primary); outline-offset:1px; background:#fff; }
.radio-row{ display:flex !important; gap:10px; align-items:flex-start; padding:12px; border:1.5px solid var(--line); border-radius:12px; margin:8px 0 !important; cursor:pointer; font-weight:500 !important; }
.radio-row input{ margin-top:4px; width:18px; height:18px; flex-shrink:0; }
.radio-row span{ display:flex; flex-direction:column; gap:2px; } .radio-row strong{ font-size:14px; } .radio-row small{ font-size:12.5px; color:var(--muted); }
.agree-row{ display:flex; gap:10px; align-items:flex-start; font-size:13.5px; line-height:1.8; background:#fff; border:1px solid var(--line); border-radius:12px; padding:14px; }
.agree-row input{ width:20px; height:20px; margin-top:3px; flex-shrink:0; }
.agree-row a{ color:var(--primary); font-weight:800; }
.alert-err{ background:#fdecea; border:1px solid #f3c1bd; color:#8a1f17; border-radius:12px; padding:14px 16px; margin-bottom:16px; font-size:14px; }
.alert-err ul{ padding-right:20px; margin-top:6px; line-height:1.9; }

/* الحالات الفارغة وتتبع الطلب */
.empty-state{ background:#fff; border:1px dashed var(--line); border-radius:16px; padding:40px 20px; text-align:center; display:flex; flex-direction:column; align-items:center; gap:6px; }
.empty-state strong{ font-size:17px; } .empty-state span{ color:var(--muted); font-size:14px; }
.order-head{ display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; background:#fff; border:1px solid var(--line); border-radius:16px; padding:18px; margin-bottom:16px; }
.order-head small{ display:block; color:var(--muted); font-size:12px; margin-bottom:4px; } .order-head strong{ font-size:16px; }
.status{ display:inline-block; padding:5px 12px; border-radius:999px; font-size:13px; font-weight:800; background:#eef1f6; color:#445; }
.status-paid, .status-processing, .status-ready, .status-completed{ background:#e3f6ec; color:#17794a; }
.status-pending_payment{ background:#fff4d6; color:#8a6100; }
.status-payment_failed, .status-cancelled, .status-review{ background:#fdecea; color:#a1261d; }
.timeline{ list-style:none; display:flex; gap:6px; margin-bottom:16px; padding:0; }
.timeline li{ flex:1; text-align:center; font-size:13px; font-weight:700; color:#9aa3b5; padding-top:22px; position:relative; }
.timeline li span{ position:absolute; top:0; left:50%; transform:translateX(-50%); width:14px; height:14px; border-radius:50%; background:#d6dbe6; }
.timeline li.done{ color:#17794a; } .timeline li.done span{ background:#1e8e5a; }

/* خطوات وCTA */
.steps-row{ display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; }
.steps-row > div{ background:#fff; border:1px solid var(--line); border-radius:14px; padding:16px; display:flex; flex-direction:column; gap:4px; }
.steps-row b{ width:30px; height:30px; border-radius:50%; background:var(--primary); color:#fff; display:flex; align-items:center; justify-content:center; font-size:14px; margin-bottom:4px; }
.steps-row span{ font-size:13px; color:var(--muted); line-height:1.7; }
.cta-box{ margin-top:30px; background:#fff; border:1px solid var(--line); border-radius:16px; padding:20px 22px; display:flex; flex-wrap:wrap; gap:14px; align-items:center; justify-content:space-between; }
.cta-box div{ display:flex; flex-direction:column; gap:3px; } .cta-box span{ color:var(--muted); font-size:13.5px; }

/* الفوتر الإضافي */
.footer-grid{ display:grid; grid-template-columns:repeat(auto-fit,minmax(200px,1fr)); gap:26px; }
.foot-about{ font-size:13px; line-height:1.9; margin-top:8px; }
.foot-contact{ list-style:none; padding:0; margin-top:10px; display:flex; flex-direction:column; gap:6px; font-size:13.5px; }
.foot-contact a{ color:#fff; font-weight:700; }
.pay-badges{ display:flex; flex-wrap:wrap; gap:8px; margin-top:10px; }
.pay-badges span{ background:#fff; color:#1a1a2e; border-radius:8px; padding:6px 12px; font-size:12px; font-weight:800; }

.legal ul{ padding-right:20px; }

@media (max-width:820px){
  .pdetail{ grid-template-columns:1fr; padding:16px; }
  .pd-media{ min-height:200px; }
  .cart-layout{ grid-template-columns:1fr; }
  .summary-card{ position:static; }
  .steps-row{ grid-template-columns:repeat(2,minmax(0,1fr)); }
  .cart-line{ grid-template-columns:44px minmax(0,1fr) auto; }
  .cart-line .stepper{ grid-column:2 / 4; }
  .cart-line .cl-total{ grid-column:2 / 3; } .cart-line .cl-remove{ grid-column:3 / 4; }
}
@media (max-width:640px){
  .trust-row{ grid-template-columns:1fr; }
  .store-hero h1{ font-size:24px; }
  .order-head{ grid-template-columns:1fr; }
  .grid{ grid-template-columns:repeat(auto-fill,minmax(160px,1fr)); gap:12px; }
  .pcard .thumb{ height:100px; }
}
@media (prefers-reduced-motion:reduce){ .toast{ animation:none; } }
