/* ========================================
   إعدادات عامة وألوان المتغيرات
======================================== */

/* تحديد أقصى ارتفاع لشعار الموقع */
.navbar-brand img {
    max-height: 5rem;
}

/* تعريف متغيرات الألوان الرئيسية للموقع */
:root {
    --main-color: #956A51;    /* اللون الأساسي */
    --white-color: white;      /* اللون الأبيض */
    --black-color: black;      /* اللون الأسود */
}

/* لون خلفية الصفحة الرئيسية */
body {
    background-color: #F0F0FF;
}

/* إزالة المسافة العلوية من أول قسم في المحتوى الرئيسي */
#main-content > section:nth-child(1) {
    margin-top: 0;
}

/* ========================================
   تنسيق شريط التنقل العلوي
======================================== */

/* لون خلفية ونص شريط التنقل */
.top-navbar {
    background-color: var(--main-color) !important;
    color: var(--white-color) !important;
}

/* تطبيق اللون الرئيسي على جميع العناصر داخل bg-inherit */
.bg-inherit * {
    color: var(--main-color) !important;
}

/* خلفية حقل البحث في الشريط العلوي */
.top-navbar .s-search-input {
    background-color: var(--white-color) !important;
}

/* تأثير الحركة عند المرور على عناصر القائمة الرئيسية */
.main-menu li.root-level > a:hover {
    transform: translateY(-3px);  /* تحريك العنصر للأعلى */
}

/* ========================================
   تنسيق أيقونات الهيدر
======================================== */

/* تنسيق أيقونات المستخدم، السلة، والقائمة */
i.header-btn__icon.sicon-user-circle,
i.header-btn__icon.icon.sicon-shopping-bag,
i.sicon-menu {
    background: var(--main-color) !important;
    color: var(--white-color) !important;
    box-shadow: rgb(100 100 111 / .2) 0 7px 29px 0;  /* ظل خفيف */
    transition: 0.3s;  /* انتقال سلس */
}

/* جعل أيقونة القائمة دائرية */
i.sicon-menu {
    padding: 8px;
    border-radius: 50%;
}

/* تأثير الحركة عند المرور على أيقونات المستخدم والسلة */
i.header-btn__icon.sicon-user-circle:hover,
i.header-btn__icon.icon.sicon-shopping-bag:hover {
    background: var(--white-color) !important;
    color: var(--main-color) !important;
    box-shadow: rgb(100 100 111 / .2) 0 7px 29px 0;
    transform: translateY(-3px);  /* تحريك للأعلى عند المرور */
    transition: 0.3s;
}

/* ========================================
   تنسيق السلايدر والصور
======================================== */

/* إزالة الحواف والمسافات من سلايدر الصور */
section.s-block.s-block--photos-slider salla-slider.photos-slider .swiper-slide {
    padding: 0 !important;
    margin-top: 0px !important;
    width: 100% !important;
    border-radius: 0 !important;
}

/* إزالة الحشو من السلايدر في الاتجاه RTL */
[dir=rtl] section.s-block.s-block--photos-slider salla-slider.photos-slider .swiper {
    padding: 0 !important;
}

/* إزالة الحواف الدائرية من الصور */
img.w-full {
    border-radius: 0;
}

/* خلفية بيضاء لصور المنتجات المحملة */
.s-product-card-image img.loaded {
    background: #fff;
}

/* إخفاء أزرار التنقل المعطلة في السلايدر */
button.s-slider-next.s-slider-nav-arrow.swiper-button-disabled.swiper-button-lock,
button.s-slider-prev.s-slider-nav-arrow.swiper-button-disabled.swiper-button-lock {
    display: none;
}

/* ========================================
   تنسيق البانرات والإعلانات
======================================== */

/* جعل البانر الثابت بعرض كامل */
section.s-block.s-block--fixed-banner.wide-placeholder > .container {
    padding: 0 !important;
    margin: 0px !important;
    max-width: 100%;
}

/* مسافات عمودية لبطاقات المنتجات في السلايدر */
.s-products-slider-card.swiper-slide {
    margin-top: 10px;
    margin-bottom: 10px;
}

/* إزالة الحواف والخلفية من البانر الثابت */
.banner--fixed img {
    border-radius: 0;
    background-color: #fff0;
}

/* ========================================
   تنسيق الأزرار
======================================== */

/* تنسيق الزر الرئيسي مع تأثير الحشو */
button.s-button-element.s-button-btn.s-button-outline.s-button-wide.s-button-primary-outline.s-button-loader-center {
    color: #fff;
    background: var(--main-color) !important;
    transition: ease-out 0.5s;
    border: 2px solid var(--main-color) !important;
    box-shadow: inset 0 0 0 0 #fff;  /* تأثير الحشو الداخلي */
}

/* تأثير الملء عند المرور على الزر */
button.s-button-element.s-button-btn.s-button-outline.s-button-wide.s-button-primary-outline.s-button-loader-center:hover {
    color: var(--main-color) !important;
    box-shadow: inset 0 -100px 0 0 #fff;  /* ملء بالأبيض من الأسفل */
}

/* تأثير التصغير عند الضغط على الزر */
button.s-button-element.s-button-btn.s-button-outline.s-button-wide.s-button-primary-outline.s-button-loader-center:active {
    transform: scale(.9);
}

/* ========================================
   تأثيرات بطاقات المنتجات
======================================== */

/* انتقال سلس لبطاقات المنتجات */
.s-products-slider-card.swiper-slide {
    transition: transform 0.3s ease;
}

/* تحريك البطاقة للأعلى عند المرور عليها */
.s-products-slider-card.swiper-slide:hover {
    transform: translateY(-7px);
}

/* مسافة علوية لبطاقات المنتجات */
.s-products-slider-card.swiper-slide {
    padding-top: 20px;
}

/* ظل خفيف لبطاقات المنتجات */
.s-product-card-entry {
    box-shadow: 0 0 10px 0 #87816e30;
}

/* ========================================
   تنسيق العناوين
======================================== */

/* لون عنوان السلايدر */
.s-slider-block__title-right {
    color: var(--main-color) !important;
}

/* حجم خط عنوان السلايدر */
.s-slider-block__title-right h2 {
    font-size: 24px;
}

/* مسافات جانبية لعناصر السلايدر */
salla-slider[type]:not(.hydrated) > div > div,
salla-slider[type]:not(.hydrated) .swiper > div > div > div,
.carousel-slider .swiper-wrapper > div {
    padding-left: .625rem;
    margin-block: 19px;
    padding-right: .625rem;
}

/* خلفية عناصر البانر */
.banner-entry {
    background: #F0F0FF !important;
}

/* ========================================
   شبكة قائمة العناصر
======================================== */

/* تقسيم القائمة إلى 4 أعمدة */
#main-content > section:nth-child(7) > div {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* ارتفاع عناصر البانر في القائمة */
#main-content > section:nth-child(7) > div .banner-entry {
    height: 289px;
}

/* تصغير ارتفاع البانر على الشاشات الصغيرة */
@media (max-width: 767px) {
    #main-content > section:nth-child(7) > div .banner-entry {
        height: 92px !important;
    }
}

/* ========================================
   تنسيق عناوين الأقسام
======================================== */

/* محاذاة عناوين الأقسام في المنتصف */
.s-block__title {
    justify-content: center;
}

/* تنسيق العنوان مع خطوط جانبية */
.right-side h2 {
    color: var(--main-color);
    position: relative;
    display: inline-block;
    font-weight: 600;
    font-size: 32px;
    padding: 0 20px;
}

/* خطوط زينة على جانبي العنوان */
.right-side h2::before,
.right-side h2::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 80px;
    height: 2px;
    background-color: #a69a89;
}

/* الخط الأيمن */
.right-side h2::before {
    right: 100%;
    margin-right: 10px;
}

/* الخط الأيسر */
.right-side h2::after {
    left: 100%;
    margin-left: 10px;
}

/* ========================================
   تنسيق روابط التواصل الاجتماعي
======================================== */

/* رابط إنستغرام بتدرج لوني */
a[href*="instagram"] {
    color: #fff;
    background: linear-gradient(45deg, #f09433 0, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    border: none;
}

/* رابط تيك توك بخلفية سوداء */
a[href*="tiktok"] {
    background: #000;
    color: #fff;
    border: none;
}

/* رابط سناب شات بخلفية صفراء */
a[href*="snapchat"] {
    background: #ff0;
    border: none;
}

/* أيقونة سناب شات سوداء */
.s-social-link a[href*="snapchat"] svg {
    fill: #000 !important;
}

/* رابط يوتيوب بخلفية حمراء */
a[href*="youtube"] {
    background: red;
    border: none;
    color: #fff;
}

/* رابط تويتر X بخلفية سوداء */
footer a[href*="x"] {
    background: #000;
    border: none;
    color: #fff;
}

/* ========================================
   تنسيق الفوتر (التذييل)
======================================== */

/* خلفية الفوتر الخارجية */
.store-footer {
    background: var(--white-color) !important;
}

/* خلفية ونص الفوتر الداخلي */
.store-footer__inner {
    background: #E1DECF !important;
    color: var(--black-color) !important;
}

/* ========================================
   تنسيقات الشاشات الصغيرة
======================================== */

@media (max-width: 767px) {
    /* تصغير حجم العنوان على الموبايل */
    .right-side h2 {
        font-size: 24px;
        padding: 0 10px;
    }

    /* ارتفاع أدنى لشريط التنقل */
    .main-nav-container {
        min-height: 63px;
    }

    /* محاذاة عناصر الفوتر في المنتصف */
    .store-footer__inner * {
        justify-content: center;
        text-align: center;
    }
  .banner-entry{
    height: 320px !important;
  }
}

/* ========================================
   قسم المميزات (Features)
======================================== */

/* خلفية أيقونات المميزات */
.s-block--features__item .feature-icon {
    background-color: #847B6E !important;
}

/* خلفية عناصر المميزات */
.s-block--features__item {
    background-color: #F0F0FF;
}

/* إخفاء أيقونات Salla الافتراضية */
.s-block--features__item .feature-icon i {
    display: none;
}

/* إعداد عام للأيقونة المخصصة */
.s-block--features__item .feature-icon {
    width: 120px;
    height: 120px;
    margin: 0 auto 15px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* الصورة الأولى للميزة الأولى */
.s-block--features__item:nth-child(1) .feature-icon {
    background-image: url("https://cdn.files.salla.network/homepage/680494008/34fbf2e2-86cb-4fa8-a0b1-44c64c6812ff.webp");
}

/* الصورة الثانية للميزة الثانية */
.s-block--features__item:nth-child(2) .feature-icon {
    background-image: url("https://cdn.files.salla.network/homepage/680494008/20012857-b829-4d10-b6ab-12edd252a5b8.webp");
}

/* الصورة الثالثة للميزة الثالثة */
.s-block--features__item:nth-child(3) .feature-icon {
    background-image: url("https://cdn.files.salla.network/homepage/680494008/574fc482-325e-444a-8178-8291b59927c0.webp");
}

/* تنسيق عنوان المميزة */
.s-block--features__item h2 {
    font-size: 20px;
    color: #847B6E;
}

/* تنسيق وصف الميزة */
.s-block--features__item p {
    font-size: 18px;
    color: #847B6E;
}

/* ========================================
   قسم البانرات فقط
======================================== */

/* إعداد شبكة أساسية عمود واحد */
#main-content .grid.one-row.md\:grid-cols-3.grid-flow-row.gap-3.sm\:gap-8 {
    display: grid;
    grid-template-columns: 1fr;
    grid-auto-flow: row;
    gap: 12px;
}

/* خلفية البانرات */
#main-content .grid.one-row.md\:grid-cols-3.grid-flow-row.gap-3.sm\:gap-8 .lazy__bg {
    width: 100%;
    height: 100%;
    background-position: center !important;
    background-size: cover !important;
    background-repeat: no-repeat !important;
}

/* تنسيق للشاشات المتوسطة (md) */
@media (min-width: 768px) {
    /* عمودين على الشاشات المتوسطة */
    #main-content .grid.one-row.md\:grid-cols-3.grid-flow-row.gap-3.sm\:gap-8 {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    /* البانر الأول يمتد على صفين */
    #main-content .grid.one-row.md\:grid-cols-3.grid-flow-row.gap-3.sm\:gap-8 .banner-entry:first-child {
        grid-row: span 2;
    }

    /* الحد الأدنى لارتفاع البانرات المربعة */
    #main-content .grid.one-row.md\:grid-cols-3.grid-flow-row.gap-3.sm\:gap-8 .banner-entry.square-photos {
        min-height: 280px;
    }

    /* الحد الأدنى لارتفاع البانر الأول */
    #main-content .grid.one-row.md\:grid-cols-3.grid-flow-row.gap-3.sm\:gap-8 .banner-entry:first-child.square-photos {
        min-height: 580px;
    }
}

/* تنسيق للشاشات الكبيرة (lg) */
@media (min-width: 1024px) {
    /* عمودين مع مسافة أكبر */
    #main-content .grid.one-row.md\:grid-cols-3.grid-flow-row.gap-3.sm\:gap-8 {
        grid-template-columns: 1fr 1fr;
        gap: 24px;
    }

    /* ارتفاعات محدثة للشاشات الكبيرة */
    #main-content .grid.one-row.md\:grid-cols-3.grid-flow-row.gap-3.sm\:gap-8 .banner-entry.square-photos {
        min-height: 320px;
    }

    #main-content .grid.one-row.md\:grid-cols-3.grid-flow-row.gap-3.sm\:gap-8 .banner-entry:first-child.square-photos {
        min-height: 664px;
    }
}

/* تنسيق للشاشات الصغيرة */
@media (max-width: 767px) {
    /* ارتفاع البانر الأول على الموبايل */
    #main-content > section:nth-child(2) > div > a:nth-child(1) {
        height: 456px;
    }
}

/* ========================================
   تنسيقات إضافية
======================================== */

/* عرض أيقونة القائمة */
#mainnav .sicon-menu {
    width: 2.5rem;
}

custom-salla-product-card .s-product-card-content {
    padding-top:5px !important;
}


span.s-cart-summary-count {
    background-color:#fff !important;
    border:1px solid var(--main-color) !important;
}

custom-salla-product-card {
    gap: 0.5rem !important;
    justify-content:center !important;
}