/*
 * Storefront Theme 5 — Quick Order (KFC-inspired storefront)
 * ألوان الهوية من Store Builder عبر --fc-* / --ln-accent
 */

*,
*::before,
*::after { box-sizing: border-box; }

:root {
    --ln-bg: #F5F5F5;
    --ln-bg-2: #EEEEEE;
    --ln-surface: #FFFFFF;
    --ln-border: #E5E5E5;
    --ln-border-2: #EDEDED;
    --ln-ink: #1A1A1A;
    --ln-ink-2: #4A4A4A;
    --ln-ink-3: #8A8A8A;
    --ln-accent: #E4002B;
    --ln-accent-2: #B80022;
    --ln-accent-light: #FFE8EC;
    --ln-red: #E4002B;
    --ln-r-sm: 8px;
    --ln-r-md: 14px;
    --ln-r-lg: 20px;
    --ln-t: 0.18s ease;
    --mk-max: 1180px;
}

body.theme-market {
    --ln-bg: var(--fc-page-bg, #f5f5f5);
    --ln-bg-2: color-mix(in srgb, var(--fc-page-bg, #f5f5f5) 90%, var(--fc-button, #e4002b) 10%);
    --ln-surface: var(--fc-card-bg, #ffffff);
    --ln-border: color-mix(in srgb, var(--fc-card-border, #e5e5e5) 90%, var(--fc-button, #e4002b) 10%);
    --ln-border-2: #ededed;
    --ln-ink: var(--fc-ink-on-card, #1a1a1a);
    --ln-ink-2: color-mix(in srgb, var(--fc-ink-on-card, #4a4a4a) 92%, #000 8%);
    --ln-ink-3: #8a8a8a;
    --ln-accent: var(--fc-button, #e4002b);
    --ln-accent-2: var(--fc-button-end, #b80022);
    --ln-accent-light: color-mix(in srgb, var(--fc-card-bg, #fff) 82%, var(--fc-button, #e4002b) 18%);
    --ln-red: var(--fc-button, #e4002b);
    --ln-r-md: var(--fc-card-radius, 14px);
    --ln-r-sm: max(6px, calc(var(--fc-card-radius, 14px) * 0.55));
    --ln-r-lg: min(24px, calc(var(--fc-card-radius, 14px) * 1.4));
}

body.theme-market {
    background: var(--ln-bg) !important;
    color: var(--ln-ink) !important;
    font-family: "Archivo", "Noto Sans Arabic", system-ui, sans-serif !important;
    margin: 0;
    padding-bottom: 0 !important;
    overflow-x: clip;
    -webkit-font-smoothing: antialiased;
}

body.theme-market .ln-bottomnav,
body.theme-market .mg-bottomnav-hidden {
    display: none !important;
}

/* ── Header ──────────────────────────────────── */
.mk-site-header {
    position: sticky;
    top: 0;
    z-index: 900;
    background: var(--fc-header-bar, #fff);
    border-bottom: 1px solid var(--ln-border);
}

.mk-site-header__inner {
    max-width: var(--mk-max);
    margin: 0 auto;
    min-height: 72px;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.mk-site-header__start {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    flex: 1;
}

.mk-site-brand {
    position: relative;
    z-index: 5;
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
    flex-shrink: 0;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    padding: 6px 4px;
    margin: -6px -4px;
    min-height: 44px;
    min-width: 44px;
}

.mk-site-logo {
    max-height: 44px;
    max-width: min(160px, 36vw);
    width: auto;
    object-fit: contain;
    pointer-events: none;
    display: block;
}

.mk-site-name {
    font-weight: 800;
    font-size: 1.35rem;
    color: var(--ln-accent);
    letter-spacing: -0.02em;
}

.mk-pill-nav {
    display: none;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
    overflow-x: auto;
    min-width: 0;
    scrollbar-width: none;
}
.mk-pill-nav::-webkit-scrollbar { display: none; }

.mk-pill {
    flex: 0 0 auto;
    border: 1.5px solid var(--ln-border);
    background: #fff;
    color: var(--ln-ink);
    font: inherit;
    font-weight: 700;
    font-size: 0.82rem;
    padding: 8px 14px;
    border-radius: 999px;
    cursor: pointer;
    white-space: nowrap;
    transition: background var(--ln-t), color var(--ln-t), border-color var(--ln-t);
}

.mk-pill:hover {
    border-color: color-mix(in srgb, var(--ln-accent) 45%, var(--ln-border));
}

.mk-pill.is-active,
.mk-pill--accent.is-active {
    background: var(--ln-accent);
    border-color: var(--ln-accent);
    color: #fff;
}

.mk-pill--accent {
    border-color: color-mix(in srgb, var(--ln-accent) 55%, #fff);
    color: var(--ln-accent);
}

.mk-site-tools {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.mk-site-search {
    display: none;
    align-items: center;
    gap: 8px;
    min-width: 180px;
    max-width: 240px;
    background: #fff;
    border: 1.5px solid var(--ln-border);
    border-radius: 999px;
    padding: 8px 14px;
    color: var(--ln-ink-3);
}

.mk-site-search input {
    border: 0;
    outline: 0;
    background: transparent;
    width: 100%;
    font: inherit;
    font-weight: 600;
    color: var(--ln-ink);
}

.mk-icon-btn {
    width: 42px;
    height: 42px;
    border: 1.5px solid var(--ln-border);
    background: #fff;
    border-radius: 12px;
    color: var(--ln-ink);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
}

.mk-cart-btn {
    border-color: color-mix(in srgb, var(--ln-accent) 35%, var(--ln-border));
    color: var(--ln-accent);
}

.mk-cart-badge {
    position: absolute;
    top: -4px;
    inset-inline-end: -4px;
    min-width: 18px;
    height: 18px;
    border-radius: 999px;
    background: var(--ln-accent);
    color: #fff;
    font-size: 0.62rem;
    font-weight: 800;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

.mk-site-account {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.mk-site-account a {
    color: var(--ln-ink) !important;
}

.mk-mobile-search {
    display: none;
    padding: 10px 16px 0;
    max-width: var(--mk-max);
    margin: 0 auto;
}

/* ── Content shell ───────────────────────────── */
.mk-site.mk-content,
body.theme-market .mk-content {
    max-width: none;
    padding: 0 0 56px;
}

.mk-section {
    max-width: var(--mk-max);
    margin: 0 auto;
    padding: 28px 16px 8px;
}

.mk-section__head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.mk-section-title {
    margin: 0;
    font-size: clamp(1.25rem, 2.2vw, 1.7rem);
    font-weight: 800;
    color: var(--ln-ink);
    letter-spacing: -0.02em;
    text-transform: uppercase;
}

[dir="rtl"] .mk-section-title {
    text-transform: none;
    letter-spacing: 0;
}

.mk-section-sub {
    margin: 4px 0 0;
    color: var(--ln-ink-3);
    font-size: 0.9rem;
    font-weight: 600;
}

.mk-section-link {
    border: 0;
    background: transparent;
    color: var(--ln-accent);
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    padding: 0;
}

/* ── عروض الكمية (مودال المنتج) ───────────────── */
.ln-bulk-wrap {
    background: var(--ln-bg-2);
    border: 1px dashed var(--ln-border-2);
    border-radius: var(--ln-r-sm);
    padding: 10px;
    margin-bottom: 14px;
}

.ln-bulk-row {
    border: 1px solid var(--ln-border);
    background: #fff;
    border-radius: 10px;
    padding: 8px 10px;
    margin-bottom: 7px;
}

.ln-bulk-row:last-child { margin-bottom: 0; }

.ln-bulk-main {
    font-size: .78rem;
    font-weight: 700;
    color: var(--ln-ink);
}

.ln-bulk-sub {
    font-size: .7rem;
    color: var(--ln-ink-3);
    margin-top: 2px;
}

/* Bulk offer as add-to-cart action */
.ln-bulk-row--action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    text-align: start;
    font: inherit;
    color: inherit;
    cursor: pointer;
    transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.ln-bulk-row--action:hover {
    transform: translateY(-1px);
}
.ln-bulk-copy { min-width: 0; flex: 1; }
.ln-bulk-cta {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 999px;
    background: var(--ln-accent, var(--primary, #111));
    color: #fff;
    font-size: .74rem;
    font-weight: 800;
    white-space: nowrap;
}


/* ── Hero ────────────────────────────────────── */
.mk-hero {
    position: relative;
    width: 100%;
    background: #111;
}

.mk-hero-swiper,
.mk-hero-banner,
.mk-hero-fallback {
    width: 100%;
}

/* هيرو ثابت النسبة — التفاصيل في fc_storefront_slider.css */
.mk-hero-swiper {
    background: #eee;
    line-height: 0;
}

.mk-hero-swiper .swiper-slide {
    aspect-ratio: unset !important;
}

.mk-hero-fallback {
    min-height: var(--fc-slider-min-h, 150px);
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at 70% 30%, color-mix(in srgb, var(--ln-accent) 35%, transparent), transparent 50%),
        linear-gradient(160deg, #1a1a1a 0%, #0d0d0d 100%);
    padding: 40px 18px;
}

.mk-hero-fallback__inner,
.mk-hero-caption {
    max-width: var(--mk-max);
    margin: 0 auto;
    padding: 18px 16px 22px;
}

.mk-hero-caption {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
    background: var(--ln-bg);
}

.mk-hero-title {
    margin: 0;
    font-size: clamp(1.6rem, 3.2vw, 2.5rem);
    font-weight: 800;
    color: var(--ln-ink);
    letter-spacing: -0.03em;
}

.mk-hero-fallback .mk-hero-title { color: #fff; }
.mk-hero-fallback .mk-hero-sub { color: rgba(255,255,255,.78); }

.mk-hero-sub {
    margin: 0;
    color: var(--ln-ink-2);
    font-size: 1rem;
    font-weight: 600;
    max-width: 40rem;
}

.mk-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 6px;
}

.mk-hero-cta {
    border: 0;
    background: var(--ln-accent);
    color: #fff;
    font: inherit;
    font-weight: 800;
    font-size: 0.92rem;
    padding: 12px 22px;
    border-radius: 8px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

[dir="rtl"] .mk-hero-cta {
    text-transform: none;
    letter-spacing: 0;
}

.mk-hero-cta--ghost {
    background: transparent;
    color: var(--ln-accent);
    border: 1.5px solid var(--ln-accent);
}

/* ── Category rail (Explore menu) ────────────── */
.mk-cat-rail {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    padding: 4px 2px 10px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.mk-cat-card {
    position: relative;
    flex: 0 0 min(220px, 68vw);
    height: 200px;
    border: 0;
    padding: 0;
    border-radius: 18px;
    overflow: hidden;
    cursor: pointer;
    background: #1a1a1a;
    scroll-snap-align: start;
    text-align: start;
}

.mk-cat-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.92;
    transition: transform 0.35s ease;
}

.mk-cat-card:hover img { transform: scale(1.05); }

.mk-cat-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,.55) 0%, transparent 45%, rgba(0,0,0,.35) 100%);
    pointer-events: none;
}

.mk-cat-card__title {
    position: absolute;
    z-index: 1;
    top: 14px;
    inset-inline-start: 14px;
    inset-inline-end: 14px;
    color: #fff;
    font-weight: 800;
    font-size: 0.95rem;
    line-height: 1.25;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

[dir="rtl"] .mk-cat-card__title {
    text-transform: none;
    letter-spacing: 0;
}

/* ── Product grids ───────────────────────────── */
body.theme-market .mk-web-grid.ln-grid,
body.theme-market .ln-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    width: 100%;
    align-items: stretch;
}

body.theme-market .ln-card {
    background: var(--ln-surface);
    border: 0;
    border-radius: var(--ln-r-lg);
    overflow: hidden;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    min-width: 0;
    height: 100%;
    box-shadow: 0 2px 14px rgba(0, 0, 0, 0.06);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

@media (hover: hover) and (pointer: fine) {
    body.theme-market .ln-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 10px 28px rgba(0, 0, 0, 0.1);
    }
}

body.theme-market .ln-card__img {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #f0f0f0;
    overflow: hidden;
    flex-shrink: 0;
}

body.theme-market .ln-card__img img {
    width: 100% !important;
    height: 100% !important;
    max-height: none !important;
    object-fit: cover !important;
    display: block;
}

body.theme-market .ln-card__badges {
    position: absolute;
    inset-inline-start: 10px;
    top: 10px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: flex-start;
}

body.theme-market .ln-card__badge {
    background: var(--ln-accent);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 800;
    padding: 4px 8px;
    border-radius: 6px;
    line-height: 1.3;
}

body.theme-market .ln-card__badge--bulk { background: #178f58; }
body.theme-market .ln-card__badge--soldout {
    background: #dc2626;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 900;
    padding: 5px 10px;
    border-radius: 999px;
    box-shadow: 0 6px 16px rgba(220, 38, 38, 0.42);
    letter-spacing: 0;
    white-space: nowrap;
}

body.theme-market .ln-card--soldout { opacity: 1; cursor: default; }
body.theme-market .ln-card--soldout .ln-card__img img { filter: grayscale(0.18); }

body.theme-market .ln-card__body {
    padding: 12px 12px 14px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
}

body.theme-market .ln-card__name {
    font-size: 0.92rem;
    font-weight: 800;
    color: var(--ln-ink);
    line-height: 1.3;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.4em;
}

body.theme-market .ln-card__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: auto;
}

body.theme-market .ln-card__prices {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

body.theme-market .ln-card__price {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--ln-ink);
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
}

body.theme-market .ln-card__old {
    font-size: 0.72rem;
    color: var(--ln-ink-3);
    text-decoration: line-through;
}

body.theme-market .ln-card__add {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 36px;
    padding: 8px 12px;
    border-radius: 8px;
    background: var(--ln-accent);
    color: #fff !important;
    border: none;
    font: inherit;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    flex-shrink: 0;
    white-space: nowrap;
}

[dir="rtl"] body.theme-market .ln-card__add {
    letter-spacing: 0;
    text-transform: none;
    font-size: 0.8rem;
}

body.theme-market .ln-card__add.ln-card__add--disabled {
    background: #dc2626 !important;
    color: #fff !important;
    box-shadow: 0 6px 16px rgba(220, 38, 38, 0.35);
}

body.theme-market .ln-section-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

body.theme-market .ln-section-action {
    border: 1.5px solid var(--ln-border);
    background: #fff;
    color: var(--ln-ink);
    border-radius: 999px;
    padding: 8px 12px;
    font-weight: 800;
    font-size: 0.78rem;
    cursor: pointer;
}

body.theme-market .ln-section-action.is-active,
body.theme-market #btnLoadOffers.is-active {
    background: var(--ln-accent);
    border-color: var(--ln-accent);
    color: #fff;
}

body.theme-market .ln-offers-sort {
    border: 1.5px solid var(--ln-border);
    border-radius: 999px;
    padding: 8px 12px;
    font: inherit;
    font-weight: 700;
    font-size: 0.78rem;
    background: #fff;
}

body.theme-market .ln-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 48px 16px;
    color: var(--ln-ink-3);
    font-weight: 700;
}

body.theme-market .ln-view-header {
    max-width: var(--mk-max);
    margin: 0 auto;
    padding: 18px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

body.theme-market #view-search .ln-grid {
    max-width: var(--mk-max);
    margin: 0 auto;
    padding: 0 16px 24px;
}

body.theme-market .ln-offers-banner {
    max-width: var(--mk-max);
    margin: 0 auto 16px;
    padding: 0 16px;
}

body.theme-market .ln-offers-banner img {
    width: 100%;
    height: clamp(120px, 22vw, 200px);
    object-fit: cover;
    border-radius: var(--ln-r-md);
    display: block;
}

/* ── Product sheet ───────────────────────────── */
body.theme-market #itemSheet .modal-dialog {
    margin: 0;
    max-width: 100%;
    min-height: 100%;
    display: flex;
    align-items: flex-end;
}

body.theme-market #itemSheet .modal-content {
    position: relative;
    width: 100%;
    max-height: 92vh;
    overflow-y: auto;
    border: 0;
    border-radius: 20px 20px 0 0;
    background: #fff;
    color: var(--ln-ink);
    box-shadow: 0 -12px 48px rgba(0, 0, 0, 0.18);
}

body.theme-market .ln-sheet-handle {
    width: 40px;
    height: 4px;
    border-radius: 4px;
    background: #ddd;
    margin: 12px auto 8px;
}

body.theme-market .ln-modal-x {
    position: absolute;
    top: 12px;
    inset-inline-start: 12px;
    z-index: 10;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--ln-border);
    background: rgba(255,255,255,.92);
    color: var(--ln-ink-2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

body.theme-market .ln-sheet-body { padding: 0 18px 22px; }

body.theme-market .ln-product-img {
    width: 100%;
    height: clamp(160px, 34vw, 220px);
    max-height: 220px;
    object-fit: cover;
    background: #f0f0f0;
    border-radius: 14px;
    display: block;
    margin: 0 0 12px;
}

body.theme-market .ln-modal-gallery {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 0 0 12px;
}

body.theme-market .ln-modal-gallery-thumb {
    flex: 0 0 52px;
    width: 52px;
    height: 52px;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer;
    padding: 0;
    background: #f0f0f0;
}

body.theme-market .ln-modal-gallery-thumb.active { border-color: var(--ln-accent); }
body.theme-market .ln-modal-gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

body.theme-market .ln-modal-name {
    margin: 0 0 6px;
    font-size: 1.25rem;
    font-weight: 800;
}

body.theme-market .ln-modal-price-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}

body.theme-market .ln-modal-price {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--ln-accent);
}

body.theme-market .ln-modal-old {
    font-size: 0.82rem;
    color: var(--ln-ink-3);
    text-decoration: line-through;
}

body.theme-market .ln-modal-disc {
    background: var(--ln-accent);
    color: #fff;
    border-radius: 6px;
    padding: 3px 8px;
    font-size: 0.68rem;
    font-weight: 800;
}

body.theme-market .ln-modal-price-total {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--ln-ink-3);
    margin: 0 0 14px;
}

body.theme-market .ln-modal-desc {
    font-size: 0.88rem;
    line-height: 1.55;
    color: var(--ln-ink-2);
    margin: 0 0 14px;
}

body.theme-market .ln-qty-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: #f5f5f5;
    border: 1px solid var(--ln-border);
    border-radius: 12px;
    padding: 10px 14px;
    margin-bottom: 12px;
}

body.theme-market .ln-qty-label { font-weight: 800; color: var(--ln-ink-2); }
body.theme-market .ln-qty-controls { display: flex; align-items: center; gap: 12px; }

body.theme-market .ln-qty-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1.5px solid var(--ln-border);
    background: #fff;
    color: var(--ln-ink);
    font-size: 1.05rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

body.theme-market .ln-qty-val {
    min-width: 22px;
    text-align: center;
    font-weight: 800;
}

body.theme-market .ln-add-btn {
    width: 100%;
    padding: 15px 16px;
    border-radius: 10px;
    border: 0;
    background: var(--ln-accent);
    color: #fff;
    font: inherit;
    font-size: 1rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

[dir="rtl"] body.theme-market .ln-add-btn {
    text-transform: none;
    letter-spacing: 0;
}

body.theme-market .ln-wishlist-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 13px 14px;
    border-radius: 10px;
    border: 1.5px solid var(--ln-border);
    background: #fff;
    color: var(--ln-ink-2);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

/* ── Cart drawer ─────────────────────────────── */
body.theme-market #cartDrawer.mk-cart-drawer.offcanvas-end,
body.theme-market .mk-cart-drawer.offcanvas-end {
    width: min(400px, 100vw) !important;
    border: 0;
    background: #fff !important;
}

body.theme-market #cartDrawer .offcanvas-header {
    padding: 16px 18px 12px;
    border-bottom: 1px solid var(--ln-border);
    background: #f7fafc;
}

body.theme-market #cartDrawer .offcanvas-body {
    background: #fff;
    padding: 14px 16px;
}

body.theme-market #cartDrawer .ln-cart-row,
body.theme-market .ln-cart-row {
    display: flex !important;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 14px;
    background: #f7f7f7;
    border: 1px solid var(--ln-border);
    margin-bottom: 10px;
    min-width: 0;
}

body.theme-market #cartDrawer .ln-cart-thumb,
body.theme-market .ln-cart-thumb {
    width: 64px !important;
    height: 64px !important;
    min-width: 64px !important;
    max-width: 64px !important;
    border-radius: 12px;
    overflow: hidden;
    background: #eee;
    flex: 0 0 64px !important;
}

body.theme-market #cartDrawer .ln-cart-thumb img,
body.theme-market .ln-cart-thumb img,
body.theme-market #cartDrawer .ln-cart-row > img,
body.theme-market .ln-cart-row > img {
    width: 64px !important;
    height: 64px !important;
    max-width: 64px !important;
    max-height: 64px !important;
    object-fit: cover !important;
    display: block !important;
}

body.theme-market .ln-cart-info { flex: 1 1 auto; min-width: 0; }
body.theme-market .ln-cart-name {
    font-size: 0.86rem;
    font-weight: 800;
    color: var(--ln-ink);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
body.theme-market .ln-cart-meta { font-size: 0.72rem; color: var(--ln-ink-3); margin-top: 2px; }
body.theme-market .ln-cart-price { font-size: 0.8rem; font-weight: 800; color: var(--ln-accent); margin-top: 4px; }

body.theme-market .ln-cart-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

body.theme-market .ln-cart-qty-btns { display: flex; align-items: center; gap: 6px; }
body.theme-market .ln-cart-qty-num { font-weight: 800; min-width: 16px; text-align: center; }

body.theme-market .ln-cart-qty-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1.5px solid var(--ln-border);
    background: #fff;
    color: var(--ln-ink);
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
}

body.theme-market .ln-cart-remove {
    background: none;
    border: none;
    color: var(--ln-accent);
    cursor: pointer;
    font-size: 0.8rem;
    padding: 2px;
}

body.theme-market .ln-cart-discount-row:not([hidden]) {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px dashed var(--ln-border);
    font-size: .9rem;
}
body.theme-market .ln-cart-discount-label {
    font-weight: 700;
    color: #178F58;
}
body.theme-market .ln-cart-discount-val {
    font-weight: 800;
    color: #178F58;
}
body.theme-market .mk-kiosk__cart-discount-row:not([hidden]) {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: .85rem;
    color: #178F58;
    font-weight: 700;
}
body.theme-market .ln-cart-footer {
    padding: 14px 18px calc(18px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--ln-border);
    background: #fff;
}

body.theme-market .ln-cart-total-label { font-weight: 700; color: var(--ln-ink-2); }
body.theme-market .ln-cart-total-val { font-size: 1.05rem; font-weight: 800; }

body.theme-market .ln-cart-checkout-btn {
    width: 100%;
    margin-top: 12px;
    padding: 14px 16px;
    border: 0;
    border-radius: 10px;
    background: var(--ln-accent);
    color: #fff;
    font: inherit;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    text-transform: uppercase;
}

[dir="rtl"] body.theme-market .ln-cart-checkout-btn {
    text-transform: none;
}

/* ── Card radius hooks ───────────────────────── */
body.theme-market.fc-card-radius-soft { --ln-r-md: 14px; --ln-r-sm: 10px; --ln-r-lg: 18px; }
body.theme-market.fc-card-radius-round { --ln-r-md: 20px; --ln-r-sm: 14px; --ln-r-lg: 24px; }
body.theme-market.fc-card-radius-square { --ln-r-md: 6px; --ln-r-sm: 4px; --ln-r-lg: 8px; }

body.theme-market .mg-anchors,
body.theme-market .mg-row,
body.theme-market .mk-list-row {
    display: none !important;
}

/* ── Desktop ─────────────────────────────────── */
@media (min-width: 576px) {
    body.theme-market #itemSheet .modal-dialog {
        max-width: 440px;
        margin: 1.75rem auto;
        min-height: auto;
        align-items: center;
    }
    body.theme-market #itemSheet .modal-content {
        border-radius: 18px;
        max-height: min(88vh, 720px);
    }
    body.theme-market .ln-sheet-handle { display: none; }
    body.theme-market .ln-product-img {
        height: 200px;
        max-height: 200px;
    }
    body.theme-market .ln-modal-x {
        inset-inline-start: auto;
        inset-inline-end: 14px;
    }
}

@media (min-width: 768px) {
    .mk-pill-nav { display: flex; }
    .mk-site-search { display: flex; }
    .mk-search-toggle { display: none; }
    .mk-mobile-search,
    #search-box.mk-mobile-search { display: none !important; }

    .mk-cat-card {
        flex-basis: 240px;
        height: 220px;
    }

    body.theme-market .mk-web-grid.ln-grid,
    body.theme-market .ln-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 18px;
    }

    .mk-section { padding-top: 36px; }
}

@media (min-width: 1100px) {
    body.theme-market .mk-web-grid.ln-grid,
    body.theme-market .ln-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
    .mk-site-header__inner { min-height: 78px; }
}

@media (max-width: 767.98px) {
    .mk-site-header__inner {
        gap: 10px;
    }
    .mk-pill-nav { display: none; }
    .mk-site-search { display: none; }
    .mk-search-toggle { display: inline-flex; }
}

/* ── Cashier / Kiosk order screen ─────────────── */
body.theme-market.mk-kiosk-open {
    overflow: hidden;
}

body.theme-market.mk-kiosk-open .mk-site-header {
    z-index: 920;
}

body.theme-market.mk-kiosk-open .mk-site-brand {
    z-index: 930;
    pointer-events: auto;
}

.mk-kiosk {
    position: fixed;
    top: var(--mk-header-h, 72px);
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 880;
    display: none;
    flex-direction: column;
    background: #f3f4f6;
    color: var(--ln-ink);
}

.mk-kiosk__cats-wrap {
    display: flex;
    align-items: stretch;
    gap: 10px;
    background: #fff;
    border-bottom: 1px solid var(--ln-border);
    padding: 0 12px;
    min-height: 86px;
}

.mk-kiosk__cats {
    display: flex;
    align-items: stretch;
    gap: 4px;
    overflow-x: auto;
    flex: 1;
    min-width: 0;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.mk-kiosk__cats::-webkit-scrollbar { display: none; }

.mk-kiosk-cat {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 88px;
    max-width: 120px;
    padding: 10px 8px 12px;
    border: 0;
    background: transparent;
    cursor: pointer;
    color: var(--ln-ink);
    font: inherit;
    position: relative;
}

.mk-kiosk-cat::after {
    content: "";
    position: absolute;
    inset-inline: 18%;
    bottom: 0;
    height: 3px;
    border-radius: 3px 3px 0 0;
    background: transparent;
}

.mk-kiosk-cat.is-active {
    color: var(--ln-accent);
}

.mk-kiosk-cat.is-active::after {
    background: var(--ln-accent);
}

.mk-kiosk-cat__img {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    overflow: hidden;
    background: #f1f1f1;
    display: grid;
    place-items: center;
}

.mk-kiosk-cat__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mk-kiosk-cat__img--icon {
    background: color-mix(in srgb, var(--ln-accent) 12%, #fff);
    color: var(--ln-accent);
    font-size: 1.1rem;
}

.mk-kiosk-cat__label {
    font-size: 0.68rem;
    font-weight: 800;
    line-height: 1.2;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

[dir="rtl"] .mk-kiosk-cat__label {
    text-transform: none;
    letter-spacing: 0;
    font-size: 0.72rem;
}

.mk-kiosk__search {
    display: none;
    align-items: center;
    gap: 8px;
    align-self: center;
    min-width: 200px;
    max-width: 260px;
    margin-inline-end: 4px;
    background: #f5f5f5;
    border: 1px solid var(--ln-border);
    border-radius: 999px;
    padding: 8px 14px;
    color: var(--ln-ink-3);
    flex-shrink: 0;
}

.mk-kiosk__search input {
    border: 0;
    outline: 0;
    background: transparent;
    width: 100%;
    font: inherit;
    font-weight: 600;
    color: var(--ln-ink);
}

.mk-kiosk__workspace {
    flex: 1;
    min-height: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
}

.mk-kiosk__menu {
    min-width: 0;
    overflow: auto;
    padding: 14px 14px 88px;
    -webkit-overflow-scrolling: touch;
}

.mk-kiosk__menu-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.mk-kiosk__back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid var(--ln-border);
    background: #fff;
    color: var(--ln-ink);
    border-radius: 999px;
    padding: 7px 12px;
    font: inherit;
    font-weight: 700;
    font-size: 0.8rem;
    cursor: pointer;
}

.mk-kiosk__title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: -0.02em;
}

[dir="rtl"] .mk-kiosk__title {
    text-transform: none;
}

.mk-kiosk-grid.ln-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
}

body.theme-market .ln-card--kiosk .ln-card__img {
    aspect-ratio: 4 / 3;
    background: #fafafa;
}

body.theme-market .ln-card--kiosk .ln-card__img img {
    object-fit: contain !important;
    padding: 8px;
}

body.theme-market .ln-card__desc {
    margin: 0;
    color: var(--ln-ink-3);
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

body.theme-market .ln-card--kiosk .ln-card__foot {
    flex-wrap: nowrap;
    align-items: center;
    gap: 8px;
}

body.theme-market .ln-card--kiosk .ln-card__prices {
    flex: 1;
    min-width: 0;
}

body.theme-market .ln-card--kiosk .ln-card__add {
    width: 4.65rem;
    height: 4.65rem;
    min-width: 4.65rem;
    max-width: 4.65rem;
    min-height: 4.65rem;
    border-radius: 50%;
    padding: 0.4rem 0.45rem;
    font-size: 0.62rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: 0;
    text-transform: none;
    white-space: normal;
    overflow: hidden;
    text-overflow: clip;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.mk-kiosk__cart {
    display: none;
    flex-direction: column;
    background: #fff;
    border-inline-start: 1px solid var(--ln-border);
    min-height: 0;
}

.mk-kiosk__cart-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 16px 18px 12px;
    background: linear-gradient(180deg, #eef3f8 0%, #fff 100%);
    border-bottom: 1px solid #edf0f3;
}

.mk-kiosk__cart-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 800;
}

.mk-kiosk__cart-dots {
    display: inline-flex;
    gap: 4px;
}

.mk-kiosk__cart-dots i {
    width: 8px;
    height: 8px;
    border-radius: 2px;
    background: var(--ln-accent);
    display: block;
}

.mk-kiosk__cart-body {
    flex: 1;
    min-height: 0;
    overflow: auto;
    padding: 8px 14px 14px;
}

.mk-kiosk-cart-empty {
    min-height: 280px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 28px 16px;
    gap: 8px;
}

.mk-kiosk-cart-empty__art {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--ln-accent) 10%, #fff);
    color: var(--ln-accent);
    display: grid;
    place-items: center;
    font-size: 2.2rem;
    margin-bottom: 8px;
}

.mk-kiosk-cart-empty__title {
    margin: 0;
    font-weight: 800;
    font-size: 1.05rem;
}

.mk-kiosk-cart-empty__sub {
    margin: 0;
    color: var(--ln-ink-3);
    font-size: 0.85rem;
    font-weight: 600;
    max-width: 16rem;
    line-height: 1.45;
}

.mk-kiosk__cart-foot {
    border-top: 1px solid var(--ln-border);
    padding: 14px 16px 16px;
    background: #fff;
}

.mk-kiosk__cart-total-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 800;
    margin-bottom: 10px;
}

.mk-kiosk__checkout {
    width: 100%;
    border: 0;
    border-radius: 999px;
    background: var(--ln-accent);
    color: #fff;
    font: inherit;
    font-weight: 800;
    font-size: 0.95rem;
    padding: 14px 16px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

[dir="rtl"] .mk-kiosk__checkout {
    text-transform: none;
    letter-spacing: 0;
}

.mk-kiosk__mobile-cart {
    position: absolute;
    inset-inline: 12px;
    bottom: 12px;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 0;
    border-radius: 14px;
    background: var(--ln-ink);
    color: #fff;
    font: inherit;
    font-weight: 800;
    padding: 14px 16px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
    cursor: pointer;
}

.mk-kiosk__mobile-cart-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

@media (min-width: 768px) {
    .mk-kiosk {
        top: var(--mk-header-h, 78px);
    }
    .mk-kiosk__search { display: flex; }
    .mk-kiosk-grid.ln-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 16px !important;
    }
}

@media (min-width: 992px) {
    .mk-kiosk__workspace {
        grid-template-columns: minmax(0, 1fr) min(340px, 32vw);
    }
    .mk-kiosk__menu {
        padding: 18px 20px 24px;
    }
    .mk-kiosk__cart {
        display: flex;
    }
    .mk-kiosk__mobile-cart {
        display: none;
    }
    .mk-kiosk-grid.ln-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 767.98px) {
    .mk-kiosk {
        top: var(--mk-header-h, 64px);
    }
    .mk-kiosk__cats-wrap {
        min-height: 78px;
        padding: 0 6px;
    }
    .mk-kiosk-cat {
        min-width: 76px;
        max-width: 100px;
        padding: 8px 6px 10px;
    }
    .mk-kiosk-cat__img {
        width: 38px;
        height: 38px;
    }
}
