/* =========================================
   NEO IPTV - Custom Theme (Unified)
   Based on work by Ibrahim Mdoukh
   ========================================= */

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@200..1000&display=swap');

:root {
    --brand-navy: #0e2a5c;
    --brand-navy-dark: #071a3d;
    --brand-green: #00a651;
    --brand-green-dark: #008a43;
    --bg-white: #ffffff;
    --bg-light: #f8f9fa;
    --border-light: #eaeaea;
}

body {
    font-family: "Cairo", sans-serif;
}

/* ==============================
   1) شاشة البداية (Splash Screen)
============================== */
/* نستخدم html:has() ليظهر الشعار فوراً قبل المتجر */
html:has(body.index)::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #ffffff;
    background-image: url('https://cdn.files.salla.network/other/510997002/51563bd6-9f0c-473f-b29f-722773a9f80b-original.webp');
    background-repeat: no-repeat;
    background-position: center;
    background-size: 220px;
    z-index: 999999999;
    pointer-events: none;
    
    /* الشعار يظهر فوراً عند تحميل الصفحة ثم يختفي بنعومة */
    animation: neoSplash 2.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes neoSplash {
    0%   { opacity: 1; transform: scale(1); }    /* يظهر مباشرة */
    70%  { opacity: 1; transform: scale(1); }    /* يثبت بينما يحمّل المتجر بالخلفية */
    100% { opacity: 0; visibility: hidden; transform: scale(1.15); } /* يختفي بنعومة */
}

/* للأجهزة الصغيرة */
@media (max-width: 640px) {
    html:has(body.index)::before {
        background-size: 150px;
    }
}

/* ⚠️ احتياطي للمتصفحات القديمة (اختياري) */
@supports not selector(:has(*)) {
    body.index::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background-color: #ffffff;
        background-image: url('https://cdn.files.salla.network/other/510997002/51563bd6-9f0c-473f-b29f-722773a9f80b-original.webp');
        background-repeat: no-repeat;
        background-position: center;
        background-size: 220px;
        z-index: 999999999;
        pointer-events: none;
        animation: neoSplash 2.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    }
}

/* ==============================
   2) الهيدر (Header) - أبيض نظيف
============================== */
.store-header {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column-reverse;
    background-color: var(--bg-white) !important;
    box-shadow: rgba(14, 42, 92, 0.08) 0px 4px 12px;
}

.top-navbar,
.main-nav-container {
    width: 100%;
    background: var(--bg-white) !important;
}

.top-navbar {
    z-index: 1;
}

.main-nav-container.fixed-header .inner {
    background: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(40px);
}

.top-navbar .s-search-input {
    color: #000 !important;
    border: 1px solid var(--brand-navy) !important;
    background-color: #ffffff;
}

.s-search-inline {
    min-width: 220px;
    max-width: 700px;
    margin-left: auto;
}

.s-menu-topnav-list {
    display: none;
}

.top-navbar .hidden {
    display: none !important;
}

.sicon-menu {
    font-size: 30px;
}

@media (min-width: 1024px) {
    .s-contacts-header {
        display: none;
    }
    .main-menu li > a:hover {
        color: var(--brand-green) !important;
    }
}

.main-nav-container .leading-none {
    margin-top: 10px;
}

/* شعار المتجر */
.navbar-brand img {
    max-height: 4rem;
    padding: 10px;
}

@media (min-width: 640px) {
    .navbar-brand img {
        max-height: 6rem !important;
    }
}

.main-nav-container.fixed-pinned .navbar-brand img {
    max-height: 5rem;
}

/* أيقونات الهيدر مع تأثير دائري */
.header-btn__icon {
    position: relative;
}

.header-btn__icon:after {
    content: "";
    position: absolute;
    top: 7%;
    left: 7%;
    border-radius: 50%;
    border-top: 1px solid transparent;
    border-right: 1px solid var(--brand-green);
    border-bottom: 1px solid transparent;
    border-left: 1px solid var(--brand-green);
    width: 85%;
    height: 85%;
    transition: border 600ms cubic-bezier(.785, .135, .15, .86), transform 600ms cubic-bezier(.785, .135, .15, .86);
    transform: rotate(45deg);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.header-btn__icon:hover:after {
    border: 1px solid var(--brand-green) !important;
    transform: rotate(135deg);
}

.sub-menu li > a {
    color: #000000 !important;
}

/* ==============================
   3) الفوتر (Footer) - أبيض نظيف
============================== */
.store-footer,
.store-footer__inner {
    background-color: var(--bg-white) !important;
}

.store-footer__inner {
    border-top: 3px solid var(--brand-navy);
    color: var(--brand-navy);
}

.store-footer h3 {
    font-size: 1.3rem;
    color: var(--brand-navy) !important;
    font-weight: 700;
}

.store-footer .opacity-75 {
    opacity: 1;
}

.store-footer .opacity-75 p {
    color: #4a5568;
}

.border,
.store-footer .social-link,
.s-contacts-icon,
.s-social-link a {
    border-color: var(--brand-green) !important;
    color: var(--brand-navy);
}

.store-footer .social-link:hover,
.s-social-link a:hover {
    background-color: var(--brand-green);
    color: #ffffff;
}

@media (min-width: 1024px) {
    .store-footer__inner .container > div {
        grid-column: span 2 / span 2;
    }
}

salla-apps-icons {
    display: none;
}

/* ==============================
   4) المميزات (Features)
============================== */
.s-block--features__item .feature-icon i {
    color: var(--brand-navy);
}

.s-block--features__item .feature-icon {
    background: transparent;
}

.s-block--features__item h2 {
    color: var(--brand-green);
}

/* ==============================
   5) عناوين الأقسام (Section Titles)
============================== */
.s-block__title h2,
.s-slider-block__title h2 {
    font-size: 1.5rem;
    text-transform: uppercase;
    background-image: linear-gradient(-225deg, var(--brand-navy) 0%, var(--brand-navy) 29%, var(--brand-green) 67%, var(--brand-navy-dark) 100%);
    background-size: 200% auto;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: textclip 4s linear infinite;
    display: inline-block;
    font-weight: 700;
    line-height: 1.5;
}

.main-content h1 {
    color: var(--brand-navy);
}

@keyframes textclip {
    100% { background-position: 200% center; }
}

/* ==============================
   6) سلايدر الصور (Photos Slider)
============================== */
.s-block.s-block--photos-slider {
    margin-top: 10px !important;
}

salla-slider.photos-slider .swiper-slide {
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    width: 100% !important;
}

[dir=rtl] salla-slider[type]:not(.hydrated) > div,
[dir=rtl] salla-slider[type]:not(.hydrated) .swiper > div > div,
[dir=rtl] .carousel-slider .swiper {
    padding: 0;
}

.s-slider-v-centered .s-slider-block__title-nav button.swiper-button-disabled {
    background: rgba(255, 255, 255, 0.33);
}

/* ==============================
   7) بطاقات المنتجات (Product Cards)
============================== */
.s-products-slider-card {
    padding-top: 5px !important;
    padding-bottom: 5px !important;
}

.s-product-card-promotion-title,
.promotion-title {
    background: rgba(14, 42, 92, 0.8);
    backdrop-filter: blur(40px);
}

.s-product-card-vertical .s-product-card-image {
    overflow: hidden;
}

.s-product-card-entry {
    border: 1px solid var(--border-light) !important;
    border-radius: 16px !important;
    overflow: hidden;
    background-color: var(--bg-white);
    box-shadow: 0px 4px 12px rgba(14, 42, 92, 0.06) !important;
    transition: all 0.3s ease;
}

.s-product-card-entry:hover {
    transform: translateY(-4px);
    border-color: var(--brand-navy) !important;
    box-shadow: 0px 10px 24px rgba(14, 42, 92, 0.15) !important;
}

.s-product-card-entry img {
    transition: 0.4s ease;
}

.s-product-card-entry:hover img {
    transform: scale(1.05);
}

.s-product-card-price {
    color: var(--brand-navy);
    font-weight: 700;
}

.s-product-card-content-title a {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 2rem;
    color: var(--brand-navy);
}

.s-product-card-entry:hover .s-product-card-content-title a {
    color: var(--brand-green);
    transition: 0.3s;
}

@media (max-width: 1024px) {
    .s-product-card-content-title a {
        font-size: 1rem;
    }
}

.s-product-card-fit-height .s-product-card-image {
    max-height: 20rem;
}

.s-product-card-content {
    text-align: center;
}

.s-product-card-content-sub {
    justify-content: center;
}

.s-product-card-vertical .s-product-card-wishlist-btn:where([dir=rtl], [dir=rtl] *) {
    left: auto !important;
    right: .5rem !important;
}

/* زر أضف إلى السلة */
.s-button-primary-outline:hover {
    color: #000000 !important;
}

.s-product-card-entry .s-button-primary-outline .s-button-text {
    color: var(--brand-navy);
}

.s-product-card-entry .s-button-primary-outline:hover .s-button-text {
    color: #ffffff;
}

.s-button-element:not(:disabled):not([loading]) {
    animation: signal 1200ms linear infinite;
}

@keyframes signal {
    0% { box-shadow: 0 0 0 0 rgba(0, 166, 81, 0.5); }
    100% { box-shadow: 0 0 0 6px rgba(0, 166, 81, 0); }
}

/* ==============================
   8) إخفاء عناصر غير مرغوبة
============================== */
#offers {
    display: none !important;
}

/* إخفاء زر المفضلة (الإعجاب) من كروت المنتجات */
.s-product-card-wishlist-btn {
    display: none !important;
}