/* ==========================================
   1. الخلفية العامة الموحدة ونصوص سوداء واضحة
   ========================================== */
body, 
html,
.page-content, 
.main-wrapper, 
section, 
div[class*="content"] {
    background: #fbf7f0 !important;
    color: #2c221e !important;
}

body p, body span, body a, body div, body li, body h1, body h2, body h3, body h4, body h5, body h6, body label, body strong, body b {
    color: #2c221e !important;
}

/* ==========================================
   2. بطاقات المنتجات وشبكة العرض
   ========================================== */
.products-grid, 
.row.products, 
div[class*="products-grid"],
.list-products,
div[class*="products-list"] {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: space-between !important;
    gap: 10px !important;
}

.product-card, 
.product-item,
.card {
    background-color: #fcf9f4 !important;
    border: 1.5px solid #2c221e !important;
    border-radius: 12px !important;
    width: 47% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    margin-bottom: 16px !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    transition: background-color 0.3s ease !important;
    color: #2c221e !important;
}

.product-card:hover, 
.product-item:hover,
.card:hover {
    background-color: #e6d7b8 !important;
}

/* ==========================================
   3. منع قص الصور
   ========================================== */
.product-card img, 
.product-item img,
.card img,
.products-slider img,
.related-products img,
div[class*="product"] img,
div[class*="grid"] img,
div[class*="slider"] img {
    object-fit: contain !important;
    height: auto !important;
    max-height: 220px !important;
    background-color: #fcf9f4 !important;
}

.product-card .product-image,
.product-item .product-image,
.card .image-wrap,
div[class*="product-image"],
div[class*="product-thumb"] {
    background-color: #fcf9f4 !important;
    height: auto !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    overflow: visible !important;
}

/* ==========================================
   4. ضبط صورة المنتج في الصفحة الداخلية
   ========================================== */
.product-image, 
.product-single__media, 
.product-gallery,
div[class*="gallery"],
div[class*="image-container"],
.product-single__photos,
div[class*="product-img"] {
    background-color: #fcf9f4 !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
}

.product-image img, 
.product-single__media img, 
.product-gallery img,
div[class*="image"] img,
.product-single__photo img {
    width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
    background-color: #fcf9f4 !important;
}

/* ==========================================
   5. حقول الإدخال وصناديق التنسيق
   ========================================== */
.product-page,
.product-details,
.product-container,
div[class*="product-details"],
div[class*="product-inner"],
div[class*="product-wrap"] {
    background-color: #fcf9f4 !important;
    border: none !important;
}

input, 
select, 
textarea, 
.form-control,
input[type="text"],
input[type="number"],
.quantity-input {
    background-color: #fcf9f4 !important;
    color: #2c221e !important;
    border: 1px solid #c5a059 !important;
    border-radius: 6px !important;
}

/* ==========================================
   6. الشريط العلوي (Header)
   ========================================== */
header, 
.header, 
.top-bar, 
nav.header-nav,
.navbar,
.salla-header {
    background-color: #124e3c !important;
}

header > a, header > div > a, header > ul > li > a,
.header > a, .header > div > a,
.header-nav a, .navbar a, .top-bar a, .top-bar span,
.salla-header a {
    color: #f4ebd0 !important;
}

/* ==========================================
   7. القوائم المنسدلة والبحث
   ========================================== */
header .dropdown-menu,
header ul.dropdown,
header div[class*="menu"],
header div[class*="dropdown"],
header div[class*="search"],
header div[class*="autocomplete"],
header div[class*="suggest"],
header div[class*="result"],
.header .dropdown-menu,
.header div[class*="dropdown"],
.header div[class*="search"],
.site-header div[class*="dropdown"],
.site-header div[class*="search"] {
    background-color: #fcf9f4 !important;
}

header .dropdown-menu *,
header div[class*="dropdown"] *,
header div[class*="search"] *,
header div[class*="autocomplete"] *,
header div[class*="suggest"] *,
header div[class*="result"] *,
.header div[class*="dropdown"] *,
.header div[class*="search"] *,
.site-header div[class*="dropdown"] *,
.site-header div[class*="search"] * {
    color: #2c221e !important;
    opacity: 1 !important;
}

/* ==========================================
   8. ذيل الصفحة (Footer) - الأساس (لون اخضر وتثبيت اللون الفاتح لكل النصوص والروابط)
   ========================================== */
footer, 
.footer, 
div[class*="footer"],
.store-footer {
    background-color: #124e3c !important;
    border-top: 2px solid #c5a059 !important;
    padding: 30px 15px !important;
}

footer p, 
footer span, 
footer h3, 
footer h4,
footer a,
footer div,
footer li,
footer ul,
.store-footer a,
.store-footer p,
.store-footer span,
.store-footer li {
    background-color: transparent !important;
    color: #f4ebd0 !important;
}

footer svg,
footer i {
    color: #c5a059 !important;
    fill: #c5a059 !important;
}

/* ==========================================
   9. تكبير شعار المتجر في رأس الصفحة
   ========================================== */
header .header-logo img, 
.salla-header .logo img, 
header img[alt*="Minasa"], 
header img[alt*="ميناسا"],
.header__logo img,
.store-header .navbar-brand img,
.main-nav-container .navbar-brand img,
a.navbar-brand img,
a.logo img {
    max-height: 100px !important;
    height: 100px !important;
    width: auto !important;
    max-width: none !important;
    object-fit: contain !important;
}

.store-header .navbar-brand,
.main-nav-container .navbar-brand,
a.navbar-brand {
    height: auto !important;
    max-height: none !important;
    display: flex !important;
    align-items: center !important;
}

@media (max-width: 767px) {
    header .header-logo img, 
    .salla-header .logo img, 
    header img[alt*="Minasa"], 
    header img[alt*="ميناسا"],
    .header__logo img,
    .store-header .navbar-brand img,
    .main-nav-container .navbar-brand img,
    a.navbar-brand img,
    a.logo img {
        max-height: 70px !important;
        height: 70px !important;
    }
}

/* ==========================================
   10. المساحة فوق البنر الأخضر المتحرك
   ========================================== */
.store-header,
.main-nav-container,
.store-header + *:not([class*="slider"]):not([class*="announcement"]):not([class*="ticker"]):not([class*="marquee"]) {
    background-color: #ffffff !important;
}

/* ==========================================
   11. ترتيب الفوتر (عمودي متناسق 100% للابتوب والجوال)
   ========================================== */
footer,
.store-footer {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

footer .store-footer__inner,
footer .footer-container,
footer > .container,
.store-footer .store-footer__inner {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 18px !important;
    width: 100% !important;
    max-width: 600px !important;
    margin: 0 auto !important;
    float: none !important;
}

footer .store-footer__inner > *,
footer .footer-container > *,
footer > .container > *,
.store-footer__inner [class*="col-"],
footer [class*="col-"] {
    width: 100% !important;
    max-width: 100% !important;
    flex: unset !important;
    margin: 0 auto !important;
    text-align: center !important;
    float: none !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
}

footer p, footer h3, footer h4, footer li, footer a, footer span, footer div {
    text-align: center !important;
    color: #f4ebd0 !important;
}

/* ترتيب العناصر عمودياً */
footer .store-footer__inner > [class*="about"],
footer .store-footer__inner > [class*="description"],
footer .store-footer__inner > [class*="store-info"],
footer .footer-container > [class*="about"] { order: 1 !important; }

footer .store-footer__inner > [class*="app"],
footer .store-footer__inner > [class*="download"] { order: 2 !important; }

footer .store-footer__inner > [class*="links"],
footer .store-footer__inner > [class*="menu"] { order: 3 !important; }

footer .store-footer__inner > [class*="contact"],
footer .store-footer__inner > [class*="phone"] { order: 4 !important; }

footer .store-footer__inner > [class*="trust"],
footer .store-footer__inner > [class*="license"],
footer .store-footer__inner > [class*="commercial"] { order: 5 !important; }

/* الشريط السفلي وطرق الدفع */
footer .store-footer__bottom,
footer [class*="footer-bottom"],
footer [class*="footer__bottom"] {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 15px !important;
    width: 100% !important;
    text-align: center !important;
}

/* ==========================================
   12. طرق الدفع: صندوق مرتب، صغير، وغير متداخل
   ========================================== */
footer salla-payments,
footer [class*="payment"]:not([class*="payment"] *) {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 8px !important;
    width: fit-content !important;
    max-width: 95% !important;
    margin: 5px auto !important;
    padding: 8px 12px !important;
    background-color: #ffffff !important;
    border-radius: 8px !important;
    box-sizing: border-box !important;
}

footer [class*="payment"] img,
footer salla-payments img,
footer img[src*="payment"],
footer img[alt*="pay" i],
footer img[alt*="mada" i],
footer img[alt*="master" i] {
    height: 24px !important;
    width: auto !important;
    max-height: 24px !important;
    object-fit: contain !important;
    background-color: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 0 !important;
    opacity: 1 !important;
    filter: none !important;
}

/* ==========================================
   13. أسفل الفوتر: شعار ميناسا (بخلفية خضراء متطابقة) والعلامة المسجلة
   ========================================== */
footer h3,
footer h4,
footer [class*="title"] {
    color: #c5a059 !important;
    font-weight: 700 !important;
    margin-bottom: 6px !important;
}

footer,
.store-footer {
    padding-top: 30px !important;
    padding-bottom: 20px !important;
}

footer::after,
.store-footer::after {
    content: "ميناسا كوفي — علامة مسجلة" !important;
    display: block !important;
    clear: both !important;
    width: 100% !important;
    box-sizing: border-box !important;
    margin-top: 20px !important;
    padding-top: 95px !important;
    border-top: 1px solid rgba(197, 160, 89, 0.4) !important;
    text-align: center !important;
    font-size: 13px !important;
    letter-spacing: 0.5px !important;
    color: #f4ebd0 !important;
    
    background-color: #124e3c !important;
    background-image: url("https://cdn.files.salla.network/other/950479693/05054b3f-765e-4cdd-a33d-9cb3c63317e3-original.webp") !important;
    background-repeat: no-repeat !important;
    background-position: center 10px !important;
    background-size: auto 65px !important;
}

/* ==========================================
   14. قائمة التصنيفات: توسيط في المنتصف + لون أسود (للكمبيوتر)
   ========================================== */
@media (min-width: 992px) {
    salla-menu,
    .store-header .main-menu,
    .main-nav-container .main-menu,
    .store-header .navbar-nav,
    .main-nav-container .navbar-nav,
    ul.main-menu {
        display: flex !important;
        flex: 1 1 auto !important;
        justify-content: center !important;
        align-items: center !important;
        margin-left: auto !important;
        margin-right: auto !important;
        text-align: center !important;
    }

    salla-menu a,
    .store-header .main-menu > li > a,
    .main-nav-container .main-menu > li > a,
    .store-header .navbar-nav > li > a,
    .main-nav-container .navbar-nav > li > a,
    ul.main-menu > li > a {
        color: #000000 !important;
    }
}

/* ==========================================
   15. تقليل الفراغات الكبيرة بين الأقسام
   ========================================== */
.page-content > section,
.page-content > div[class*="section"],
.home-page > section,
.home-page > div[class*="section"],
salla-slideshow,
salla-products-slider,
div[class*="component"],
section[class*="home"] {
    margin-top: 15px !important;
    margin-bottom: 15px !important;
    padding-top: 10px !important;
    padding-bottom: 10px !important;
}

/* غالبًا الفراغ الكبير مصدره هامش زائد داخل الحاوية نفسها */
.container, 
.s-block-content,
div[class*="block-content"] {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* تقليل الفراغ الفارغ بين السلايدر والقسم اللي بعده مباشرة */
.store-header + * + * {
    margin-top: 10px !important;
}