/* =========================================
   Meat House Theme - Brand Identity Edition
   (Red & Cream Theme)
   ========================================= */

/* 1. متغيرات الهوية (CSS Variables) */
:root {
    --mh-bg: #fff8f8;        /* الخلفية الأساسية */
    --mh-red-dark: #801919;  /* أحمر غامق (للفوتر والعناوين) */
    --mh-red-light: #b30909; /* أحمر فاتح (للأزرار والتفاعل) */
    --mh-text: #1a1a1a;      /* لون النص الأساسي (أسود) */
    --mh-gold-accent: #b30909; /* تم استبدال الذهبي بالأحمر الفاتح */
}

/* 2. الخلفيات والنصوص العامة */
.bg-white {
    background-color: var(--mh-bg) !important;
}

body {
    background-color: var(--mh-bg) !important;
    color: var(--mh-text); /* نص داكن */
}

/* إخفاء العنوان الأول في الصفحات الفردية */
.content--single-page h1:first-of-type {
    display: none;
}

.s-comments-page {
    padding-top: 0rem;
}

.p-6 {
    padding: 0rem;
}

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

/* لون خلفية الفوتر الداخلية */
.footer-is-light .store-footer .store-footer__inner {
    background-color: transparent !important;
    color: white; /* النص في الفوتر يبقى أبيض */
}

@media (max-width: 1024px) {
    /* تنسيق العنوان ليكون قابلاً للضغط */
    .footer-heading-mobile {
        cursor: pointer;
        position: relative;
        padding-bottom: 10px;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        margin-bottom: 10px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        color: #ffffff !important; /* أبيض */
    }

    /* أيقونة السهم (+) */
    .footer-heading-mobile::after {
        content: '+'; 
        font-size: 1.5rem;
        font-weight: bold;
        color: #ffffff;
        transition: transform 0.3s ease;
        margin-left: 10px;
    }

    /* تغيير الأيقونة عند الفتح (-) */
    .footer-heading-mobile.active::after {
        content: '-';
        transform: rotate(180deg);
        color: #fff8f8;
    }

    .mobile-content {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease-out;
    }
    
    .s-menu-footer-item {
        color: #f0f0f0;
        text-decoration: none;
        transition: color 0.3s;
        display: block;
        padding: 5px 0;
    }
}

@media (min-width: 1024px) {
    .store-footer__inner {
        padding-bottom: 0rem;
    }
}

/* تصميم الفوتر الجديد - أحمر غامق هوية */
.store-footer {
    position: relative;
    /* تدرج من الأحمر الغامق إلى الأحمر الفاتح */
    background: linear-gradient(to bottom, #801919, #601010) !important;
    background-size: cover !important;
    border-top: 5px solid #b30909; /* حد علوي أحمر فاتح */
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    overflow: hidden !important; 
}

/* خلفيات شفافة للعناصر الداخلية */
.store-footer__inner, 
.footer-copyright,
.footer-is-light .store-footer .store-footer__inner {
    background-color: transparent !important;
    background: transparent !important;
}

/* ألوان النصوص في الفوتر */
.store-footer h3, 
.store-footer .footer-heading-mobile {
    color: #ffffff !important; /* عناوين بيضاء */
    text-shadow: none;
}

.store-footer p, 
.store-footer a, 
.store-footer span,
.s-menu-footer-item {
    color: #e6e6e6 !important; /* نص أبيض مائل للرمادي */
    justify-content: center;
}

/* تأثير الروابط */
.store-footer a:hover {
    color: #fff8f8 !important; /* أبيض كريمي عند التمرير */
    transform: translateX(-5px);
    font-weight: bold;
}

.social-icon, .s-social-icon {
    color: #ffffff !important; /* أيقونات بيضاء */
}
.store-footer .contact-social ul {
    justify-content: center;
}

.store-footer__inner {
    border-bottom: 0px;
}

/* ================= الهيدر والقوائم (Header & Nav) ================= */

.fixed-header {
    background: var(--mh-bg) !important; /* خلفية بيضاء كريمية */
    background-color: var(--mh-bg) !important;
    background-image: none !important;
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
    border-bottom: 2px solid #b30909; /* حد أحمر فاتح */
    box-shadow: 0 4px 12px rgba(128, 25, 25, 0.05);
}

.fixed-header .bg-inherit {
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
    background: var(--mh-bg) !important;
}

#mainnav {
    background-color: transparent !important;
    background-image: none !important;
    color: var(--mh-red-dark);
}

.index #mainnav {
    background: transparent !important;
}

.sub-menu {
    background: #ffffff !important; /* خلفية القائمة الفرعية بيضاء */
    border: 1px solid #b30909;
}

/* ألوان الروابط في الهيدر */
.index .main-menu li.root-level>a {
    color: var(--mh-red-dark); /* أحمر غامق */
    font-weight: bold;
}

@media only screen and (min-width: 1024px) {
    .main-menu>.has-children:hover>a,
    .main-menu li>a:hover {
        color: var(--mh-red-light); /* أحمر فاتح عند التمرير */
    }
}

/* أيقونات الهيدر */
.index [class^=sicon-], .index [class*=" sicon-"] {
    color: var(--mh-red-dark); /* أحمر غامق */
}

[class^=sicon-], [class*=" sicon-"] {
    color: var(--mh-red-dark);
}

/* ================= أقسام المتجر (Sections) ================= */

.ty-about-section {
    background: var(--mh-bg) !important;
}

/* العناوين والأقسام */
.ty-sec-title {
    color: var(--mh-red-dark); /* أحمر غامق */
    font-size: 1.5rem;
    font-weight: 800;
    position: relative;
    display: inline-block;
    padding-bottom: 15px;
}

/* الخط تحت العنوان */
.ty-sec-title::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background-color: var(--mh-red-light); /* أحمر فاتح */
    border-radius: 2px;
    width: 40%;
    margin: 0 auto;
}

/* المحتوى النصي */
.ty-about-content h3 {
    color: var(--mh-red-dark) !important;
}
.ty-about-content p {
    color: #555555 !important; /* رمادي داكن للقراءة */
}

/* الأزرار */
.ty-btn-outline {
    display: inline-block;
    border: 2px solid var(--mh-red-light); /* حدود أحمر فاتح */
    color: var(--mh-red-light);
    background: transparent;
    border-radius: 50px;
}
.ty-btn-outline:hover {
    background: var(--mh-red-light);
    color: #ffffff;
}

/* إطار الفيديو */
.ty-about-video-wrapper {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 10px 10px 0px var(--mh-red-light) !important; /* ظل أحمر فاتح */
    aspect-ratio: 16 / 9;
    border: 1px solid #ddd;
}

@media (max-width: 768px) {
    .ty-about-video-wrapper {
        box-shadow: none;
        border: 4px solid var(--mh-red-light) !important;
    }
}

/* ================= عناصر متفرقة ================= */

/* السلة */
.s-cart-summary-total {
    color: var(--mh-red-light);
}

/* التصنيفات */
.ty-cat-icon {
    width: 150px;
    height: 150px;
    border: 2px solid #eaeaea;
    border-radius: 50%;
    background: #ffffff; /* أبيض */
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

@media (max-width: 768px) {
    .ty-cat-icon {
        width: 130px;
        height: 130px;
        margin: 0 auto;
    } 
    .ty-cats-grid {
        gap: 20px;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
    }
}

/* إخفاء عناصر غير مرغوبة */
#ty-hero-slider { display: none; }
.index .top-navbar { display: none; }
#tySteps { display: none; }
.s-trust-badges-wrapper { display: none; }
.ad-marquee-section, .ad-cats-section { margin-bottom: 0px; }

/* شاشة التحميل (Loader Overlay) */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--mh-bg);
    z-index: 9999990;
    transition: opacity 0.8s ease-out, visibility 0.8s;
    opacity: 1;
    visibility: visible;
}

body.site-loaded::before {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* عناوين البلوكات */
.s-block__title {
    margin-top: 2rem;
    margin-bottom: 2rem;
    justify-content: center;
    color: var(--mh-red-dark);
}

.s-block--tabs-produtcs {
    background: var(--mh-bg) !important;
}

/* الشعار المتحرك أو الدائرة */
.ty-half-ring {
    width: 200px;
    height: 200px;
    margin-top: -101px;
    border-color: var(--mh-red-light);
}

.ty-half-spinner-wrapper {
    left: 28%;
    width: 200px;
    height: 130px;
}

@media (max-width: 768px) {
    .ty-half-spinner-wrapper {
        width: 200px;
        height: 200px;
        top: 0px;
    }
    .ty-half-ring {
        width: 200px;
        height: 200px;
        margin-top: -50px;
    }
}


/* =========================================
   تنسيق اللودر بالهوية الجديدة (Meat House Brand Loader)
   ========================================= */

/* 1. خلفية اللودر */
#mh-loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--mh-bg); /* أبيض كريمي #fff8f8 */
    z-index: 999999999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease, visibility 0.5s;
}

/* 2. حاوية اللودر */
.mh-loader-content {
    position: relative;
    width: 180px;
    height: 180px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* 3. الشعار في المنتصف */
.mh-loader-logo {
    width: 90px;
    height: auto;
    position: relative;
    z-index: 2;
    animation: mh-pulse 2s infinite ease-in-out;
}

/* 4. الحلقة الدوارة (الألوان الجديدة) */
.mh-spinner-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 4px solid transparent;
    border-top-color: var(--mh-red-light); /* أحمر فاتح #b30909 */
    border-bottom-color: var(--mh-red-dark); /* أحمر غامق #801919 */
    border-radius: 50%;
    animation: mh-spin 1.2s linear infinite;
    z-index: 1;
    box-shadow: 0 0 15px rgba(179, 9, 9, 0.1);
}

/* 5. حركة الدوران */
@keyframes mh-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 6. حركة النبض للشعار */
@keyframes mh-pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.9; }
    100% { transform: scale(1); opacity: 1; }
}

/* إخفاء اللودر */
body.mh-loaded #mh-loader-overlay {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}