/* Estore storefront — clean SaaS-style RTL design (itsordable-inspired).
   Theming is driven by CSS variables set inline from estore_settings. */

:root {
    --brand: #0d9488;
    --brand-ink: #0f766e;
    --accent: #f59e0b;
    --ink: #0f172a;
    --muted: #64748b;
    --bg: #f8fafc;
    --card: #ffffff;
    --line: #e2e8f0;
    --radius: 16px;
    --shadow: 0 1px 3px rgba(15, 23, 42, .06), 0 8px 24px -12px rgba(15, 23, 42, .12);
    --font: 'Tajawal', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: var(--font);
    background: var(--bg);
    color: var(--ink);
    /* direction comes from <html dir> (rtl for ar, ltr for en) */
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container { max-width: 1180px; margin: 0 auto; padding: 0 20px; }

/* ── announcement bar ── */
.es-announce {
    background: var(--brand);
    color: #fff;
    text-align: center;
    font-size: 13px;
    font-weight: 500;
    padding: 8px 16px;
}

/* ── header ── */
.es-header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
}
.es-header-in {
    display: flex; align-items: center; gap: 16px;
    height: 68px;
}
.es-logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; flex-shrink: 0; }
.es-logo img { height: 38px; width: auto; border-radius: 8px; }
.es-logo .es-logo-mark {
    width: 38px; height: 38px; border-radius: 10px;
    background: var(--brand); color: #fff;
    display: grid; place-items: center; font-size: 18px;
}
.es-search { flex: 1; max-width: 480px; margin: 0 auto; }
.es-search.mobile { display: none; }
.es-search input {
    width: 100%; height: 44px;
    border: 1.5px solid var(--line); border-radius: 999px;
    padding: 0 20px 0 46px;
    font-family: inherit; font-size: 14px;
    background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E") no-repeat left 16px center;
    transition: border-color .15s;
}
.es-search input:focus { outline: none; border-color: var(--brand); }
.es-header-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.es-track-link { font-size: 14px; font-weight: 600; color: var(--muted); padding: 8px 10px; }
.es-track-link:hover { color: var(--brand); }

/* 🌐 language toggle — sits right beside the cart button */
.es-lang-btn {
    height: 44px; min-width: 44px; padding: 0 14px;
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    border: 1.5px solid var(--line); border-radius: 999px; background: var(--card);
    font-family: inherit; font-size: 14px; font-weight: 700; color: var(--ink);
    transition: border-color .15s, color .15s;
}
.es-lang-btn:hover { border-color: var(--brand); color: var(--brand); }
.es-lang-btn .globe { font-size: 18px; line-height: 1; }

/* toast */
.es-toast {
    position: fixed; left: 50%; bottom: 96px; z-index: 120;
    transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
    background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px;
    font-size: 14px; font-weight: 600; max-width: min(92vw, 420px); text-align: center;
    box-shadow: 0 10px 30px -10px rgba(15, 23, 42, .5);
    transition: opacity .2s, transform .2s;
}
.es-toast.show { opacity: 1; transform: translate(-50%, 0); }

.es-btn.is-disabled { opacity: .5; pointer-events: none; }

/* structured Kuwaiti address: 2 columns, 1 on narrow phones */
.es-addr-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
@media (max-width: 420px) { .es-addr-grid { grid-template-columns: 1fr; } }

/* editable lines in the checkout order summary */
.es-sum-line {
    display: grid; grid-template-columns: 52px 1fr auto; gap: 12px; align-items: center;
    padding: 12px 0; border-bottom: 1px solid var(--line);
}
.es-sum-line img { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; background: var(--bg); }
.es-sum-info { min-width: 0; }
.es-sum-name { font-weight: 700; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.es-sum-meta { color: var(--muted); font-size: 12px; margin-top: 2px; }
.es-sum-controls { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.es-sum-total { font-weight: 800; font-size: 14px; white-space: nowrap; }
.es-sum-remove {
    width: 30px; height: 30px; border-radius: 8px; border: none; cursor: pointer;
    background: #fef2f2; color: #dc2626; font-size: 13px; font-weight: 700;
}
.es-sum-remove:hover { background: #fee2e2; }
.es-qty.es-qty-sm button { width: 28px; height: 28px; font-size: 15px; }
.es-qty.es-qty-sm input { width: 34px; font-size: 14px; }
.es-summary { position: sticky; top: 88px; align-self: start; }

/* cart button + drawer */
.es-cart-btn {
    position: relative; border: none; cursor: pointer;
    background: var(--brand); color: #fff;
    height: 44px; min-width: 44px; padding: 0 16px;
    border-radius: 999px; font-family: inherit; font-weight: 700; font-size: 14px;
    display: inline-flex; align-items: center; gap: 8px;
    transition: transform .1s, box-shadow .15s;
}
.es-cart-btn:hover { box-shadow: 0 6px 16px -6px var(--brand); }
.es-cart-count {
    position: absolute; top: -6px; inset-inline-start: -6px;
    background: var(--accent); color: #fff;
    min-width: 22px; height: 22px; padding: 0 6px;
    border-radius: 999px; font-size: 12px; font-weight: 800;
    display: grid; place-items: center;
    border: 2px solid #fff;
}

.es-overlay {
    position: fixed; inset: 0; background: rgba(15, 23, 42, .45);
    opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 90;
}
.es-overlay.open { opacity: 1; pointer-events: auto; }
.es-drawer {
    position: fixed; top: 0; bottom: 0; left: 0; z-index: 100;
    width: min(400px, 92vw); background: #fff;
    /* display:none when closed — a transformed offscreen fixed element
       can still widen the scroll area on mobile RTL, pushing the whole
       page sideways. Animation runs only while .open. */
    display: none;
    flex-direction: column;
    box-shadow: 8px 0 32px rgba(15, 23, 42, .15);
}
.es-drawer.open {
    display: flex;
    animation: esDrawerIn .22s ease;
}
@keyframes esDrawerIn {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}
/* LTR: logo sits left, cart right → drawer slides in from the right */
[dir="ltr"] .es-drawer { left: auto; right: 0; box-shadow: -8px 0 32px rgba(15, 23, 42, .15); }
[dir="ltr"] .es-drawer.open { animation-name: esDrawerInLtr; }
@keyframes esDrawerInLtr {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}
.es-drawer-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 20px; border-bottom: 1px solid var(--line);
    font-weight: 800; font-size: 17px;
}
.es-drawer-close { border: none; background: var(--bg); width: 34px; height: 34px; border-radius: 10px; cursor: pointer; font-size: 16px; color: var(--muted); }
.es-drawer-body { flex: 1; overflow-y: auto; padding: 12px 20px; }
.es-drawer-foot { padding: 16px 20px; border-top: 1px solid var(--line); background: #fff; }
.es-drawer-row { display: flex; justify-content: space-between; font-weight: 700; margin-bottom: 12px; font-size: 16px; }

.es-line {
    display: flex; gap: 12px; padding: 14px 0;
    border-bottom: 1px solid var(--line); align-items: center;
}
.es-line img { width: 60px; height: 60px; object-fit: cover; border-radius: 12px; background: var(--bg); flex-shrink: 0; }
.es-line-info { flex: 1; min-width: 0; }
.es-line-name { font-weight: 700; font-size: 14px; margin-bottom: 4px; }
.es-line-price { color: var(--brand); font-weight: 700; font-size: 14px; }
.es-line-meta { color: var(--muted); font-size: 12px; }
.es-qty { display: inline-flex; align-items: center; gap: 0; border: 1.5px solid var(--line); border-radius: 999px; overflow: hidden; }
.es-qty button { width: 30px; height: 30px; border: none; background: #fff; cursor: pointer; font-size: 15px; color: var(--ink); font-weight: 700; }
.es-qty button:hover { background: var(--bg); }
.es-qty input, .es-qty span { width: 38px; text-align: center; border: none; font-family: inherit; font-size: 14px; font-weight: 700; }
.es-line-remove { border: none; background: none; color: #ef4444; cursor: pointer; font-size: 12px; padding: 4px; }

/* ── hero ── */
.es-hero {
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-ink) 100%);
    color: #fff; padding: 44px 0 52px;
    border-radius: 0 0 28px 28px;
    position: relative; overflow: hidden;
}
.es-hero::after {
    content: ''; position: absolute; inset-inline-end: -80px; top: -80px;
    width: 280px; height: 280px; border-radius: 50%;
    background: rgba(255, 255, 255, .08);
}
.es-hero h1 { margin: 0 0 8px; font-size: 30px; font-weight: 800; }
.es-hero p { margin: 0; opacity: .9; font-size: 15px; max-width: 560px; }

/* ── categories (circular, ordable-style) ── */
.es-cats {
    display: flex; gap: 16px; overflow-x: auto; padding: 22px 4px 14px;
    scrollbar-width: none;
}
.es-cats::-webkit-scrollbar { display: none; }
.es-cat {
    flex-shrink: 0; display: flex; flex-direction: column; align-items: center;
    gap: 7px; cursor: pointer; min-width: 62px;
}
.es-cat-dot {
    width: 58px; height: 58px; border-radius: 50%;
    display: grid; place-items: center;
    background: #fff; border: 1.5px solid var(--line);
    color: var(--brand); font-size: 20px; font-weight: 800;
    transition: all .15s;
}
.es-cat-name { font-size: 12px; font-weight: 700; color: var(--muted); max-width: 74px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.es-cat:hover .es-cat-dot { border-color: var(--brand); transform: scale(1.05); }
.es-cat.active .es-cat-dot { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 6px 16px -6px var(--brand); }
.es-cat.active .es-cat-name { color: var(--brand); }

/* ── product grid ── */
.es-grid {
    display: grid; gap: 18px; padding: 10px 0 48px;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.es-card {
    background: var(--card); border-radius: var(--radius);
    border: 1px solid var(--line); overflow: hidden;
    display: flex; flex-direction: column;
    transition: transform .15s, box-shadow .15s;
}
.es-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.es-card-img { position: relative; aspect-ratio: 1; background: #f1f5f9; overflow: hidden; }
.es-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.es-card:hover .es-card-img img { transform: scale(1.04); }

.es-badge {
    position: absolute; top: 10px; inset-inline-start: 10px;
    padding: 4px 10px; border-radius: 999px; font-size: 11px; font-weight: 700;
    background: #fff; color: var(--muted);
}
.es-badge.in { color: var(--brand); }
.es-badge.out { color: #ef4444; }
.es-card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; flex: 1; gap: 6px; }
.es-card-name { font-weight: 700; font-size: 15px; line-height: 1.4; }
.es-card-cat { font-size: 12px; color: var(--muted); }
.es-card-foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 8px; }
.es-price { font-weight: 800; font-size: 16px; color: var(--ink); }
.es-add {
    border: none; cursor: pointer;
    width: 38px; height: 38px; border-radius: 12px;
    background: var(--brand); color: #fff; font-size: 20px; font-weight: 700;
    display: grid; place-items: center; transition: background .15s;
}
.es-add:hover { background: var(--brand-ink); }
.es-add:disabled { background: var(--line); cursor: not-allowed; }

/* mini qty stepper inside product cards (replaces "+" once in cart) */
.es-mini-stepper {
    display: inline-flex; align-items: center; gap: 2px;
    background: var(--brand); border-radius: 999px; padding: 3px;
}
.es-mini-stepper button {
    width: 28px; height: 28px; border: none; border-radius: 50%;
    background: rgba(255,255,255,.22); color: #fff; cursor: pointer;
    font-size: 15px; font-weight: 800; line-height: 1;
}
.es-mini-stepper button:hover { background: rgba(255,255,255,.35); }
.es-mini-stepper span { color: #fff; font-weight: 800; font-size: 14px; min-width: 26px; text-align: center; }

/* floating cart bar — sticks to bottom like delivery apps */
body { padding-bottom: 96px; }
.es-cartbar {
    /* physical centring — identical in rtl and ltr */
    position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%);
    z-index: 60; border: none; cursor: pointer;
    display: inline-flex; align-items: center; gap: 14px;
    background: var(--brand); color: #fff;
    padding: 14px 22px; border-radius: 999px;
    font-family: inherit; font-size: 15px; font-weight: 800;
    box-shadow: 0 10px 30px -8px color-mix(in srgb, var(--brand) 70%, #000);
    transition: transform .15s;
}
.es-cartbar:hover { transform: translateX(-50%) translateY(-2px); }
.es-cartbar-count {
    background: #fff; color: var(--brand);
    min-width: 26px; height: 26px; padding: 0 8px; border-radius: 999px;
    display: grid; place-items: center; font-size: 13px; font-weight: 800;
}
.es-cartbar-total { font-weight: 700; font-size: 14px; opacity: .95; }

.es-empty { text-align: center; padding: 80px 20px; color: var(--muted); }
.es-empty .big { font-size: 44px; margin-bottom: 12px; }

/* ── product page ── */
.es-pdp { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; padding: 36px 0 56px; }
.es-pdp-img { border-radius: 24px; overflow: hidden; background: #f1f5f9; aspect-ratio: 1; border: 1px solid var(--line); }
.es-pdp-img img { width: 100%; height: 100%; object-fit: cover; }
.es-pdp h1 { font-size: 26px; margin: 0 0 10px; }
.es-pdp-price { font-size: 26px; font-weight: 800; color: var(--brand); margin: 14px 0; }
.es-pdp-desc { color: var(--muted); line-height: 1.8; font-size: 15px; margin: 18px 0; white-space: pre-line; }
.es-pdp .es-stock { font-size: 13px; font-weight: 700; }
.es-pdp .es-stock.ok { color: var(--brand); }
.es-pdp .es-stock.no { color: #ef4444; }

.es-field { margin-bottom: 16px; }
.es-field label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 7px; }
.es-input, .es-select, .es-textarea {
    width: 100%; border: 1.5px solid var(--line); border-radius: 12px;
    padding: 12px 16px; font-family: inherit; font-size: 14px; background: #fff;
    transition: border-color .15s;
}
.es-input:focus, .es-select:focus, .es-textarea:focus { outline: none; border-color: var(--brand); }
.es-textarea { min-height: 90px; resize: vertical; }

.es-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    background: var(--brand); color: #fff; border: none; cursor: pointer;
    padding: 14px 28px; border-radius: 14px;
    font-family: inherit; font-size: 15px; font-weight: 800;
    transition: filter .15s, transform .1s; width: 100%;
}
.es-btn:hover { filter: brightness(.94); }
.es-btn:active { transform: scale(.99); }
.es-btn:disabled { background: var(--line); cursor: not-allowed; }
.es-btn.ghost { background: #fff; color: var(--brand); border: 1.5px solid var(--brand); }
.es-btn.sm { padding: 10px 20px; font-size: 14px; width: auto; }

/* ── checkout ── */
.es-checkout { display: grid; grid-template-columns: 1.4fr 1fr; gap: 28px; padding: 32px 0 60px; align-items: start; }
.es-panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.es-panel h3 { margin: 0 0 18px; font-size: 16px; font-weight: 800; }
.es-choice-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.es-choice { position: relative; }
.es-choice input { position: absolute; opacity: 0; }
/* disabled fulfilment option — grey, unselectable, corner badge */
.es-choice input:disabled + span.off,
.es-choice span.off {
    background: #f1f5f9; color: #94a3b8; border-style: dashed;
    cursor: not-allowed; opacity: .75; position: relative;
}
.es-choice span.off small { color: #94a3b8; }
.es-off-badge {
    position: absolute; top: 6px; inset-inline-start: 6px;
    font-style: normal; font-size: 10px; font-weight: 800; line-height: 1;
    background: #cbd5e1; color: #475569; padding: 3px 7px; border-radius: 999px;
}
.es-choice span {
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    border: 1.5px solid var(--line); border-radius: 14px; padding: 16px 12px;
    cursor: pointer; font-weight: 700; font-size: 14px; color: var(--muted);
    transition: all .15s; text-align: center;
}
.es-choice small { font-weight: 500; font-size: 12px; }
.es-choice input:checked + span { border-color: var(--brand); color: var(--brand); background: color-mix(in srgb, var(--brand) 6%, #fff); }
.es-summary-row { display: flex; justify-content: space-between; padding: 9px 0; font-size: 14px; color: var(--muted); }
.es-summary-row.total { border-top: 1.5px solid var(--line); margin-top: 8px; padding-top: 14px; font-weight: 800; font-size: 18px; color: var(--ink); }
.es-summary-row .fee { color: var(--brand); font-weight: 700; }

.es-flash { background: #ecfdf5; border: 1px solid #a7f3d0; color: #047857; border-radius: 12px; padding: 12px 16px; margin-bottom: 16px; font-weight: 600; font-size: 14px; }
.es-error { background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; border-radius: 12px; padding: 12px 16px; margin-bottom: 16px; font-size: 14px; }

/* ── success / track ── */
.es-narrow { max-width: 560px; margin: 0 auto; padding: 48px 20px 64px; }
.es-check {
    width: 84px; height: 84px; border-radius: 50%; margin: 0 auto 20px;
    background: color-mix(in srgb, var(--brand) 12%, #fff);
    display: grid; place-items: center; font-size: 38px; color: var(--brand);
}
.es-order-num {
    font-size: 22px; font-weight: 800; background: #fff;
    border: 1.5px dashed var(--brand); border-radius: 12px;
    padding: 12px; margin: 18px 0; letter-spacing: .5px;
}
.es-steps { display: flex; gap: 0; margin: 28px 0; }
.es-step { flex: 1; text-align: center; position: relative; font-size: 12px; color: var(--muted); font-weight: 600; }
.es-step::before {
    content: ''; width: 26px; height: 26px; border-radius: 50%; margin: 0 auto 8px;
    background: var(--line); display: block; position: relative; z-index: 2;
}
.es-step::after { content: ''; position: absolute; top: 12px; inset-inline-start: -50%; width: 100%; height: 3px; background: var(--line); z-index: 1; }
.es-step:first-child::after { display: none; }
.es-step.done { color: var(--brand); }
.es-step.done::before { background: var(--brand); box-shadow: 0 0 0 5px color-mix(in srgb, var(--brand) 15%, transparent); }
.es-step.done::after { background: var(--brand); }

/* ── footer ── */
.es-footer { margin-top: 44px; padding-bottom: 14px; }
/* footer as a centered card — balanced box, never hugs a screen edge */
.es-footer-in {
    display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px;
    background: var(--card); border: 1px solid var(--line);
    border-radius: 20px; padding: 30px 28px;
    box-shadow: var(--shadow); margin-inline: auto;
}
.es-footer h4 { font-size: 15px; margin: 0 0 14px; }
.es-footer p, .es-footer a { color: var(--muted); font-size: 14px; line-height: 2; }
.es-footer a:hover { color: var(--brand); }
.es-footer-bottom { border-top: 1px solid var(--line); padding: 16px 0; text-align: center; color: var(--muted); font-size: 13px; }

/* pagination */
.es-pager { display: flex; justify-content: center; gap: 6px; padding-bottom: 40px; }
.es-pager a, .es-pager span {
    min-width: 38px; height: 38px; padding: 0 12px; border-radius: 10px;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1.5px solid var(--line); background: #fff; font-size: 14px; font-weight: 600; color: var(--muted);
}
.es-pager .current { background: var(--brand); border-color: var(--brand); color: #fff; }

/* ── features strip (trust badges under hero) ── */
.es-features {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px; padding: 18px 0 4px;
}
.es-feature {
    background: #fff; border: 1px solid var(--line); border-radius: 14px;
    padding: 14px 16px; display: flex; align-items: center; gap: 12px;
    font-size: 13px; font-weight: 700;
}
.es-feature .ic {
    width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
    background: color-mix(in srgb, var(--brand) 10%, #fff);
    color: var(--brand); display: grid; place-items: center; font-size: 17px;
}
.es-feature small { display: block; color: var(--muted); font-weight: 500; font-size: 11px; }

/* ── product meta panel ── */
.es-meta { border: 1px solid var(--line); border-radius: 14px; padding: 4px 16px; margin: 18px 0; background: #fff; }
.es-meta .row { display: flex; justify-content: space-between; padding: 10px 0; font-size: 13px; border-bottom: 1px dashed var(--line); }
.es-meta .row:last-child { border-bottom: none; }
.es-meta .k { color: var(--muted); }
.es-meta .v { font-weight: 700; }

/* ── min-order hint in cart ── */
.es-hint {
    display: flex; align-items: center; gap: 10px;
    background: #fffbeb; border: 1px solid #fde68a; color: #92400e;
    border-radius: 12px; padding: 12px 16px; font-size: 13px; font-weight: 600;
    margin-bottom: 14px;
}

/* ── footer: prevent any child from pushing the page wider ── */
.es-footer { overflow: hidden; }
.es-footer-in > * { min-width: 0; }
.es-footer p, .es-footer a, .es-footer-bottom { overflow-wrap: anywhere; word-break: break-word; }

/* belt-and-braces: nothing may widen the page — clip is harder than
   hidden (no scroll container created), and every direct child of body
   is capped at the viewport width. */
html { overflow-x: clip; }
body { overflow-x: hidden; max-width: 100vw; }
body > * { max-width: 100vw; }
main, .container, .es-grid, .es-footer-in { min-width: 0; }

@media (max-width: 860px) {
    .es-pdp { grid-template-columns: 1fr; gap: 26px; }
    .es-checkout { grid-template-columns: 1fr; }
    .es-footer-in { grid-template-columns: 1fr; gap: 22px; padding: 24px 20px; text-align: center; }
    .es-footer-in a { display: inline-block; }

    /* header: logo pinned to the start (right in RTL), cart to the far
       opposite edge — explicit margins so nothing wraps awkwardly. */
    .es-header-in { gap: 12px; height: 64px; }
    .es-logo { font-size: 19px; margin-inline-end: 0; }
    .es-logo img { height: 36px; }
    .es-logo .es-logo-mark { width: 36px; height: 36px; font-size: 17px; }
    .es-header-actions { margin-inline-start: auto; }
    .es-track-link { display: none; }
    .es-cart-btn { height: 44px; min-width: 44px; padding: 0 14px; }
    /* phones: globe only, label hidden to save header width */
    .es-lang-btn { padding: 0; width: 44px; }
    .es-lang-btn .label { display: none; }
    .es-summary { position: static; }
    .es-header .es-search { display: none; }
    .es-search.mobile { display: block; max-width: none; padding: 0 16px 14px; margin: 0; }
    .es-search.mobile input { height: 50px; font-size: 15px; }

    /* product grid — bigger, clearer cards */
    .es-grid { grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 12px; }
    /* lone product fills the row on phones — keeps it from looking
       lopsided; desktop keeps the normal single column. */
    .es-grid > .es-card:only-child { grid-column: 1 / -1; }
    .es-card-body { padding: 12px 14px 14px; gap: 6px; }
    .es-card-name { font-size: 16px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
    .es-card-cat { font-size: 12.5px; }
    .es-price { font-size: 16px; }
    .es-add { width: 40px; height: 40px; border-radius: 12px; font-size: 22px; }
    .es-mini-stepper { padding: 4px; }
    .es-mini-stepper button { width: 32px; height: 32px; font-size: 17px; }
    .es-mini-stepper span { font-size: 15px; min-width: 30px; }

    .es-hero { padding: 38px 0 44px; }
    .es-hero h1 { font-size: 26px; }
    .es-hero p { font-size: 15px; }
    .es-features { grid-template-columns: repeat(3, 1fr); gap: 10px; }
    .es-feature { padding: 12px; flex-direction: column; align-items: flex-start; gap: 7px; font-size: 13px; }
    .es-feature .ic { width: 34px; height: 34px; font-size: 16px; }
    .es-feature small { font-size: 11.5px; }

    /* cart drawer — slides in from the side opposite the logo */
    .es-drawer { width: min(400px, 88vw); }
    .es-drawer-head { padding: 16px 18px; font-size: 18px; }
    .es-drawer-body { padding: 10px 18px; }
    .es-drawer-foot { padding: 14px 18px 18px; }

    /* floating cart bar — full-width safe pill */
    .es-cartbar {
        inset-inline-start: 12px; inset-inline-end: 12px; bottom: 12px;
        transform: none; justify-content: space-between;
        padding: 15px 20px; gap: 10px; font-size: 16px;
    }
    .es-cartbar:hover { transform: none; }
    .es-cartbar-count { min-width: 30px; height: 30px; font-size: 14px; }
    .es-cartbar-total { font-size: 15px; }
    body { padding-bottom: 92px; }

    .es-panel { padding: 20px; }
    .es-choice-row { gap: 10px; }
    .es-choice span { padding: 14px 8px; font-size: 14px; }
    .es-choice small { font-size: 12.5px; }
    .es-input, .es-select, .es-textarea { font-size: 16px; padding: 13px 16px; }
    .es-btn { font-size: 16px; padding: 15px 28px; }
    .es-steps { margin: 22px 0; }
    .es-step { font-size: 11.5px; }
    .es-step::before { width: 24px; height: 24px; }
    .es-pager { flex-wrap: wrap; }
    .es-pager a, .es-pager span { min-width: 42px; height: 42px; font-size: 15px; }
    .es-narrow { padding: 36px 18px 52px; }
    .es-line img { width: 64px; height: 64px; }
    .es-line-name { font-size: 15px; }
    .es-line-price { font-size: 15px; }
    .es-qty button { width: 32px; height: 32px; font-size: 17px; }
    .es-qty input { width: 40px; font-size: 15px; }
    .es-summary-row { font-size: 15px; }
    .es-footer p, .es-footer a { font-size: 15px; }
    .es-cat-dot { width: 64px; height: 64px; font-size: 22px; }
    .es-cat-name { font-size: 13px; max-width: 80px; }
}

@media (max-width: 380px) {
    .es-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .es-features { gap: 8px; }
    .es-feature { font-size: 12px; padding: 10px; }
}

/* Cart line with a stock/availability problem — stays editable/removable */
.es-line.has-error { background: #fff7f7; border-radius: 12px; }
.es-line-error { color: #b91c1c; font-size: 12px; font-weight: 600; margin-top: 4px; }
