/**
 * theme_6 — مصدر واحد لواجهة المتجر (صمم واجهة موقعك)
 * يُحمَّل بعد Bootstrap وقبل fc-surface-override.
 */

/* ─── ١) نطاق الصفحة والطباعة ─── */
body.theme-custom,
body.sb-store-custom {
    --fc-elev-sm: 0 2px 16px var(--fc-glow-faint, rgba(0, 0, 0, 0.06));
    --fc-elev-md: 0 10px 36px var(--fc-glow-soft, rgba(0, 0, 0, 0.08)), 0 2px 10px var(--fc-glow-faint, rgba(0, 0, 0, 0.05));
    --fc-elev-lg: 0 22px 60px var(--fc-shadow-brand, rgba(24, 81, 160, 0.22)), 0 8px 24px var(--fc-glow-faint, rgba(0, 0, 0, 0.06));
    --fc-elev-cart: -18px 0 48px var(--fc-shadow-brand, rgba(24, 81, 160, 0.2));
    --fc-elev-modal: 0 28px 72px var(--fc-shadow-brand, rgba(24, 81, 160, 0.18)), 0 4px 20px var(--fc-glow-faint, rgba(0, 0, 0, 0.06));
}

.theme-custom,
body.theme-custom,
body.sb-store-custom {
    background-color: var(--fc-page-bg, #f3f4f6) !important;
    background-image: none !important;
    color: var(--fc-ink, #1a1816);
    min-height: 100vh;
    overflow-x: hidden;
}

html[dir="rtl"] body.theme-custom,
html[dir="rtl"] body.sb-store-custom {
    font-family: "Noto Sans Arabic", system-ui, -apple-system, "Segoe UI", sans-serif;
}

html[dir="ltr"] body.theme-custom,
html[dir="ltr"] body.sb-store-custom {
    font-family: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
}

body.theme-custom[data-fc-page-bg-mode="color"],
body.sb-store-custom[data-fc-page-bg-mode="color"] {
    background-image: linear-gradient(
        165deg,
        color-mix(in srgb, var(--fc-page-bg, #f3f4f6) 100%, #ffffff 0%) 0%,
        color-mix(in srgb, var(--fc-page-bg, #f3f4f6) 82%, var(--fc-button, var(--primary)) 18%) 52%,
        color-mix(in srgb, var(--fc-page-bg, #f3f4f6) 90%, var(--fc-button, var(--primary)) 10%) 100%
    ) !important;
}

.theme-custom .storefront-main {
    padding-bottom: clamp(2.5rem, 6vw, 4rem);
}

/* ─── ٢) الهيدر والشعار والسلة ─── */
.theme-custom .navbar-custom {
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
    background: color-mix(in srgb, var(--fc-card-bg, #fff) 88%, transparent) !important;
    border-bottom: 1px solid color-mix(in srgb, var(--fc-border-accent, #e5e7eb) 22%, transparent) !important;
    border-radius: 0 0 var(--fc-card-radius, 14px) var(--fc-card-radius, 14px);
    margin-bottom: 0.35rem;
    box-shadow: var(--fc-elev-sm);
}

.theme-custom .header-logo {
    max-height: 48px !important;
    max-width: min(220px, 52vw) !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    display: block;
    margin-inline: auto;
}

.theme-custom .navbar-logo-wrap {
    min-width: 0;
}

.theme-custom .navbar-logo-wrap h4 {
    font-size: 1.1rem !important;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.theme-custom .cart-icon {
    width: 44px !important;
    min-width: 44px;
    text-align: center;
    height: 44px;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: color-mix(in srgb, var(--fc-card-bg, #fff) 70%, transparent);
    border: 1px solid color-mix(in srgb, var(--fc-border-accent, #e5e7eb) 35%, transparent);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    position: relative;
    font-size: 24px;
    text-decoration: none;
    cursor: pointer;
}

.theme-custom .cart-icon:hover {
    transform: translateY(-1px);
    box-shadow: var(--fc-elev-md);
}

.theme-custom .cart-badge {
    position: absolute;
    top: -5px;
    inset-inline-end: -8px;
    font-size: 11px;
    font-weight: bold;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: 0.3s;
    background: linear-gradient(135deg, var(--fc-button, var(--primary)), var(--fc-button-end, var(--primary))) !important;
    color: #fff !important;
    border: 2px solid color-mix(in srgb, var(--fc-card-bg, #fff) 80%, transparent);
    box-shadow: 0 4px 14px var(--fc-shadow-brand, rgba(24, 81, 160, 0.28));
}

/* ─── ٣) البحث ─── */
.theme-custom .atelier-search-wrap {
    margin-bottom: 1.15rem;
}

.theme-custom .atelier-search-wrap .form-control {
    border-radius: 999px;
    padding-block: 0.72rem;
    padding-inline-end: 1.1rem;
    padding-inline-start: 2.85rem;
    border: 1px solid color-mix(in srgb, var(--fc-card-border, #e5e7eb) 80%, var(--fc-button, var(--primary)) 14%);
    background: color-mix(in srgb, var(--fc-card-bg, #fff) 94%, transparent);
    font-weight: 600;
    box-shadow: var(--fc-elev-md);
}

.theme-custom .atelier-search-wrap .form-control:focus {
    border-color: var(--fc-button, var(--primary));
    box-shadow: 0 0 0 3px var(--fc-glow-faint, rgba(0, 0, 0, 0.06));
}

.theme-custom .atelier-search-icon {
    position: absolute;
    inset-inline-start: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: color-mix(in srgb, var(--fc-text-accent, var(--primary)) 38%, var(--fc-ink-on-card, #334155) 62%);
    pointer-events: none;
}

/* ─── ٤) سلايدر العروض — جوال بعرض الشاشة تحت الهيدر ─── */
.theme-custom .fc-storefront-slider-slot {
    width: 100%;
}

.theme-custom .fc-storefront-slider-slot .mySwiper.swiper,
.theme-custom .fc-storefront-slider-slot .swiper.mySwiper {
    width: 100%;
    overflow: hidden;
}

@media (max-width: 767.98px) {
    .theme-custom .fc-storefront-slider-slot__inner.container {
        max-width: none;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .theme-custom .fc-storefront-slider-slot .mySwiper.swiper,
    .theme-custom .fc-storefront-slider-slot .swiper.mySwiper {
        height: auto !important;
        margin-top: 0;
        margin-bottom: 0.35rem;
        border-radius: 0 !important;
        box-shadow: none;
    }
}

@media (min-width: 768px) {
    .theme-custom .fc-storefront-slider-slot .mySwiper.swiper,
    .theme-custom .fc-storefront-slider-slot .swiper.mySwiper {
        height: auto !important;
        margin-top: 0.35rem;
        margin-bottom: 0.5rem;
        border-radius: var(--fc-card-radius, 14px) !important;
        box-shadow: var(--fc-elev-lg);
    }
}

.theme-custom .fc-storefront-slider-slot .mySwiper .swiper-slide {
    overflow: hidden;
    height: auto;
    background: color-mix(in srgb, var(--fc-card-bg, #fff) 92%, var(--fc-button, var(--primary)) 8%);
}

.theme-custom .fc-storefront-slider-slot .mySwiper .swiper-slide img {
    width: 100%;
    height: auto;
    display: block;
    padding: 0;
}

.theme-custom .fc-storefront-slider-slot .swiper-pagination-bullet {
    background: color-mix(in srgb, var(--fc-card-bg, #fff) 55%, var(--fc-button, var(--primary)) 45%);
    opacity: 1;
}

.theme-custom .fc-storefront-slider-slot .swiper-pagination-bullet-active {
    background: var(--fc-button, var(--primary));
}

.theme-custom .low-stock-badge,
.theme-verre .low-stock-badge {
    position: absolute;
    top: 8px;
    inset-inline-start: 8px;
    z-index: 3;
    background: #f59e0b;
    color: #1e293b;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 0.2rem 0.45rem;
    border-radius: 6px;
    line-height: 1.2;
}

/* ─── ٤ب) شبكة أقسام بصور (theme_6 — atelier-nav-grid) ─── */
body.atelier-nav-grid .atelier-cat-grid-section {
    padding: 0.5rem 0 1.25rem;
}

body.atelier-nav-grid .atelier-cat-grid__heading {
    font-size: 1.15rem;
    font-weight: 800;
    text-align: center;
    margin: 0 0 1rem;
    color: var(--fc-text-accent, var(--primary, #1851a0));
    letter-spacing: 0.02em;
}

body.atelier-nav-grid .atelier-cat-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
}

@media (min-width: 576px) {
    body.atelier-nav-grid .atelier-cat-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 1rem;
    }
}

@media (min-width: 992px) {
    body.atelier-nav-grid .atelier-cat-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

body.atelier-nav-grid .atelier-cat-card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: var(--fc-card-radius, 14px);
    background: var(--fc-card-bg, #fff);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08), 0 2px 8px rgba(15, 23, 42, 0.04);
    overflow: hidden;
    cursor: pointer;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

body.atelier-nav-grid .atelier-cat-card:hover,
body.atelier-nav-grid .atelier-cat-card:focus-visible {
    transform: translateY(-3px);
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.12), 0 4px 12px rgba(15, 23, 42, 0.06);
    outline: none;
}

body.atelier-nav-grid .atelier-cat-card__img {
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: color-mix(in srgb, var(--fc-card-bg, #fff) 70%, var(--fc-button, #1851a0) 12%);
}

body.atelier-nav-grid .atelier-cat-card__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

body.atelier-nav-grid .atelier-cat-card__img--deals {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, color-mix(in srgb, var(--fc-button, #1851a0) 88%, #fff), color-mix(in srgb, var(--fc-button, #1851a0) 55%, #0f172a));
    color: #fff;
    font-size: 2rem;
}

body.atelier-nav-grid .atelier-cat-card__img--deals-photo {
    background: color-mix(in srgb, var(--fc-card-bg, #fff) 70%, var(--fc-button, #1851a0) 12%);
    font-size: inherit;
}

body.atelier-nav-grid .atelier-cat-card__img--deals-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

body.atelier-nav-grid .atelier-cat-card__title {
    display: block;
    padding: 0.65rem 0.5rem 0.75rem;
    font-size: 0.82rem;
    font-weight: 800;
    line-height: 1.35;
    color: var(--fc-text-accent, #1e293b);
}

body.atelier-nav-grid .atelier-cat-toolbar {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 0.85rem;
    padding-bottom: 0.65rem;
    border-bottom: 1px solid color-mix(in srgb, var(--fc-border-accent, #cbd5e1) 55%, transparent);
}

body.atelier-nav-grid .atelier-cat-back {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.75rem;
    border: 1px solid color-mix(in srgb, var(--fc-button, #1851a0) 35%, transparent);
    border-radius: 999px;
    background: var(--fc-card-bg, #fff);
    color: var(--fc-button, var(--primary, #1851a0));
    font-size: 0.78rem;
    font-weight: 800;
    cursor: pointer;
}

body.atelier-nav-grid .atelier-cat-toolbar__title {
    flex: 1;
    min-width: 0;
    margin: 0;
    font-size: 1rem;
    font-weight: 800;
    text-align: start;
    color: var(--fc-text-accent, #1e293b);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.atelier-nav-grid .atelier-products-view {
    padding-top: 0.25rem;
}

/* ─── ٥) شريط الأقسام ─── */
.theme-custom .categories-wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
    gap: 0.55rem 0.75rem;
    padding: 0.85rem 0.65rem 1.1rem;
    margin: 0 auto;
    max-width: 100%;
    overflow-x: visible;
    scrollbar-width: thin;
    background: transparent;
    scroll-padding-inline: 0.5rem;
}

.theme-custom .categories-wrapper::-webkit-scrollbar {
    display: none;
}

@media (max-width: 767.98px) {
    .theme-custom .categories-wrapper {
        flex-wrap: nowrap;
        justify-content: flex-start;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x proximity;
        scroll-padding-inline: 12px;
        padding-inline: 6px;
        gap: 0.5rem;
        -webkit-overflow-scrolling: touch;
        padding-inline: 0.4rem;
    }

    .theme-custom .cat-pill {
        scroll-snap-align: start;
        flex-shrink: 0;
    }
}

@media (min-width: 768px) {
    .theme-custom .categories-wrapper {
        flex-wrap: wrap !important;
        justify-content: center !important;
        overflow-x: visible !important;
        max-width: min(960px, 100%);
        margin-inline: auto;
        padding: 0.55rem 1rem 0.85rem;
    }
}

.theme-custom .cat-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0.5rem 1.1rem;
    cursor: pointer;
    white-space: nowrap;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, outline-color 0.2s ease, background 0.2s ease;
    color: var(--fc-ink-on-card, #1a1816) !important;
    outline: 2px solid transparent;
    outline-offset: 2px;
}

.theme-custom .cat-pill.cat-pill--visual {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 0.45rem;
    min-width: 4.75rem;
    max-width: 5.5rem;
    padding: 0.65rem 0.55rem 0.75rem;
    vertical-align: top;
    text-align: center;
    line-height: 1.15;
    white-space: normal;
}

.theme-custom .cat-pill__thumb {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid color-mix(in srgb, var(--fc-border-accent, #e5e7eb) 55%, var(--fc-button, var(--primary)) 18%);
    display: block;
}

@media (min-width: 768px) {
    .theme-custom .cat-pill__thumb {
        width: 58px;
        height: 58px;
    }
}

.theme-custom .cat-pill__label {
    font-size: 0.74rem;
    font-weight: 800;
    max-width: 5.2rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.2;
    color: inherit;
}

/* التحديد: إطار فقط — نفس لون الخلفية والنص */
.theme-custom .cat-pill.active {
    outline-color: var(--fc-button, var(--primary));
    font-weight: 800;
}

.subcategories-wrapper,
.atelier-subcat-row {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.45rem;
    overflow-x: auto;
    padding: 0 0.75rem 0.65rem;
    margin-top: -0.25rem;
    margin-bottom: 0.75rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.subcategories-wrapper::-webkit-scrollbar,
.atelier-subcat-row::-webkit-scrollbar {
    display: none;
}

.subcat-pill,
.atelier-subcat-pill {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    border: 1px solid var(--fc-border-soft, rgba(0, 0, 0, 0.12));
    background: var(--fc-surface-muted, #f8f7f5);
    color: var(--fc-ink-on-card, #1a1816);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.subcat-pill.active,
.subcat-pill:hover,
.atelier-subcat-pill.active,
.atelier-subcat-pill:hover {
    background: var(--fc-brand, var(--st-brand, #1851a0));
    border-color: var(--fc-brand, var(--st-brand, #1851a0));
    color: #fff;
}

.theme-custom .cat-pill:not(.active):hover {
    transform: translateY(-2px);
}

/* شكل شرائح الأقسام — كل خيار مظهر مختلف */
.theme-custom.fc-cat-tab-style-flat .cat-pill:not(.active) {
    background: color-mix(in srgb, var(--fc-page-bg, #f3f4f6) 55%, var(--fc-card-bg, #fff)) !important;
    border: 1px solid color-mix(in srgb, var(--fc-border-accent, #e5e7eb) 55%, transparent) !important;
    box-shadow: none !important;
}

.theme-custom.fc-cat-tab-style-soft .cat-pill:not(.active) {
    background: var(--fc-card-bg, #fff) !important;
    border: 1px solid color-mix(in srgb, var(--fc-border-accent, #e5e7eb) 40%, transparent) !important;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08) !important;
}

.theme-custom.fc-cat-tab-style-shadow .cat-pill:not(.active) {
    background: var(--fc-card-bg, #fff) !important;
    border: none !important;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.12) !important;
}

.theme-custom.fc-cat-tab-style-outline .cat-pill:not(.active) {
    background: color-mix(in srgb, var(--fc-card-bg, #fff) 90%, var(--fc-button, var(--primary)) 10%) !important;
    border: 2px solid color-mix(in srgb, var(--fc-button, var(--primary)) 50%, var(--fc-border-accent, #e5e7eb)) !important;
    box-shadow: none !important;
}

.theme-custom.fc-cat-tab-style-pill .cat-pill:not(.active) {
    background: color-mix(in srgb, var(--fc-card-bg, #fff) 82%, var(--fc-button, var(--primary)) 18%) !important;
    border: 1px solid color-mix(in srgb, var(--fc-button, var(--primary)) 22%, transparent) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7) !important;
}

.theme-custom.fc-cat-tab-style-pill .cat-pill.active {
    background: color-mix(in srgb, var(--fc-card-bg, #fff) 70%, var(--fc-button, var(--primary)) 30%) !important;
}

.theme-custom.fc-cat-tab-radius-soft .cat-pill {
    border-radius: 14px !important;
}

.theme-custom.fc-cat-tab-radius-round .cat-pill {
    border-radius: 22px !important;
}

.theme-custom.fc-cat-tab-radius-square .cat-pill {
    border-radius: 6px !important;
}

.theme-custom.fc-cat-tab-radius-soft .cat-pill__thumb {
    border-radius: 10px !important;
}

.theme-custom.fc-cat-tab-radius-round .cat-pill__thumb {
    border-radius: 16px !important;
}

.theme-custom.fc-cat-tab-radius-square .cat-pill__thumb {
    border-radius: 4px !important;
}

/* ─── ٦) شريط العروض والفرز ─── */
.theme-custom .offers-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 6px 4px 14px;
    padding: 0 0.25rem;
}

.theme-custom .offers-toolbar.d-none {
    display: none !important;
}

.theme-custom .offers-toolbar__label {
    font-weight: 800;
    font-size: 0.8rem;
    letter-spacing: 0.02em;
    color: color-mix(in srgb, var(--fc-ink-on-card, #334155) 88%, var(--fc-button, var(--primary)) 12%);
}

.theme-custom .offers-sort-select {
    border: 1px solid color-mix(in srgb, var(--fc-card-border, #e5e7eb) 88%, var(--fc-button, var(--primary)) 12%);
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 0.78rem;
    background: var(--fc-card-bg, #fff);
    color: var(--fc-ink-on-card, #1a1816);
    min-width: 190px;
}

@media (max-width: 576px) {
    .theme-custom .offers-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .theme-custom .offers-sort-select {
        min-width: 0;
        width: 100%;
    }
}

/* ─── ٧) شبكة المنتجات ─── */
.theme-custom #products-grid,
.theme-custom .row.g-3 {
    --bs-gutter-x: 1.25rem;
    --bs-gutter-y: 1.35rem;
}

.theme-custom .product-box {
    overflow: hidden;
    position: relative;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--fc-card-bg, #fff) !important;
    border-radius: var(--fc-card-radius, 14px) !important;
    border: 1px solid color-mix(in srgb, var(--fc-border-accent, #e5e7eb) 30%, transparent) !important;
    color: var(--fc-ink-on-card, #1a1816);
    padding: 0.5rem !important;
    transition:
        transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.28s ease,
        border-color 0.25s ease;
}

/* أنماط الكروت الخمسة — fc_product_card_presets.css (يُحمَّل من storefront_layout) */

.theme-custom .product-img-wrapper {
    width: 100%;
    height: 220px;
    padding: 10px;
    position: relative;
    background-color: var(--fc-card-bg, #fff);
}

.theme-custom .product-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.theme-custom.fc-card-radius-square .product-img,
.theme-custom.fc-card-radius-square .product-img-wrapper {
    border-radius: 4px 4px 0 0 !important;
}

.theme-custom.fc-card-radius-round .product-img,
.theme-custom.fc-card-radius-round .product-img-wrapper {
    border-radius: calc(var(--fc-card-radius, 22px) - 4px) calc(var(--fc-card-radius, 22px) - 4px) 0 0 !important;
}

.theme-custom .product-info {
    padding: 0.85rem 0.95rem 1.1rem !important;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.theme-custom .product-title {
    color: var(--fc-ink-on-card, #1a1816) !important;
    font-weight: 800 !important;
    font-size: 0.92rem;
    line-height: 1.35;
    letter-spacing: -0.015em;
}

.theme-custom .price-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
    margin-top: auto;
}

/* أسعار المتجر — لون الزر (هوية العرض) وليس لون النص الثانوي */
.theme-custom .fc-store-price,
.theme-custom .current-price {
    color: var(--fc-button, var(--primary)) !important;
    font-weight: 800 !important;
    font-size: 1.02rem;
    letter-spacing: -0.02em;
}

.theme-custom #modalPrice.fc-store-price {
    font-size: 1.75rem;
    line-height: 1.2;
}

.theme-custom #modalQtyTotal.fc-store-price {
    font-size: 0.875rem;
    font-weight: 700 !important;
}

.theme-custom #cartTotalDisplay.fc-store-price {
    font-size: 1.1rem;
}

/* عناوين تجارية بلون الزر (بدون مقاس سعر) */
.theme-custom .fc-store-accent-label {
    color: var(--fc-button, var(--primary));
    font-weight: 700;
    font-size: 0.8125rem;
}

.theme-custom .old-price {
    font-size: 0.85rem;
    font-weight: 600;
    color: color-mix(in srgb, var(--fc-ink-on-card, #64748b) 75%, transparent);
    text-decoration: line-through;
}

.theme-custom .discount-badge,
.theme-custom .soldout-badge {
    position: absolute;
    top: 15px;
    inset-inline-end: 15px;
    inset-inline-start: auto;
    z-index: 2;
    font-weight: 900;
}

.theme-custom .discount-badge {
    padding: 0.35rem 0.75rem;
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    color: #fff;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    border-radius: 999px;
    box-shadow: 0 6px 18px rgba(220, 38, 38, 0.35);
    backdrop-filter: blur(6px);
}

.theme-custom .soldout-badge {
    padding: 0.4rem 0.85rem;
    font-size: 0.78rem;
    font-weight: 900;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
    border-radius: 999px;
    box-shadow: 0 8px 22px rgba(220, 38, 38, 0.45);
    white-space: nowrap;
    letter-spacing: 0;
}

.theme-custom .bulk-badge {
    position: absolute;
    top: 52px;
    inset-inline-end: 15px;
    inset-inline-start: auto;
    padding: 4px 10px;
    font-weight: 800;
    border-radius: 999px;
    z-index: 2;
    background: var(--fc-bulk-badge, #178f58);
    color: #fff;
    font-size: 0.65rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    box-shadow: 0 6px 16px color-mix(in srgb, var(--fc-bulk-badge, #178f58) 45%, transparent);
}

.theme-custom .btn-view {
    border: 2px solid color-mix(in srgb, var(--fc-button, var(--primary)) 35%, transparent) !important;
    color: var(--fc-button, var(--primary)) !important;
    border-radius: 999px !important;
    font-weight: 800 !important;
    white-space: nowrap;
    overflow: visible;
    text-overflow: clip;
    line-height: 1.2;
}

.theme-custom .product-box:hover .btn-view:not(.btn-view--disabled),
.theme-custom .btn-checkout {
    background: linear-gradient(135deg, var(--fc-button), var(--fc-button-end)) !important;
    border-color: transparent !important;
    color: #fff !important;
    box-shadow: 0 8px 20px var(--fc-btn-shadow-soft, rgba(24, 81, 160, 0.28));
}

.theme-custom .qty-control {
    display: flex;
    align-items: center;
    overflow: hidden;
    width: max-content;
    background: color-mix(in srgb, var(--fc-card-bg, #fff) 88%, var(--fc-bulk-badge, #178f58)) !important;
    border: 1px solid color-mix(in srgb, var(--fc-bulk-badge, #178f58) 32%, transparent) !important;
    border-radius: 999px !important;
}

.theme-custom .qty-control button {
    background: none;
    border: none;
    padding: 2px 10px;
    font-weight: bold;
}

.theme-custom .qty-control input {
    width: 30px;
    text-align: center;
    border: none;
    font-weight: bold;
    background: none;
    font-size: 14px;
}

.theme-custom .btn-checkout {
    padding: 15px;
    width: 100%;
    transition: 0.3s;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    color: #fff;
}

.theme-custom .remove-item {
    cursor: pointer;
    font-size: 18px;
}

.theme-custom .cart-item-img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 12px;
}

/* ─── ٨) المودال ─── */
.theme-custom .modal-content {
    border: none;
    border-radius: calc(var(--fc-card-radius, 14px) + 4px);
    overflow: hidden;
    box-shadow:
        var(--fc-elev-modal),
        inset 0 1px 0 color-mix(in srgb, var(--fc-card-bg, #fff) 55%, var(--fc-button, var(--primary)) 8%);
}

.theme-custom .modal-img-wrap {
    background-color: var(--fc-card-bg, #fff);
}

.theme-custom .modal-img {
    width: 100%;
    height: 350px;
    object-fit: cover;
}

.theme-custom .modal-gallery-thumbs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 10px 16px 14px;
    background: var(--fc-card-bg, #fff);
    -webkit-overflow-scrolling: touch;
}

.theme-custom .modal-gallery-thumb {
    flex: 0 0 64px;
    width: 64px;
    height: 64px;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer;
    padding: 0;
    background: #fff;
}

.theme-custom .modal-gallery-thumb.active {
    border-color: var(--fc-button, var(--primary));
}

.theme-custom .modal-gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.fc-storefront-header-banner img {
    width: 100%;
    max-height: 360px;
    object-fit: cover;
    display: block;
}

.atelier-cat-card__img-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    min-height: 120px;
    font-size: 2rem;
    color: var(--fc-button, var(--primary));
    opacity: 0.45;
}

.fc-slider-slide-link {
    display: block;
    width: 100%;
    height: 100%;
}

.fc-slider-slide-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.theme-custom .modal-close-btn {
    position: absolute;
    top: 15px;
    inset-inline-start: 15px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    border: none;
    background: color-mix(in srgb, var(--fc-card-bg, #fff) 82%, var(--fc-button, var(--primary)) 18%) !important;
    color: var(--fc-ink-on-card, #334155) !important;
    box-shadow: var(--fc-elev-md);
    transition: transform 0.2s ease, background 0.2s ease;
}

.theme-custom .modal-close-btn:hover {
    transform: scale(1.06);
}

.theme-custom #modalTitle {
    letter-spacing: -0.02em;
    color: var(--fc-ink-on-card, #0f172a) !important;
}

.theme-custom .modal-price-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.theme-custom .modal-price-badge {
    background: #dc2626;
    color: #fff;
    border-radius: 999px;
    padding: 3px 9px;
    font-size: 0.72rem;
    font-weight: 700;
}

.theme-custom .modal-bulk-wrap {
    border: 1px dashed color-mix(in srgb, var(--fc-card-border, #e5e7eb) 75%, var(--fc-button, var(--primary)) 25%);
    border-radius: 12px;
    padding: 10px;
    margin-bottom: 14px;
    background: color-mix(in srgb, var(--fc-card-bg, #fff) 94%, var(--fc-button, var(--primary)) 6%);
}

.theme-custom .modal-bulk-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    border: 1px solid color-mix(in srgb, var(--fc-card-border, #e5e7eb) 92%, var(--fc-button, var(--primary)) 8%);
    border-radius: 12px;
    background: var(--fc-card-bg, #fff);
    padding: 10px 12px;
    margin-bottom: 8px;
    text-align: start;
    font: inherit;
    color: inherit;
    cursor: pointer;
    transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.theme-custom .modal-bulk-row--action:hover {
    transform: translateY(-1px);
    border-color: color-mix(in srgb, var(--fc-button, var(--primary)) 45%, transparent);
    box-shadow: 0 8px 20px color-mix(in srgb, var(--fc-button, var(--primary)) 16%, transparent);
}

.theme-custom .modal-bulk-row:last-child {
    margin-bottom: 0;
}

.theme-custom .modal-bulk-copy {
    min-width: 0;
    flex: 1;
}

.theme-custom .modal-bulk-main {
    font-size: 0.84rem;
    font-weight: 800;
    color: var(--fc-ink-on-card, #1a1816);
}

.theme-custom .modal-bulk-sub {
    font-size: 0.72rem;
    font-weight: 600;
    color: color-mix(in srgb, var(--fc-ink-on-card, #334155) 72%, var(--fc-button, var(--primary)) 28%);
    margin-top: 2px;
}

.theme-custom .modal-bulk-cta {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--fc-button, var(--primary)), color-mix(in srgb, var(--fc-button, var(--primary)) 75%, #111));
    color: #fff;
    font-size: 0.75rem;
    font-weight: 800;
    white-space: nowrap;
}

.theme-custom .modal-desc {
    font-weight: 600;
    font-size: 14px;
    line-height: 1.7;
    max-height: 150px;
    overflow-y: auto;
}

/* ─── ٩) سلة الجانبية ─── */
.theme-custom .offcanvas.offcanvas-end {
    border-radius: calc(var(--fc-card-radius, 14px) + 6px) 0 0 calc(var(--fc-card-radius, 14px) + 6px);
    box-shadow: var(--fc-elev-cart);
}

.theme-custom .offcanvas-header {
    background: color-mix(in srgb, var(--fc-card-bg, #fff) 96%, var(--fc-button, var(--primary)) 4%);
}

/* ─── ١٠) قائمة theme5 + بطل اختياري ─── */
.theme-custom .theme5-menu-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.4rem 0.65rem;
    padding: 0.65rem 1rem;
    margin: 0 0 1.15rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--fc-card-bg, #fff) 92%, var(--fc-button, var(--primary)) 5%);
    border: 1px solid color-mix(in srgb, var(--fc-border-accent, #e5e7eb) 28%, transparent);
    box-shadow: var(--fc-elev-md);
}

.theme-custom .theme5-menu-link {
    font-weight: 700;
    font-size: 0.78rem;
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    text-decoration: none;
    color: color-mix(in srgb, var(--fc-ink-on-card, #334155) 90%, var(--fc-button, var(--primary)) 10%);
    transition: background 0.2s ease, color 0.2s ease;
}

.theme-custom .theme5-menu-link:hover {
    background: color-mix(in srgb, var(--fc-button, var(--primary)) 12%, transparent);
    color: var(--fc-button, var(--primary));
}

.theme-custom .theme5-menu-center {
    font-weight: 800;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    color: color-mix(in srgb, var(--fc-ink-on-card, #64748b) 75%, var(--fc-button, var(--primary)) 25%);
    padding-inline: 0.5rem;
}

.theme-custom .theme5-hero {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: clamp(1.25rem, 3vw, 2.5rem);
    align-items: center;
    padding: clamp(1.75rem, 4vw, 3.25rem);
    margin: 0.5rem 0 1.75rem;
    border-radius: calc(var(--fc-card-radius, 14px) + 8px);
    background: linear-gradient(
        135deg,
        color-mix(in srgb, var(--fc-card-bg, #fff) 94%, var(--fc-button, var(--primary)) 6%) 0%,
        var(--fc-card-bg, #fff) 42%,
        color-mix(in srgb, var(--fc-card-bg, #fff) 92%, var(--primary) 8%) 100%
    );
    border: 1px solid color-mix(in srgb, var(--fc-border-accent, #e5e7eb) 32%, transparent);
    box-shadow: var(--fc-elev-lg);
    overflow: hidden;
}

.theme-custom .theme5-hero-copy h1 {
    font-weight: 800;
    font-size: clamp(1.65rem, 1.2vw + 1.35rem, 2.65rem);
    line-height: 1.18;
    letter-spacing: -0.03em;
    color: var(--fc-ink-on-card, #0f172a);
    margin-bottom: 0.75rem;
}

.theme-custom .theme5-hero-copy p {
    font-size: clamp(0.92rem, 0.35vw + 0.85rem, 1.05rem);
    line-height: 1.65;
    color: color-mix(in srgb, var(--fc-ink-on-card, #475569) 88%, var(--fc-button, var(--primary)) 12%);
    margin-bottom: 1.25rem;
    max-width: 36ch;
}

.theme-custom .theme5-hero-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.65rem;
    font-weight: 800;
    border-radius: 999px;
    text-decoration: none;
    color: #fff !important;
    background: linear-gradient(135deg, var(--fc-button), var(--fc-button-end));
    box-shadow: 0 12px 32px var(--fc-shadow-brand, rgba(24, 81, 160, 0.32));
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.theme-custom .theme5-hero-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 40px var(--fc-shadow-brand, rgba(24, 81, 160, 0.38));
    color: #fff !important;
}

.theme-custom .theme5-hero-media {
    border-radius: calc(var(--fc-card-radius, 14px) + 2px);
    overflow: hidden;
    aspect-ratio: 4 / 3;
    box-shadow: var(--fc-elev-lg);
    border: 1px solid color-mix(in srgb, var(--fc-border-accent, #e5e7eb) 35%, transparent);
}

.theme-custom .theme5-hero-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

@media (max-width: 767.98px) {
    .theme-custom .theme5-hero {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .theme-custom .theme5-hero-copy p {
        margin-inline: auto;
    }
}

/* ─── ١١) التذييل ─── */
.theme-custom .fc-store-footer__inner {
    max-width: 1200px;
    margin-inline: auto;
}

.theme-custom .fc-store-footer__col-title {
    letter-spacing: 0.03em;
    font-size: 0.8rem;
    font-weight: 800;
    opacity: 0.92;
}

/* ─── ١٢) أزرار معطّلة — هوية (ما عدا الخصم) ─── */
.theme-custom .btn-view.btn-view--disabled,
.theme-custom .btn-view.btn-view--disabled:disabled,
.theme-custom .product-box:hover .btn-view.btn-view--disabled,
.theme-custom .product-box:hover .btn-view.btn-view--disabled:disabled {
    pointer-events: none;
    background: linear-gradient(135deg, #ef4444, #dc2626) !important;
    color: #fff !important;
    border-color: transparent !important;
    box-shadow: 0 6px 16px rgba(220, 38, 38, 0.35);
    white-space: nowrap;
    overflow: visible;
}

.theme-custom #modalAddBtn.fc-modal-add--disabled {
    background: color-mix(in srgb, var(--fc-card-bg, #fff) 80%, var(--fc-border-accent) 20%) !important;
    color: color-mix(in srgb, var(--fc-ink-on-card) 76%, var(--fc-button, var(--primary)) 24%) !important;
    border: none !important;
    opacity: 0.96;
}

/* ─── ١٣) لمسات تفاعلية ─── */
.theme-custom .btn,
.theme-custom button,
.theme-custom .qty-control button,
.theme-custom .cat-pill,
.theme-custom .product-box,
.theme-custom .cart-icon,
.theme-custom .modal-close-btn {
    touch-action: manipulation;
}

/* صفحة الدفع: themes/checkout_neutral.css — لا تلوين من هنا */
