/* =========================================
   2027 Premium Digital Store UI - Clean & High CRO
   ========================================= */

:root {
    --color-primary: #FFB38F;
    --color-primary-dark: #e89975;
    --color-primary-light: #ebd2ae;
    --color-primary-reverse: #eee;
    --f-h: white;
    --1: #FFB38F;
    --2: #FFB38F;
    --logo: url("https://cdn.salla.sa/cdn-cgi/image/fit=scale-down,width=400,height=400,onerror=redirect,format=auto/BrPmxD/6AeoM1R3t2CBPWmBunFNDKgnvSjZycRZaKCb6Hme.png");
    --shadow-soft: 0 10px 25px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 15px 35px rgba(255, 179, 143, 0.2);
    --transition-smooth: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* --- Base & Dynamic Background --- */
html { scroll-behavior: smooth; }
body, 
.s-block, 
section#featured-products-style2-2, 
body.index, 
body.product-index, 
body.page-single {
    background-image: none !important;
    background-color: #f5f6f8 !important; /* رمادي فاتح واحترافي */
}
* { transition: var(--transition-smooth); }

/* --- Header & Navigation --- */
.main-nav-container {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-soft);
    border-bottom: 1px solid rgba(0,0,0,0.02);
}
/* حل مشكلة تداخل الشعار (إلغاء التكرار وإظهار الأصلي فقط) */
.navbar-brand {
    background-image: none !important; 
    animation: none !important;
    filter: none !important;
    display: block;
    transition: var(--transition-smooth);
}
.navbar-brand img {
    height: auto !important; 
    max-height: 70px !important;
    display: block !important;
    opacity: 1 !important;
}
.navbar-brand:hover { transform: scale(1.05); }

/* إزالة أي شعارات خلفية أخرى كانت تسبب تداخل */
body:not(.product-index):not(.product-single):after { display: none !important; }

/* إخفاء الشريط العلوي القديم بالكامل */
.top-navbar, .s-top-nav, #top-nav {
    display: none !important; 
}

/* إخفاء أيقونات الوضع الليلي القديمة */
button[aria-label*="dark"], button[aria-label*="Dark"], .dark-mode-toggle, .modern-dm-toggle, [data-theme-toggle] {
    display: none !important;
}
.header-btn__icon svg path[d*="M21 12.79A9"] {
    display: none !important;
}

/* تصميم الشريط الإعلاني المتحرك */
#pro-announcement-bar {
    background: #111; 
    color: var(--color-primary) !important; 
    text-align: center;
    padding: 10px 15px;
    font-size: 15px;
    font-weight: 800;
    position: relative;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    border-bottom: 2px solid rgba(255, 179, 143, 0.15);
}
.announcement-text {
    display: flex;
    align-items: center;
    gap: 10px;
    animation: fadeSlideUp 0.6s ease-in-out;
}
.announcement-text svg {
    width: 22px;
    height: 22px;
    stroke: var(--color-primary);
    fill: none;
}
@keyframes fadeSlideUp { 
    0% { opacity: 0; transform: translateY(10px); } 
    100% { opacity: 1; transform: translateY(0); } 
}

/* تصميم مربع البحث الجديد في الهيدر */
.custom-header-search {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1.5px solid #eaeaea;
    border-radius: 50px;
    padding: 6px 16px;
    margin-left: 15px;
    margin-right: 15px;
    transition: var(--transition-smooth);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}
.custom-header-search:focus-within {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(255, 179, 143, 0.15);
}
.custom-header-search input {
    border: none;
    outline: none;
    background: transparent;
    width: 140px;
    font-family: inherit;
    font-size: 14px;
    color: #2c3e50;
    transition: width 0.3s ease;
}
.custom-header-search input:focus { width: 200px; }
.custom-header-search button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    color: var(--color-primary-dark);
}
.custom-header-search button svg { stroke: var(--color-primary); }
.custom-header-search:hover {
    border-color: var(--color-primary-dark);
    box-shadow: 0 0 10px rgba(255, 179, 143, 0.1);
}

@media (max-width: 768px) {
    .custom-header-search input { width: 100px; }
    .custom-header-search input:focus { width: 140px; }
}

/* --- Product Cards (High CRO) --- */
.s-product-card-entry {
    background: #fff;
    border-radius: 20px;
    border: 1px solid transparent;
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    padding: 10px;
}
.s-product-card-entry:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(255, 179, 143, 0.3);
}
.s-product-card-image {
    border-radius: 15px !important;
    overflow: hidden;
    background: #f9f9f9 !important;
}
.s-product-card-image img {
    transition: var(--transition-smooth);
}
.s-product-card-entry:hover .s-product-card-image img {
    transform: scale(1.05);
}

/* --- Typography & Titles --- */
.s-product-card-content-title a {
    font-size: 16px;
    font-weight: 700;
    color: #2c3e50;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}
.s-block__title h2, .s-slider-block__title h2 {
    background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary));
    color: #fff !important;
    border-radius: 12px;
    padding: 8px 20px;
    font-size: 18px !important;
    font-weight: 800;
    display: inline-block;
    box-shadow: 0 4px 15px rgba(255, 179, 143, 0.3);
}

/* --- Add to Cart Button (The Conversion Driver) --- */
.cart-submit-wrap .s-button-element, 
.s-products-list-wrapper .s-button-element {
    background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary)) !important;
    color: #fff !important;
    border-radius: 12px !important;
    font-weight: 700;
    border: none;
    box-shadow: 0 4px 15px rgba(255, 179, 143, 0.3);
    width: 100%;
    margin-top: 10px;
}
.cart-submit-wrap .s-button-element:hover, 
.s-products-list-wrapper .s-button-element:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 10px 25px rgba(255, 179, 143, 0.5);
    filter: brightness(1.05);
}

/* --- Badges & Pricing --- */
.s-product-card-promotion-title {
    background-color: #e74c3c !important; 
    color: white !important;
    border-radius: 8px;
    padding: 4px 10px !important;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.3);
}

/* --- Product Description HTML Styling --- */
.product__description {
    background: #fff;
    border-radius: 15px;
    padding: 25px;
    box-shadow: var(--shadow-soft);
    border: 1px solid #f0f0f0;
    color: #444;
    line-height: 1.8;
}
.product__description h3, .product__description h4 {
    color: var(--color-primary-dark);
    margin-bottom: 15px;
}

/* --- Menu Hover --- */
.main-menu li a { transition: var(--transition-smooth); }
.main-menu li a:hover { color: var(--color-primary) !important; transform: translateY(-2px); }

/* =========================================
   --- الفوتر (Footer Fixes) ---
   ========================================= */

/* الخلفية السوداء وإزالة الفراغات */
footer.store-footer,
.footer-is-light .store-footer,
.store-footer__inner,
.footer-is-light .store-footer .store-footer__inner {
    background: #111 !important;
    background-color: #111 !important;
    margin: 0 !important;
    border-radius: 0 !important;
    max-width: 100% !important;
    border: none !important;
    box-shadow: none !important;
}

/* توحيد شريط الحقوق السفلي */
.store-footer > div:last-child,
footer.store-footer .bg-gray-50,
.store-footer-copyright {
    background-color: #111 !important;
    border-top: 1px solid rgba(255, 255, 255, 0.05) !important;
}

/* الألوان الأساسية: النص والأيقونات بالأبيض */
footer.store-footer *,
footer.store-footer h3,
footer.store-footer p,
footer.store-footer span,
footer.store-footer a,
.store-footer .s-contacts-icon {
    color: #fff !important; 
}
.store-footer .s-contacts-icon {
    border-color: #fff !important;
    background-color: transparent !important;
}

/* تأثير التمرير (Hover) ليعمل باللون البرتقالي إجبارياً */
footer.store-footer a {
    transition: all 0.3s ease !important;
    display: inline-block;
}
footer.store-footer a:hover,
footer.store-footer a:hover *,
footer.store-footer a:hover span,
footer.store-footer a:hover p,
footer.store-footer .s-contacts-icon:hover {
    color: var(--color-primary) !important; 
}
footer.store-footer a:hover .s-contacts-icon {
    border-color: var(--color-primary) !important; 
}
footer.store-footer a:hover {
    transform: translateX(-5px) !important; 
}

/* محاذاة القوائم (روابط مهمة) لليمين */
.store-footer .s-menu-footer-list,
.store-footer__inner ul:not(.s-contacts-list) {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important; 
    gap: 12px !important;
}
.store-footer .s-menu-footer-list li,
.store-footer__inner ul:not(.s-contacts-list) li {
    display: block !important;
    width: 100% !important;
    text-align: right !important;
}

/* قسم (تواصل معنا) - الأيقونة بجانب النص في سطر واحد */
.store-footer .s-contacts-list {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 15px !important;
}
.store-footer .s-contacts-list li {
    display: block !important;
    margin-bottom: 12px !important;
    width: 100% !important;
}
.store-footer .s-contacts-list li a,
.store-footer .s-contacts-list li div {
    display: inline-flex !important;
    flex-direction: row !important; 
    align-items: center !important; 
    justify-content: flex-start !important; 
    gap: 12px !important; 
    width: 100% !important;
}
.store-footer .s-contacts-list .s-contacts-icon {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important; 
    flex-shrink: 0 !important; 
    width: 42px !important;
    height: 42px !important;
}
/* ضبط اتجاه الإيميل والرقم لتجنب انقلاب الأرقام */
.store-footer .s-contacts-list li span,
.store-footer .s-contacts-list li p,
.store-footer .s-contacts-list li bdi {
    margin: 0 !important;
    text-align: right !important;
    direction: ltr !important; 
    display: block !important;
}

/* إخفاء الشعار الوهمي القديم */
.footer-is-light .store-footer .store-footer__inner:before {
    display: none !important;
}

/* --- Mobile Optimizations --- */
@media (max-width: 768px) {
    .s-products-list-horizontal-cards, .s-products-list-vertical-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }
    .s-product-card-entry {
        padding: 8px;
        border-radius: 15px;
    }
}

/* =========================================
   موازنة الأزرار العائمة ومحاذاة الفوتر
   ========================================= */

/* 1. موازنة زر الواتساب وزر الصعود على نفس السطر تماماً */
.wa-float-2027, 
.whatsapp-float,
a[href*="wa.me"] {
    bottom: 85px !important;
    left: 25px !important;
}

#scroll-icon, 
.scroll-top-2027, 
.pro-scroll-top {
    bottom: 85px !important;
    right: 25px !important;
}

/* 2. كسر الـ Column القديم وإجبار الأيقونة والنص على خط أفقي واحد */
footer.store-footer .s-contacts-list,
footer.store-footer ul[class*="contact"] {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 16px !important;
    padding: 0 !important;
}

footer.store-footer .s-contacts-list li {
    display: block !important;
    width: 100% !important;
}

footer.store-footer .s-contacts-list li a,
footer.store-footer .s-contacts-list li div {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 12px !important;
    width: 100% !important;
}

footer.store-footer .s-contacts-icon {
    display: inline-flex !important;
    margin: 0 !important;
    flex-shrink: 0 !important;
}

footer.store-footer .s-contacts-list li span,
footer.store-footer .s-contacts-list li p,
footer.store-footer .s-contacts-list li bdi {
    margin: 0 !important;
    display: inline-block !important;
    direction: ltr !important;
    text-align: right !important;
    font-size: 14px !important;
}