@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

/* ── Page Loader ─────────────────────────────────────────────────── */
#madaen-loader {
    position: fixed;
    inset: 0;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    z-index: 99999;
    opacity: 1;
    transition: opacity 0.45s ease;
    pointer-events: all;
}

#madaen-loader.out {
    opacity: 0;
    pointer-events: none;
}

.madaen-loader__ring {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 3px solid rgba(232, 64, 32, 0.12);
    border-top-color: #e84020;
    animation: madaen-spin 0.72s linear infinite;
    will-change: transform;
}

.madaen-loader__name {
    font-family: 'Effra', 'PingARLT', sans-serif;
    font-size: 1.35rem;
    font-weight: 700;
    color: #1a1a1a;
    letter-spacing: 0.02em;
    opacity: 0.85;
}

@keyframes madaen-spin {
    to { transform: rotate(360deg); }
}


@font-face {
    font-family: 'Effra';
    src: url('https://cdn.jsdelivr.net/gh/q2ha/effrafont@main/Effra_Rg.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Effra';
    src: url('https://cdn.jsdelivr.net/gh/q2ha/effrafont@main/Effra-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

:root {
    --font-latin: 'Poppins', sans-serif;
    --font-arabic: 'Effra', 'PingARLT', sans-serif;

    --m-orange: #e84020;
    --m-orange-dark: #c23318;
    --m-orange-light: #ff6b3d;
    --m-glow: rgba(232, 64, 32, 0.2);
    --m-glow-strong: rgba(232, 64, 32, 0.4);

    --radius-card: 16px;
    --radius-btn: 12px;

    --shadow-card: 0 2px 12px rgba(0, 0, 0, 0.3), 0 1px 3px rgba(0, 0, 0, 0.2);
    --shadow-hover: 0 12px 32px rgba(0, 0, 0, 0.4), 0 4px 12px var(--m-glow);
    --shadow-btn: 0 4px 16px var(--m-glow);
    --shadow-btn-h: 0 8px 24px var(--m-glow-strong);

    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --t-fast: all 0.2s var(--ease);
    --t-base: all 0.35s var(--ease);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-arabic) !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

bdi,
.price,
[class*="price"],
[class*="s-price"],
.number,
[lang="en"],
span:dir(ltr),
salla-price {
    font-family: var(--font-latin) !important;
    font-feature-settings: 'tnum';
    letter-spacing: -0.01em;
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--m-orange-dark);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--m-orange);
}

#header,
.s-header,
header.s-header {
    transition: var(--t-base) !important;
    will-change: background, box-shadow;
}

#header.scrolled,
.s-header.scrolled {
    -webkit-backdrop-filter: blur(16px) saturate(180%) !important;
    backdrop-filter: blur(16px) saturate(180%) !important;
    background: rgba(15, 20, 22, 0.88) !important;
    box-shadow: 0 1px 0 rgba(232, 64, 32, 0.1), 0 4px 24px rgba(0, 0, 0, 0.35) !important;
}

salla-product-card,
.s-product-card {
    border-radius: var(--radius-card) !important;
    overflow: hidden !important;
    transition: var(--t-base) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.09), 0 1px 3px rgba(0, 0, 0, 0.05) !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    will-change: transform, box-shadow;
}

salla-product-card:hover,
.s-product-card:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.13), 0 3px 8px rgba(232, 64, 32, 0.1) !important;
    border-color: rgba(232, 64, 32, 0.2) !important;
}

salla-product-card .s-product-card__image,
.s-product-card .s-product-card__image,
salla-product-card [class*="image-wrapper"],
salla-product-card [class*="img-wrapper"] {
    overflow: hidden !important;
}

salla-product-card img,
.s-product-card img {
    transition: transform 0.5s var(--ease) !important;
    will-change: transform;
}

salla-product-card:hover img,
.s-product-card:hover img {
    transform: scale(1.07) !important;
}

salla-badge,
[class*="s-badge"],
[class*="badge"] {
    border-radius: 6px !important;
    font-family: var(--font-latin) !important;
    font-weight: 600 !important;
    font-size: 0.75rem !important;
}

salla-button button,
.s-btn,
[class*="s-btn"],
button.s-button {
    border-radius: var(--radius-btn) !important;
    font-family: var(--font-arabic) !important;
    font-weight: 600 !important;
    transition: var(--t-fast) !important;
    will-change: transform, box-shadow;
}

.s-btn-primary,
[class*="s-btn-primary"],
salla-button[shape="btn-primary"] button,
salla-add-product-button button {
    background: linear-gradient(135deg, var(--m-orange) 0%, var(--m-orange-dark) 100%) !important;
    box-shadow: var(--shadow-btn) !important;
    border: none !important;
}

.s-btn-primary:hover,
[class*="s-btn-primary"]:hover,
salla-button[shape="btn-primary"] button:hover,
salla-add-product-button button:hover {
    transform: translateY(-2px) !important;
    box-shadow: var(--shadow-btn-h) !important;
    background: linear-gradient(135deg, var(--m-orange-light) 0%, var(--m-orange) 100%) !important;
}

.s-btn-primary:active,
salla-add-product-button button:active {
    transform: translateY(0) !important;
}

.s-btn-secondary,
[class*="s-btn-secondary"] {
    border-radius: var(--radius-btn) !important;
    border: 1.5px solid rgba(232, 64, 32, 0.28) !important;
    transition: var(--t-fast) !important;
}

.s-btn-secondary:hover,
[class*="s-btn-secondary"]:hover {
    border-color: var(--m-orange) !important;
    background: rgba(232, 64, 32, 0.06) !important;
    transform: translateY(-1px) !important;
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

.animate-delay-1 {
    transition-delay: 0.1s !important;
}

.animate-delay-2 {
    transition-delay: 0.2s !important;
}

.animate-delay-3 {
    transition-delay: 0.3s !important;
}

.animate-delay-4 {
    transition-delay: 0.4s !important;
}

.s-search-input,
salla-search input,
input[type="search"],
[class*="search-input"] {
    border-radius: 12px !important;
    border: 1.5px solid rgba(232, 64, 32, 0.18) !important;
    background: rgba(255, 255, 255, 0.05) !important;
    font-family: var(--font-arabic) !important;
    transition: var(--t-fast) !important;
}

.s-search-input:focus,
salla-search input:focus,
input[type="search"]:focus,
[class*="search-input"]:focus {
    border-color: var(--m-orange) !important;
    background: rgba(232, 64, 32, 0.04) !important;
    box-shadow: 0 0 0 3px rgba(232, 64, 32, 0.1) !important;
    outline: none !important;
}

salla-skeleton,
[class*="skeleton"] {
    border-radius: var(--radius-card) !important;
    background: rgba(255, 255, 255, 0.04) !important;
    overflow: hidden !important;
    position: relative !important;
}

salla-skeleton::after,
[class*="skeleton"]::after {
    content: '' !important;
    position: absolute !important;
    inset: 0 !important;
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(255, 255, 255, 0.08) 50%,
            transparent 100%) !important;
    transform: translateX(-100%) !important;
    animation: skeleton-shimmer 1.5s infinite !important;
}

@keyframes skeleton-shimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

footer,
#footer,
.s-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
}

main .container,
main [class*="container"],
main [class*="s-container"],
.s-section .container,
section .container,
.s-layout__main .container {
    max-width: 100% !important;
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

salla-slider {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
}

/* Direct parent of salla-slider: remove all width/padding constraints */
div:has(> salla-slider),
section:has(> salla-slider) {
    max-width: 100% !important;
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    overflow: hidden !important;
}

/* Grandparent level too */
div:has(> div > salla-slider),
section:has(> div > salla-slider) {
    max-width: 100% !important;
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Named slider block wrappers */
[class*="s-block--slider"],
[class*="s-block--hero"],
.s-slider-block {
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    overflow: hidden !important;
}

[class*="s-block--slider"] .container,
[class*="s-block--slider"] [class*="container"],
[class*="s-block--hero"] .container,
[class*="s-block--hero"] [class*="container"],
.s-slider-block .container,
.s-slider-block [class*="container"] {
    max-width: 100% !important;
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.swiper,
.s-slider-container {
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
}

.madaen-whatsapp {
    position: fixed;
    bottom: 105px;
    right: 24px;
    width: 56px;
    height: 56px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4), 0 2px 8px rgba(0, 0, 0, 0.3);
    z-index: 9000;
    transition: var(--t-fast);
    text-decoration: none;
    cursor: pointer;
}

.madaen-whatsapp:hover {
    transform: scale(1.12);
    box-shadow: 0 8px 28px rgba(37, 211, 102, 0.55), 0 4px 12px rgba(0, 0, 0, 0.3);
    background: #20ba5a;
}

.madaen-whatsapp:active {
    transform: scale(0.96);
}

@media (min-width: 1024px) {
    .madaen-whatsapp {
        bottom: 24px;
    }
}

.madaen-whatsapp svg {
    width: 28px;
    height: 28px;
    fill: #fff;
}

.madaen-whatsapp::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: rgba(37, 211, 102, 0.28);
    animation: wa-pulse 2.5s ease-out infinite;
    z-index: -1;
}

@keyframes wa-pulse {
    0% {
        transform: scale(0.95);
        opacity: 0.7;
    }

    70% {
        transform: scale(1.35);
        opacity: 0;
    }

    100% {
        transform: scale(1.35);
        opacity: 0;
    }
}

.color-mode-dark salla-product-card,
.color-mode-dark .s-product-card {
    background: rgba(255, 255, 255, 0.03) !important;
    border-color: rgba(255, 255, 255, 0.06) !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3), 0 1px 3px rgba(0, 0, 0, 0.2) !important;
}

.color-mode-dark salla-product-card:hover,
.color-mode-dark .s-product-card:hover {
    background: rgba(255, 255, 255, 0.05) !important;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4), 0 4px 12px var(--m-glow) !important;
}

main section,
main>div {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.swiper-slide img,
[class*="s-slider"] img,
[class*="swiper-slide"] img {
    width: 100% !important;
    height: auto !important;
    object-fit: cover !important;
    display: block !important;
    border-radius: 0 !important;
}

salla-slider,
[class*="s-block--products"],
salla-products-slider {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

.s-button-primary-outline:not(:disabled),
.s-button-light-outline:disabled,
.s-button-disabled.s-button-outline {
    background: transparent !important;
    border: 1.5px solid var(--m-orange) !important;
    color: var(--m-orange) !important;
}

.s-button-primary-outline:not(:disabled):hover {
    background: rgba(232, 64, 32, 0.08) !important;
    border-color: var(--m-orange) !important;
    transform: none !important;
}

.s-button-light-outline:disabled,
.s-button-disabled.s-button-outline {
    opacity: 0.65 !important;
    cursor: not-allowed !important;
}

.s-slider-block__display-all,
a.s-slider-block__display-all {
    color: #1a1a1a !important;
    font-weight: 600 !important;
    text-decoration: none !important;
}

.s-slider-block__display-all:hover {
    color: var(--m-orange) !important;
}

.s-slider-block__title {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    position: relative !important;
}

.s-slider-block__title-right {
    flex: 0 0 auto !important;
}

.s-slider-block__title-left {
    display: none !important;
}

@media (max-width: 640px) {
    .madaen-hero-arrow {
        width: 34px !important;
        height: 34px !important;
        font-size: 18px !important;
    }
}

/* ── Product card: red border fix ── */

/* Give the swiper enough room so border/shadow aren't clipped */
.s-products-slider-card.swiper-slide,
[class*="s-products-slider"] .swiper-slide {
    overflow: visible !important;
    padding: 4px 2px 6px !important;
}

/* The swiper wrapper also needs breathing room */
.swiper-wrapper:has(.s-products-slider-card) {
    padding-bottom: 8px !important;
}

custom-salla-product-card {
    display: block;
    border-radius: var(--radius-card) !important;
    overflow: hidden !important;
    transition: var(--t-base) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
    border: 2px solid rgba(232, 64, 32, 0.25) !important;
}

custom-salla-product-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14), 0 0 16px var(--m-glow-strong) !important;
    border-color: rgba(232, 64, 32, 0.6) !important;
}

.s-block--banners.madaen-merged-hidden {
    display: none !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
}

.s-block--banners {
    margin-bottom: 16px !important;
    overflow-x: clip !important;
    overflow-y: visible !important;
    box-sizing: border-box !important;
    padding-top: 6px !important;
    padding-bottom: 8px !important;
}

.s-block--banners .s-block__title,
.s-block--banners .right-side {
    display: flex !important;
    justify-content: center !important;
    text-align: center !important;
    width: 100% !important;
    margin-bottom: 20px !important;
}

.s-block--banners .s-block__title h2,
.s-block--banners .right-side h2 {
    font-family: var(--font-arabic) !important;
    font-weight: 800 !important;
    position: relative !important;
    padding-bottom: 12px !important;
    display: inline-block !important;
}

.s-block--banners .s-block__title h2::after,
.s-block--banners .right-side h2::after {
    content: '' !important;
    position: absolute !important;
    bottom: 0 !important;
    right: 50% !important;
    transform: translateX(50%) !important;
    width: 40px !important;
    height: 3px !important;
    background: var(--m-orange) !important;
    border-radius: 2px !important;
}

.s-block--banners .grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    grid-auto-rows: auto !important;
    align-items: start !important;
    gap: 14px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

@media (min-width: 768px) {
    .s-block--banners .grid {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
        gap: 16px !important;
    }
}

@media (min-width: 1200px) {
    .s-block--banners .grid {
        grid-template-columns: repeat(auto-fill, minmax(14%, 1fr)) !important;
        gap: 16px !important;
    }
}

.banner-entry.square-photos {
    position: relative !important;
    display: block !important;
    border-radius: 24px !important;
    overflow: hidden !important;
    aspect-ratio: 1 / 1 !important;
    width: 100% !important;
    height: auto !important;
    min-height: unset !important;
    max-height: unset !important;
    grid-row: span 1 !important;
    align-self: start !important;
    background: transparent;
    box-shadow: none !important;
    border: none !important;
}

.banner-entry.square-photos:hover,
.banner-entry.square-photos:focus {
    filter: none !important;
    opacity: 1 !important;
    transform: none !important;
}

.banner-entry.square-photos::before,
.banner-entry.square-photos::after {
    display: none !important;
}

.banner-entry.square-photos:hover .lazy__bg,
.banner-entry.square-photos:hover img {
    filter: none !important;
    opacity: 1 !important;
    transform: none !important;
}

.banner-entry .text-with-border {
    display: none !important;
}

.banner-entry.square-photos .lazy__bg {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}

@media (max-width: 767px) {

    .s-products-list,
    [class*="products-grid"],
    [class*="products-list"],
    salla-products-list {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
        padding: 0 10px !important;
    }

    salla-button button,
    .s-btn,
    [class*="s-btn"] {
        min-height: 48px !important;
        padding: 12px 18px !important;
    }

    .s-section,
    section,
    [class*="section"] {
        overflow-x: hidden !important;
        max-width: 100vw !important;
    }

    h1,
    .s-h1 {
        font-size: 1.6rem !important;
        line-height: 1.3 !important;
    }

    h2,
    .s-h2 {
        font-size: 1.25rem !important;
        line-height: 1.35 !important;
    }

    salla-product-card,
    .s-product-card {
        border-radius: 12px !important;
    }

    .madaen-whatsapp {
        bottom: 99px;
        right: 16px;
        width: 50px;
        height: 50px;
    }

    .madaen-whatsapp svg {
        width: 24px;
        height: 24px;
    }

    .s-block--banners .grid {
        gap: 10px !important;
    }
}

@media (max-width: 480px) {

    .s-products-list,
    [class*="products-grid"],
    [class*="products-list"] {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
        padding: 0 8px !important;
    }

    .banner-entry.square-photos {
        border-radius: 18px !important;
    }
}

/* ── Hero Banner Slider ── */
div:has(> .madaen-hero-slider),
section:has(> .madaen-hero-slider) {
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
}

.madaen-hero-slider {
    position: relative;
    width: 100%;
    overflow: hidden;
    touch-action: pan-y;
    -webkit-user-select: none;
    user-select: none;
}

.madaen-hero-track {
    display: flex;
    direction: ltr;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

/* Before JS: show only first slide to prevent stacking */
.madaen-hero-slide {
    display: block;
    width: 100%;
    text-decoration: none;
}

.madaen-hero-slide+.madaen-hero-slide {
    display: none;
}

/* After JS: all slides inside track are visible and fixed-width */
.madaen-hero-track>.madaen-hero-slide {
    display: block !important;
    min-width: 100%;
    flex-shrink: 0;
}

.madaen-hero-slide img {
    width: 100% !important;
    height: auto !important;
    display: block !important;
    border-radius: 0 !important;
    pointer-events: none;
    -webkit-user-drag: none;
}

.madaen-hero-dots {
    position: absolute;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.madaen-hero-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.55);
    cursor: pointer;
    transition: background 0.3s, transform 0.3s;
}

.madaen-hero-dot--active {
    background: #fff;
    transform: scale(1.3);
}

.madaen-hero-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.35);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    color: #fff;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    font-size: 26px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.2s;
    -webkit-tap-highlight-color: transparent;
}

.madaen-hero-arrow:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: translateY(-50%) scale(1.1);
}

.madaen-hero-arrow--prev {
    right: 16px;
}

.madaen-hero-arrow--next {
    left: 16px;
}

@media (max-width: 480px) {
    .madaen-hero-arrow {
        width: 36px;
        height: 36px;
        font-size: 20px;
    }

    .madaen-hero-arrow--prev {
        right: 8px;
    }

    .madaen-hero-arrow--next {
        left: 8px;
    }
}

/* ── Mobile Menu Categories ── */

/* Salla's built-in lg:hidden items (image + span) */
#mobile-menu .main-menu li a[class*="flex"],
#mobile-menu .main-menu li a[class*="items-center"] {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 10px 16px !important;
    color: #374151 !important;
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06) !important;
    background: transparent !important;
    opacity: 1 !important;
    visibility: visible !important;
    font-family: var(--font-arabic) !important;
}

#mobile-menu .main-menu li a[class*="flex"] img,
#mobile-menu .main-menu li a[class*="items-center"] img {
    width: 48px !important;
    height: 48px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    flex-shrink: 0 !important;
    pointer-events: none !important;
}

#mobile-menu .main-menu li a[class*="flex"] span,
#mobile-menu .main-menu li a[class*="items-center"] span {
    color: #374151 !important;
    font-family: var(--font-arabic) !important;
    font-weight: 600 !important;
    font-size: 0.9rem !important;
}

/* Our injected fallback items (text only) */
#mobile-menu .main-menu li a.madaen-menu-cat,
#mobile-menu ul li a.madaen-menu-cat {
    display: block !important;
    padding: 13px 20px !important;
    color: #374151 !important;
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06) !important;
    background: transparent !important;
    font-family: var(--font-arabic) !important;
    line-height: 1.4 !important;
}

#mobile-menu .main-menu li a.madaen-menu-cat:hover,
#mobile-menu .main-menu li a.madaen-menu-cat:active {
    background: rgba(232, 64, 32, 0.05) !important;
    color: var(--m-orange) !important;
}

/* ── Premium Footer Styles ───────────────────────────────────────── */
footer, .store-footer, .s-footer {
    border-top: 1px solid rgba(232, 64, 32, 0.08) !important;
    background: #fdfdfd !important;
}

.color-mode-dark footer, .color-mode-dark .store-footer, .color-mode-dark .s-footer {
    background: #0d1113 !important;
    border-top-color: rgba(255, 255, 255, 0.04) !important;
}

/* Footer Headings */
.store-footer h3, footer h3, .s-contacts-title {
    font-family: var(--font-arabic) !important;
    font-size: 1.15rem !important;
    font-weight: 800 !important;
    color: #1a1a1a !important;
    margin-bottom: 24px !important;
    position: relative;
    display: inline-block;
    padding-bottom: 10px;
}

.color-mode-dark .store-footer h3, .color-mode-dark footer h3, .color-mode-dark .s-contacts-title {
    color: #fff !important;
}

.store-footer h3::after, footer h3::after, .s-contacts-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 32px;
    height: 3px;
    background: var(--m-orange);
    border-radius: 2px;
}

/* Footer Description */
.store-footer .max-w-sm p {
    font-size: 0.95rem !important;
    line-height: 1.8 !important;
    color: #6b7280 !important;
    text-align: justify;
}

.color-mode-dark .store-footer .max-w-sm p {
    color: #9ca3af !important;
}

/* Footer Menu Links */
.s-menu-footer-list {
    display: flex !important;
    flex-direction: column !important;
    gap: 14px !important;
}

.s-menu-footer-item {
    font-size: 0.95rem !important;
    color: #4b5563 !important;
    text-decoration: none !important;
    transition: var(--t-base) !important;
    display: flex;
    align-items: center;
}

.s-menu-footer-item::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background: var(--m-orange);
    border-radius: 50%;
    margin-left: 10px;
    opacity: 0.5;
    transition: var(--t-fast);
}

.s-menu-footer-item:hover {
    color: var(--m-orange) !important;
    transform: translateX(-6px) !important;
}

.s-menu-footer-item:hover::before {
    opacity: 1;
    transform: scale(1.3);
}

.color-mode-dark .s-menu-footer-item {
    color: #d1d5db !important;
}

/* ── Footer bottom bar (contacts + socials combined) ─────────────── */
.madaen-footer-bottom {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 16px 24px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    width: 100%;
    box-sizing: border-box;
    direction: ltr;
}

/* ── Trust badges centered row ───────────────────────────────────── */
.madaen-footer-badges {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    padding: 20px 24px 0;
    width: 100%;
    box-sizing: border-box;
}

/* Separator between contact items and social icons */
.madaen-footer-sep {
    display: inline-block;
    width: 1px;
    height: 22px;
    background: rgba(0, 0, 0, 0.15);
    margin: 0 6px;
    flex-shrink: 0;
}

.madaen-footer-social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    border: 1.5px solid rgba(0, 0, 0, 0.18);
    text-decoration: none !important;
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
    background: transparent;
}

.madaen-footer-social-link:hover {
    transform: translateY(-2px);
    border-color: rgba(0, 0, 0, 0.4);
    background: rgba(0, 0, 0, 0.04);
}

.madaen-fsoc-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.madaen-fsoc-icon svg {
    width: 18px;
    height: 18px;
    display: block;
    fill: #555;
}

/* Snapchat icon slightly smaller due to its shape */
.madaen-fsoc--snap .madaen-fsoc-icon svg {
    width: 16px;
    height: 16px;
}

/* Hide labels */
.madaen-fsoc-label {
    display: none;
}

.madaen-contact-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    text-decoration: none !important;
    color: #374151 !important;
    font-size: 0.85rem;
    transition: color 0.2s;
}

.madaen-contact-item:hover {
    color: var(--m-orange) !important;
}

.madaen-citem-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1.5px solid rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
    transition: border-color 0.2s;
}

.madaen-contact-item:hover .madaen-citem-icon {
    border-color: rgba(0, 0, 0, 0.4);
}

.madaen-citem-icon svg {
    width: 16px;
    height: 16px;
    fill: #555;
}

.madaen-citem-text {
    color: #374151;
    font-family: var(--font-latin);
    font-size: 0.85rem;
    direction: ltr;
}

/* Hide the entire "تواصل معنا" footer column */
.store-footer__inner .container>div:has(salla-contacts) {
    display: none !important;
}

/* ── Product Page Enhancements ───────────────────────────────────── */

/* Product Image Styling */
.s-block--product-details .swiper-slide img,
.s-product-detail-images img,
.product-single img {
    border-radius: var(--radius-card) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04) !important;
    border: 1px solid rgba(0, 0, 0, 0.03) !important;
    transition: var(--t-base) !important;
}

.s-block--product-details .swiper-slide:hover img {
    transform: scale(1.02);
}

/* Quantity Input Elegant Styling */
salla-quantity-input,
.s-quantity-input {
    border-radius: var(--radius-btn) !important;
    border: 1.5px solid rgba(232, 64, 32, 0.15) !important;
    background: #fff !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02) !important;
    transition: var(--t-fast) !important;
    height: 46px !important;
}

salla-quantity-input:focus-within,
.s-quantity-input:focus-within {
    border-color: rgba(0, 0, 0, 0.15) !important;
    box-shadow: none !important;
}

salla-quantity-input button,
.s-quantity-input button {
    color: inherit !important;
    font-size: 1.2rem !important;
}

salla-quantity-input button:hover,
.s-quantity-input button:hover {
    background: rgba(0, 0, 0, 0.05) !important;
}

/* Product Title */
.product-title,
.s-product-detail h1 {
    font-size: 1.7rem !important;
    font-weight: 800 !important;
    color: #1a1a1a !important;
    line-height: 1.4 !important;
}

.color-mode-dark .product-title,
.color-mode-dark .s-product-detail h1 {
    color: #fff !important;
}

/* Share & Wishlist Buttons */
.s-product-detail salla-button[shape="icon"] button,
.product-single salla-button[shape="icon"] button {
    border: 1.5px solid rgba(0, 0, 0, 0.08) !important;
    background: #fff !important;
    border-radius: 8px !important;
    color: #4b5563 !important;
    transition: var(--t-fast) !important;
    width: 44px !important;
    height: 44px !important;
}

.color-mode-dark .s-product-detail salla-button[shape="icon"] button {
    background: #1a1a1a !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    color: #d1d5db !important;
}

.s-product-detail salla-button[shape="icon"] button:hover,
.product-single salla-button[shape="icon"] button:hover {
    border-color: var(--m-orange) !important;
    color: var(--m-orange) !important;
    transform: translateY(-3px) !important;
    box-shadow: 0 4px 12px var(--m-glow) !important;
}

/* Main action buttons alignment and size */
.s-product-detail .s-button-primary,
.s-product-detail .s-button-outline {
    height: 48px !important;
    font-size: 1.05rem !important;
    border-radius: var(--radius-btn) !important;
}

/* Product Options / Variants */
.s-product-options .s-option-item {
    border-radius: 10px !important;
    border: 1.5px solid rgba(0, 0, 0, 0.08) !important;
    transition: var(--t-fast) !important;
}

.s-product-options .s-option-item:hover {
    border-color: var(--m-orange-light) !important;
    background: rgba(232, 64, 32, 0.03) !important;
}

.s-product-options .s-option-item.selected {
    border-color: var(--m-orange) !important;
    background: rgba(232, 64, 32, 0.06) !important;
    box-shadow: 0 0 0 2px rgba(232, 64, 32, 0.15) !important;
}

/* ── Gap Fix ─────────────────────────────────────────────────────── */

/* Theme CSS applies margin-top: 4rem to every .s-block element.
   Override ALL of them to 0, then restore spacing only between
   consecutive sibling sections — this removes the top gap on every
   page without breaking inter-section spacing. */
.s-block {
    margin-top: 0 !important;
}

.s-block ~ .s-block {
    margin-top: 2rem !important;
}

@media (min-width: 640px) {
    .s-block ~ .s-block {
        margin-top: 4rem !important;
    }
}

/* Hide legacy header spacer elements */
.s-header-padding,
[class*="header-padding"],
[class*="header-spacer"],
.header-placeholder,
#main-content > salla-hook:first-child {
    display: none !important;
    height: 0 !important;
    min-height: 0 !important;
    max-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
}


/* ── Header top-navbar ───────────────────────────────────────────── */

.top-navbar {
    padding-top: 4px !important;
    padding-bottom: 4px !important;
    min-height: 0 !important;
    font-size: 0.75rem !important;
    line-height: 1.2 !important;
}

.top-navbar .s-menu-topnav-list {
    gap: 8px !important;
}

.top-navbar .s-menu-topnav-item {
    font-size: 0.72rem !important;
    padding: 2px 6px !important;
}

.top-navbar .header-search,
.top-navbar .header-buttons {
    display: none !important;
}

/* ── Section title ──○── divider ─────────────────────────────────── */
.s-block__title .right-side h2::after,
.s-block--banners .s-block__title h2::after,
.s-block--banners .right-side h2::after {
    display: none !important;
}

.enhanced-title-border.home-block-line {
    display: flex !important;
    align-items: center;
    gap: 8px;
    width: 110px;
    height: auto !important;
    background: none !important;
    border-radius: 0 !important;
    margin: 10px auto 0;
    position: static !important;
}

.enhanced-title-border.home-block-line .etb-line {
    flex: 1;
    height: 1.5px;
    background: var(--m-orange);
    border-radius: 1px;
    display: block;
}

.enhanced-title-border.home-block-line .etb-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    border: 1.5px solid var(--m-orange);
    background: transparent;
    flex-shrink: 0;
    display: block;
}

/* ── Search toggle (collapsed by default) ───────────────────────── */
salla-search.madaen-search-collapsed {
    overflow: hidden;
    max-width: 42px !important;
    transition: max-width 0.3s ease;
}

salla-search.madaen-search-open {
    max-width: 280px !important;
    transition: max-width 0.3s ease;
}

/* ── Features Block ─────────────────────────────────────────────── */
.s-block--features__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: var(--radius-card);
    padding: 32px 16px;
    transition: var(--t-base);
}

.color-mode-dark .s-block--features__item {
    border-color: rgba(255, 255, 255, 0.05);
}

.s-block--features__item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08), 0 4px 12px var(--m-glow);
    border-color: rgba(232, 64, 32, 0.2);
    background: rgba(232, 64, 32, 0.02);
}

.s-block--features__item .feature-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(232, 64, 32, 0.1);
    color: var(--m-orange);
    margin-bottom: 20px;
    transition: var(--t-base);
}

.s-block--features__item:hover .feature-icon {
    background: var(--m-orange);
    color: #fff;
    transform: scale(1.1);
}

.s-block--features__item .feature-icon svg {
    width: 32px;
    height: 32px;
    stroke-width: 1.5;
}

.s-block--features__item h2 {
    font-size: 1.25rem !important;
    font-weight: 700 !important;
    color: #1a1a1a;
    margin-bottom: 12px !important;
    font-family: var(--font-arabic) !important;
}

.color-mode-dark .s-block--features__item h2 {
    color: #fff;
}

.s-block--features__item p {
    font-size: 0.95rem !important;
    color: #6b7280;
    margin: 0 !important;
    line-height: 1.5;
}

.color-mode-dark .s-block--features__item p {
    color: #9ca3af;
}

/* ═══════════════════════════════════════════════════════════════════
   PRODUCT PAGE
   ═══════════════════════════════════════════════════════════════════ */

/* ── Collapse the empty grey description block ───────────────────── */
.s-block--product-description,
[class*="product-description"],
[class*="s-product-description"] {
    min-height: 0 !important;
}

.s-block--product-description:not(:has(*)),
.s-block--product-description:empty {
    display: none !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Hide empty tab panels and accordion bodies */
.s-product-tabs,
[class*="product-tabs"],
[class*="s-product-tab"] {
    min-height: 0 !important;
}

.s-product-tabs:empty,
[class*="product-tabs"]:empty {
    display: none !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* ── Breadcrumb ──────────────────────────────────────────────────── */
.s-breadcrumb,
[class*="breadcrumb"],
nav[aria-label*="breadcrumb"] {
    padding: 12px 0 8px !important;
    font-size: 0.82rem !important;
    font-family: var(--font-arabic) !important;
}

.s-breadcrumb a,
[class*="breadcrumb"] a {
    color: #6b7280 !important;
    text-decoration: none !important;
    transition: color 0.2s !important;
}

.s-breadcrumb a:hover,
[class*="breadcrumb"] a:hover {
    color: var(--m-orange) !important;
}

.s-breadcrumb [aria-current="page"],
[class*="breadcrumb"] [aria-current="page"] {
    color: var(--m-orange) !important;
    font-weight: 600 !important;
}

/* ── Product detail block wrapper ────────────────────────────────── */
.s-block--product-details {
    padding-top: 8px !important;
    padding-bottom: 32px !important;
}

/* ── Product title ───────────────────────────────────────────────── */
.s-product-detail h1,
.product-title,
[class*="product-name"] h1,
[class*="product-title"] {
    font-size: clamp(1.35rem, 3vw, 1.9rem) !important;
    font-weight: 800 !important;
    line-height: 1.35 !important;
    color: #1a1a1a !important;
    font-family: var(--font-arabic) !important;
    margin-bottom: 8px !important;
}

/* ── Price ───────────────────────────────────────────────────────── */
.s-product-detail .s-price,
.s-product-detail [class*="price"],
.product-price,
[class*="product-price"] {
    font-size: 1.6rem !important;
    font-weight: 700 !important;
    color: var(--m-orange) !important;
    font-family: var(--font-latin) !important;
}

.s-product-detail .s-price-old,
[class*="price-old"],
[class*="original-price"] {
    font-size: 1rem !important;
    color: #9ca3af !important;
    text-decoration: line-through !important;
    font-family: var(--font-latin) !important;
}

/* ── Detail label/value rows (السعر، الكمية) ─────────────────────── */
.s-product-detail .s-label,
[class*="detail-label"],
[class*="product-label"] {
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    color: #6b7280 !important;
    font-family: var(--font-arabic) !important;
}

/* ── Action buttons ──────────────────────────────────────────────── */
.s-product-detail salla-add-product-button button,
.s-product-detail [class*="add-to-cart"] button,
.s-product-detail .s-button-primary {
    height: 50px !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
    border-radius: var(--radius-btn) !important;
    letter-spacing: 0.01em !important;
}

/* ── Related / upsell products section ───────────────────────────── */
.s-block--best-offers,
.s-block--related-products,
[class*="related-products"],
[class*="best-offers"],
[class*="upsell"] {
    padding-top: 8px !important;
    padding-bottom: 24px !important;
}

.s-block--best-offers .s-block__title,
.s-block--related-products .s-block__title,
[class*="related-products"] .s-block__title,
[class*="upsell"] .s-block__title {
    margin-bottom: 24px !important;
}

.s-block--best-offers .s-block__title h2,
.s-block--related-products .s-block__title h2,
[class*="related-products"] [class*="title"] h2,
[class*="upsell"] [class*="title"] h2 {
    font-size: 1.3rem !important;
    font-weight: 800 !important;
    color: #1a1a1a !important;
    font-family: var(--font-arabic) !important;
}

/* ── Share / wishlist icon row ───────────────────────────────────── */
.s-product-detail [class*="actions"],
[class*="product-actions"] {
    gap: 10px !important;
}

/* ── Product image: white clean card look ────────────────────────── */
.s-block--product-details .s-product-detail__images,
[class*="product-images"],
[class*="product-gallery"] {
    background: #f8f8f8 !important;
    border-radius: var(--radius-card) !important;
    overflow: hidden !important;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
}

/* Thumbnail strip */
.s-block--product-details [class*="thumb"],
[class*="product-images"] [class*="thumb"] {
    border-radius: 8px !important;
    border: 2px solid transparent !important;
    transition: border-color 0.2s !important;
    overflow: hidden !important;
    cursor: pointer !important;
}

.s-block--product-details [class*="thumb"]:hover,
.s-block--product-details [class*="thumb"].active,
[class*="product-images"] [class*="thumb"]:hover {
    border-color: var(--m-orange) !important;
}

/* ── "No stock" / out-of-stock badge ─────────────────────────────── */
[class*="out-of-stock"],
[class*="sold-out"],
.s-product-unavailable {
    background: #fef2f2 !important;
    color: #dc2626 !important;
    border: 1px solid #fecaca !important;
    border-radius: 8px !important;
    padding: 10px 16px !important;
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    text-align: center !important;
}