/* ============================================================
   BUDAC — نظام التصميم
   ألوان: بنفسجي دافئ غامق + ذهبي مطفي + كريمي دافئ + وردي غبار
   خطوط: Tajawal (عناوين) + IBM Plex Sans Arabic (كل الباقي)
   ============================================================ */

:root {
    --color-bg: #FBF6EE;
    --color-surface: #FFFFFF;
    --color-ink: #221C2B;
    --color-ink-soft: #5C5468;
    --color-primary: #2E1A47;
    --color-primary-light: #4A2F6B;
    --color-gold: #C9A227;
    --color-gold-soft: #E8D9A8;
    --color-blush: #C98A8A;
    --color-sage: #7C8B6F;
    --color-border: #E7DFCF;

    --font-display: "Tajawal", "IBM Plex Sans Arabic", sans-serif;
    --font-body: "IBM Plex Sans Arabic", sans-serif;

    --radius-md: 14px;
    --radius-lg: 22px;
    --shadow-card: 0 8px 24px -12px rgba(46, 26, 71, 0.25);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
}

body {
    background: var(--color-bg);
    color: var(--color-ink);
    font-family: var(--font-body);
    line-height: 1.6;
}

a { color: inherit; text-decoration: none; }

.container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ---------- الهيدر ---------- */
.site-header {
    background: var(--color-primary);
    color: #fff;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
}

.logo {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.logo-word {
    font-family: var(--font-display);
    font-size: 30px;
    font-weight: 700;
    color: var(--color-gold-soft);
    letter-spacing: 1px;
}

.logo-tagline {
    font-size: 12px;
    color: #C9BEDD;
    margin-top: 2px;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 28px;
    font-size: 15px;
}

.header-nav a {
    color: #EDE7F5;
}

.cart-link {
    display: flex;
    align-items: center;
    gap: 6px;
}

.cart-icon { color: var(--color-gold-soft); display: block; }

.cart-count {
    background: var(--color-gold);
    color: var(--color-primary);
    font-size: 12px;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* البصمة المميزة: حافة مسننة — تحاكي حافة قماش/ديكور منزلي */
.scallop-divider {
    height: 18px;
    background-image: radial-gradient(circle at 9px 0, transparent 9px, var(--color-bg) 9.5px);
    background-size: 18px 18px;
    background-repeat: repeat-x;
    background-color: var(--color-primary);
}

/* ---------- الهيرو ---------- */
.hero {
    padding: 56px 0 40px;
    text-align: center;
}

.hero-eyebrow {
    font-size: 13px;
    color: var(--color-gold);
    letter-spacing: 2px;
    font-weight: 600;
    margin: 0 0 10px;
}

.hero-title {
    font-family: var(--font-display);
    font-size: 46px;
    color: var(--color-primary);
    margin: 0 0 14px;
    font-weight: 700;
}

.hero-subtitle {
    font-size: 16px;
    color: var(--color-ink-soft);
    margin: 0 0 24px;
}

.trust-row {
    display: flex;
    justify-content: center;
    gap: 28px;
    list-style: none;
    padding: 0;
    margin: 0;
    flex-wrap: wrap;
}

.trust-row li {
    font-size: 13px;
    color: var(--color-primary);
    font-weight: 600;
    position: relative;
    padding-inline-start: 18px;
}

.trust-row li::before {
    content: "";
    position: absolute;
    inline-size: 6px;
    block-size: 6px;
    border-radius: 50%;
    background: var(--color-gold);
    inset-inline-start: 0;
    top: 50%;
    transform: translateY(-50%);
}

/* ---------- شبكة المنتجات ---------- */
.product-grid-section {
    padding: 20px 0 72px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 24px;
}

.product-card {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--color-border);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    display: block;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 32px -14px rgba(46, 26, 71, 0.32);
}

.product-card-image,
.product-detail-image {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-card-image { aspect-ratio: 1 / 1; }

.product-card-image::before,
.product-card-image::after,
.product-detail-image::before,
.product-detail-image::after {
    content: "";
    position: absolute;
    inline-size: 26px;
    block-size: 26px;
    border: 1.5px solid rgba(255, 255, 255, 0.55);
    pointer-events: none;
}

.product-card-image::before, .product-detail-image::before {
    top: 12px; inset-inline-start: 12px;
    border-inline-end: none; border-bottom: none;
}

.product-card-image::after, .product-detail-image::after {
    bottom: 12px; inset-inline-end: 12px;
    border-inline-start: none; border-top: none;
}

.product-card-image img,
.product-detail-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ph-monogram {
    font-family: var(--font-display);
    font-size: 44px;
    color: rgba(255, 255, 255, 0.75);
}

/* توليفات ألوان placeholder للمنتجات بلا صور بعد — تلمح لخامات ديكور (مرايا/ذهب/قماش) */
.ph-0 { background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%); }
.ph-1 { background: linear-gradient(135deg, var(--color-gold-soft) 0%, var(--color-gold) 100%); }
.ph-2 { background: linear-gradient(135deg, var(--color-blush) 0%, #E3B9B9 100%); }
.ph-3 { background: linear-gradient(135deg, var(--color-sage) 0%, #A4B396 100%); }

.badge-out {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--color-ink);
    color: #fff;
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 999px;
}

.product-card-body {
    padding: 16px 18px 20px;
}

.product-card-name {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 4px;
    color: var(--color-ink);
}

.product-card-variant {
    font-size: 12px;
    color: var(--color-ink-soft);
    margin: 0 0 8px;
}

.product-card-price {
    font-size: 16px;
    font-weight: 700;
    color: var(--color-primary);
    margin: 0;
}

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

/* ---------- صفحة تفاصيل المنتج ---------- */
.product-detail { padding: 48px 0 80px; }

.product-detail-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: start;
}

.product-detail-image {
    aspect-ratio: 1 / 1;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
}

.product-detail-category {
    color: var(--color-gold);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 1px;
    margin: 0 0 8px;
    display: inline-block;
    text-decoration: none;
}

.product-detail-category:hover {
    text-decoration: underline;
}

.product-detail-name {
    font-family: var(--font-display);
    font-size: 34px;
    color: var(--color-primary);
    margin: 0 0 8px;
}

.product-detail-variant {
    color: var(--color-ink-soft);
    font-size: 14px;
    margin: 0 0 16px;
}

.product-detail-price {
    font-size: 26px;
    font-weight: 700;
    color: var(--color-primary);
    margin: 0 0 20px;
}

.product-detail-description {
    color: var(--color-ink-soft);
    margin: 0 0 28px;
    line-height: 1.8;
}

.btn-primary {
    background: var(--color-primary);
    color: #fff;
    border: none;
    padding: 14px 32px;
    border-radius: 999px;
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease;
}

.btn-primary:hover:not(:disabled) { background: var(--color-primary-light); }

.btn-primary:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.stock-note {
    margin-top: 12px;
    font-size: 13px;
    color: var(--color-sage);
}

/* ---------- الفوتر ---------- */
.site-footer {
    background: var(--color-primary);
    color: #C9BEDD;
    padding: 28px 0;
    margin-top: 40px;
}

.footer-inner { text-align: center; }

.footer-brand {
    font-family: var(--font-display);
    color: var(--color-gold-soft);
    font-size: 18px;
    margin: 0 0 4px;
}

.footer-meta { font-size: 13px; margin: 0; }

/* ---------- موبايل ---------- */
@media (max-width: 720px) {
    .hero-title { font-size: 32px; }
    .product-detail-inner { grid-template-columns: 1fr; gap: 28px; }
    .header-inner { padding: 16px 20px; }
    .logo-word { font-size: 24px; }
}

/* احترام تفضيل تقليل الحركة */
@media (prefers-reduced-motion: reduce) {
    .product-card { transition: none; }
}

/* وضوح الفوكس بالكيبورد */
a:focus-visible, button:focus-visible {
    outline: 2px solid var(--color-gold);
    outline-offset: 2px;
}

/* ============ إضافات: التصنيفات، العروض، المعرض والـZoom، التنويعات ============ */

/* ---------- شريط التصنيفات ---------- */
.category-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 28px;
}

.category-chip {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 999px;
    border: 1.5px solid var(--color-primary);
    color: var(--color-primary);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}

.category-chip:hover { background: rgba(46, 26, 71, 0.08); }

.category-chip.is-active {
    background: var(--color-primary);
    color: #fff;
}

/* ---------- شارة العروض/الخصم ---------- */
.badge-offer {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--color-gold);
    color: var(--color-primary);
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
    z-index: 2;
}

.badge-offer-detail {
    top: 14px;
    left: 14px;
    font-size: 14px;
    padding: 6px 14px;
}

.price-compare {
    color: #9a9a9a;
    text-decoration: line-through;
    font-size: 0.75em;
    margin-right: 8px;
    font-weight: 400;
}

/* ---------- معرض صور المنتج + تأثير التكبير (Zoom) ---------- */
.product-gallery {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.product-gallery-main {
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: 18px;
    overflow: hidden;
    background: #f4f1ea;
    cursor: zoom-in;
}

.product-gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.12s ease-out;
    will-change: transform;
}

.product-gallery-thumbs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.gallery-thumb {
    width: 68px;
    height: 68px;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid transparent;
    padding: 0;
    cursor: pointer;
    background: #f4f1ea;
    transition: border-color 0.15s ease, transform 0.15s ease;
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gallery-thumb:hover { transform: translateY(-2px); }

.gallery-thumb.is-active {
    border-color: var(--color-gold);
}

/* ---------- اختيار التنويعات (variants) ---------- */
.variant-picker {
    margin: 18px 0;
}

.variant-picker-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 10px;
}

.variant-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.variant-chip {
    padding: 9px 18px;
    border-radius: 10px;
    border: 1.5px solid #d8d2e0;
    background: #fff;
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--color-primary);
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, transform 0.1s ease;
}

.variant-chip:hover:not(.is-out) {
    border-color: var(--color-primary-light);
    transform: translateY(-1px);
}

.variant-chip.is-active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
}

.variant-chip.is-out {
    opacity: 0.4;
    text-decoration: line-through;
    cursor: not-allowed;
}

/* ---------- وصف المنتج (نص واضح بفقرات، بلا وسوم HTML) ---------- */
.product-detail-description {
    white-space: pre-line;
    line-height: 1.9;
    color: #4a4a4a;
    font-size: 15px;
    margin: 16px 0;
}

/* ---------- تحسينات موبايل للإضافات الجديدة ---------- */
@media (max-width: 720px) {
    .gallery-thumb { width: 56px; height: 56px; }
    .category-filter-row { gap: 8px; }
    .category-chip { padding: 6px 16px; font-size: 13px; }
}

/* ============ العروض الخاصة ============ */

.offers-section {
    padding: 40px 0 20px;
    background: linear-gradient(180deg, #FBF8F2 0%, transparent 100%);
}

.section-head { text-align: center; margin-bottom: 28px; }

.section-heading {
    font-family: var(--font-display);
    font-size: 30px;
    color: var(--color-primary);
    margin: 0 0 6px;
}

.section-sub { color: var(--color-ink-soft); font-size: 14px; margin: 0; }

.offers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 22px;
}

.offer-card {
    background: #fff;
    border-radius: var(--radius-lg);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 6px 20px -10px rgba(46, 26, 71, 0.28);
    border: 1.5px solid var(--color-gold-soft);
    display: block;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.offer-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 18px 36px -14px rgba(46, 26, 71, 0.34);
}

.offer-card-banner {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
}

.offer-card-banner > img { width: 100%; height: 100%; object-fit: cover; }

/* صور المنتجات كبانر احتياطي إذا الأدمن ما رفعش بانر */
.offer-banner-fallback { display: flex; height: 100%; gap: 2px; }
.offer-banner-fallback img { flex: 1; min-width: 0; height: 100%; object-fit: cover; }

.offer-save-badge {
    position: absolute;
    top: 12px;
    inset-inline-start: 12px;
    background: var(--color-gold);
    color: var(--color-primary);
    font-size: 13px;
    font-weight: 700;
    padding: 5px 14px;
    border-radius: 999px;
    box-shadow: 0 4px 12px -4px rgba(0,0,0,0.35);
}

.offer-save-badge-lg { font-size: 16px; padding: 8px 20px; top: 16px; inset-inline-start: 16px; }

.offer-card-body { padding: 18px 20px 22px; }

.offer-card-title {
    font-family: var(--font-display);
    font-size: 21px;
    color: var(--color-primary);
    margin: 0 0 4px;
}

.offer-card-sub { font-size: 13px; color: var(--color-ink-soft); margin: 0 0 12px; }

.offer-card-items {
    list-style: none;
    padding: 0;
    margin: 0 0 14px;
    font-size: 13px;
    color: var(--color-ink);
}

.offer-card-items li {
    padding: 5px 0;
    border-bottom: 1px dashed var(--color-gold-soft);
}
.offer-card-items li:last-child { border-bottom: none; }

.qty-badge {
    background: var(--color-gold-soft);
    color: var(--color-primary);
    font-size: 11px;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 999px;
}

.offer-card-price { margin: 0; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.offer-price-now { font-size: 22px; font-weight: 700; color: var(--color-primary); }
.offer-price-was { font-size: 14px; color: #9a9a9a; text-decoration: line-through; }

/* ---------- صفحة تفاصيل العرض ---------- */
.offer-detail { padding: 40px 0 70px; }

.offer-detail-head {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 40px;
    align-items: center;
    margin-bottom: 48px;
}

.offer-detail-banner { position: relative; border-radius: var(--radius-lg); overflow: hidden; }
.offer-detail-banner img { width: 100%; display: block; }

.offer-eyebrow {
    color: var(--color-gold);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 2px;
    margin: 0 0 6px;
}

.offer-detail-title {
    font-family: var(--font-display);
    font-size: 36px;
    color: var(--color-primary);
    margin: 0 0 8px;
}

.offer-detail-sub { font-size: 16px; color: var(--color-ink-soft); margin: 0 0 20px; }

.offer-price-box {
    background: #FBF8F2;
    border: 1.5px solid var(--color-gold-soft);
    border-radius: var(--radius-lg);
    padding: 18px 22px;
    margin-bottom: 16px;
}

.offer-price-main { font-size: 34px; font-weight: 700; color: var(--color-primary); margin: 0; }
.offer-price-detail { font-size: 14px; color: var(--color-ink-soft); margin: 6px 0 0; }
.offer-price-detail strong { color: var(--color-sage); }
.strike { text-decoration: line-through; }

.offer-deadline {
    font-size: 14px;
    color: #B8860B;
    background: #FFF9E6;
    padding: 8px 14px;
    border-radius: 8px;
    display: inline-block;
    margin: 0 0 16px;
}

.offer-detail-description {
    white-space: pre-line;
    line-height: 1.9;
    color: #4a4a4a;
    font-size: 15px;
    margin-top: 18px;
}

.offer-items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.offer-item-qty {
    position: absolute;
    top: 12px;
    inset-inline-end: 12px;
    background: var(--color-primary);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    padding: 3px 11px;
    border-radius: 999px;
}

@media (max-width: 820px) {
    .offer-detail-head { grid-template-columns: 1fr; gap: 24px; }
    .offer-detail-title { font-size: 28px; }
    .offer-price-main { font-size: 28px; }
    .section-heading { font-size: 24px; }
}

/* ============ السلة، الدفع، التتبع ============ */

.container-narrow { max-width: 620px; }
.page-heading {
    font-family: var(--font-display); font-size: 32px;
    color: var(--color-primary); margin: 0 0 28px;
}

/* رسائل flash */
.flash-container { margin: 20px auto 0; }
.flash { padding: 12px 20px; border-radius: 10px; margin-bottom: 10px; font-size: 14px; }
.flash-success { background: #DFF3E7; color: #2E7D53; border-right: 4px solid #2E7D53; }
.flash-error { background: #FBE3E0; color: #C0392B; border-right: 4px solid #C0392B; }
.flash-warning { background: #FFF3D6; color: #B8860B; border-right: 4px solid #B8860B; }

.cart-count.has-items { background: var(--color-gold); color: var(--color-primary); font-weight: 700; }

/* ---------- السلة ---------- */
.cart-page, .checkout-page, .track-page, .success-page { padding: 40px 0 70px; }

.cart-layout { display: grid; grid-template-columns: 1fr 340px; gap: 32px; align-items: start; }

.cart-line {
    display: grid;
    grid-template-columns: 88px 1fr auto auto auto;
    gap: 16px; align-items: center;
    background: #fff; border: 1px solid #EDE9E2;
    border-radius: var(--radius-lg); padding: 14px; margin-bottom: 12px;
}
.cart-line.has-issue { border-color: #E5A5A0; background: #FFFAF9; }

.cart-line-image {
    width: 88px; height: 88px; border-radius: 12px; overflow: hidden;
    background: #F4F1EA; display: flex; align-items: center; justify-content: center;
}
.cart-line-image img { width: 100%; height: 100%; object-fit: cover; }

.cart-line-name { font-weight: 600; color: var(--color-primary); text-decoration: none; font-size: 15px; }
.cart-line-name:hover { text-decoration: underline; }
.cart-line-variant, .cart-line-unit { font-size: 12px; color: var(--color-ink-soft); margin: 3px 0 0; }
.line-tag {
    display: inline-block; background: var(--color-gold-soft); color: var(--color-primary);
    font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 999px; margin-bottom: 4px;
}
.stock-warning { color: #C0392B; font-size: 12px; margin: 6px 0 0; font-weight: 600; }

.cart-qty-form { display: flex; gap: 6px; align-items: center; }
.qty-field { width: 64px; padding: 7px; border: 1.5px solid #E0DAD2; border-radius: 8px; text-align: center; font-family: inherit; }
.btn-mini {
    padding: 7px 12px; background: var(--color-primary); color: #fff;
    border: none; border-radius: 8px; font-family: inherit; font-size: 12px; cursor: pointer;
}
.btn-mini:hover { background: var(--color-primary-light); }
.btn-remove {
    background: none; border: none; color: #B0A9A0; font-size: 24px;
    cursor: pointer; line-height: 1; padding: 0 6px;
}
.btn-remove:hover { color: #C0392B; }
.cart-line-total { font-weight: 700; color: var(--color-primary); white-space: nowrap; }

/* ---------- ملخص ---------- */
.cart-summary, .checkout-summary {
    background: #fff; border: 1px solid #EDE9E2;
    border-radius: var(--radius-lg); padding: 24px; position: sticky; top: 20px;
}
.summary-title { font-size: 17px; color: var(--color-primary); margin: 0 0 16px; }
.summary-row { display: flex; justify-content: space-between; padding: 8px 0; font-size: 14px; gap: 12px; }
.summary-muted { color: var(--color-ink-soft); font-size: 13px; }
.summary-discount { color: #2E7D53; font-weight: 600; }
.summary-total {
    border-top: 2px solid #EDE9E2; margin-top: 8px; padding-top: 14px;
    font-size: 19px; font-weight: 700; color: var(--color-primary);
}

.coupon-form { display: flex; gap: 8px; margin-bottom: 12px; }
.coupon-form input {
    flex: 1; min-width: 0; padding: 9px 12px; border: 1.5px solid #E0DAD2;
    border-radius: 8px; font-family: inherit; font-size: 13px;
}
.coupon-note { font-size: 12px; margin: 0 0 10px; }
.coupon-error { color: #C0392B; }
.coupon-applied {
    display: flex; justify-content: space-between; align-items: center;
    background: #DFF3E7; color: #2E7D53; padding: 9px 14px;
    border-radius: 8px; font-size: 13px; font-weight: 600; margin-bottom: 12px;
}
.btn-link { background: none; border: none; color: #2E7D53; cursor: pointer; text-decoration: underline; font-family: inherit; font-size: 12px; }

.btn-block { width: 100%; display: block; margin-top: 14px; text-align: center; }
.continue-link { display: block; text-align: center; margin-top: 14px; color: var(--color-ink-soft); font-size: 13px; text-decoration: none; }
.continue-link:hover { color: var(--color-primary); }
.checkout-blocked { color: #C0392B; font-size: 13px; text-align: center; margin: 12px 0 0; }

/* ---------- الدفع ---------- */
.checkout-layout { display: grid; grid-template-columns: 1fr 360px; gap: 32px; align-items: start; }
.checkout-form-col { background: #fff; border: 1px solid #EDE9E2; border-radius: var(--radius-lg); padding: 26px; }

.field { display: block; margin-bottom: 16px; }
.field > span { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--color-primary); }
.field input, .field select, .field textarea {
    width: 100%; padding: 11px 13px; border: 1.5px solid #E0DAD2;
    border-radius: 9px; font-family: inherit; font-size: 14px; background: #fff;
}
.field input:focus, .field select:focus, .field textarea:focus {
    outline: none; border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(46,26,71,0.1);
}

.checkout-items { list-style: none; padding: 0; margin: 0 0 14px; }
.checkout-items li {
    display: flex; justify-content: space-between; gap: 12px;
    padding: 9px 0; border-bottom: 1px dashed #EDE9E2; font-size: 13px;
}
.checkout-items li:last-child { border-bottom: none; }
.ci-name small { color: var(--color-ink-soft); }
.ci-qty { color: var(--color-ink-soft); font-size: 12px; }
.ci-price { white-space: nowrap; font-weight: 600; }

.shipping-error { color: #C0392B; font-size: 12px; font-weight: 600; }
.payment-note {
    background: #FBF8F2; border-radius: 8px; padding: 10px 14px;
    font-size: 13px; text-align: center; margin: 14px 0 0; color: var(--color-primary);
}

.qty-picker { display: flex; align-items: center; gap: 10px; margin: 14px 0; }
.qty-picker label { font-size: 13px; font-weight: 600; color: var(--color-primary); }
.qty-picker input { width: 76px; padding: 8px; border: 1.5px solid #E0DAD2; border-radius: 8px; text-align: center; font-family: inherit; }
.add-to-cart-form { margin: 16px 0; }
.btn-ghost-link {
    display: block; width: 100%; background: none; border: none; margin-top: 10px;
    color: var(--color-primary); font-family: inherit; font-size: 13px;
    cursor: pointer; text-decoration: underline; text-align: center;
}

/* ---------- تأكيد الطلبية ---------- */
.success-card {
    max-width: 640px; margin: 0 auto; background: #fff;
    border: 1px solid #EDE9E2; border-radius: 20px; padding: 40px; text-align: center;
}
.success-icon {
    width: 64px; height: 64px; border-radius: 50%; background: #DFF3E7; color: #2E7D53;
    font-size: 34px; display: flex; align-items: center; justify-content: center; margin: 0 auto 18px;
}
.success-title { font-family: var(--font-display); font-size: 30px; color: var(--color-primary); margin: 0 0 8px; }
.success-sub { color: var(--color-ink-soft); margin: 0 0 24px; }

.order-number-box {
    background: #FBF8F2; border: 2px dashed var(--color-gold-soft);
    border-radius: 14px; padding: 18px; margin-bottom: 28px;
}
.onb-label { display: block; font-size: 12px; color: var(--color-ink-soft); }
.onb-value {
    display: block; font-size: 28px; font-weight: 700; color: var(--color-primary);
    letter-spacing: 2px; margin: 4px 0; font-family: monospace;
}
.order-number-box small { color: var(--color-ink-soft); font-size: 12px; }

.order-recap { text-align: right; }
.delivery-recap { margin-top: 18px; padding-top: 16px; border-top: 1px solid #EDE9E2; font-size: 14px; }
.delivery-recap p { margin: 4px 0; }
.muted { color: var(--color-ink-soft); font-size: 13px; }
.success-actions { display: flex; gap: 12px; justify-content: center; margin-top: 26px; flex-wrap: wrap; }

/* ---------- التتبع ---------- */
.track-form { background: #fff; border: 1px solid #EDE9E2; border-radius: var(--radius-lg); padding: 26px; }
.track-result { background: #fff; border: 1px solid #EDE9E2; border-radius: var(--radius-lg); padding: 26px; margin-top: 24px; }
.track-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; flex-wrap: wrap; gap: 10px; }
.track-number { font-family: monospace; font-size: 20px; font-weight: 700; color: var(--color-primary); letter-spacing: 1px; }

.status-pill { display: inline-block; padding: 4px 14px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.status-pending { background: #FFF3D6; color: #8A6D0F; }
.status-confirmed { background: #E0EDFB; color: #1B5FA8; }
.status-shipped { background: #EFE9F7; color: #5B3E8E; }
.status-delivered { background: #DFF3E7; color: #2E7D53; }
.status-cancelled { background: #FBE3E0; color: #C0392B; }

.track-timeline { display: flex; justify-content: space-between; margin-bottom: 26px; position: relative; }
.track-timeline::before {
    content: ""; position: absolute; top: 9px; right: 8%; left: 8%;
    height: 2px; background: #E5E0D8;
}
.track-step { position: relative; text-align: center; flex: 1; z-index: 1; }
.track-dot {
    width: 20px; height: 20px; border-radius: 50%; background: #E5E0D8;
    display: block; margin: 0 auto 8px; border: 3px solid #fff;
}
.track-step.is-done .track-dot { background: var(--color-sage); }
.track-label { font-size: 11px; color: var(--color-ink-soft); display: block; }
.track-step.is-done .track-label { color: var(--color-primary); font-weight: 600; }
.track-cancelled { text-align: center; color: #C0392B; font-weight: 600; padding: 20px; }

.related-section { padding: 20px 0 60px; }

@media (max-width: 900px) {
    .cart-layout, .checkout-layout { grid-template-columns: 1fr; }
    .cart-summary, .checkout-summary { position: static; }
    .cart-line { grid-template-columns: 68px 1fr auto; gap: 12px; }
    .cart-line-image { width: 68px; height: 68px; }
    .cart-qty-form { grid-column: 2 / 4; }
    .cart-line-total { grid-column: 2; }
    .page-heading { font-size: 26px; }
    .success-card { padding: 28px 20px; }
    .onb-value { font-size: 22px; }
}

/* ═══════════════════════════════════════════════════
   الهوية البصرية الجديدة: لوغو، بحث، سلايدر، فوتر، أنيميشن
   ═══════════════════════════════════════════════════ */

/* ---------- الهيدر ---------- */
.header-inner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 24px;
    align-items: center;
}

.logo { display: flex; flex-direction: column; gap: 2px; text-decoration: none; }
.logo-img { height: 46px; width: auto; display: block; }
.logo-tagline {
    font-size: 10px; letter-spacing: 2.5px;
    color: var(--color-gold-soft); text-align: center;
}

/* ---------- البحث ---------- */
.header-search { display: flex; max-width: 380px; width: 100%; }
.header-search input {
    flex: 1; min-width: 0;
    padding: 10px 16px;
    border: 1.5px solid rgba(255,255,255,0.22);
    border-radius: 999px 0 0 999px;
    background: rgba(255,255,255,0.1);
    color: #fff; font-family: inherit; font-size: 14px;
}
.header-search input::placeholder { color: rgba(255,255,255,0.55); }
.header-search input:focus {
    outline: none;
    border-color: var(--color-gold);
    background: rgba(255,255,255,0.16);
}
.header-search button {
    padding: 0 18px;
    border: 1.5px solid var(--color-gold);
    border-radius: 0 999px 999px 0;
    background: var(--color-gold);
    color: var(--color-primary);
    cursor: pointer; display: flex; align-items: center;
    transition: background 0.15s;
}
.header-search button:hover { background: #B8912A; }

/* ---------- سلايدر البطل ---------- */
.hero-slider { position: relative; overflow: hidden; background: var(--color-primary); }
.hero-track { display: flex; transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1); }
.hero-slide { min-width: 100%; }

.hero-slide-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 44px;
    align-items: center;
    padding: 52px 0 60px;
}

.hero-slide-media {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    background: rgba(255,255,255,0.06);
}
.hero-slide-media > img { width: 100%; height: 100%; object-fit: cover; }

.hero-media-collage { display: flex; height: 100%; gap: 3px; }
.hero-media-collage img { flex: 1; min-width: 0; height: 100%; object-fit: cover; }

.hero-save {
    position: absolute; top: 16px; inset-inline-start: 16px;
    background: var(--color-gold); color: var(--color-primary);
    font-size: 14px; font-weight: 700; padding: 7px 18px; border-radius: 999px;
    box-shadow: 0 6px 18px -6px rgba(0,0,0,0.5);
}

.hero-slide-text { color: #fff; }
.hero-slide-text .hero-eyebrow { color: var(--color-gold); letter-spacing: 3px; font-size: 12px; margin: 0 0 8px; }
.hero-slide-text .hero-title {
    font-family: var(--font-display); font-size: 40px;
    color: #fff; margin: 0 0 10px; line-height: 1.25;
}
.hero-slide-text .hero-subtitle { color: rgba(255,255,255,0.78); font-size: 16px; margin: 0 0 18px; }

.hero-includes { list-style: none; padding: 0; margin: 0 0 20px; }
.hero-includes li {
    font-size: 14px; color: rgba(255,255,255,0.85);
    padding: 5px 0 5px 0; padding-inline-start: 22px; position: relative;
}
.hero-includes li::before {
    content: "✓"; position: absolute; inset-inline-start: 0;
    color: var(--color-gold); font-weight: 700;
}

.hero-price { display: flex; align-items: baseline; gap: 14px; margin: 0 0 22px; flex-wrap: wrap; }
.hero-price-now { font-size: 34px; font-weight: 700; color: var(--color-gold); }
.hero-price-was { font-size: 17px; color: rgba(255,255,255,0.5); text-decoration: line-through; }

.btn-hero { font-size: 16px; padding: 14px 38px; }

.hero-controls {
    display: flex; align-items: center; justify-content: center; gap: 16px;
    padding-bottom: 22px;
}
.hero-arrow {
    width: 40px; height: 40px; border-radius: 50%;
    border: 1.5px solid rgba(255,255,255,0.3); background: transparent;
    color: #fff; font-size: 24px; line-height: 1; cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}
.hero-arrow:hover { background: rgba(255,255,255,0.14); border-color: var(--color-gold); }

.hero-dots { display: flex; gap: 8px; }
.hero-dot {
    width: 9px; height: 9px; border-radius: 50%; padding: 0;
    border: none; background: rgba(255,255,255,0.32); cursor: pointer;
    transition: background 0.2s, width 0.2s;
}
.hero-dot.is-active { background: var(--color-gold); width: 26px; border-radius: 999px; }

/* ---------- شريط الثقة ---------- */
.trust-bar { background: #FBF8F2; border-bottom: 1px solid var(--color-gold-soft); }
.trust-row {
    display: flex; justify-content: center; flex-wrap: wrap;
    gap: 12px 40px; list-style: none; padding: 14px 0; margin: 0;
}
.trust-row li { font-size: 13px; color: var(--color-primary); font-weight: 500; }

/* ---------- التصنيفات ---------- */
.categories-section, .strip-section { padding: 46px 0; }

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 18px;
}

.category-card {
    text-decoration: none; text-align: center; display: block;
    transition: transform 0.2s ease;
}
.category-card:hover { transform: translateY(-4px); }

.category-card-image {
    aspect-ratio: 1 / 1; border-radius: 50%; overflow: hidden;
    background: linear-gradient(140deg, #F4F1EA, #E8DFD0);
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 10px;
    border: 2px solid transparent;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.category-card:hover .category-card-image {
    border-color: var(--color-gold);
    box-shadow: 0 10px 26px -12px rgba(46,26,71,0.45);
}
.category-card-image img { width: 100%; height: 100%; object-fit: cover; }
.category-mono {
    font-family: var(--font-display); font-size: 34px; color: var(--color-primary); opacity: 0.4;
}
.category-card-name {
    font-size: 14px; font-weight: 600; color: var(--color-primary); display: block;
}

.section-head-row { display: flex; justify-content: space-between; align-items: flex-end; text-align: right; }
.product-card-cat {
    font-size: 11px; color: var(--color-gold); font-weight: 600;
    letter-spacing: 0.5px; display: block; margin-bottom: 3px;
}

/* ---------- الفوتر ---------- */
.site-footer { background: var(--color-primary); color: #D9D2E6; margin-top: 60px; }

.footer-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr 1.2fr;
    gap: 40px;
    padding: 52px 0 40px;
}

.footer-logo { height: 52px; width: auto; display: block; margin-bottom: 6px; }
.footer-tagline {
    font-size: 10px; letter-spacing: 2.5px; color: var(--color-gold-soft);
    margin: 0 0 14px;
}
.footer-about { font-size: 13px; line-height: 1.9; color: rgba(255,255,255,0.62); margin: 0; }

.footer-heading {
    font-size: 14px; color: var(--color-gold); margin: 0 0 16px;
    font-weight: 700; letter-spacing: 0.5px;
}
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 10px; font-size: 13px; }
.footer-links a { color: rgba(255,255,255,0.7); text-decoration: none; transition: color 0.15s; }
.footer-links a:hover { color: var(--color-gold); }

.footer-contact li { display: flex; align-items: center; gap: 9px; color: rgba(255,255,255,0.7); }
.footer-payment { font-size: 13px; }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 18px 0;
    text-align: center;
}
.footer-bottom p { margin: 0; font-size: 12px; color: rgba(255,255,255,0.45); }

/* ---------- صفحات ثابتة ---------- */
.static-page { padding: 44px 0 60px; }
.page-content { line-height: 1.95; color: #4a4a4a; font-size: 15px; }
.page-content .lead { font-size: 18px; color: var(--color-primary); margin-bottom: 24px; }
.page-content h2 {
    font-family: var(--font-display); font-size: 22px;
    color: var(--color-primary); margin: 32px 0 12px;
}
.page-content ul, .page-content ol { padding-inline-start: 22px; }
.page-content li { margin-bottom: 8px; }
.page-cta {
    background: #FBF8F2; border: 1.5px solid var(--color-gold-soft);
    border-radius: var(--radius-lg); padding: 24px; text-align: center; margin-top: 36px;
}
.page-cta p { margin: 0 0 14px; }

/* ---------- البحث ---------- */
.search-page { padding: 40px 0 60px; }
.search-count { color: var(--color-ink-soft); font-size: 14px; margin: -18px 0 22px; }
.search-page-form { display: flex; gap: 10px; margin-bottom: 32px; max-width: 560px; }
.search-page-form input {
    flex: 1; padding: 12px 18px; border: 1.5px solid #E0DAD2;
    border-radius: 999px; font-family: inherit; font-size: 15px;
}
.search-page-form input:focus { outline: none; border-color: var(--color-primary); }
.empty-state { text-align: center; padding: 50px 20px; }
.empty-state .btn-primary { margin-top: 16px; }

/* ═══════════════ الأنيميشن ═══════════════ */

/* ظهور تدريجي عند التمرير */
.reveal { opacity: 0; transform: translateY(28px); }
.reveal.is-visible {
    opacity: 1; transform: none;
    transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.2, 0.7, 0.3, 1);
}

/* بطاقات المنتجات: ارتفاع ناعم */
.product-card {
    transition: transform 0.22s cubic-bezier(0.2, 0.7, 0.3, 1), box-shadow 0.22s ease;
}
.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px -20px rgba(46, 26, 71, 0.4);
}
.product-card-image img { transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.3, 1); }
.product-card:hover .product-card-image img { transform: scale(1.07); }

/* الأزرار */
.btn-primary { transition: transform 0.12s ease, box-shadow 0.2s ease, background 0.15s ease; }
.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px -12px rgba(46, 26, 71, 0.6);
}
.btn-primary:active:not(:disabled) { transform: translateY(0); }

/* عدّاد السلة ينبض كي تزيد حاجة */
@keyframes cartPop {
    0% { transform: scale(1); }
    45% { transform: scale(1.45); }
    100% { transform: scale(1); }
}
.cart-count.has-items { animation: cartPop 0.4s ease; }

/* رسائل flash تنزلق */
@keyframes flashIn {
    from { opacity: 0; transform: translateY(-12px); }
    to { opacity: 1; transform: none; }
}
.flash { animation: flashIn 0.32s ease; }

/* ♿ نحترم إعداد النظام: واحد عندو حساسية للحركة ما يشوفش أنيميشن */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    .reveal { opacity: 1; transform: none; }
}

/* ---------- موبايل ---------- */
@media (max-width: 980px) {
    .header-inner { grid-template-columns: auto auto; grid-template-areas: "logo nav" "search search"; }
    .logo { grid-area: logo; }
    .header-nav { grid-area: nav; }
    .header-search { grid-area: search; max-width: 100%; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
    .hero-slide-inner { grid-template-columns: 1fr; gap: 24px; padding: 32px 0 40px; }
    .hero-slide-text .hero-title { font-size: 28px; }
    .hero-price-now { font-size: 27px; }
    .hero-slide-media { aspect-ratio: 16 / 10; }
}

@media (max-width: 560px) {
    .footer-grid { grid-template-columns: 1fr; }
    .logo-img { height: 38px; }
    .trust-row { gap: 10px 20px; font-size: 12px; }
    .categories-grid { grid-template-columns: repeat(auto-fit, minmax(105px, 1fr)); gap: 12px; }
    .section-heading { font-size: 22px; }
}

/* ═══════════ تصحيحات: البحث، الشعار الفرعي، الفوتر ═══════════ */

:root { --font-tagline: "Tajawal", "IBM Plex Sans Arabic", sans-serif; }

/* ---------- الشعار الفرعي بخط Tajawal ---------- */
.logo-tagline {
    font-family: var(--font-tagline);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 3px;
    color: var(--color-gold-soft);
    text-align: center;
    opacity: 0.9;
}

/* ---------- البحث: تناسق كامل بين الحقل والزر ---------- */
.header-search {
    display: flex;
    align-items: stretch;      /* الزر والحقل بنفس الارتفاع بالضبط */
    max-width: 420px;
    width: 100%;
    height: 44px;
}

.header-search input {
    flex: 1;
    min-width: 0;
    height: 100%;
    padding: 0 18px;
    border: 1.5px solid rgba(255,255,255,0.22);
    border-inline-end: none;                 /* ما نكرروش الحدود بين الحقل والزر */
    border-radius: 999px 0 0 999px;
    background: rgba(255,255,255,0.1);
    color: #fff;
    font-family: inherit;
    font-size: 14px;
    transition: background 0.15s, border-color 0.15s;
}

.header-search input::placeholder { color: rgba(255,255,255,0.5); }

.header-search input:focus {
    outline: none;
    background: rgba(255,255,255,0.16);
    border-color: var(--color-gold);
}

.header-search button {
    height: 100%;
    width: 52px;
    flex-shrink: 0;
    padding: 0;
    border: 1.5px solid var(--color-gold);
    border-radius: 0 999px 999px 0;
    background: var(--color-gold);
    color: var(--color-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}

.header-search button:hover { background: #DBB13A; }
.header-search button svg { display: block; }

/* كي المستخدم يكتب، الحدود كلها تولّي ذهبية — يبان كوحدة واحدة */
.header-search:focus-within input { border-color: var(--color-gold); }

/* ---------- الفوتر: العنوان ملتصق بالسطر تحتو ---------- */
.footer-intro {
    background: rgba(0,0,0,0.16);
    padding: 26px 0 22px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.footer-intro-title {
    font-family: var(--font-display);
    font-size: 24px;
    color: var(--color-gold-soft);
    margin: 0 0 4px;              /* فراغ صغير فقط بين العنوان والسطر */
    line-height: 1.3;
}

.footer-intro-sub {
    font-family: var(--font-tagline);
    font-size: 13px;
    color: rgba(255,255,255,0.72);
    margin: 0;
}

/* نص "من نحن" فالفوتر: كان باهت وبخط رفيع — دابا أوضح */
.footer-about {
    font-family: var(--font-tagline);
    font-size: 13.5px;
    font-weight: 500;
    line-height: 2;
    color: rgba(255,255,255,0.82);
    margin: 0;
}

.footer-tagline {
    font-family: var(--font-tagline);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 3px;
    color: var(--color-gold-soft);
    margin: 0 0 14px;
}

/* البطل بلا عروض: زر واضح */
.hero-inner .btn-hero { margin-top: 22px; display: inline-block; }

/* ═══════════ معرض ملء الشاشة (Lightbox) ═══════════ */

.product-gallery-main { cursor: zoom-in; }

.zoom-hint {
    position: absolute;
    bottom: 14px;
    inset-inline-end: 14px;
    width: 40px; height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(46, 26, 71, 0.82);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    opacity: 0; transform: scale(0.85);
    transition: opacity 0.2s, transform 0.2s, background 0.15s;
    pointer-events: none;   /* النقر يمر للصورة تحت */
}
.product-gallery-main:hover .zoom-hint { opacity: 1; transform: scale(1); }

/* فالهاتف ما كاينش hover — نخليه بادي دائمًا */
@media (hover: none) {
    .zoom-hint { opacity: 1; transform: scale(1); }
}

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(18, 10, 30, 0.96);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    animation: lightboxIn 0.22s ease;
}
.lightbox[hidden] { display: none; }

@keyframes lightboxIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.lightbox-stage {
    flex: 1;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 70px 10px;
    min-height: 0;         /* مهم: يخلي الصورة تحترم ارتفاع الحاوية */
}

.lightbox-stage img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    animation: lightboxImgIn 0.25s ease;
}

@keyframes lightboxImgIn {
    from { opacity: 0; transform: scale(0.97); }
    to { opacity: 1; transform: none; }
}

.lightbox-close {
    position: absolute;
    top: 16px; inset-inline-end: 20px;
    width: 44px; height: 44px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.12);
    color: #fff;
    font-size: 30px; line-height: 1;
    cursor: pointer;
    transition: background 0.15s;
    z-index: 2;
}
.lightbox-close:hover { background: rgba(255,255,255,0.24); }

.lightbox-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 52px; height: 52px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.12);
    color: #fff;
    font-size: 34px; line-height: 1;
    cursor: pointer;
    transition: background 0.15s;
    z-index: 2;
}
.lightbox-arrow:hover { background: var(--color-gold); color: var(--color-primary); }
.lightbox-prev { inset-inline-end: 16px; }   /* فـRTL: "السابقة" على اليمين */
.lightbox-next { inset-inline-start: 16px; }

.lightbox-counter {
    color: rgba(255,255,255,0.7);
    font-size: 14px;
    padding: 6px 0 10px;
    font-family: var(--font-tagline);
}

.lightbox-thumbs {
    display: flex;
    gap: 8px;
    padding: 0 20px 22px;
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: thin;
}

.lightbox-thumb {
    width: 62px; height: 62px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid transparent;
    padding: 0;
    background: rgba(255,255,255,0.08);
    cursor: pointer;
    opacity: 0.55;
    transition: opacity 0.15s, border-color 0.15s;
}
.lightbox-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lightbox-thumb:hover { opacity: 0.85; }
.lightbox-thumb.is-active { opacity: 1; border-color: var(--color-gold); }

@media (max-width: 640px) {
    .lightbox-stage { padding: 56px 12px 8px; }
    .lightbox-arrow { width: 42px; height: 42px; font-size: 27px; }
    .lightbox-prev { inset-inline-end: 8px; }
    .lightbox-next { inset-inline-start: 8px; }
    .lightbox-thumb { width: 50px; height: 50px; }
}

/* ═══════════ أزرار الصور فلوحة التحكم ═══════════ */

.image-item { position: relative; }

.image-item.is-main {
    border-color: var(--color-gold, #C9A227);
    box-shadow: 0 0 0 2px rgba(201, 162, 39, 0.35);
}

.image-item-actions {
    position: absolute;
    top: 4px; inset-inline-start: 4px;
    display: flex; gap: 4px;
    opacity: 0;
    transition: opacity 0.15s;
}
.image-item:hover .image-item-actions { opacity: 1; }

/* فالهاتف: بادية دائمًا */
@media (hover: none) {
    .image-item-actions { opacity: 1; }
}

.image-item-actions form { margin: 0; }

.img-btn {
    width: 26px; height: 26px;
    border-radius: 6px;
    border: none;
    color: #fff;
    font-size: 15px; line-height: 1;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}
.img-btn-main { background: #C9A227; color: #2E1A47; }
.img-btn-main:hover { background: #DBB13A; }
.img-btn-del { background: #C0392B; font-size: 19px; }
.img-btn-del:hover { background: #A03024; }

.image-main-tag {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: rgba(201, 162, 39, 0.92);
    color: #2E1A47;
    font-size: 10px; font-weight: 700;
    text-align: center; padding: 3px;
}

/* ═══════════ تناسق الحاسوب والهاتف ═══════════ */

/* شبكة موحّدة لكل صفحات المنتجات — بدل قيم مختلفة فكل قسم */
.product-grid,
.offer-items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 22px;
}

/* ---------- تابلت ---------- */
@media (max-width: 1024px) {
    .container { padding-inline: 20px; }
    .product-grid, .offer-items-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px; }
    .categories-grid { grid-template-columns: repeat(auto-fit, minmax(125px, 1fr)); }
}

/* ---------- الهاتف: منتجين فالسطر ---------- */
@media (max-width: 700px) {
    .container { padding-inline: 14px; }

    .product-grid, .offer-items-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .product-card-body { padding: 12px 10px 14px; }
    .product-card-name { font-size: 13.5px; line-height: 1.5; }
    .product-card-price { font-size: 15px; }
    .product-card-cat { font-size: 10px; }
    .price-compare { font-size: 11px; display: block; margin: 2px 0 0; }

    .badge-offer, .badge-out { font-size: 10px; padding: 3px 8px; }

    /* الأقسام: مسافات أصغر باش الشاشة تسع أكثر */
    .categories-section, .strip-section, .offers-section, .product-grid-section {
        padding: 28px 0;
    }
    .section-heading { font-size: 21px; }
    .section-sub { font-size: 13px; }
    .section-head { margin-bottom: 18px; }

    /* البطل */
    .hero-slide-text .hero-title { font-size: 24px; }
    .hero-slide-text .hero-subtitle { font-size: 14px; }
    .hero-includes li { font-size: 13px; }
    .hero-price-now { font-size: 24px; }
    .btn-hero { width: 100%; text-align: center; }

    /* التصنيفات: 3 فالسطر */
    .categories-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
    .category-card-name { font-size: 12px; }

    /* صفحة المنتج */
    .product-detail-inner { gap: 20px; }
    .product-detail-name { font-size: 22px; }
    .product-detail-price { font-size: 24px; }

    /* الفوتر */
    .footer-intro-title { font-size: 19px; }
    .footer-intro-sub { font-size: 12px; }
    .footer-grid { padding: 32px 0 26px; gap: 26px; }
    .footer-logo { height: 44px; }

    /* شريط الثقة: نقاط أصغر */
    .trust-row { gap: 8px 16px; padding: 11px 0; }
    .trust-row li { font-size: 11.5px; }
}

/* ---------- هاتف صغير ---------- */
@media (max-width: 380px) {
    .product-grid, .offer-items-grid { gap: 10px; }
    .product-card-name { font-size: 12.5px; }
    .categories-grid { grid-template-columns: repeat(2, 1fr); }
    .header-search { height: 40px; }
    .header-search input { font-size: 13px; padding: 0 14px; }
}

/* الصور فكل مكان: نسبة موحّدة، ما تتشوّهش */
.product-card-image {
    aspect-ratio: 1 / 1;
    overflow: hidden;
    position: relative;
    background: #F4F1EA;
}
.product-card-image img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* عناوين المنتجات: سطرين كحد أقصى، باش البطاقات يبقاو بنفس الطول */
.product-card-name {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.9em;
}

/* البطاقات: توزيع متساوٍ للارتفاع */
.product-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}
.product-card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}
.product-card-price { margin-top: auto; }

/* ═══════════ ميزات الزبون ═══════════ */

/* ---------- زر واتساب عائم ---------- */
.wa-float {
    position: fixed;
    bottom: 22px;
    inset-inline-start: 22px;
    z-index: 900;
    display: flex;
    align-items: center;
    gap: 0;
    height: 56px;
    padding: 0 16px;
    border-radius: 999px;
    background: #25D366;
    color: #fff;
    text-decoration: none;
    box-shadow: 0 8px 24px -8px rgba(37, 211, 102, 0.7);
    transition: gap 0.25s ease, padding 0.25s ease, transform 0.15s ease;
    overflow: hidden;
}

.wa-float:hover { transform: translateY(-3px); gap: 9px; padding-inline-end: 22px; }

.wa-float-label {
    font-size: 15px;
    font-weight: 600;
    max-width: 0;
    opacity: 0;
    white-space: nowrap;
    transition: max-width 0.25s ease, opacity 0.2s ease;
}
.wa-float:hover .wa-float-label { max-width: 90px; opacity: 1; }

/* نبضة خفيفة تلفت الانتباه أول ما تفتح الصفحة، وتوقف بعد */
@keyframes waPulse {
    0%, 100% { box-shadow: 0 8px 24px -8px rgba(37, 211, 102, 0.7); }
    50% { box-shadow: 0 8px 24px -8px rgba(37, 211, 102, 0.7), 0 0 0 12px rgba(37, 211, 102, 0.16); }
}
.wa-float { animation: waPulse 2.4s ease-in-out 3; }

@media (max-width: 640px) {
    .wa-float { bottom: 16px; inset-inline-start: 16px; height: 52px; padding: 0 14px; }
    .wa-float-label { display: none; }
}

/* ---------- أزرار الكمية ---------- */
.qty-stepper {
    display: inline-flex;
    align-items: stretch;
    border: 1.5px solid #E0DAD2;
    border-radius: 10px;
    overflow: hidden;
    height: 44px;
}

.qty-btn {
    width: 42px;
    border: none;
    background: #F7F4EE;
    color: var(--color-primary);
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.12s;
}
.qty-btn:hover { background: var(--color-gold-soft); }
.qty-btn:active { background: var(--color-gold); }

.qty-stepper input {
    width: 60px;
    border: none;
    border-inline: 1.5px solid #E0DAD2;
    text-align: center;
    font-family: inherit;
    font-size: 16px;
    font-weight: 600;
    color: var(--color-primary);
    -moz-appearance: textfield;
}
.qty-stepper input::-webkit-outer-spin-button,
.qty-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty-stepper input:focus { outline: none; background: #FBF8F2; }

/* ---------- مشاركة المنتج ---------- */
.share-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin: 20px 0;
    padding-top: 18px;
    border-top: 1px solid #EDE9E2;
}
.share-label { font-size: 13px; color: var(--color-ink-soft); }

.share-btn {
    padding: 7px 14px;
    border-radius: 999px;
    border: 1.5px solid #E0DAD2;
    background: #fff;
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--color-primary);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s;
}
.share-btn:hover { border-color: var(--color-primary); background: #FBF8F2; }
.share-wa:hover { border-color: #25D366; color: #128C4A; }
.share-fb:hover { border-color: #1877F2; color: #1877F2; }
.share-copy.is-copied { background: #DFF3E7; border-color: #2E7D53; color: #2E7D53; }

/* ---------- أسئلة شائعة ---------- */
.product-faq {
    border: 1.5px solid #EDE9E2;
    border-radius: 12px;
    padding: 0;
    margin: 18px 0;
    background: #FDFCFA;
}

.product-faq summary {
    padding: 14px 18px;
    cursor: pointer;
    font-weight: 600;
    color: var(--color-primary);
    font-size: 14.5px;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.product-faq summary::-webkit-details-marker { display: none; }
.product-faq summary::after {
    content: "+";
    font-size: 20px;
    color: var(--color-gold);
    transition: transform 0.2s;
}
.product-faq[open] summary::after { transform: rotate(45deg); }

.product-faq dl { margin: 0; padding: 0 18px 16px; }
.product-faq dt {
    font-weight: 600;
    font-size: 13.5px;
    color: var(--color-primary);
    margin-top: 14px;
}
.product-faq dd {
    margin: 5px 0 0;
    font-size: 13.5px;
    line-height: 1.8;
    color: #5a5a5a;
}
.product-faq a { color: var(--color-primary); }

/* ---------- نسخ رقم الطلبية ---------- */
.onb-row { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 4px 0; }

.onb-copy {
    padding: 6px 14px;
    border-radius: 8px;
    border: 1.5px solid var(--color-primary);
    background: #fff;
    color: var(--color-primary);
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}
.onb-copy:hover { background: var(--color-primary); color: #fff; }
.onb-copy.is-copied { background: #DFF3E7; border-color: #2E7D53; color: #2E7D53; }

/* ---------- مؤقّت العرض ---------- */
.offer-countdown {
    background: #FFF6E5;
    border: 1.5px solid var(--color-gold-soft);
    border-radius: 12px;
    padding: 14px 18px;
    margin: 0 0 18px;
    text-align: center;
}
.countdown-label { display: block; font-size: 13px; color: #8A6D0F; margin-bottom: 10px; font-weight: 600; }
.countdown-units { display: flex; justify-content: center; gap: 20px; }

.cd-unit { display: flex; flex-direction: column; align-items: center; min-width: 48px; }
.cd-unit b {
    font-size: 26px;
    font-weight: 700;
    color: var(--color-primary);
    line-height: 1.1;
    font-variant-numeric: tabular-nums;   /* الأرقام ما ترقصش كي تتبدّل */
}
.cd-unit i { font-style: normal; font-size: 11px; color: var(--color-ink-soft); margin-top: 2px; }
.countdown-ended { color: #C0392B; font-weight: 600; font-size: 14px; }

/* ---------- شفتها مؤخرًا ---------- */
.recently-viewed[hidden] { display: none; }
.btn-clear-recent {
    background: none;
    border: none;
    color: var(--color-ink-soft);
    font-family: inherit;
    font-size: 13px;
    cursor: pointer;
    text-decoration: underline;
    padding: 4px;
}
.btn-clear-recent:hover { color: var(--color-primary); }

/* ═══════════ التقييمات والاقتراحات (واجهة الزبون) ═══════════ */

.reviews-section { padding: 40px 0; background: #FBF8F2; }
.reviews-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 20px; }
.reviews-head .section-heading { margin: 0; }

.rating-summary { display: flex; align-items: center; gap: 8px; }
.rating-stars { color: var(--color-gold); font-size: 20px; letter-spacing: 2px; }
.rating-value { font-weight: 700; color: var(--color-primary); font-size: 17px; }
.rating-count { color: var(--color-ink-soft); font-size: 13px; }

.reviews-list { list-style: none; padding: 0; margin: 0 0 22px; }
.review-item {
    background: #fff; border: 1px solid #EDE9E2;
    border-radius: 12px; padding: 16px 18px; margin-bottom: 12px;
}
.review-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.review-author { color: var(--color-primary); font-size: 14.5px; }
.review-stars { color: var(--color-gold); font-size: 15px; letter-spacing: 1px; }
.review-comment { margin: 8px 0 6px; font-size: 14px; line-height: 1.8; color: #4a4a4a; }
.review-date { font-size: 11.5px; color: var(--color-ink-soft); }
.hint-muted { color: var(--color-ink-soft); font-size: 14px; margin-bottom: 20px; }

.review-form-box {
    background: #fff; border: 1.5px solid #EDE9E2;
    border-radius: 12px; overflow: hidden;
}
.review-form-box summary {
    padding: 14px 18px; cursor: pointer; font-weight: 600;
    color: var(--color-primary); list-style: none;
}
.review-form-box summary::-webkit-details-marker { display: none; }
.review-form-box summary::before { content: "✎ "; color: var(--color-gold); }
.review-form { padding: 0 18px 18px; }

/* منتقي النجوم — الترتيب معكوس فالـHTML باش الـCSS يخدم بـ~ */
.star-picker { display: inline-flex; flex-direction: row-reverse; gap: 4px; }
.star-picker input { display: none; }
.star-picker label {
    font-size: 30px; color: #DDD6C9; cursor: pointer;
    transition: color 0.12s; line-height: 1;
}
.star-picker label:hover,
.star-picker label:hover ~ label,
.star-picker input:checked ~ label { color: var(--color-gold); }

/* ---------- الاقتراحات فالسلة ---------- */
.upsell-box {
    background: #FFFCF4; border: 1.5px solid var(--color-gold-soft);
    border-radius: var(--radius-lg); padding: 18px; margin-top: 16px;
}
.upsell-title { font-size: 15px; color: var(--color-primary); margin: 0 0 14px; }

.upsell-item {
    display: grid; grid-template-columns: 56px 1fr auto;
    gap: 12px; align-items: center;
    padding: 10px 0; border-bottom: 1px dashed var(--color-gold-soft);
}
.upsell-item:last-child { border-bottom: none; }

.upsell-image {
    width: 56px; height: 56px; border-radius: 9px; overflow: hidden;
    background: #F4F1EA; display: flex; align-items: center; justify-content: center;
}
.upsell-image img { width: 100%; height: 100%; object-fit: cover; }

.upsell-name {
    font-size: 13.5px; font-weight: 600; color: var(--color-primary);
    text-decoration: none; display: block; line-height: 1.5;
}
.upsell-name:hover { text-decoration: underline; }
.upsell-price { margin: 3px 0 0; font-size: 13.5px; font-weight: 700; color: var(--color-primary); }
.upsell-was { font-size: 11.5px; color: #9a9a9a; text-decoration: line-through; font-weight: 400; margin-inline-start: 5px; }
.upsell-badge {
    background: var(--color-gold); color: var(--color-primary);
    font-size: 10px; font-weight: 700; padding: 1px 7px;
    border-radius: 999px; margin-inline-start: 4px;
}

@media (max-width: 700px) {
    .upsell-item { grid-template-columns: 48px 1fr auto; gap: 9px; }
    .upsell-image { width: 48px; height: 48px; }
    .upsell-name { font-size: 12.5px; }
    .star-picker label { font-size: 26px; }
}

/* ═══════════ حاسبة الكمية ═══════════ */

.calc-box {
    background: linear-gradient(140deg, #FBF8F2, #FFF9EC);
    border: 1.5px solid var(--color-gold-soft);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin: 20px 0;
}

.calc-title { font-size: 16px; color: var(--color-primary); margin: 0 0 4px; }
.calc-hint { font-size: 13px; color: var(--color-ink-soft); margin: 0 0 16px; }

.calc-shapes { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.shape-btn {
    flex: 1; min-width: 90px;
    padding: 10px 8px;
    border: 1.5px solid #E0DAD2;
    border-radius: 10px;
    background: #fff;
    font-family: inherit; font-size: 13px; font-weight: 600;
    color: var(--color-primary);
    cursor: pointer;
    transition: all 0.15s;
}
.shape-btn:hover { border-color: var(--color-primary-light); }
.shape-btn.is-active {
    background: var(--color-primary); border-color: var(--color-primary); color: #fff;
}

.calc-fields { display: flex; gap: 10px; flex-wrap: wrap; }
.calc-field { flex: 1; min-width: 110px; display: block; margin-bottom: 12px; }
.calc-field > span {
    display: block; font-size: 12px; font-weight: 600;
    color: var(--color-primary); margin-bottom: 5px;
}
.calc-field input {
    width: 100%; padding: 10px 12px;
    border: 1.5px solid #E0DAD2; border-radius: 9px;
    font-family: inherit; font-size: 15px; background: #fff;
}
.calc-field input:focus {
    outline: none; border-color: var(--color-gold);
    box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.15);
}
.calc-field-sm { max-width: 80px; flex: 0 0 80px; }

.surface-row {
    display: flex; gap: 8px; align-items: flex-end;
    padding: 10px; background: rgba(255,255,255,0.6);
    border-radius: 10px; margin-bottom: 8px; position: relative;
}
.btn-remove-surface {
    width: 28px; height: 28px; border-radius: 7px; border: none;
    background: #FBE3E0; color: #C0392B; font-size: 17px;
    cursor: pointer; flex-shrink: 0; margin-bottom: 12px;
}
.btn-add-surface {
    background: none; border: 1.5px dashed var(--color-gold);
    color: var(--color-primary); padding: 9px 16px; border-radius: 9px;
    font-family: inherit; font-size: 13px; cursor: pointer;
    width: 100%; margin-bottom: 12px;
}
.btn-add-surface:hover { background: rgba(201,162,39,0.08); }

.btn-calc {
    width: 100%; padding: 13px;
    background: var(--color-gold); color: var(--color-primary);
    border: none; border-radius: 10px;
    font-family: inherit; font-size: 15px; font-weight: 700;
    cursor: pointer; transition: background 0.15s, transform 0.1s;
}
.btn-calc:hover { background: #DBB13A; transform: translateY(-1px); }

.calc-result {
    margin-top: 14px; padding: 16px;
    border-radius: 10px; font-size: 14px;
    background: #fff; border: 1.5px solid #E0DAD2;
}
.calc-result.is-success { border-color: #2E7D53; background: #F3FBF6; }
.calc-result.is-error { border-color: #C0392B; background: #FEF6F5; color: #C0392B; }

.cr-main { font-size: 19px; color: var(--color-primary); margin: 0 0 8px; }
.cr-main strong { color: #2E7D53; font-size: 23px; }
.cr-detail { font-size: 13px; color: var(--color-ink-soft); margin: 3px 0; }
.cr-highlight {
    margin: 12px 0 0; padding-top: 12px;
    border-top: 1px dashed #D5CEC2;
    font-size: 15px; color: var(--color-primary);
}
.cr-highlight strong { color: var(--color-gold); font-size: 19px; }
.cr-list { margin: 8px 0; padding-inline-start: 20px; font-size: 13px; color: var(--color-ink-soft); }

@media (max-width: 640px) {
    .calc-fields { flex-direction: column; }
    .surface-row { flex-wrap: wrap; }
    .calc-field-sm { max-width: 100%; flex: 1; }
}

/* ════════════════════════════════════════════════════════════
   تحديثات v15
   ════════════════════════════════════════════════════════════ */

/* ---------- 1) الخط: بدّلنا Aref Ruqaa بـTajawal فكل العناوين ----------
   السبب: Aref Ruqaa خط خطاطة، جميل لكن صعب القراءة فالعناوين الطويلة
   وخصوصًا على شاشة الهاتف. Tajawal واضح ومازال أنيق. */
:root {
    --font-display: "Tajawal", "IBM Plex Sans Arabic", sans-serif;
}
.hero-title,
.section-heading,
.footer-intro-title,
.footer-heading,
.success-title {
    font-weight: 800;
    letter-spacing: -0.2px;
}

/* ---------- 2) شريط البحث: قطعة واحدة متناسقة ----------
   المشكلة القديمة: نصف قطر الزوايا ما كانش يتقلب مع RTL، فجهة تبان دائرية
   والجهة الأخرى قائمة. الحل: غلاف واحد دائري، والزر دائرة داخلو. */
.header-search {
    position: relative;
    align-items: center;
    height: 46px;
    padding: 0;
    background: rgba(255, 255, 255, 0.1);
    border: 1.5px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    overflow: hidden;
    transition: background 0.15s, border-color 0.15s;
}
.header-search:focus-within {
    background: rgba(255, 255, 255, 0.16);
    border-color: var(--color-gold);
}
.header-search input {
    height: 100%;
    padding: 0 20px;
    background: transparent;
    border: none;
    border-radius: 0;
}
.header-search input:focus {
    outline: none;
    background: transparent;
    border-color: transparent;
}
.header-search button {
    width: 38px;
    height: 38px;
    margin-inline-end: 4px;
    border: none;
    border-radius: 50%;
    background: var(--color-gold);
    color: var(--color-primary);
}

/* ---------- 3) التصنيفات: بطاقات أفقية ----------
   بدل دوائر كبيرة فوسط الصفحة، ولّت بطاقات صف-صف: صورة صغيرة + الاسم
   جنبها. أسهل للقراءة، والأسماء الطويلة ما تتقصّش. */
.categories-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
}
.category-card {
    display: flex;
    align-items: center;
    gap: 14px;
    text-align: start;
    padding: 10px 14px 10px 10px;
    background: var(--color-surface);
    border: 1.5px solid var(--color-border);
    border-radius: 999px;
    transition: transform 0.15s ease, border-color 0.15s, box-shadow 0.15s;
}
.category-card:hover {
    transform: translateY(-2px);
    border-color: var(--color-gold);
    box-shadow: 0 10px 24px -14px rgba(46, 26, 71, 0.5);
}
.category-card-image {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    aspect-ratio: auto;
    margin-bottom: 0;
    border: none;
}
.category-card:hover .category-card-image {
    border: none;
    box-shadow: none;
}
.category-card-name {
    flex: 1;
    font-size: 14.5px;
    font-weight: 600;
    line-height: 1.4;
}
.category-card-arrow {
    color: var(--color-gold);
    font-size: 24px;
    line-height: 1;
    opacity: 0.65;
    transition: transform 0.15s, opacity 0.15s;
}
.category-card:hover .category-card-arrow {
    opacity: 1;
    transform: translateX(-3px);
}

/* ---------- 4) قسم "وصل حديثًا": خلفية متدرّجة ---------- */
.strip-newest {
    background: linear-gradient(180deg, #FBF6EE 0%, #F5EDE0 45%, #FBF6EE 100%);
    border-block: 1px solid rgba(201, 162, 39, 0.18);
}

/* ---------- 5) الفوتر: كتلة واحدة بلون واحد ----------
   حذفنا الفوتر المكرر، والمقدمة ولّت جزء من نفس الفوتر (بلا خلفية أغمق). */
.footer-intro {
    background: transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 34px 0 24px;
}

/* ---------- 6) أيقونات السوشل ميديا ---------- */
.footer-social {
    display: flex;
    gap: 10px;
    margin-top: 18px;
}
.social-btn {
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.09);
    border: 1.5px solid rgba(255, 255, 255, 0.16);
    color: #fff;
    transition: transform 0.15s, background 0.15s, border-color 0.15s;
}
.social-btn:hover {
    transform: translateY(-3px);
    border-color: transparent;
}
.social-fb:hover { background: #1877F2; }
.social-ig:hover { background: linear-gradient(45deg, #F58529, #DD2A7B, #8134AF); }
.social-tt:hover { background: #010101; }

/* ---------- 7) زر السلة العائم ---------- */
.cart-float {
    position: fixed;
    bottom: 88px;                    /* فوق زر واتساب بالضبط */
    inset-inline-start: 22px;
    z-index: 900;
    width: 56px;
    height: 56px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    background: var(--color-primary);
    color: var(--color-gold-soft);
    cursor: pointer;
    box-shadow: 0 8px 24px -8px rgba(46, 26, 71, 0.75);
    transition: transform 0.15s ease;
}
.cart-float:hover { transform: translateY(-3px); }

.cart-float-count {
    position: absolute;
    top: -4px;
    inset-inline-end: -4px;
    min-width: 22px;
    height: 22px;
    padding: 0 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #6B6B6B;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}
.cart-float-count.has-items { background: var(--color-gold); color: var(--color-primary); }

/* ---------- 8) لوحة السلة الجانبية ---------- */
.cart-drawer-overlay {
    position: fixed;
    inset: 0;
    z-index: 950;
    background: rgba(34, 28, 43, 0.5);
    backdrop-filter: blur(2px);
    opacity: 0;
    transition: opacity 0.2s ease;
}
.cart-drawer-overlay.is-open { opacity: 1; }

/* ⚠️ مهم: خاصية hidden لازم تغلب display:flex، وإلا اللوحة تبان مباشرة
   كي تتحل الصفحة (هذا كان سبب ظهورها بلا ما تضغط الزر). */
.cart-drawer[hidden],
.cart-drawer-overlay[hidden] { display: none !important; }

.cart-drawer {
    position: fixed;
    top: 0;
    left: 0;                             /* موقع فيزيائي ثابت — ما يتقلبش مع RTL */
    z-index: 960;
    width: min(420px, 100%);
    height: 100dvh;
    display: flex;
    flex-direction: column;
    background: var(--color-bg);
    box-shadow: 18px 0 40px -20px rgba(0, 0, 0, 0.4);
    /* الترانسفورم ما يتقلبش تلقائيًا مع RTL — لهذا نستعملو قيمة فيزيائية.
       اللوحة على اليسار، فنخبيوها لبرّا اليسار بـ-100%. */
    transform: translateX(-100%);
    transition: transform 0.25s ease;
}
.cart-drawer.is-open { transform: translateX(0); }

.cart-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    background: var(--color-primary);
    color: #fff;
}
.cart-drawer-head h2 {
    margin: 0;
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 800;
}
.cart-drawer-close {
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}
.cart-drawer-close:hover { background: rgba(255, 255, 255, 0.22); }

.cart-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}
.cart-drawer-loading,
.cart-drawer-empty {
    text-align: center;
    color: var(--color-ink-soft);
    padding: 40px 10px;
}

.cd-line {
    display: flex;
    gap: 12px;
    padding: 12px;
    margin-bottom: 10px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
}
.cd-line-img {
    width: 62px;
    height: 62px;
    flex-shrink: 0;
    border-radius: 10px;
    object-fit: cover;
    background: #F1EBE0;
}
.cd-line-info { flex: 1; min-width: 0; }
.cd-line-name {
    margin: 0 0 2px;
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.4;
}
.cd-line-variant { margin: 0 0 6px; font-size: 12px; color: var(--color-ink-soft); }
.cd-line-price { margin: 0; font-size: 13px; font-weight: 700; color: var(--color-primary); }

.cd-line-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
}
.cd-qty-btn {
    width: 28px;
    height: 28px;
    border: 1.5px solid var(--color-border);
    border-radius: 8px;
    background: #F7F4EE;
    color: var(--color-primary);
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
}
.cd-qty-btn:hover { background: var(--color-gold-soft); }
.cd-qty-val { min-width: 26px; text-align: center; font-weight: 700; font-size: 14px; }
.cd-remove {
    margin-inline-start: auto;
    border: none;
    background: none;
    color: #B3261E;
    font-size: 12px;
    cursor: pointer;
    text-decoration: underline;
}

.cart-drawer-foot {
    padding: 16px;
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
}
.cart-drawer-total {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 15px;
    margin-bottom: 4px;
}
.cart-drawer-total strong { font-size: 20px; color: var(--color-primary); }
.cart-drawer-note { margin: 0 0 12px; font-size: 12px; color: var(--color-ink-soft); }
.cart-drawer-checkout { display: block; text-align: center; width: 100%; }
.cart-drawer-link {
    display: block;
    text-align: center;
    margin-top: 10px;
    font-size: 13px;
    color: var(--color-primary);
}

body.drawer-open { overflow: hidden; }

/* ---------- تجاوب ---------- */
@media (max-width: 768px) {
    .categories-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .category-card { padding: 8px 10px 8px 8px; gap: 10px; }
    .category-card-image { width: 46px; height: 46px; }
    .category-card-name { font-size: 12.5px; }
    .category-card-arrow { display: none; }
    .footer-social { justify-content: flex-start; }
}
@media (max-width: 480px) {
    .categories-grid { grid-template-columns: 1fr; }
    .category-card-name { font-size: 14px; }
    .cart-float { bottom: 78px; inset-inline-start: 16px; width: 52px; height: 52px; }
}

/* ════════════════════════════════════════════════════════════
   تحديثات v17: تخطيط المتجر، الشريط الجانبي، العرض المميّز
   ════════════════════════════════════════════════════════════ */

/* ---------- 1) خلفيات الأقسام: تباين واضح بين قسم وقسم ----------
   المشكلة القديمة: كل الأقسام بنفس اللون الكريمي، فالعين ما تفرّقش بيناتهم.
   الحل: نبدّلو الخلفية بالتناوب، و"وصل حديثًا" يأخذ تدرّج أوضح. */
.strip-section { background: var(--color-bg); }

.strip-newest {
    background: linear-gradient(180deg, #FBF6EE 0%, #EFE3D0 30%, #EBDCC5 55%, #F3E9DA 85%, #FBF6EE 100%);
    border-block: 1px solid rgba(201, 162, 39, 0.28);
}

.categories-section {
    background: linear-gradient(180deg, #FBF6EE 0%, #F7F1E6 100%);
}

/* ---------- 2) التصنيفات فالهاتف فقط ---------- */
.categories-mobile { display: none; }
@media (max-width: 1024px) {
    .categories-mobile { display: block; }
}

/* ---------- 3) تخطيط المتجر: شريط جانبي + شبكة ---------- */
.shop-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 32px;
    align-items: start;
}

.shop-sidebar-inner {
    position: sticky;              /* يبقى ظاهر وأنت تنزل فالصفحة */
    top: 20px;
    background: var(--color-surface);
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 18px 14px;
    box-shadow: var(--shadow-card);
}

.shop-sidebar-title {
    margin: 0 0 12px;
    padding-bottom: 10px;
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: 800;
    color: var(--color-primary);
    border-bottom: 1.5px solid var(--color-gold-soft);
}

.shop-sidebar-list { list-style: none; margin: 0; padding: 0; }

.side-cat {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 9px 12px;
    margin-bottom: 3px;
    border-radius: 10px;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--color-ink);
    text-decoration: none;
    transition: background 0.12s, color 0.12s;
}
.side-cat:hover { background: #F6F1E7; color: var(--color-primary); }

.side-cat.is-active {
    background: var(--color-primary);
    color: #fff;
    font-weight: 700;
}

.side-cat-name { line-height: 1.35; }

.side-cat-count {
    flex-shrink: 0;
    min-width: 24px;
    padding: 1px 7px;
    border-radius: 999px;
    background: #EFE9DC;
    color: var(--color-ink-soft);
    font-size: 11.5px;
    font-weight: 700;
    text-align: center;
}
.side-cat.is-active .side-cat-count {
    background: var(--color-gold);
    color: var(--color-primary);
}

.shop-main { min-width: 0; }

.shop-result-count {
    margin: 0 0 14px;
    font-size: 13px;
    color: var(--color-ink-soft);
}

.shop-empty-filter {
    padding: 40px 20px;
    text-align: center;
    color: var(--color-ink-soft);
}

/* البطاقة المخفية عند الفلترة */
.product-card.is-filtered-out { display: none; }

/* أزرار التصنيف: فالهاتف فقط */
.category-filter-mobile { display: none; }

@media (max-width: 1024px) {
    .shop-layout { grid-template-columns: 1fr; gap: 0; }
    .shop-sidebar { display: none; }
    .category-filter-mobile { display: flex; }
}

/* ---------- 4) قسم "عرض خاص" بالصورة الكبيرة ---------- */
.spotlight-section {
    padding: 54px 0;
    background: linear-gradient(135deg, #2E1A47 0%, #4A2F6B 100%);
    color: #fff;
}

.spotlight-inner {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: 38px;
    align-items: center;
}

.spotlight-media {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 24px 50px -22px rgba(0, 0, 0, 0.6);
}
.spotlight-media img { width: 100%; height: auto; display: block; }

.spotlight-placeholder {
    aspect-ratio: 4 / 3;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    font-family: var(--font-display);
    font-size: 80px;
    color: var(--color-gold-soft);
}

.spotlight-badge {
    position: absolute;
    top: 16px;
    inset-inline-start: 16px;
    padding: 7px 16px;
    border-radius: 999px;
    background: var(--color-gold);
    color: var(--color-primary);
    font-size: 14px;
    font-weight: 800;
    box-shadow: 0 6px 16px -6px rgba(0, 0, 0, 0.5);
}

.spotlight-eyebrow {
    margin: 0 0 8px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 3px;
    color: var(--color-gold);
}

.spotlight-title {
    margin: 0 0 10px;
    font-family: var(--font-display);
    font-size: 34px;
    font-weight: 800;
    line-height: 1.3;
    color: #fff;
}

.spotlight-sub {
    margin: 0 0 14px;
    font-size: 16px;
    color: var(--color-gold-soft);
}

.spotlight-text {
    margin: 0 0 20px;
    font-size: 14.5px;
    line-height: 2;
    color: rgba(255, 255, 255, 0.85);
    white-space: pre-line;          /* يحترم أسطر النص اللي كتبها الأدمن */
}

.spotlight-price {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin: 0 0 22px;
}
.spotlight-price-now { font-size: 34px; font-weight: 800; color: var(--color-gold); }
.spotlight-price-was {
    font-size: 17px;
    color: rgba(255, 255, 255, 0.5);
    text-decoration: line-through;
}

.spotlight-btn {
    display: inline-block;
    padding: 14px 38px;
    font-size: 16px;
    background: var(--color-gold);
    color: var(--color-primary);
}
.spotlight-btn:hover { background: #DBB13A; }

.spotlight-note {
    margin: 16px 0 0;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.65);
}

@media (max-width: 860px) {
    .spotlight-section { padding: 36px 0; }
    .spotlight-inner { grid-template-columns: 1fr; gap: 24px; }
    .spotlight-title { font-size: 26px; }
    .spotlight-price-now { font-size: 28px; }
    .spotlight-btn { display: block; text-align: center; }
}

/* ---------- صفحات الخطأ ---------- */
.error-page { padding: 90px 0; text-align: center; }
.error-code {
    margin: 0;
    font-family: var(--font-display);
    font-size: 84px;
    font-weight: 800;
    line-height: 1;
    color: var(--color-gold);
    opacity: 0.55;
}
.error-title {
    margin: 10px 0 8px;
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 800;
    color: var(--color-primary);
}
.error-text { margin: 0 0 26px; color: var(--color-ink-soft); }
.error-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn-secondary {
    display: inline-block;
    padding: 12px 26px;
    border: 1.5px solid var(--color-primary);
    border-radius: 999px;
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 600;
    transition: background 0.15s, color 0.15s;
}
.btn-secondary:hover { background: var(--color-primary); color: #fff; }
