/* ===== حدود المجرة — طبقة التحسين v1 (جوال + حاسوب) ===== */
:root{--hd-blue:#3978ba;--hd-ink:#173b63;--hd-red:#d85f68;--hd-line:#e4eaf1;--hd-shadow:0 10px 30px rgba(20,52,88,.08)}
html{scroll-behavior:smooth;-webkit-text-size-adjust:100%}
body{-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}
::selection{background:#cfe3f8;color:#10304f}
:focus-visible{outline:3px solid #8fbdee;outline-offset:2px;border-radius:6px}
img{max-width:100%}
.site-header{background:rgba(255,255,255,.94)!important;-webkit-backdrop-filter:saturate(180%) blur(10px);backdrop-filter:saturate(180%) blur(10px)}

/* 1) Hero: عرض + هوامش صحيحة (كان يزيد 40px ويُقتطع) */
@media(max-width:900px){.hero.hero-backdrop{width:calc(100% - 2*var(--gutter,20px))!important}}
.hero-backdrop .hero-content{box-sizing:border-box}
@media(max-width:800px){.hero-backdrop .hero-content a.primary-btn,.hero-backdrop .hero-content .primary-btn{width:100%;box-sizing:border-box}}

/* 2) شرائح العروض: بطاقة = عرض المسار تماماً، وفراغ ثابت 16px */
.custom-offer-track{gap:16px!important}
@media(max-width:800px){.custom-offer-track .custom-offer-card{width:100%!important;flex:0 0 100%!important;box-sizing:border-box}}
@media(hover:none){.custom-offer-arrow{display:none!important}.custom-offer-window{padding-inline:0!important}}
.custom-offer-dots{gap:8px!important}.custom-offer-dots button{width:8px!important;height:8px!important;position:relative}
.custom-offer-dots button::before{content:"";position:absolute;inset:-14px -6px}
.custom-offer-dots button.is-active{width:22px!important}

/* 3) واتساب مقابل الكوكيز + الفوتر */
body:has(.cookie-notice) .whatsapp-float{bottom:calc(118px + env(safe-area-inset-bottom))!important}
body.has-buybar .whatsapp-float{bottom:calc(92px + env(safe-area-inset-bottom))!important}
body.has-buybar:has(.cookie-notice) .whatsapp-float{bottom:calc(172px + env(safe-area-inset-bottom))!important}
@media(max-width:800px){.site-footer{padding-bottom:calc(84px + env(safe-area-inset-bottom))}.cookie-notice{box-shadow:0 -6px 30px rgba(20,52,88,.18)}body.has-buybar .cookie-notice{bottom:calc(86px + env(safe-area-inset-bottom))}}

/* 4) أحجام نصوص ومساحات لمس مريحة */
.brand small,.brand-copy small,.custom-offer-body small,.custom-offer-image>span,.custom-offer-link,.custom-add-cart,.catalog-note,.product-batch-controls small,.cookie-notice p,.site-footer small,.footer-legal,.footer-legal *,.payment-label{font-size:12px!important}
.custom-add-cart{min-height:40px;padding:8px 12px!important}
.custom-offer-link{display:inline-flex;align-items:center;min-height:40px}
.mobile-store-link{min-height:44px;padding-inline:8px}
.cart-button{min-width:44px;min-height:44px}
.breadcrumbs a{display:inline-flex;align-items:center;min-height:32px}
.cookie-notice button,.load-more-products,.custom-offer-teaser-link{min-height:44px}
.footer-nav a,.site-footer a{display:inline-flex;align-items:center;min-height:36px}
.promo-trust-bar .payment-badge{width:72px!important;height:44px!important}.promo-trust-bar .payment-badge img{max-height:38px!important;width:auto}
@media(max-width:800px){.promo-trust-bar .payment-badge{width:64px!important;height:40px!important}.promo-trust-bar .payment-badge img{max-height:34px!important}}

/* 5) أسعار وبطاقات */
.hd-price{display:flex;align-items:baseline;flex-wrap:wrap;gap:4px 8px;margin:8px 0 10px;direction:rtl}
.hd-price strong{color:var(--hd-blue);font-size:1.2rem;font-weight:900;letter-spacing:-.01em}
.hd-price del{color:#9aa7b5;font-size:.82rem}
.hd-price .hd-off{background:#fdeaec;color:#c2414c;border-radius:999px;padding:2px 9px;font-size:.74rem;font-weight:800}
.product-card{border-radius:18px;transition:transform .25s,box-shadow .25s,border-color .25s}
@media(hover:hover){.product-card:hover{transform:translateY(-4px);box-shadow:0 18px 40px rgba(20,52,88,.14)}}
.product-card .cart-link{min-height:44px;border-radius:12px;font-weight:800}
.product-title{line-height:1.7}

/* 6) صفحة المنتج */
.detail-layout h1{font-size:clamp(1.45rem,4.4vw,2.4rem)!important;line-height:1.45!important}
.hd-detail-price{display:flex;align-items:baseline;flex-wrap:wrap;gap:6px 12px;margin:14px 0 6px;direction:rtl}
.hd-detail-price strong{font-size:clamp(1.8rem,6vw,2.4rem);color:var(--hd-blue);font-weight:900}
.hd-detail-price del{color:#9aa7b5;font-size:1rem}.hd-detail-price .hd-off{background:#fdeaec;color:#c2414c;border-radius:999px;padding:4px 12px;font-size:.85rem;font-weight:800}
.hd-note{color:#5f7b93;font-size:.9rem;margin:2px 0 14px}
.hd-hide{display:none!important}
.hd-buybar{display:none}
@media(max-width:800px){.hd-buybar{display:flex;align-items:center;justify-content:space-between;gap:12px;position:fixed;inset-inline:0;bottom:0;z-index:1002;padding:10px 16px calc(10px + env(safe-area-inset-bottom));background:rgba(255,255,255,.97);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);border-top:1px solid var(--hd-line);box-shadow:0 -8px 28px rgba(20,52,88,.1);direction:rtl}
 .hd-buybar .hd-bb-price{display:flex;flex-direction:column;line-height:1.3}.hd-buybar .hd-bb-price b{color:var(--hd-blue);font-size:1.2rem;font-weight:900}.hd-buybar .hd-bb-price s{color:#9aa7b5;font-size:.78rem}
 .hd-buybar button{flex:1;max-width:220px;min-height:48px;border:0;border-radius:12px;background:var(--hd-blue);color:#fff;font:800 15px Tajawal,Arial,sans-serif;cursor:pointer}body.has-buybar{padding-bottom:76px}}

/* 7) السلة */
.hd-cart-total{display:flex;justify-content:space-between;align-items:baseline;margin:12px 0 4px;padding:14px 0;border-block:1px dashed #cdd9e6;direction:rtl}
.hd-cart-total span{color:#5f7b93;font-size:.95rem}.hd-cart-total b{color:var(--hd-ink);font-size:1.5rem;font-weight:900}
.hd-cart-note{color:#7d8da0;font-size:12px;margin:0 0 10px}
.cart-line-info strong{color:var(--hd-blue)}
@media(max-width:640px){.cart-line .quantity-control button{min-width:40px;min-height:40px}}

/* 8) حاسوب: أريحية وفخامة */
@media(min-width:1100px){.section-title{letter-spacing:-.02em}.product-grid{gap:24px}.custom-offer-section{padding-block:84px}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}.product-card{transition:none}}

/* لمسات أخيرة */
@media(max-width:800px){.hero.hero-backdrop{min-height:670px!important}.hero-backdrop .hero-content{margin-top:312px!important}}
body.has-buybar .whatsapp-float{right:auto!important;left:16px!important}
.promo-trust-bar .payment-badge img{transform:scale(1.7)}
