/* ==========================================================================
   SADN BEAUTY (سدن بيوتي) - COMPLETE MASTER CSS (HEADER + STOREFRONT)
   THEME: SALLA RAED THEME (ثيم رائد)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Amiri:ital,wght@0,400;0,700;1,400&family=Cormorant+Garamond:ital,wght@0,500;0,600;0,700;1,400&family=Plus+Jakarta+Sans:wght@400;500;600&family=Tajawal:wght@300;400;500;700;800&display=swap');

:root {
    /* لوحة الألوان المعتمدة لهوية سدن بيوتي */
    --color-plum: #51243D;
    --color-plum-dark: #3A182B;
    --color-plum-light: #6B3452;
    --color-nude: #E8D5D5;
    --color-nude-light: #F4EBEB;
    --color-ivory: #FAF7F4;
    --color-champagne: #C6A783;
    --color-champagne-light: #DFC9AE;
    --color-champagne-dark: #A88964;
    --color-charcoal: #29252A;
    --color-white: #FFFFFF;

    /* ربط متغيرات سلة الافتراضية بألوان الهوية */
    --color-primary: #51243D !important;
    --color-primary-dark: #3A182B !important;
    --color-primary-light: #E8D5D5 !important;
    --color-primary-reverse: #FAF7F4 !important;

    /* الظلال الفاخرة */
    --shadow-luxury: 0 10px 30px -5px rgba(81, 36, 61, 0.06), 0 4px 12px -2px rgba(81, 36, 61, 0.03);
    --shadow-luxury-hover: 0 20px 40px -10px rgba(81, 36, 61, 0.13), 0 8px 16px -4px rgba(81, 36, 61, 0.06);
}

/* --------------------------------------------------------------------------
   1. الإعدادات العامة والخطوط وشريط التمرير
   -------------------------------------------------------------------------- */
body,
.font-sans {
    background-color: var(--color-ivory) !important;
    color: var(--color-charcoal) !important;
    font-family: 'Tajawal', 'Plus Jakarta Sans', sans-serif !important;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

::selection {
    background-color: var(--color-plum);
    color: var(--color-white);
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: var(--color-ivory);
}
::-webkit-scrollbar-thumb {
    background: var(--color-champagne);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--color-plum);
}

.sadn-serif-ar {
    font-family: 'Amiri', serif !important;
}
.sadn-serif-en {
    font-family: 'Cormorant Garamond', serif !important;
}

/* --------------------------------------------------------------------------
   2. الهيدر المخصص الثلاثي (EXACT 3-TIER HEADER LAYOUT)
   -------------------------------------------------------------------------- */
/* إخفاء عناصر الهيدر الافتراضي لثيم رائد لمنع التكرار */
/* إخفاء الهيدر الأصلي بصرياً مع إبقاء مكونات سلة نشطة في الخلفية */
header.store-header > *:not(#sadn-custom-header-root),
.top-navbar,
#mainnav {
    position: absolute !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    z-index: -1 !important;
}

header.store-header {
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
}

#sadn-custom-header-root {
    width: 100%;
    direction: rtl;
    font-family: 'Tajawal', sans-serif !important;
    position: sticky;
    top: 0;
    z-index: 999;
    background: #FFFFFF;
}

/* أ) الطبقة 1: الشريط الإعلاني العلوي */
.sadn-top-bar {
    background-color: #51243D;
    color: #FAF7F4;
    padding: 9px 24px;
    border-bottom: 1px solid rgba(198, 167, 131, 0.22);
    font-size: 13px;
}

.sadn-top-bar-inner {
    max-width: 1320px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.sadn-top-promo {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.sadn-top-promo .sadn-sparkle {
    color: #C6A783;
    font-size: 15px;
    display: inline-flex;
}

.sadn-top-promo-ar {
    color: #FAF7F4;
    font-weight: 500;
}

.sadn-top-divider {
    color: rgba(198, 167, 131, 0.55);
    margin: 0 4px;
}

.sadn-top-promo-en {
    font-family: 'Cormorant Garamond', serif !important;
    color: #C6A783;
    letter-spacing: 0.12em;
    font-size: 12px;
    text-transform: uppercase;
    font-weight: 600;
}

.sadn-top-lang-btn {
    background: transparent;
    border: none;
    color: #E8D5D5;
    font-family: 'Tajawal', sans-serif !important;
    font-size: 12.5px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    padding: 0;
    transition: color 0.2s ease;
}

.sadn-top-lang-btn:hover {
    color: #C6A783;
}

/* ب) الطبقة 2: الهيدر الأوسط (البحث يميناً - الشعار وسطاً - الأيقونات يساراً) */
.sadn-main-header {
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(232, 213, 213, 0.65);
}

.sadn-main-header-inner {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 24px;
    height: 94px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 16px;
}

/* اليمين: شريط البحث */
.sadn-header-right {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
}

.sadn-search-form {
    position: relative;
    width: 100%;
    max-width: 310px;
    margin: 0;
}

.sadn-search-input {
    width: 100%;
    background-color: #FAF7F4 !important;
    border: 1px solid #E8D5D5 !important;
    border-radius: 9999px !important;
    padding: 10px 40px 10px 16px !important;
    font-size: 13.5px !important;
    color: #29252A !important;
    font-family: 'Tajawal', sans-serif !important;
    outline: none !important;
    transition: all 0.25s ease !important;
    box-shadow: none !important;
}

.sadn-search-input::placeholder {
    color: rgba(41, 37, 42, 0.45) !important;
}

.sadn-search-input:focus {
    border-color: #51243D !important;
    box-shadow: 0 0 0 3px rgba(81, 36, 61, 0.08) !important;
}

.sadn-search-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(81, 36, 61, 0.6);
    font-size: 18px;
    pointer-events: none;
    display: flex;
}

/* المنتصف: الشعار الكامل (SADN BEAUTY + Monogram) */
.sadn-header-center {
    display: flex;
    justify-content: center;
}

.sadn-brand-logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none !important;
}

.sadn-brand-logo svg {
    width: 54px;
    height: 54px;
    flex-shrink: 0;
    transition: transform 0.4s ease;
}

.sadn-brand-logo:hover svg {
    transform: scale(1.05);
}

.sadn-brand-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: right;
}

.sadn-brand-en {
    font-family: 'Cormorant Garamond', serif !important;
    font-size: 26px;
    font-weight: 600;
    letter-spacing: 0.18em;
    color: #51243D;
    line-height: 1;
}

.sadn-brand-ar {
    font-family: 'Tajawal', sans-serif !important;
    font-size: 15.5px;
    font-weight: 500;
    color: rgba(81, 36, 61, 0.9);
    margin-top: 5px;
}

/* اليسار: حسابي + المفضلة + الحقيبة */
.sadn-header-left {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
}

.sadn-action-btn {
    background: transparent;
    border: none;
    color: #29252A;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    border-radius: 9999px;
    cursor: pointer;
    text-decoration: none !important;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
    position: relative;
}

.sadn-action-btn:hover {
    color: #51243D;
    background-color: rgba(232, 213, 213, 0.35);
}

.sadn-action-btn i {
    font-size: 21px;
}

.sadn-wishlist-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 17px;
    height: 17px;
    border-radius: 50%;
    background-color: #E8D5D5;
    color: #51243D;
    font-size: 10px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid #FFFFFF;
}

.sadn-cart-pill {
    background-color: #51243D !important;
    color: #FAF7F4 !important;
    padding: 9px 18px !important;
    border-radius: 9999px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 9px !important;
    text-decoration: none !important;
    border: none !important;
    cursor: pointer !important;
    transition: all 0.25s ease !important;
    box-shadow: 0 4px 12px rgba(81, 36, 61, 0.14) !important;
}

.sadn-cart-pill:hover {
    background-color: #3A182B !important;
    transform: translateY(-1px);
}

.sadn-cart-pill i {
    color: #C6A783 !important;
    font-size: 20px !important;
}

.sadn-cart-label {
    font-size: 13px;
    font-weight: 500;
    color: #FAF7F4;
}

.sadn-cart-count {
    width: 21px;
    height: 21px;
    border-radius: 50%;
    background-color: #C6A783;
    color: #29252A;
    font-size: 11.5px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ج) الطبقة 3: شريط التصنيفات السفلي */
.sadn-nav-bar {
    background-color: #FFFFFF;
    border-top: 1px solid rgba(232, 213, 213, 0.45);
}

.sadn-nav-list {
    max-width: 1320px;
    margin: 0 auto;
    padding: 12px 24px 0;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 34px;
    flex-wrap: wrap;
}

.sadn-nav-item a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding-bottom: 11px;
    text-decoration: none !important;
    font-size: 14.5px;
    font-weight: 500;
    color: #29252A;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}

.sadn-nav-item a:hover,
.sadn-nav-item a.active {
    color: #51243D;
    font-weight: 700;
    border-bottom-color: #51243D;
}

.sadn-nav-en {
    font-family: 'Cormorant Garamond', serif !important;
    font-size: 13px;
    color: rgba(41, 37, 42, 0.45);
    font-weight: 500;
}

.sadn-nav-item a.active .sadn-nav-en {
    color: #A88964;
}

.sadn-offers-pill {
    background-color: rgba(232, 213, 213, 0.72);
    color: #51243D !important;
    font-weight: 700 !important;
    font-size: 12.5px !important;
    padding: 4px 12px !important;
    border-radius: 9999px !important;
}

/* شريط بحث وقائمة الجوال المنسدلة */
.sadn-mobile-menu-btn,
.sadn-mobile-search-btn {
    display: none;
    background: transparent;
    border: none;
    color: #51243D;
    font-size: 23px;
    cursor: pointer;
    padding: 6px;
}

.sadn-mobile-drawer {
    display: none;
    background: #FAF7F4;
    border-top: 1px solid #E8D5D5;
    padding: 14px 16px;
}

.sadn-mobile-drawer.open {
    display: block;
}

.sadn-mobile-drawer-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.sadn-mobile-drawer-grid a {
    background: #FFFFFF;
    border: 1px solid rgba(232, 213, 213, 0.8);
    padding: 9px 12px;
    border-radius: 12px;
    color: #51243D;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none !important;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

@media (max-width: 991px) {
    .sadn-top-promo-en,
    .sadn-top-divider,
    .sadn-search-form,
    .sadn-action-text,
    .sadn-nav-bar {
        display: none !important;
    }

    .sadn-mobile-menu-btn,
    .sadn-mobile-search-btn {
        display: inline-flex;
    }

    .sadn-main-header-inner {
        height: 76px;
        padding: 0 14px;
    }

    .sadn-brand-en {
        font-size: 19px;
    }

    .sadn-brand-ar {
        font-size: 13px;
    }

    .sadn-brand-logo svg {
        width: 42px;
        height: 42px;
    }
}

/* --------------------------------------------------------------------------
   3. عناوين الأقسام في ثيم رائد (Section Titles)
   -------------------------------------------------------------------------- */
.s-block__title {
    margin-bottom: 2rem !important;
    border-bottom: 1px solid rgba(232, 213, 213, 0.6);
    padding-bottom: 0.85rem;
}

.s-block__title h2 {
    font-family: 'Amiri', serif !important;
    font-size: 2rem !important;
    font-weight: 700 !important;
    color: var(--color-plum) !important;
    line-height: 1.3 !important;
}

.s-block__title h2::before {
    content: 'SIGNATURE FORMULATIONS';
    display: block;
    font-family: 'Cormorant Garamond', serif !important;
    font-size: 0.75rem;
    letter-spacing: 0.25em;
    color: var(--color-champagne-dark);
    font-weight: 600;
    margin-bottom: 4px;
}

/* --------------------------------------------------------------------------
   4. بطاقات المنتجات في ثيم رائد (Product Cards)
   -------------------------------------------------------------------------- */
custom-salla-product-card,
.s-product-card-entry {
    background-color: var(--color-white) !important;
    border-radius: 24px !important;
    padding: 14px !important;
    border: 1px solid rgba(232, 213, 213, 0.85) !important;
    box-shadow: var(--shadow-luxury) !important;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
    overflow: hidden !important;
}

custom-salla-product-card:hover,
.s-product-card-entry:hover {
    transform: translateY(-6px) !important;
    box-shadow: var(--shadow-luxury-hover) !important;
    border-color: var(--color-champagne) !important;
}

.s-product-card-image,
.s-product-card-image-wrapper {
    border-radius: 16px !important;
    background-color: var(--color-ivory) !important;
    overflow: hidden !important;
    margin-bottom: 12px !important;
}

.s-product-card-image img {
    transition: transform 0.7s ease !important;
    object-fit: cover !important;
}

.s-product-card-entry:hover .s-product-card-image img {
    transform: scale(1.06) !important;
}

.s-product-card-promotion-title,
.badge--ribbon {
    background-color: var(--color-plum) !important;
    color: var(--color-ivory) !important;
    border-radius: 9999px !important;
    padding: 4px 12px !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    box-shadow: 0 2px 8px rgba(81, 36, 61, 0.15) !important;
}

.s-product-card-wishlist-btn,
.btn--wishlist {
    background-color: rgba(255, 255, 255, 0.92) !important;
    color: var(--color-plum) !important;
    border-radius: 50% !important;
    width: 34px !important;
    height: 34px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06) !important;
}

.s-product-card-wishlist-btn:hover {
    background-color: var(--color-plum) !important;
    color: var(--color-white) !important;
}

.s-product-card-content-title a {
    color: var(--color-plum) !important;
    font-weight: 700 !important;
    font-size: 1rem !important;
    transition: color 0.2s ease !important;
}

.s-product-card-content-title a:hover {
    text-decoration: underline !important;
}

.s-product-card-price,
.s-product-card-sale-price h4 {
    color: var(--color-plum) !important;
    font-weight: 800 !important;
    font-size: 1.12rem !important;
}

.s-product-card-regular-price {
    color: rgba(41, 37, 42, 0.4) !important;
    font-size: 0.8rem !important;
    text-decoration: line-through !important;
}

.s-product-card-content-footer {
    padding-top: 12px !important;
    margin-top: 10px !important;
    border-top: 1px solid var(--color-ivory) !important;
}

.s-product-card-content-footer salla-add-product-button .s-button-element,
salla-add-product-button button,
.s-button-primary,
.sadn-btn-luxury {
    background-color: var(--color-plum) !important;
    color: var(--color-ivory) !important;
    border-radius: 9999px !important;
    border: 1px solid rgba(198, 167, 131, 0.4) !important;
    font-weight: 600 !important;
    font-size: 0.82rem !important;
    padding: 10px 18px !important;
    position: relative !important;
    overflow: hidden !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 12px rgba(81, 36, 61, 0.12) !important;
}

.s-product-card-content-footer salla-add-product-button .s-button-element:hover,
salla-add-product-button button:hover,
.s-button-primary:hover,
.sadn-btn-luxury:hover {
    background-color: var(--color-plum-dark) !important;
    transform: translateY(-1px) !important;
}

.s-product-card-content-footer salla-add-product-button .s-button-element::after,
.sadn-btn-luxury::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(198, 167, 131, 0.25), transparent);
    transition: left 0.6s ease;
}

.s-product-card-content-footer salla-add-product-button .s-button-element:hover::after,
.sadn-btn-luxury:hover::after {
    left: 130%;
}

/* --------------------------------------------------------------------------
   5. الأقسام المخصصة المحقونة (Hero Arch, Promise Strip, Categories, Story)
   -------------------------------------------------------------------------- */
.sadn-editorial-arch {
    border-radius: 180px 180px 16px 16px !important;
}

.sadn-hero-wrapper {
    position: relative;
    overflow: hidden;
    background: linear-gradient(to bottom, rgba(232, 213, 213, 0.38), var(--color-ivory), var(--color-ivory));
    padding: 3.5rem 1rem 4.5rem;
}

.sadn-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

.sadn-hero-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    align-items: center;
}

@media (min-width: 1024px) {
    .sadn-hero-grid {
        grid-template-columns: 7fr 5fr;
        gap: 3rem;
    }
}

.sadn-badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 9999px;
    background: var(--color-white);
    border: 1px solid rgba(198, 167, 131, 0.45);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    font-size: 0.78rem;
    color: var(--color-plum);
    font-weight: 600;
}

.sadn-hero-title {
    font-family: 'Amiri', serif !important;
    font-size: clamp(2.1rem, 4.5vw, 3.4rem);
    font-weight: 700;
    color: var(--color-plum);
    line-height: 1.22;
    margin: 1.2rem 0 0.5rem;
}

.sadn-hero-title span {
    display: block;
    color: var(--color-charcoal);
    font-weight: 400;
    margin-top: 4px;
}

.sadn-hero-quote {
    font-family: 'Cormorant Garamond', serif !important;
    font-style: italic;
    font-size: 1.25rem;
    color: var(--color-champagne-dark);
    margin-bottom: 1rem;
}

.sadn-hero-desc {
    color: rgba(41, 37, 42, 0.8);
    font-size: 1.02rem;
    line-height: 1.75;
    max-width: 580px;
    font-weight: 300;
    margin-bottom: 1.75rem;
}

.sadn-metrics-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    max-width: 480px;
    padding-top: 1.5rem;
    margin-top: 1.75rem;
    border-top: 1px solid var(--color-nude);
}

/* شريط الوعود (Brand Promise Strip) */
.sadn-promise-strip {
    background: var(--color-white);
    border-top: 1px solid rgba(232, 213, 213, 0.75);
    border-bottom: 1px solid rgba(232, 213, 213, 0.75);
    padding: 2rem 0;
}

.sadn-promise-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    text-align: center;
}

@media (min-width: 768px) {
    .sadn-promise-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.sadn-promise-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--color-ivory);
    border: 1px solid rgba(198, 167, 131, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-plum);
    font-size: 1.4rem;
    margin: 0 auto 0.5rem;
}

/* بطاقات الفئات الأربعة (Curated Categories) */
.sadn-cat-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

@media (min-width: 1024px) {
    .sadn-cat-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 1.5rem;
    }
}

.sadn-cat-card {
    background: var(--color-white);
    border-radius: 24px;
    padding: 12px;
    border: 1px solid rgba(232, 213, 213, 0.85);
    box-shadow: var(--shadow-luxury);
    transition: all 0.35s ease;
    cursor: pointer;
    text-decoration: none !important;
    display: block;
}

.sadn-cat-card:hover {
    box-shadow: var(--shadow-luxury-hover);
    transform: translateY(-5px);
}

.sadn-cat-img-box {
    position: relative;
    height: 270px;
    border-radius: 16px;
    overflow: hidden;
    background: rgba(232, 213, 213, 0.3);
    margin-bottom: 12px;
}

.sadn-cat-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s ease;
}

.sadn-cat-card:hover .sadn-cat-img-box img {
    transform: scale(1.1);
}

/* قسم القصة الفلسفية (Editorial Story Banner) */
.sadn-story-box {
    background-color: var(--color-plum);
    color: var(--color-ivory);
    border-radius: 32px;
    padding: 3rem 2rem;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-luxury);
    margin: 3.5rem auto;
}

@media (min-width: 1024px) {
    .sadn-story-box {
        padding: 4rem;
    }
}

/* --------------------------------------------------------------------------
   6. الفوتر الملكي في ثيم رائد (Store Footer)
   -------------------------------------------------------------------------- */
footer.store-footer,
.store-footer__inner {
    background-color: var(--color-plum) !important;
    color: var(--color-ivory) !important;
    border-top: 1px solid rgba(198, 167, 131, 0.35) !important;
}

footer.store-footer h3,
footer.store-footer h4,
footer.store-footer .footer-title {
    color: var(--color-champagne) !important;
    font-weight: 700 !important;
}

footer.store-footer a,
footer.store-footer p,
footer.store-footer span {
    color: rgba(232, 213, 213, 0.85) !important;
    transition: color 0.2s ease !important;
}

footer.store-footer a:hover {
    color: var(--color-white) !important;
}

/* نافذة مستشارة الجمال المنبثقة (Routine Finder Modal) */
.sadn-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(41, 37, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.sadn-modal-backdrop.active {
    display: flex;
}

/* ==========================================================================
   SADN BEAUTY - عنوان قسم المنتجات الثابتة (Fixed Products Header)
   ========================================================================== */

/* خلفية قسم المنتجات الثابتة لتطابق الصورة تماماً */
.s-block--fixed-products,
section.s-block:has(salla-products-list) {
    background-color: rgba(232, 213, 213, 0.28) !important; /* خلفية وردي نود ناعم جداً */
    border-top: 1px solid rgba(232, 213, 213, 0.65) !important;
    padding-top: 3.5rem !important;
    padding-bottom: 3.5rem !important;
    margin-top: 0 !important;
}

/* إخفاء العنوان التقليدي الافتراضي لثيم رائد داخل المنتجات الثابتة لمنع التكرار */
.s-block--fixed-products .s-block__title {
    display: none !important;
}

/* الحاوية الرئيسية لعنوان منتجات سدن المختارة */
.sadn-fixed-products-header {
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-end !important;
    justify-content: space-between !important;
    gap: 16px !important;
    margin-bottom: 2.25rem !important;
    padding: 0 4px !important;
    direction: rtl !important;
    width: 100% !important;
}

/* الجانب الأيمن: النصوص (الإنجليزي + العربي) */
.sadn-fp-titles {
    text-align: right !important;
}

.sadn-fp-subtitle {
    font-family: 'Cormorant Garamond', serif !important;
    font-size: 12px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.25em !important;
    color: rgba(81, 36, 61, 0.65) !important;
    display: block !important;
    margin-bottom: 6px !important;
    font-weight: 600 !important;
}

.sadn-fp-main-title {
    font-family: 'Amiri', serif !important;
    font-size: clamp(1.85rem, 3.2vw, 2.45rem) !important;
    font-weight: 700 !important;
    color: #51243D !important;
    margin: 0 !important;
    line-height: 1.2 !important;
}

/* الجانب الأيسر: كبسولة "الكل (8)" البرقوقية */
.sadn-fp-all-pill {
    background-color: #51243D !important;
    color: #FAF7F4 !important;
    font-family: 'Tajawal', sans-serif !important;
    font-size: 13.5px !important;
    font-weight: 600 !important;
    padding: 8px 20px !important;
    border-radius: 9999px !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 4px 12px rgba(81, 36, 61, 0.12) !important;
    transition: all 0.25s ease !important;
    white-space: nowrap !important;
}

.sadn-fp-all-pill:hover {
    background-color: #3A182B !important;
    color: #FFFFFF !important;
    transform: translateY(-1px) !important;
}

/* ==========================================================================
   تحديثات عداد الأمنيات الذكي + قائمة نتائج البحث الفوري الاحترافية
   ========================================================================== */

/* إخفاء شارة الأمنيات تماماً عندما تكون 0 */
.sadn-wishlist-badge.is-zero {
    display: none !important;
}

/* تنسيق حاوية نتائج البحث الفوري أسفل مربع البحث */
#sadn-live-search-results {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 350px;
    max-width: 90vw;
    background: #FFFFFF;
    border: 1px solid #E8D5D5;
    border-radius: 20px;
    box-shadow: 0 20px 45px -10px rgba(81, 36, 61, 0.16);
    z-index: 10000;
    max-height: 420px;
    overflow-y: auto;
    padding: 10px;
    direction: rtl;
    text-align: right;
}

#sadn-live-search-results.is-open {
    display: block;
    animation: sadnSearchFade 0.2s ease-out;
}

@keyframes sadnSearchFade {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.sadn-search-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 10px;
    border-radius: 14px;
    text-decoration: none !important;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid rgba(250, 247, 244, 0.8);
}

.sadn-search-item:last-of-type {
    border-bottom: none;
}

.sadn-search-item:hover {
    background-color: #FAF7F4;
}

.sadn-search-thumb {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    object-fit: cover;
    background-color: #FAF7F4;
    border: 1px solid rgba(232, 213, 213, 0.5);
    flex-shrink: 0;
}

.sadn-search-info {
    flex: 1;
    min-width: 0;
}

.sadn-search-title {
    font-size: 13px;
    font-weight: 700;
    color: #51243D;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sadn-search-price {
    font-size: 12.5px;
    font-weight: 800;
    color: #A88964;
}

.sadn-search-old-price {
    font-size: 11px;
    color: #999;
    text-decoration: line-through;
    margin-right: 6px;
    font-weight: 400;
}

.sadn-search-more-btn {
    display: block;
    text-align: center;
    background-color: #51243D;
    color: #FAF7F4 !important;
    padding: 9px 14px;
    border-radius: 9999px;
    font-size: 12.5px;
    font-weight: 700;
    margin-top: 8px;
    text-decoration: none !important;
    transition: background-color 0.2s ease;
}

.sadn-search-more-btn:hover {
    background-color: #3A182B;
}

/* ==========================================================================
   إصلاح انضغاط شبكة المنتجات داخل صفحات التصنيفات والبحث (Category Grid Fix)
   ========================================================================== */

/* إجبار حاوية المنتجات في صفحات التصنيفات على أخذ العرض الكامل 100% */
salla-products-list,
.s-products-list-wrapper,
.s-products-list-container {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    flex: 1 1 100% !important;
    min-width: 0 !important;
}

/* ضبط الشبكة الداخلية لبطاقات المنتجات (4 أعمدة على سطح المكتب و2 على الجوال) */
.s-products-list-vertical-cards,
salla-products-list .s-products-list-vertical-cards {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 1.25rem !important;
    width: 100% !important;
}

@media (min-width: 768px) {
    .s-products-list-vertical-cards,
    salla-products-list .s-products-list-vertical-cards {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 1.5rem !important;
    }
}

@media (min-width: 1024px) {
    .s-products-list-vertical-cards,
    salla-products-list .s-products-list-vertical-cards {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
        gap: 1.5rem !important;
    }
}

/* ضمان أخذ كل بطاقة منتج لعرض العمود بالكامل دون انكماش */
custom-salla-product-card,
.s-product-card-entry {
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
}

/* ==========================================================================
   الحل الجذري لمشكلة الإزاحة الأفقية وعدم اكتمال الهيدر في الجوال
   ========================================================================== */

/* 1. قفل الإزاحة الأفقية نهائياً على مستوى الجذر وحاويات ثيم رائد */
html,
body,
.app,
.app-inner,
main#main-content,
header.store-header {
    width: 100% !important;
    max-width: 100vw !important;
    overflow-x: clip !important; /* أقوى من hidden ولا يكسر خاصية sticky */
    margin-left: 0 !important;
    margin-right: 0 !important;
    box-sizing: border-box !important;
}

/* 2. تحجيم الهيدر الأصلي المخفي في نقطة صفرية حتى لا يمدد عرض الصفحة في الجوال */
header.store-header > *:not(#sadn-custom-header-root),
.top-navbar,
#mainnav {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    width: 1px !important;
    height: 1px !important;
    max-width: 1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    clip-path: inset(50%) !important;
    white-space: nowrap !important;
    opacity: 0 !important;
    pointer-events: none !important;
    z-index: -9999 !important;
}

/* 3. ضبط جذر الهيدر المخصص ليحترم حدود الشاشة بدقة */
#sadn-custom-header-root,
.sadn-top-bar,
.sadn-main-header,
.sadn-nav-bar {
    width: 100% !important;
    max-width: 100vw !important;
    box-sizing: border-box !important;
}

/* 4. تصميم مخصص ومتقن لشاشات الجوال والتابلت (أقل من 991px) */
@media (max-width: 991px) {
    /* أ) الشريط الإعلاني العلوي: نص متناسق في المنتصف بدون زحام */
    .sadn-top-bar {
        padding: 7px 12px !important;
    }

    .sadn-top-bar-inner {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        gap: 6px !important;
    }

    /* إخفاء زر العملة والنص الإنجليزي في الجوال لإعطاء مساحة مريحة للنص الإعلاني */
    .sadn-top-promo-en,
    .sadn-top-divider,
    .sadn-top-lang-btn {
        display: none !important;
    }

    .sadn-top-promo {
        justify-content: center !important;
        flex-wrap: nowrap !important;
        gap: 5px !important;
        width: 100% !important;
    }

    .sadn-top-promo-ar {
        font-size: 11.5px !important;
        line-height: 1.4 !important;
        white-space: normal !important;
        text-align: center !important;
    }

    /* ب) الهيدر الأوسط في الجوال: توزيع متوازن لا يخرج عن الشاشة أبداً */
    .sadn-main-header-inner {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        height: 68px !important;
        padding: 0 10px !important;
        gap: 4px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* إخفاء شريط البحث المكتبي والنصوص الجانبية في الجوال */
    .sadn-search-form,
    .sadn-action-text,
    .sadn-nav-bar {
        display: none !important;
    }

    /* اليمين: زر القائمة */
    .sadn-header-right {
        flex: 0 0 auto !important;
        display: flex !important;
        align-items: center !important;
    }

    .sadn-mobile-menu-btn {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 4px !important;
        font-size: 24px !important;
    }

    /* المنتصف: الشعار (منع انكسار كلمة SADN BEAUTY إلى سطرين) */
    .sadn-header-center {
        flex: 1 1 auto !important;
        min-width: 0 !important;
        display: flex !important;
        justify-content: center !important;
    }

    .sadn-brand-logo {
        gap: 7px !important;
        align-items: center !important;
    }

    .sadn-brand-logo svg {
        width: 34px !important;
        height: 34px !important;
        flex-shrink: 0 !important;
    }

    .sadn-brand-en {
        font-size: 15px !important;
        letter-spacing: 0.1em !important;
        white-space: nowrap !important; /* يمنع انقسام SADN و BEAUTY في سطرين */
    }

    .sadn-brand-ar {
        font-size: 11px !important;
        margin-top: 2px !important;
        white-space: nowrap !important;
    }

    /* اليسار: أيقونات حسابي والمفضلة وكبسولة الحقيبة داخل حدود الشاشة */
    .sadn-header-left {
        flex: 0 0 auto !important;
        display: flex !important;
        align-items: center !important;
        gap: 4px !important;
    }

    .sadn-action-btn {
        padding: 5px !important;
    }

    .sadn-action-btn i {
        font-size: 20px !important;
    }

    .sadn-wishlist-badge {
        top: 0px !important;
        right: 0px !important;
        width: 15px !important;
        height: 15px !important;
        font-size: 9px !important;
    }

    /* تصغير كبسولة الحقيبة في الجوال لتظهر كاملة وبأبعاد متناسقة */
    .sadn-cart-pill {
        padding: 6px 10px !important;
        gap: 5px !important;
        flex-shrink: 0 !important;
    }

    .sadn-cart-pill i {
        font-size: 17px !important;
    }

    .sadn-cart-count {
        width: 18px !important;
        height: 18px !important;
        font-size: 10.5px !important;
    }
}

/* 5. للشاشات الصغيرة جداً (أقل من 360px مثل Galaxy Fold / iPhone SE) */
@media (max-width: 360px) {
    .sadn-brand-en {
        font-size: 13px !important;
        letter-spacing: 0.06em !important;
    }
    .sadn-brand-logo svg {
        width: 28px !important;
        height: 28px !important;
    }
    .sadn-action-btn {
        padding: 3px !important;
    }
    .sadn-cart-pill {
        padding: 5px 8px !important;
    }
}

/* ==========================================================================
   إخفاء نافذة تسجيل الدخول عند فتح المتجر وإظهارها في المنتصف فقط عند الطلب
   ========================================================================== */

/* رفع نافذة الدخول الافتراضية لثيم رائد فوق الهيدر مع ضبابية الخلفية فقط */
salla-login-modal {
    position: relative !important;
    z-index: 999999 !important;
}

salla-login-modal .s-modal-backdrop,
salla-login-modal .s-modal-overlay {
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
}

/* تنسيق حاوية مكون حسابي الافتراضي لثيم رائد داخل الهيدر المخصص */
#sadn-native-account-slot {
    display: inline-flex !important;
    align-items: center !important;
    position: relative !important;
}

/* توحيد شكل زر ثيم رائد الأصلي ليطابق شكل أيقونة "حسابي" في تصميم سدن */
#sadn-native-account-slot .header-btn--user,
#sadn-native-account-slot salla-user-menu button,
#sadn-native-account-slot .s-user-menu-trigger {
    background: transparent !important;
    border: none !important;
    color: #29252A !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 6px 8px !important;
    border-radius: 9999px !important;
    font-family: 'Tajawal', sans-serif !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    box-shadow: none !important;
}

#sadn-native-account-slot .header-btn--user:hover,
#sadn-native-account-slot salla-user-menu button:hover {
    color: #51243D !important;
    background-color: rgba(232, 213, 213, 0.35) !important;
}

/* 1. خفض طبقة الهيدر المخصص لتسمح لنوافذ ثيم رائد بالظهور فوقه */
#sadn-custom-header-root,
header.store-header {
    z-index: 30 !important;
}

/* 2. ضمان بقاء نافذة تسجيل الدخول الافتراضية في أعلى طبقة فوق الهيدر */
salla-login-modal,
salla-modal,
.s-modal {
    z-index: 99999 !important;
}