/* CF Shop storefront */
.shop-announce{background:var(--accent,#7c3aed);color:#fff;text-align:center;font-weight:900;padding:9px 12px;font-size:.9rem}
.shop-hero{padding:36px 0 18px}
.shop-banners{display:grid;grid-template-columns:2fr 1fr;gap:14px}
.shop-banner{
    position:relative;border-radius:var(--radius,18px);padding:28px;min-height:190px;display:flex;flex-direction:column;
    justify-content:flex-end;gap:8px;overflow:hidden;color:#fff;background:#0f172a;border:1px solid var(--glass-border,rgba(255,255,255,.1))
}
.shop-banner.theme-light{background:#fff;color:var(--text,#0f172a);border-color:var(--stroke,#e2e8f0)}
.shop-banner.theme-accent{background:linear-gradient(135deg,var(--accent,#7c3aed),#312e81)}
.shop-banner img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;opacity:.45}
.shop-banner>*{position:relative}
.shop-banner h2,.shop-banner p{
    margin:0;unicode-bidi:plaintext;text-align:start;white-space:pre-wrap
}
.shop-banner h2{font-size:1.5rem;font-weight:1000;line-height:1.3}
.shop-banner p{font-weight:700;opacity:.85;font-size:.95rem}
.shop-banner .btn{align-self:flex-start;margin-top:6px}
.shop-banners .shop-banner:first-child h2{font-size:2rem}
.shop-cats{display:flex;gap:8px;overflow-x:auto;padding:4px 0 10px;scrollbar-width:thin}
.shop-cat{
    flex:0 0 auto;padding:9px 14px;border-radius:999px;border:1px solid var(--stroke,#e2e8f0);background:#fff;color:var(--text,#0f172a);
    font-weight:900;font-size:.85rem;cursor:pointer;white-space:nowrap
}
.shop-cat.active,.shop-cat:hover{background:var(--accent,#7c3aed);color:#fff;border-color:var(--accent,#7c3aed)}
.shop-cat small{opacity:.7;margin-inline-start:4px}
.shop-toolbar{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin:14px 0 18px}
.shop-search{flex:1;min-width:240px;display:flex;gap:8px;position:relative}
.shop-search input,.shop-filter select,.shop-filter input{
    width:100%;padding:12px 14px;border-radius:12px;border:1px solid var(--stroke,#e2e8f0);
    background:#fff;color:var(--text,#0f172a);font-family:inherit;font-weight:700
}
.shop-filter{min-width:150px}
.shop-suggest{
    position:absolute;top:calc(100% + 6px);right:0;left:0;background:#fff;border:1px solid var(--stroke,#e2e8f0);border-radius:14px;
    box-shadow:0 18px 40px rgba(15,23,42,.18);z-index:50;overflow:hidden;display:none
}
.shop-suggest.open{display:block}
.shop-suggest a{display:flex;gap:10px;align-items:center;padding:10px 12px;color:var(--text,#0f172a);text-decoration:none;font-weight:800;font-size:.9rem}
.shop-suggest a:hover{background:var(--bg1,#f1f5f9)}
.shop-suggest img{width:38px;height:38px;object-fit:contain;border-radius:8px;background:#fff;border:1px solid var(--stroke,#e2e8f0)}
.shop-suggest .sg-price{margin-inline-start:auto;direction:ltr;color:var(--accent,#7c3aed)}
.shop-meta{color:var(--muted,#64748b);font-weight:800;font-size:.92rem;margin-bottom:14px;display:flex;justify-content:space-between;flex-wrap:wrap;gap:8px}
.shop-toggle{display:inline-flex;align-items:center;gap:6px;font-weight:800;font-size:.85rem;color:var(--muted,#64748b);cursor:pointer}
.product-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px}
.product-card{
    position:relative;border:1px solid var(--glass-border,rgba(255,255,255,.1));background:var(--glass-bg,#111827);border-radius:var(--radius,18px);
    overflow:hidden;display:flex;flex-direction:column;min-height:100%;backdrop-filter:blur(16px);box-shadow:var(--glass-shadow);transition:.25s
}
.product-card:hover{transform:translateY(-4px);border-color:var(--accent,#7c3aed)}
.product-media{aspect-ratio:1.1;background:#fff;display:grid;place-items:center;overflow:hidden;border-bottom:1px solid var(--stroke,#e2e8f0);position:relative}
.product-media a{display:contents}
.product-media img{width:100%;height:100%;object-fit:contain;padding:12px}
.product-placeholder{font-size:2.4rem;opacity:.35}
.badges{position:absolute;top:10px;right:10px;display:flex;flex-direction:column;gap:4px;z-index:2}
.badge{padding:3px 8px;border-radius:999px;font-size:.7rem;font-weight:900;color:#fff;background:#0f172a}
.badge.new{background:#2563eb}.badge.low{background:#f59e0b}.badge.out{background:#ef4444}.badge.back{background:#64748b}
.wish-btn{
    position:absolute;top:10px;left:10px;z-index:2;width:34px;height:34px;border-radius:50%;border:1px solid var(--stroke,#e2e8f0);
    background:#fff;cursor:pointer;display:grid;place-items:center;font-size:1rem;color:#94a3b8
}
.wish-btn.on{color:#ef4444}
.product-body{padding:14px;display:flex;flex-direction:column;gap:6px;flex:1;min-width:0}
.product-group{font-size:.76rem;color:var(--accent,#a78bfa);font-weight:900}
.product-name{
    font-size:.98rem;font-weight:1000;line-height:1.45;margin:0;color:var(--text,#0f172a);
    text-align:right;overflow-wrap:anywhere;word-break:break-word;min-width:0;
    display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;min-height:2.9em
}
.product-name a{color:inherit;text-decoration:none}
.product-desc{
    font-size:.8rem;color:var(--muted,#64748b);line-height:1.6;text-align:right;
    overflow-wrap:anywhere;word-break:break-word;min-width:0;
    display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden
}
.product-rating{font-size:.78rem;color:#fbbf24;font-weight:900}
.product-rating small{color:var(--muted,#94a3b8)}
.product-foot{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:auto;padding-top:8px}
.product-price{font-size:1.05rem;font-weight:1000;color:var(--text,#0f172a);direction:ltr;text-align:left}
.product-price small{display:block;font-size:.72rem;color:var(--muted,#94a3b8);font-weight:800;direction:rtl}
.stock-badge{display:inline-block;padding:3px 8px;border-radius:999px;background:rgba(34,197,94,.15);color:#86efac;font-size:.72rem;font-weight:900}
.stock-badge.out{background:rgba(239,68,68,.15);color:#fca5a5}
.delivery-note{display:inline-flex;align-items:center;gap:8px;margin-top:8px;padding:8px 12px;border-radius:12px;background:#f8fafc;border:1px solid #e5e7eb;color:#1f2937;font-size:.82rem;font-weight:700;line-height:1.45}
.delivery-note .num{direction:ltr;unicode-bidi:isolate;display:inline-block}
.delivery-note svg,.icon-btn:not(.wa) svg,.cart-head-btn svg{width:16px;height:16px;flex:none;fill:none;stroke:currentColor;stroke-width:1.75;stroke-linecap:round;stroke-linejoin:round}
.icon-btn svg,.cart-head-btn svg{width:20px;height:20px}
.product-card .delivery-note{margin-top:6px;padding:5px 8px;font-size:.72rem;gap:6px}
.qty-row{display:flex;align-items:center;gap:6px}
.qty-btn,.qty-val{width:34px;height:34px;border-radius:10px;border:1px solid var(--stroke,#e2e8f0);background:#fff;color:var(--text,#0f172a);font-weight:900;cursor:pointer}
.qty-val{display:grid;place-items:center;min-width:34px;width:auto;padding:0 8px}
.shop-empty,.shop-loading{grid-column:1/-1;text-align:center;padding:48px 16px;border:1px dashed var(--stroke,#e2e8f0);border-radius:var(--radius,18px);color:var(--muted,#64748b);font-weight:800}
.shop-pagination{display:flex;justify-content:center;gap:8px;margin-top:24px;flex-wrap:wrap}
.page-btn{min-width:42px;padding:10px 14px;border-radius:12px;border:1px solid var(--stroke,#e2e8f0);background:#fff;color:var(--text,#0f172a);font-weight:900;cursor:pointer}
.page-btn.active,.page-btn:hover{background:var(--accent-light,#ede9fe);border-color:var(--accent,#7c3aed)}
.page-btn:disabled{opacity:.45;cursor:not-allowed}
.cart-head-btn{position:relative;width:42px;height:42px;padding:0;display:inline-grid;place-items:center}
@media (max-width:720px){header .actions .cart-head-btn{display:inline-grid}}
.cart-head-btn svg{width:20px;height:20px}
.cart-badge{position:absolute;top:6px;inset-inline-end:6px;width:8px;height:8px;min-width:0;padding:0;border-radius:50%;background:#ef4444;box-shadow:0 0 0 2px #fff;font-size:0}
header .actions .cart-head-btn .cart-badge{display:block}
.cart-badge.empty,header .actions .cart-head-btn .cart-badge.empty{display:none}
.money{display:inline-flex;align-items:center;gap:4px;direction:ltr}
.riyal{width:0.9em;height:0.9em;display:inline-block;flex:none;vertical-align:-0.1em}
.cart-foot.is-hidden{display:none}
.pd-ar{margin:0 0 12px;font-weight:800;color:var(--text,#0f172a);text-align:right}
.cart-drawer{position:fixed;inset:0;z-index:2000;display:none}
.cart-drawer.open{display:block}
.cart-backdrop{position:absolute;inset:0;background:rgba(15,23,42,.55)}
.cart-panel{position:absolute;top:0;left:0;height:100%;width:min(440px,100%);background:#fff;color:var(--text,#0f172a);box-shadow:var(--shadow);display:flex;flex-direction:column}
.cart-head{padding:18px;border-bottom:1px solid var(--stroke,#e2e8f0);display:flex;justify-content:space-between;align-items:center}
.cart-head h3{margin:0;font-size:1.2rem;font-weight:1000}
.cart-body{padding:16px;overflow:auto;flex:1}
.cart-line{display:grid;grid-template-columns:56px 1fr auto;gap:10px;padding:12px 0;border-bottom:1px solid var(--bg1,#f1f5f9);align-items:start}
.cart-line img{width:56px;height:56px;object-fit:contain;border:1px solid var(--stroke,#e2e8f0);border-radius:10px;background:#fff}
.cart-line h4{margin:0 0 4px;font-size:.92rem}
.cart-line .meta{color:var(--muted,#64748b);font-size:.78rem;font-weight:800}
.cart-foot{padding:16px;border-top:1px solid var(--stroke,#e2e8f0);background:var(--bg1,#f8fafc)}
.cart-sum{display:flex;justify-content:space-between;font-weight:800;font-size:.9rem;padding:3px 0;color:var(--muted,#64748b)}
.cart-sum.total{font-weight:1000;font-size:1.05rem;color:var(--text,#0f172a);border-top:1px dashed var(--stroke,#e2e8f0);margin-top:6px;padding-top:8px}
.cart-sum .ok{color:#059669}
.coupon-row{display:flex;gap:6px;margin:8px 0}
.coupon-row input{flex:1;padding:10px 12px;border-radius:10px;border:1px solid var(--stroke,#e2e8f0);font-family:inherit;font-weight:800;text-transform:uppercase}
.coupon-msg{font-size:.8rem;font-weight:800;min-height:1.2em}
.coupon-msg.err{color:#dc2626}.coupon-msg.ok{color:#059669}
.checkout-card{position:fixed;inset:0;z-index:2100;display:none;place-items:center;padding:16px;background:rgba(15,23,42,.55);overflow:auto}
.checkout-card.open{display:grid}
.checkout-box{width:min(620px,100%);background:#fff;color:var(--text,#0f172a);border-radius:18px;padding:22px;box-shadow:var(--shadow);max-height:95vh;overflow:auto}
.checkout-box h3{margin:0 0 14px;font-size:1.25rem}
.form-row{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.form-field{margin-bottom:12px}
.form-field label{display:block;font-size:.85rem;font-weight:900;margin-bottom:6px}
.form-field input,.form-field textarea,.form-field select{width:100%;padding:12px 14px;border-radius:12px;border:1px solid var(--stroke,#e2e8f0);font-family:inherit;font-weight:700}
.form-actions{display:flex;gap:10px;justify-content:flex-end;margin-top:8px;flex-wrap:wrap}
.choice-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.choice{border:1px solid var(--stroke,#e2e8f0);border-radius:12px;padding:10px 12px;cursor:pointer;font-weight:800;font-size:.88rem;display:flex;gap:8px;align-items:flex-start}
.choice input{margin-top:4px}
.choice.on{border-color:var(--accent,#7c3aed);background:var(--accent-light,#f5f3ff)}
.choice small{display:block;color:var(--muted,#64748b);font-weight:700;font-size:.76rem;margin-top:2px}
.success-box{text-align:center;padding:24px 8px}
.success-box h3{color:#059669}
.success-box .bank{background:var(--bg1,#f8fafc);border:1px dashed var(--stroke,#e2e8f0);border-radius:12px;padding:12px;white-space:pre-line;text-align:right;font-weight:800;margin:12px 0}
.toast{position:fixed;bottom:90px;left:50%;transform:translateX(-50%);background:#0f172a;color:#fff;padding:12px 18px;border-radius:12px;font-weight:900;z-index:3000;opacity:0;transition:.25s;pointer-events:none}
.toast.show{opacity:1}
.shop-trust{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin:28px 0 0}
.trust{border:1px solid var(--glass-border,rgba(255,255,255,.1));background:var(--glass-bg,#111827);border-radius:14px;padding:14px;font-weight:900;font-size:.85rem;color:var(--text,#0f172a);display:flex;gap:10px;align-items:center}
.trust span{font-size:1.4rem}
.trust small{display:block;color:var(--muted,#94a3b8);font-weight:700;font-size:.75rem}
/* product page */
.pd{display:grid;grid-template-columns:1.05fr .95fr;gap:36px;align-items:start;direction:ltr}
.pd-gallery{position:sticky;top:90px}
.pd-info{direction:rtl}
.pd-code{font-size:.95rem;font-weight:800;color:var(--muted,#64748b);letter-spacing:.01em;margin-top:4px}
.pd-features{margin:8px 0 14px;padding:0 0 0 1.15rem;color:var(--text,#0f172a);font-weight:700;line-height:1.7;text-align:left}
.pd-features li{margin:4px 0}
.pd-main{aspect-ratio:1;background:#fff;border-radius:18px;border:1px solid var(--stroke,#e2e8f0);display:grid;place-items:center;overflow:hidden}
.pd-main img{width:100%;height:100%;object-fit:contain;padding:18px}
.pd-thumbs{display:flex;gap:8px;margin-top:10px;flex-wrap:wrap}
.pd-thumbs img{width:64px;height:64px;object-fit:contain;border:2px solid var(--stroke,#e2e8f0);border-radius:10px;background:#fff;cursor:pointer}
.pd-thumbs img.on{border-color:var(--accent,#7c3aed)}
.pd-info h1{font-size:1.6rem;font-weight:1000;margin:6px 0 10px;color:var(--text,#0f172a);line-height:1.35;unicode-bidi:plaintext;text-align:start}
.pd-crumb{direction:ltr;text-align:left;display:flex;flex-wrap:wrap;justify-content:flex-start;align-items:center;gap:6px;font-size:.82rem;color:var(--muted,#94a3b8);font-weight:800}
.pd-crumb a{color:var(--accent,#a78bfa);text-decoration:none}
.pd-price{font-size:1.8rem;font-weight:1000;color:var(--text,#0f172a);direction:ltr;text-align:right;margin:10px 0 4px}
.pd-note{color:var(--muted,#94a3b8);font-weight:800;font-size:.85rem}
.pd-actions{display:flex;gap:10px;align-items:center;margin:18px 0;flex-wrap:wrap}
.icon-btn{width:48px;height:48px;padding:0;display:inline-grid;place-items:center;border-radius:14px}
.icon-btn:not(.wa) svg{width:20px;height:20px;display:block;fill:none;stroke:currentColor;stroke-width:1.75;stroke-linecap:round;stroke-linejoin:round}
.icon-btn.wa svg{width:20px;height:20px;display:block;fill:currentColor;stroke:none}
.icon-btn.wa{background:#25D366;color:#fff;border-color:#25D366}
.pd-specs{width:100%;border-collapse:collapse;margin-top:14px;font-size:.88rem}
.pd-specs td{padding:9px 10px;border-bottom:1px solid var(--glass-border,rgba(15,23,42,.08));color:var(--text,#0f172a);font-weight:700}
.pd-specs td:first-child{color:var(--muted,#94a3b8);width:38%;font-weight:900}
.pd-tabs{margin-top:30px}
.pd-desc{color:var(--text,#0f172a);line-height:1.9;font-weight:600;unicode-bidi:plaintext}
.pd-desc img{max-width:100%}
.review{border:1px solid var(--glass-border,rgba(255,255,255,.1));border-radius:14px;padding:14px;margin-bottom:10px;background:var(--glass-bg,#111827);color:var(--text,#0f172a)}
.review .stars{color:#fbbf24;font-weight:900}
.review .who{font-size:.8rem;color:var(--muted,#94a3b8);font-weight:800}
.stars-input{display:flex;gap:4px;direction:ltr;justify-content:flex-end}
.stars-input button{background:none;border:0;font-size:1.6rem;color:#cbd5e1;cursor:pointer}
.stars-input button.on{color:#fbbf24}
.section-title{color:var(--text,#0f172a);font-weight:1000;font-size:1.25rem;margin:0 0 14px}
.share-row{display:flex;gap:8px;flex-wrap:wrap;margin-top:8px}
/* track page */
.track-steps{display:grid;grid-template-columns:repeat(6,1fr);gap:6px;margin:18px 0}
.track-step{text-align:center;font-size:.75rem;font-weight:900;color:var(--muted,#94a3b8)}
.track-step i{display:block;height:8px;border-radius:999px;background:#334155;margin-bottom:6px}
.track-step.done{color:#fff}.track-step.done i{background:#22c55e}
.track-step.now i{background:var(--accent,#7c3aed)}
.track-card{border:1px solid var(--glass-border,rgba(255,255,255,.1));background:var(--glass-bg,#111827);border-radius:18px;padding:20px;color:var(--text,#0f172a)}
.track-card table{width:100%;border-collapse:collapse;font-size:.9rem}
.track-card td,.track-card th{padding:8px;border-bottom:1px solid rgba(255,255,255,.08);text-align:right}
@media (max-width:1024px){.product-grid{grid-template-columns:repeat(3,1fr)}.shop-trust{grid-template-columns:repeat(2,1fr)}}
@media (max-width:768px){
    .product-grid{grid-template-columns:repeat(2,1fr)}.form-row,.choice-grid{grid-template-columns:1fr}
    .cart-panel{width:100%}.shop-banners{grid-template-columns:1fr}.pd{grid-template-columns:1fr}.pd-gallery{position:static}
    .track-steps{grid-template-columns:repeat(3,1fr)}
}
@media (max-width:480px){.product-grid{grid-template-columns:1fr}}
