/* =============================================
   رونق — الصفحة الرئيسية
   ============================================= */

:root {
    --color-bg:           #f8f5f2;
    --color-bg-slot:      #ece8e4;
    --color-primary:      #1a302a;
    --color-primary-dark: #122018;
    --color-gold:         #c4a265;
    --color-gold-light:   #d4b87a;
    --color-text:         #2c2c2c;
    --color-text-muted:   #6b6560;
    --color-border:       #d5cfc8;
    --color-white:        #ffffff;

    --font-heading: 'Amiri', 'Noto Naskh Arabic', serif;
    --font-body:    'Tajawal', 'Cairo', sans-serif;

    --container-max: 1200px;
    --header-height: 72px;
    --trust-bar-height: 88px;
    --radius-sm: 5px;
    --radius-md: 8px;
    --shadow-soft: 0 8px 32px rgba(26, 48, 42, 0.08);
    --transition: 0.25s ease;
}

/* ---- Reset ---- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scrollbar-gutter: stable;
    overflow-y: scroll;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-bg);
    direction: rtl;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

/* المحتوى يتمدد ليدفع الشريط السفلي لأسفل الصفحة */
body > main {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: 0;
}

/* الصفحة الرئيسية: الهيرو يملأ الشاشة (سطح المكتب) */
body.page-home {
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
}

body.page-home > .header {
    flex-shrink: 0;
}

body.page-home > main {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
}

body.page-home .hero {
    flex: 1 1 auto;
    min-height: 100%;
}

body.page-home .hero__inner {
    min-height: 100%;
    height: 100%;
}

@media (max-width: 768px) {
    /* على الهاتف: تمرير طبيعي بدل قفل الشاشة */
    body.page-home {
        height: auto;
        max-height: none;
        overflow: visible;
        background-color: #f3f0eb;
    }

    body.page-home > main {
        overflow: visible;
    }
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

.container {
    width: 100%;
    max-width: var(--container-max);
    margin-inline: auto;
    padding-inline: 24px;
}

/* =============================================
   Header
   ============================================= */
.header {
    position: sticky;
    top: 0;
    z-index: 210;
    background-color: var(--color-bg);
    border-bottom: 1px solid transparent;
}

.header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    height: var(--header-height);
    gap: 16px;
}

.logo {
    position: relative;
    z-index: 1;
}

.nav {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
}

.header__actions {
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
    z-index: 1;
    margin-inline-start: auto;
}
.logo__circle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background-color: var(--color-primary);
    color: var(--color-white);
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

/* Navigation */
.nav-toggle {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 0;
    height: 0;
}

.nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background-color: rgba(26, 48, 42, 0.4);
    z-index: 190;
    cursor: pointer;
    border: none;
    padding: 0;
    margin: 0;
}

.nav-toggle:checked ~ .nav-overlay {
    display: block;
}

.nav__list {
    display: flex;
    align-items: center;
    gap: 28px;
}

.nav__cluster {
    display: contents;
}

.nav,
.nav__list {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.nav::-webkit-scrollbar,
.nav__list::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

.nav__link {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-primary);
    padding-block: 4px;
    position: relative;
    transition: color var(--transition);
    white-space: nowrap;
}

.nav__link--active {
    font-weight: 500;
}

.nav__link:hover {
    color: var(--color-gold);
}

.nav__link--active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    inset-inline: 0;
    height: 2px;
    background-color: var(--color-primary);
    border-radius: 1px;
}

.nav-dot {
    position: absolute;
    top: -2px;
    inset-inline-end: -7px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--color-gold);
    box-shadow: 0 0 0 2px var(--color-bg);
    pointer-events: none;
}

.header__icon--menu .nav-dot {
    top: 2px;
    inset-inline-end: 2px;
}

/* ---- Account side drawer (hamburger) ---- */
.side-drawer {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    right: auto;
    width: min(300px, 88vw);
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 18px 14px;
    overflow-y: auto;
    transform: translateX(-110%);
    transition: transform var(--transition);
    pointer-events: none;
}

.nav-toggle:checked ~ .side-drawer {
    transform: translateX(0);
    pointer-events: auto;
}

.side-drawer__panel {
    background-color: var(--color-white);
    border: 1px solid #e4dfd9;
    border-radius: 14px;
    padding: 18px 14px;
    box-shadow: var(--shadow-soft);
}

.side-drawer__title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--color-primary);
    text-align: center;
    margin-bottom: 14px;
}

.side-drawer__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.side-drawer__link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--color-primary);
    border-radius: 10px;
    text-decoration: none;
    transition: background-color var(--transition), color var(--transition);
}

.side-drawer__link svg {
    flex-shrink: 0;
    color: var(--color-primary);
}

.side-drawer__link:hover {
    background-color: #f3f0ec;
}

.drawer-badge {
    margin-inline-start: auto;
    min-width: 18px;
    height: 18px;
    padding-inline: 5px;
    border-radius: 999px;
    background-color: var(--color-gold);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.drawer-badge--on-dark {
    background-color: #fff;
    color: var(--color-primary);
}

.side-drawer__link--active {
    background-color: #eef0ee;
    font-weight: 600;
}

.side-drawer__link--logout {
    margin-top: 6px;
    border-top: 1px solid #ebe6e0;
    border-radius: 0 0 10px 10px;
    padding-top: 14px;
}

.side-drawer__help {
    background-color: #f4f0e8;
    border: 1px solid #ebe4d8;
    border-radius: 14px;
    padding: 16px 14px;
    box-shadow: var(--shadow-soft);
}

.side-drawer__help-top {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
}

.side-drawer__help-top svg {
    flex-shrink: 0;
    color: var(--color-primary);
    margin-top: 2px;
}

.side-drawer__help-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 4px;
}

.side-drawer__help-desc {
    font-size: 0.68rem;
    color: var(--color-text-muted);
    line-height: 1.45;
}

.side-drawer__help-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px 14px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--color-white);
    background-color: var(--color-primary);
    border-radius: 8px;
    text-decoration: none;
    transition: background-color var(--transition);
}

.side-drawer__help-btn:hover {
    background-color: var(--color-primary-dark);
}

.nav-toggle:checked ~ .header__actions .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle:checked ~ .header__actions .menu-line:nth-child(2) {
    opacity: 0;
}

.nav-toggle:checked ~ .header__actions .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Header icons */
.header__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
    transition: color var(--transition);
    position: relative;
    cursor: pointer;
}

.header__icon--menu {
    flex-direction: column;
    gap: 5px;
    width: 32px;
    height: 32px;
}

.menu-line {
    display: block;
    width: 22px;
    height: 2px;
    background-color: var(--color-primary);
    border-radius: 2px;
    transition: var(--transition);
}

.header__icon:hover {
    color: var(--color-gold);
}

.header__icon--cart {
    position: relative;
}

.cart-badge {
    position: absolute;
    top: -6px;
    inset-inline-start: -8px;
    min-width: 18px;
    height: 18px;
    padding-inline: 4px;
    border-radius: 50%;
    background-color: var(--color-primary);
    color: var(--color-white);
    font-size: 0.65rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* =============================================
   Hero — تخطيط مقسوم مشابه للتصميم المرجعي
   ============================================= */
.hero {
    position: relative;
    flex: 1 1 auto;
    display: flex;
    align-items: stretch;
    padding: 0;
    margin: 0;
    background-color: var(--color-bg);
    overflow: hidden;
    min-height: 0;
}

.hero__inner {
    position: relative;
    display: grid;
    grid-template-columns: minmax(280px, 0.95fr) minmax(300px, 1.15fr);
    align-items: stretch;
    gap: clamp(28px, 4vw, 48px);
    width: 100%;
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
}

.hero__content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    max-width: 460px;
    /* إزاحة النص فقط لليسار وللأعلى — دون تحريك الصورة */
    transform: translate(-170px, -36px);
    padding-top: clamp(28px, 4vh, 48px);
    padding-bottom: clamp(20px, 3vh, 36px);
    padding-inline: 0;
    background: none;
}

.hero__media {
    position: relative;
    z-index: 1;
    width: 100%;
    min-width: 0;
    min-height: 0;
    height: 100%;
    margin: 0;
    align-self: stretch;
}

.hero__image {
    --hero-image-extend: clamp(200px, 36vw, 540px);
    width: calc(100% + var(--hero-image-extend));
    max-width: none;
    /* في RTL: يمتد لليمين نحو حرف «ص» مع ثبات الحافة اليسرى */
    margin-inline-start: calc(var(--hero-image-extend) * -1);
    height: 100%;
    max-height: none;
    aspect-ratio: auto;
    object-fit: cover;
    object-position: center;
    border-radius: 0;
    display: block;
    background-color: var(--color-bg-slot);
    box-shadow: none;
}

.hero__title {
    font-family: var(--font-heading);
    font-size: clamp(1.85rem, 3.4vw, 2.65rem);
    font-weight: 700;
    color: var(--color-primary);
    line-height: 1.35;
    margin: 0 0 14px;
}

.hero__desc {
    font-size: clamp(0.88rem, 1.2vw, 0.98rem);
    color: var(--color-text-muted);
    line-height: 1.85;
    max-width: 34em;
    margin: 0 0 26px;
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
}

.hero__actions .btn--primary {
    padding: 13px 22px;
    gap: 8px;
}

.hero__actions .btn--primary svg {
    transform: none; /* السهم لليسار في RTL */
}

.hero__actions .btn--outline {
    background-color: var(--color-white);
    border-color: #ddd8d2;
    color: var(--color-primary);
    padding: 13px 20px;
}

.hero__actions .btn--outline:hover {
    border-color: var(--color-primary);
    background-color: #fff;
}

.hero__image--color,
.hero__image--placeholder {
    background: linear-gradient(145deg, #ebe4da, #d5cfc8);
    box-shadow: none;
}

.home-featured {
    padding: 40px 20px 48px;
}

.home-featured__title {
    font-family: var(--font-heading);
    margin-bottom: 20px;
    color: var(--color-primary);
}

.home-featured__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.home-featured__card {
    background: #fff;
    border: 1px solid #e4dfd9;
    border-radius: 12px;
    overflow: hidden;
    color: inherit;
    text-decoration: none;
}

.home-featured__meta {
    padding: 12px;
}

.home-featured__meta strong {
    display: block;
    margin-bottom: 4px;
}

.home-featured__meta span {
    color: #6b6560;
    font-size: 0.85rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    border: 1.5px solid transparent;
    cursor: pointer;
    transition: background-color var(--transition), color var(--transition), border-color var(--transition);
    white-space: nowrap;
}

.site-toast {
    position: fixed;
    top: calc(var(--header-height) + 12px);
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    z-index: 400;
    max-width: min(420px, calc(100vw - 32px));
    padding: 10px 16px;
    border-radius: 10px;
    background: #e8f5ee;
    border: 1px solid #cfe8d9;
    color: #1a302a;
    font-size: 0.9rem;
    box-shadow: 0 8px 24px rgba(26, 48, 42, 0.12);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.site-toast.is-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

.pwa-help {
    position: fixed;
    inset: 0;
    z-index: 500;
    background: rgba(26, 48, 42, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.pwa-help[hidden] {
    display: none;
}

.pwa-help__card {
    width: min(420px, 100%);
    background: #fff;
    border-radius: 14px;
    padding: 20px;
    box-shadow: 0 12px 40px rgba(26, 48, 42, 0.18);
}

.pwa-help__card p {
    margin: 0 0 14px;
    line-height: 1.7;
    color: #2c2c2c;
}

.pwa-help__ok {
    width: 100%;
    padding: 10px 14px;
    border: 0;
    border-radius: 8px;
    background: #1a302a;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
}

.btn--primary {
    background-color: var(--color-primary);
    color: var(--color-white);
    border-color: var(--color-primary);
}

.btn--primary:hover {
    background-color: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
}

.btn--outline {
    background-color: transparent;
    color: var(--color-text);
    border-color: var(--color-border);
}

.btn--outline:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

/* صور المنتجات — الإطار يتبع اتجاه الصورة (أفقي/عمودي) */
.product-media {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: var(--radius-md, 12px);
    background: linear-gradient(145deg, #ebe4da, #d5cfc8);
    line-height: 0;
    display: block;
}

/* قبل تحميل الصورة أو بدون صورة */
.product-media--card,
.product-media--empty {
    aspect-ratio: 4 / 5;
}

.product-media--landscape {
    aspect-ratio: 16 / 10;
}

.product-media--portrait {
    aspect-ratio: 3 / 4;
}

.product-media--square {
    aspect-ratio: 1 / 1;
}

.product-media.has-image {
    aspect-ratio: auto; /* تُستبدل بنسبة الصورة من JS */
}

.product-media__img {
    width: 100%;
    height: auto;
    display: block;
}

/* عند ضبط النسبة من JS: الصورة تملأ الحاوية وتخفي الزوائد */
.product-media[style*="aspect-ratio"] .product-media__img {
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* في معرض bento: املأ الخلية وغطِّ الحواف */
.gallery-slot.product-media {
    padding: 0;
    display: block;
    height: 100%;
    min-height: 0;
    aspect-ratio: auto;
}

.gallery-slot.product-media.has-image {
    aspect-ratio: auto;
}

.gallery-slot .product-media__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.gallery-grid .gallery-slot.product-media {
    aspect-ratio: auto;
}

.admin-thumb-img {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    background: #f3f0ec;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.admin-thumb-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.admin-thumb-img.is-landscape {
    width: 72px;
    height: 48px;
}

.admin-thumb-img.is-portrait {
    width: 48px;
    height: 72px;
}

/* =============================================
   معرض فسيفساء (Masonry) — لوحات مختارة / أعمالنا
   ============================================= */
.mosaic-gallery {
    columns: 4;
    column-gap: 12px;
}

.mosaic-gallery__item {
    break-inside: avoid;
    -webkit-column-break-inside: avoid;
    page-break-inside: avoid;
    margin: 0 0 12px;
    border-radius: var(--radius-md, 12px);
    overflow: hidden;
    display: block;
    width: 100%;
    background: linear-gradient(145deg, #ebe4da, #d5cfc8);
    line-height: 0;
    transition: opacity var(--transition, 0.2s ease);
}

.mosaic-gallery__item:hover {
    opacity: 0.9;
}

.mosaic-gallery__item img,
.mosaic-gallery__item .product-media__img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: unset;
    vertical-align: top;
}

/* بلاطة فسيفساء: لا تفرض نسبة ثابتة ولا قص cover */
.mosaic-gallery__item.product-media,
.mosaic-gallery__item.product-media.has-image {
    aspect-ratio: auto;
    height: auto;
}

.mosaic-gallery__item.product-media[style*="aspect-ratio"] .product-media__img {
    height: auto;
    object-fit: unset;
}

@media (max-width: 1100px) {
    .mosaic-gallery {
        columns: 3;
    }
}

@media (max-width: 768px) {
    .mosaic-gallery {
        columns: 2;
        column-gap: 10px;
    }

    .mosaic-gallery__item {
        margin-bottom: 10px;
        border-radius: 10px;
    }
}

@media (max-width: 480px) {
    .mosaic-gallery {
        columns: 1;
    }
}

/* =============================================
   Trust Bar
   ============================================= */
.trust-bar {
    background-color: var(--color-white);
    border-top: 1px solid var(--color-border);
    padding-block: 14px;
    margin-top: auto;
    flex-shrink: 0;
    width: 100%;
}

.trust-bar__inner {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
}

.trust-bar__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 4px;
}

.trust-bar__icon {
    color: var(--color-primary);
    opacity: 0.75;
    margin-bottom: 2px;
}

.trust-bar__icon svg {
    width: 22px;
    height: 22px;
}

.trust-bar__title {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--color-primary);
    line-height: 1.3;
}

.trust-bar__desc {
    font-size: 0.62rem;
    color: var(--color-text-muted);
    line-height: 1.4;
}

/* =============================================
   Responsive — Tablet
   ============================================= */
@media (max-width: 1024px) {
    .nav__list {
        gap: 18px;
    }

    .nav__link {
        font-size: 0.82rem;
    }

    .hero__inner {
        grid-template-columns: 1fr 1fr;
        gap: 24px;
    }

    .hero__image {
        --hero-image-extend: 0px;
        width: 100%;
        margin-inline-start: 0;
        height: 100%;
        max-height: none;
        border-radius: 0;
    }

    .trust-bar__inner {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }

    .trust-bar__item:nth-child(4),
    .trust-bar__item:nth-child(5) {
        grid-column: span 1;
    }
}

/* =============================================
   Responsive — Mobile
   ============================================= */
@media (max-width: 768px) {
    :root {
        --header-height: 64px;
        --trust-bar-height: 120px;
    }

    .container {
        padding-inline: 16px;
    }

    .header .container {
        padding-inline: 14px;
    }

    .header__inner {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: 12px;
    }

    .logo {
        flex: 0 0 auto;
        justify-self: auto;
        order: 0;
    }

    .logo__circle {
        width: 44px;
        height: 44px;
        font-size: 1rem;
    }

    .header__actions {
        flex: 0 0 auto;
        justify-self: auto;
        margin-inline-start: auto;
        order: 2;
        gap: 12px;
    }

    .header__icon--menu {
        width: 28px;
        height: 28px;
    }

    .header__icon--menu .menu-line {
        width: 20px;
    }

    .header__icon--cart svg {
        width: 22px;
        height: 22px;
    }

    /* روابط الهيدر: سحب أفقي لعرض الباقي بدون شريط رمادي */
    .nav {
        position: static;
        left: auto;
        transform: none;
        flex: 1 1 0;
        min-width: 0;
        max-width: none;
        overflow-x: auto;
        overflow-y: hidden;
        overscroll-behavior-x: contain;
        -webkit-overflow-scrolling: touch;
        order: 1;
        touch-action: pan-x;
        scrollbar-width: none;
        -ms-overflow-style: none;
        container-type: inline-size;
        -webkit-mask-image: none;
        mask-image: none;
    }

    .nav::-webkit-scrollbar {
        display: none;
        width: 0;
        height: 0;
        background: transparent;
    }

    .nav__list {
        gap: 22px;
        justify-content: flex-start;
        flex-wrap: nowrap;
        width: max-content;
        min-width: max-content;
        padding-inline-end: 16px;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .nav__list > li {
        flex: 0 0 auto;
    }

    .nav__cluster {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        flex: 0 0 100cqw;
        width: 100cqw;
        max-width: 100cqw;
        gap: 22px;
        box-sizing: border-box;
    }

    .nav__list::-webkit-scrollbar {
        display: none;
        width: 0;
        height: 0;
    }

    .nav__link {
        font-size: 0.78rem;
        padding-block: 4px;
        border-bottom: none;
        white-space: nowrap;
    }

    .nav__link--active::after {
        display: block;
    }

    .nav__link--active {
        color: var(--color-primary);
        font-weight: 500;
    }

    /* Hero mobile — الواجهة الرئيسية للهاتف */
    body.page-home .header {
        background-color: var(--color-bg);
        overflow: visible;
    }

    body.page-home .header__inner {
        overflow: visible;
    }

    body.page-home .hero {
        flex: 0 0 auto;
        min-height: 0;
        padding: 0 0 16px;
        overflow: visible;
        background-color: transparent;
    }

    body.page-home .hero .container {
        padding-inline: 14px;
    }

    body.page-home .hero__inner {
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: stretch;
        position: relative;
        grid-template-columns: none;
        gap: 0;
        min-height: 0;
        height: auto;
        max-height: none;
        border-radius: 20px;
        overflow: hidden;
        background-color: #f3f0eb;
        box-shadow: none;
    }

    body.page-home .hero__media {
        position: relative;
        inset: auto;
        order: -1;
        width: 100%;
        height: auto;
        min-height: 0;
        z-index: 0;
        background-color: #f3f0eb;
    }

    body.page-home .hero__image {
        --hero-image-extend: 0px;
        width: 100%;
        height: auto;
        margin-inline-start: 0;
        max-width: 100%;
        max-height: none;
        aspect-ratio: auto;
        object-fit: contain;
        object-position: top center;
        border-radius: 0;
        background-color: #f3f0eb;
        display: block;
    }

    body.page-home .hero__content {
        position: relative;
        z-index: 2;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        order: 1;
        width: 100%;
        max-width: none;
        min-height: 0;
        height: auto;
        margin: 0;
        transform: none;
        background: none;
        padding: 18px 16px 20px;
        text-align: start;
    }

    body.page-home .hero__title {
        font-size: clamp(1.9rem, 7.5vw, 2.4rem);
        line-height: 1.32;
        margin: 0 0 12px;
        color: var(--color-primary);
        max-width: none;
    }

    body.page-home .hero__desc {
        max-width: none;
        margin: 0 0 22px;
        font-size: 0.86rem;
        line-height: 1.75;
        color: #5a615c;
    }

    body.page-home .hero__actions {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        margin: 0;
        gap: 10px;
    }

    body.page-home .hero__actions .btn {
        width: 100%;
        flex: none;
        justify-content: center;
        border-radius: 12px;
        padding: 13px 18px;
        font-size: 0.92rem;
        font-weight: 600;
    }

    body.page-home .hero__actions .btn--primary {
        background-color: var(--color-primary);
        border-color: var(--color-primary);
        color: #fff;
        box-shadow: 0 8px 18px rgba(26, 48, 42, 0.18);
    }

    body.page-home .hero__actions .btn--outline {
        background-color: rgba(255, 255, 255, 0.92);
        border: 1px solid #e0dbd4;
        color: var(--color-primary);
        backdrop-filter: blur(6px);
    }

    body.page-home .home-featured {
        padding-top: 8px;
    }

    /* صفحات أخرى على الجوال: سلوك الهيرو السابق إن وُجد */
    body:not(.page-home) .hero {
        padding: 0;
        overflow: hidden;
    }

    body:not(.page-home) .hero__inner {
        grid-template-columns: 1fr;
        gap: 0;
        min-height: 0;
        height: auto;
    }

    body:not(.page-home) .hero__media {
        order: -1;
        height: min(38vh, 280px);
        min-height: 200px;
        flex-shrink: 0;
    }

    body:not(.page-home) .hero__image {
        --hero-image-extend: 0px;
        width: 100%;
        margin-inline-start: 0;
        height: 100%;
        max-height: none;
        aspect-ratio: auto;
        border-radius: 0;
    }

    body:not(.page-home) .hero__content {
        align-items: stretch;
        max-width: none;
        text-align: start;
        margin-inline-start: 0;
        transform: none;
        background: none;
        padding: 20px 0 24px;
        justify-content: flex-start;
    }

    /* Trust bar mobile */
    .trust-bar {
        padding-block: 12px;
    }

    .trust-bar__inner {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px 10px;
    }

    .trust-bar__item:last-child {
        grid-column: 1 / -1;
        max-width: 200px;
        margin-inline: auto;
    }
}

@media (max-width: 480px) {
    body.page-home .hero .container {
        padding-inline: 12px;
    }

    body.page-home .hero__inner {
        border-radius: 16px;
    }

    body.page-home .hero__content {
        padding: 16px 14px 18px;
    }

    body.page-home .hero__actions {
        width: 100%;
    }

    .hero__actions {
        flex-direction: column;
    }

    .hero__actions .btn {
        width: 100%;
    }

    .trust-bar__inner {
        grid-template-columns: 1fr;
    }

    .trust-bar__item:last-child {
        grid-column: auto;
        max-width: none;
    }
}
