/* TezkorMarket storefront. The colours come from static/logo.png: the green tile (#14b064 to
   #06643b), the orange bolt (#ff8a00) and the amber MARKET (#ffb23f). Mobile first; the theme
   is set on <html data-theme> before paint (templates/partials/theme.html), so there is no
   prefers-color-scheme query here on purpose: it would override the buyer's own choice. */

@font-face {
    font-family: 'Manrope';
    src: url('fonts/manrope-latin.woff2') format('woff2');
    font-weight: 200 800;
    font-display: swap;
}
/* the Russian pages: Manrope's Cyrillic subset, fetched only when such letters are on screen */
@font-face {
    font-family: 'Manrope';
    src: url('fonts/manrope-cyrillic.woff2') format('woff2');
    font-weight: 200 800;
    font-display: swap;
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* the new-alphabet pages: ğ ş */
@font-face {
    font-family: 'Manrope';
    src: url('fonts/manrope-latin-ext.woff2') format('woff2');
    font-weight: 200 800;
    font-display: swap;
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308,
        U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113,
        U+2C60-2C7F, U+A720-A7FF;
}
/* Manrope has no Ғ Қ Ҳ: Inter draws those three for the Uzbek Cyrillic pages */
@font-face {
    font-family: 'Manrope';
    src: url('fonts/inter-uzbek-cyrillic.woff2') format('woff2');
    font-weight: 200 800;
    font-display: swap;
    unicode-range: U+0492-0493, U+049A-049B, U+04B2-04B3;
}

:root {
    color-scheme: light;
    --sans: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --bg: #f3f6f4;
    --surface: #fff;
    --surface-2: #eef3f0;
    --field: #fff;
    --line: #e2eae5;
    --line-2: #cddad2;
    --ink: #0f1f17;
    --ink-2: #4e6358;
    --ink-3: #677b70;
    --green: #0a7f44;          /* buttons: white text 5.1:1 */
    --green-hover: #086a39;
    --green-ink: #087a41;      /* green text on light surfaces: 5.4:1 */
    --green-wash: #e5f3eb;
    --green-glow: #14b064;     /* the logo tile, top left */
    --green-deep: #06643b;     /* the logo tile, bottom right */
    --hero-a: #0b864a;
    --hero-b: #065c37;
    --orange: #ff8a00;         /* the bolt */
    --orange-ink: #1d1203;     /* text on orange: 7.8:1 */
    --orange-text: #a84e00;    /* orange as text on light surfaces: 5:1 */
    --amber: #ffb23f;          /* MARKET */
    --market: #f08000;
    --band: #fff1e0;
    --media: #eef3f0;
    --danger: #d92d20;
    --ring: rgba(10, 127, 68, .18);
    --foot: #06402a;
    --sheet-shadow: 0 -18px 50px rgba(6, 40, 24, .2);
}

:root[data-theme="dark"] {
    color-scheme: dark;
    --bg: #0b1510;
    --surface: #121d17;
    --surface-2: #18251e;
    --field: #18251e;
    --line: #22322a;
    --line-2: #2f4338;
    --ink: #e8f2ec;
    --ink-2: #9fb5a8;
    --ink-3: #7f9488;
    --green-hover: #0c9150;
    --green-ink: #3ccf82;
    --green-wash: #10281c;
    --hero-a: #0b6b3c;
    --hero-b: #05351f;
    --orange: #ff9a2e;
    --orange-ink: #231300;
    --orange-text: #ffaa4d;
    --market: #ffb23f;
    --band: #21170a;
    --media: #18231d;
    --danger: #ff6b60;
    --ring: rgba(60, 207, 130, .24);
    --foot: #07170f;
    --sheet-shadow: 0 -18px 50px rgba(0, 0, 0, .6);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html:has(.quick[open]) { overflow: hidden; }

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    color: var(--ink);
    font: 500 1rem/1.55 var(--sans);
    -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }

:focus-visible { outline: 2.5px solid var(--green-ink); outline-offset: 3px; border-radius: 8px; }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.wrap { width: 100%; max-width: 1240px; margin-inline: auto; padding-inline: 16px; }
.main { flex: 1; padding-bottom: 8px; }

/* ---------- strip, header, logo ---------- */

.strip {
    background: linear-gradient(96deg, var(--green-deep), var(--hero-a));
    color: #fff;
    font-size: .78rem;
    font-weight: 700;
}
.strip .wrap { display: flex; justify-content: center; gap: 28px; padding-block: 7px; }
.strip span { display: inline-flex; align-items: center; gap: 7px; }
.strip svg { width: 15px; height: 15px; fill: var(--amber); flex: none; }
.strip .extra { display: none; }

.header { background: var(--surface); border-bottom: 1px solid var(--line); }
.header .wrap { display: flex; align-items: center; gap: 10px; padding-block: 10px; }

.brand {
    display: inline-flex;
    flex: none;
    align-items: center;
    gap: 9px;
    min-height: 44px;
    color: var(--ink);
    text-decoration: none;
}
.mark {
    flex: none;
    width: 36px;
    height: 36px;
    border-radius: 11px;
    background: linear-gradient(135deg, var(--green-glow), var(--green-deep));
}
.mark svg { width: 100%; height: 100%; }
/* the logo's lockup: TEZKOR over a spaced-out MARKET of the same width */
.wordmark { display: grid; gap: 4px; line-height: 1; }
.wordmark b { font-size: 1.04rem; font-weight: 800; letter-spacing: -.005em; }
.wordmark span {
    margin-right: -.52em;
    color: var(--market);
    font-size: .56rem;
    font-weight: 800;
    letter-spacing: .52em;
}

.search { position: relative; flex: 1 1 auto; min-width: 0; }
.search svg {
    position: absolute;
    left: 12px;
    top: 50%;
    width: 19px;
    height: 19px;
    transform: translateY(-50%);
    fill: var(--ink-3);
    pointer-events: none;
}
.search input {
    width: 100%;
    height: 42px;
    padding: 0 12px 0 39px;
    border: 1.5px solid transparent;
    border-radius: 13px;
    background: var(--surface-2);
    font-size: 16px; /* below 16px iOS Safari zooms the page on focus */
    font-weight: 500;
    -webkit-appearance: none;
    appearance: none;
    transition: border-color .18s, box-shadow .18s, background .18s;
}
.search input::placeholder { color: var(--ink-3); }
.search input:focus { outline: 0; border-color: var(--green-ink); background: var(--surface); box-shadow: 0 0 0 4px var(--ring); }

.theme-toggle {
    flex: none;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 13px;
    background: var(--surface-2);
    color: var(--ink-2);
    cursor: pointer;
}
.theme-toggle span { display: grid; }
.theme-toggle svg { width: 20px; height: 20px; fill: currentColor; }
.theme-toggle .sun { display: none; }
[data-theme="dark"] .theme-toggle .sun { display: grid; }
[data-theme="dark"] .theme-toggle .moon { display: none; }
/* language menu (partials/language.html): flag + code, opens the four languages */
.lang-menu { position: relative; flex: none; }
.lang-menu summary {
    height: 44px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding-inline: 9px;
    border-radius: 13px;
    background: var(--surface-2);
    color: var(--ink-2);
    font-size: .82rem;
    font-weight: 800;
    list-style: none;
    cursor: pointer;
}
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu ul {
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    z-index: 60;
    min-width: 210px;
    padding: 6px;
    list-style: none;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
    box-shadow: 0 14px 40px rgba(6, 40, 24, .18);
}
.lang-menu li a {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding-inline: 10px;
    border-radius: 10px;
    color: var(--ink);
    font-size: .9rem;
    font-weight: 700;
    text-decoration: none;
}
.lang-menu li a:hover,
.lang-menu li a[aria-current] { background: var(--surface-2); }
.flag { width: 20px; height: 14px; flex: none; border-radius: 3px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .12); }

/* ---------- buttons ---------- */

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 20px;
    border: 0;
    border-radius: 14px;
    background: var(--green);
    color: #fff;
    font-weight: 800;
    font-size: .95rem;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    transition: background .18s;
}
.button svg { width: 18px; height: 18px; fill: currentColor; flex: none; }
.button:hover { background: var(--green-hover); }
.button:disabled { opacity: .65; cursor: progress; }

/* ---------- price, discount, order count ---------- */

.price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
.now {
    color: var(--ink);
    font-size: 1.06rem;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -.025em;
    white-space: nowrap;
}
.now small { color: var(--ink-2); font-size: max(12px, .66em); font-weight: 700; letter-spacing: 0; }
.was {
    color: var(--ink-3);
    font-size: .78rem;
    font-weight: 600;
    text-decoration-thickness: 1.5px;
    white-space: nowrap;
}

.badge {
    position: absolute;
    left: 8px;
    top: 8px;
    padding: 5px 8px;
    border-radius: 999px;
    background: var(--orange);
    color: var(--orange-ink);
    font-size: .75rem;
    font-weight: 800;
    line-height: 1;
}

/* ---------- product card: the name is a stretched link, the order button sits above it ---------- */

.card {
    position: relative;
    container-type: inline-size;
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 6px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 20px;
}
.card:has(.card-link:focus-visible) { outline: 2.5px solid var(--green-ink); outline-offset: 2px; }
.card-media { position: relative; aspect-ratio: 1; overflow: hidden; border-radius: 15px; background: var(--media); }
/* out of flow: uploads keep their own proportions (app/media.py), and an in-flow image would
   stretch the box past its aspect-ratio */
.card-media img, .deal-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.card-body { display: flex; flex: 1; flex-direction: column; gap: 5px; padding: 10px 6px 4px; }
.card-name {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    min-height: 2.7em;
    margin-bottom: 6px;
    color: var(--ink-2);
    font-size: .84rem;
    font-weight: 600;
    line-height: 1.35;
}
.card-link { color: inherit; text-decoration: none; }
.card-link::after { content: ''; position: absolute; inset: 0; z-index: 1; }
.card-link:focus-visible { outline: 0; }
.card-buy {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 44px;
    margin-top: auto;
    padding: 8px;
    border-radius: 13px;
    background: var(--green);
    color: #fff;
    font-size: .82rem;
    font-weight: 800;
    white-space: nowrap;
    text-decoration: none;
    transition: background .18s;
}
.card-buy svg { width: 16px; height: 16px; fill: currentColor; flex: none; }
.card-buy:hover { background: var(--green-hover); }
/* a phone shelf card is too narrow for the icon and the words on one line */
@container (max-width: 164px) {
    .card-buy svg { display: none; }
}

/* ---------- home hero: the promise, centred, then today's deals on the logo's green ---------- */

.hero {
    position: relative;
    isolation: isolate;
    margin-inline: -16px;
    padding: 30px 0 6px;
    overflow: hidden;
    background:
        radial-gradient(70% 50% at 16% 0%, rgba(26, 190, 106, .5), transparent 72%),
        linear-gradient(165deg, var(--hero-a), var(--hero-b));
    color: #fff;
    text-align: center;
    border-radius: 0 0 30px 30px;
}
/* the thin ring around the mark in static/logo.png, here around the promise */
.hero::before {
    content: '';
    position: absolute;
    z-index: -1;
    left: 50%;
    top: -14px;
    width: 340px;
    height: 340px;
    border: 1.5px solid rgba(255, 255, 255, .14);
    border-radius: 50%;
    transform: translateX(-50%);
    pointer-events: none;
}
.hero-copy { max-width: 780px; margin-inline: auto; padding-inline: 24px; }
.hero-copy h1 {
    font-size: clamp(2.05rem, 1.35rem + 3.4vw, 3.8rem);
    font-weight: 800;
    line-height: 1.04;
    letter-spacing: -.04em;
    text-wrap: balance;
}
.hero-copy p {
    max-width: 48ch;
    margin: 12px auto 0;
    font-size: 1rem;
    line-height: 1.5;
    text-wrap: pretty;
}

.promises { display: none; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 22px; list-style: none; }
.promises li {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 14px;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 999px;
    background: rgba(255, 255, 255, .12);
    font-size: .84rem;
    font-weight: 700;
}
.promises svg { width: 16px; height: 16px; fill: var(--amber); flex: none; }

.deals { position: relative; margin-top: 22px; }
/* phones: one centred slide with the next one peeking; the side padding is what centres it */
.deals-track {
    position: relative;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 100%;
    gap: 12px;
    padding: 0 10% 4px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}
.deals-track::-webkit-scrollbar { display: none; }

.deal {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 7px;
    background: var(--surface);
    color: var(--ink);
    text-align: left;
    border-radius: 24px;
    scroll-snap-align: center;
}
.deal:has(.card-link:focus-visible) { outline: 2.5px solid #fff; outline-offset: 2px; }
.deal-media { position: relative; aspect-ratio: 5 / 4; overflow: hidden; border-radius: 18px; background: var(--media); }
.deal-media .badge { left: 10px; top: 10px; padding: 6px 10px; font-size: .84rem; }
.deal-body { display: flex; flex: 1; flex-direction: column; gap: 6px; padding: 12px 9px 6px; }
.deal .now { font-size: 1.42rem; }
.deal .was { font-size: .86rem; }
.deal-name {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    margin-bottom: 8px;
    color: var(--ink-2);
    font-size: .95rem;
    font-weight: 700;
    line-height: 1.3;
}
.deal-buy { position: relative; z-index: 2; width: 100%; margin-top: auto; padding-block: 14px; border-radius: 16px; }

.deals-dots { display: flex; justify-content: center; padding: 8px 0 4px; }
.deals-dots button {
    position: relative;
    /* a 44px target each; many dots share a narrow phone down to 24px (WCAG 2.5.8) */
    flex: 0 1 44px;
    min-width: 24px;
    height: 44px;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
}
.deals-dots button::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .42);
    transform: translate(-50%, -50%);
    transition: width .25s, background .25s;
}
.deals-dots button[aria-current="true"]::before { width: 20px; background: var(--amber); }
.deals-arrow { display: none; }

/* ---------- category rail: round photos in the logo's colours ---------- */

.cats {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 76px;
    gap: 12px;
    margin: 20px -16px 0;
    padding: 2px 16px 4px;
    overflow-x: auto;
    scrollbar-width: none;
}
.cats::-webkit-scrollbar { display: none; }
.cat { display: grid; justify-items: center; align-content: start; gap: 8px; text-decoration: none; }
.cat-ring {
    display: block;
    width: 72px;
    height: 72px;
    padding: 3px;
    border-radius: 50%;
    background: conic-gradient(from 210deg, var(--green-glow), var(--amber), var(--orange), var(--green-deep), var(--green-glow));
}
.cat-ring img {
    width: 100%;
    height: 100%;
    border: 3px solid var(--bg);
    border-radius: 50%;
    object-fit: cover;
    background: var(--media);
}
.cat-name {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    max-width: 100%;
    font-size: .75rem;
    font-weight: 700;
    line-height: 1.25;
    text-align: center;
    overflow-wrap: anywhere;
}
.cat:hover .cat-name { color: var(--green-ink); }
.cat:focus-visible { outline: 0; }
.cat:focus-visible .cat-ring { outline: 2.5px solid var(--green-ink); outline-offset: 2px; }

/* listing pages keep text chips */
.chips {
    display: flex;
    gap: 8px;
    margin: 14px -16px 0;
    padding: 2px 16px;
    overflow-x: auto;
    scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
    flex: none;
    padding: 11px 15px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    font-size: .86rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}
.chip:hover { border-color: var(--green-ink); color: var(--green-ink); }
.chip[aria-current="page"] { background: var(--green); border-color: var(--green); color: #fff; }

/* ---------- sections, shelves, the discount band, grid ---------- */

.section { margin-top: 36px; }
.section-head { margin-bottom: 14px; }
.section-head h2 {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: clamp(1.18rem, 1.02rem + .7vw, 1.55rem);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -.03em;
}
.section-head h2 svg { width: 1.05em; height: 1.05em; fill: var(--orange); flex: none; }

.listing-head { margin-top: 26px; }
.listing-head h1 {
    font-size: clamp(1.45rem, 1.15rem + 1.4vw, 2.2rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -.035em;
    overflow-wrap: anywhere;
}
.listing-intro { max-width: 70ch; margin-top: 10px; color: var(--ink-2); font-size: .95rem; line-height: 1.55; }
.listing-head ~ .section { margin-top: 20px; }

/* a shelf scrolls sideways; the next card peeks in so the scroll is discoverable */
.shelf {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 44%;
    gap: 10px;
    margin-inline: -16px;
    padding: 2px 16px 10px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 16px;
    scrollbar-width: thin;
}
.shelf > * { scroll-snap-align: start; }

.band { margin: 38px -16px 0; padding: 22px 0 14px; background: var(--band); }
.band .section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding-inline: 16px;
}
.band-max {
    color: var(--orange-text);
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: -.03em;
    white-space: nowrap;
}
.band .shelf { margin-inline: 0; }

.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }

.more { display: flex; justify-content: center; margin-top: 22px; }
.more a {
    display: inline-flex;
    justify-content: center;
    min-width: 230px;
    padding: 13px 22px;
    border: 1.5px solid var(--green-ink);
    border-radius: 14px;
    color: var(--green-ink);
    font-weight: 800;
    text-decoration: none;
}
.more a:hover { background: var(--green-wash); }
.more a[aria-busy="true"] { opacity: .55; pointer-events: none; }

/* ---------- how ordering works: a real sequence, so numbered ---------- */

.how {
    margin: 48px -16px 0;
    padding: 34px 16px 30px;
    background: var(--green-wash);
    text-align: center;
}
.how h2 {
    font-size: clamp(1.4rem, 1.1rem + 1.2vw, 2.1rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -.035em;
}
.how-lead { max-width: 36ch; margin: 8px auto 0; color: var(--ink-2); }
.how-steps { display: grid; gap: 12px; margin-top: 24px; list-style: none; counter-reset: step; text-align: left; }
.how-steps li {
    position: relative;
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    column-gap: 14px;
    align-content: start;
    padding: 16px;
    background: var(--surface);
    border-radius: 20px;
    counter-increment: step;
}
.how-icon {
    grid-row: span 2;
    position: relative;
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--green-glow), var(--green-deep));
}
.how-icon svg { width: 24px; height: 24px; fill: #fff; }
.how-icon::after {
    content: counter(step);
    position: absolute;
    right: -7px;
    top: -7px;
    width: 23px;
    height: 23px;
    display: grid;
    place-items: center;
    border: 2px solid var(--surface);
    border-radius: 50%;
    background: var(--orange);
    color: var(--orange-ink);
    font-size: .75rem;
    font-weight: 800;
}
.how-steps b { align-self: end; font-size: 1rem; font-weight: 800; letter-spacing: -.01em; }
.how-steps li > span:last-child { margin-top: 3px; color: var(--ink-2); font-size: .9rem; line-height: 1.45; }
.how-note {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
    padding: 10px 16px;
    border-radius: 999px;
    background: var(--surface);
    color: var(--green-ink);
    font-size: .86rem;
    font-weight: 700;
    text-align: left;
}
.how-note svg { width: 18px; height: 18px; fill: currentColor; flex: none; }

/* ---------- quick order: a bottom sheet on phones, a centred dialog on wide screens ---------- */

.quick {
    width: 100%;
    max-width: 100%;
    max-height: calc(100dvh - 24px);
    margin: auto 0 0;
    padding: 0;
    overflow: auto;
    overscroll-behavior: contain;
    border: 0;
    border-radius: 26px 26px 0 0;
    background: var(--surface);
    color: var(--ink);
    box-shadow: var(--sheet-shadow);
}
.quick::backdrop { background: rgba(5, 20, 12, .58); }
/* the box itself has no padding: a click that lands on the dialog element hit the backdrop */
.quick-inner { padding: 10px 18px calc(18px + env(safe-area-inset-bottom)); }
.quick-grip { width: 40px; height: 4px; margin: 0 auto 14px; border-radius: 4px; background: var(--line-2); }
.quick-head { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.quick-image { width: 76px; height: 76px; border-radius: 16px; object-fit: cover; background: var(--media); }
.quick-name {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    margin-bottom: 6px;
    font-size: .95rem;
    font-weight: 700;
    line-height: 1.3;
}
.quick-head .now { font-size: 1.25rem; }
.quick-close {
    align-self: start;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: var(--surface-2);
    color: var(--ink-2);
    cursor: pointer;
}
.quick-close svg { width: 20px; height: 20px; fill: currentColor; }

.quick-form { display: grid; gap: 12px; margin-top: 18px; }
.field { display: grid; gap: 6px; }
.field[hidden] { display: none; }
.field > span { color: var(--ink-2); font-size: .8rem; font-weight: 700; }
.field input, .field select {
    width: 100%;
    padding: 14px 15px;
    border: 1.5px solid var(--line);
    border-radius: 14px;
    background: var(--field);
    font-size: 16px; /* below 16px iOS Safari zooms the page on focus */
    font-weight: 600;
    -webkit-appearance: none;
    appearance: none;
    transition: border-color .18s, box-shadow .18s;
}
.field input::placeholder { color: var(--ink-3); font-weight: 500; }
.field select {
    padding-right: 42px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%237f9488' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 15px;
}
.field input:focus, .field select:focus { outline: 0; border-color: var(--green-ink); box-shadow: 0 0 0 4px var(--ring); }
.field .bad { border-color: var(--danger); }
.err { color: var(--danger); font-size: .78rem; font-weight: 700; }

.quick-submit { width: 100%; margin-top: 4px; padding: 16px 20px; border-radius: 16px; font-size: 1rem; }
.quick-assure {
    display: flex;
    gap: 9px;
    padding: 12px 13px;
    border-radius: 14px;
    background: var(--green-wash);
    color: var(--ink-2);
    font-size: .8rem;
    line-height: 1.45;
}
.quick-assure svg { width: 18px; height: 18px; fill: var(--green-ink); flex: none; margin-top: 1px; }
.quick-more { justify-self: center; padding: 4px; color: var(--green-ink); font-size: .86rem; font-weight: 700; }

/* partials/order_submit.html adds these while a send is retried */
.order-status { color: var(--ink-2); font-size: .86rem; text-align: center; }
.order-retry {
    margin-top: 8px;
    padding: 10px 18px;
    border: 1.5px solid var(--green-ink);
    border-radius: 999px;
    background: transparent;
    color: var(--green-ink);
    font-weight: 800;
    cursor: pointer;
}

/* ---------- empty states, errors ---------- */

.empty {
    display: grid;
    justify-items: center;
    gap: 16px;
    padding: 56px 8px;
    text-align: center;
}
.empty h1 { font-size: clamp(1.45rem, 1.15rem + 1.4vw, 2.1rem); font-weight: 800; line-height: 1.2; letter-spacing: -.035em; }
.empty p { max-width: 44ch; color: var(--ink-2); overflow-wrap: anywhere; }

/* ---------- thanks: the confirmation, what happens next, then more to look at ---------- */

.done {
    max-width: 560px;
    margin: 22px auto 0;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 28px;
}
.done-hero {
    position: relative;
    isolation: isolate;
    padding: 34px 22px 30px;
    overflow: hidden;
    background:
        radial-gradient(80% 60% at 16% 0%, rgba(26, 190, 106, .5), transparent 72%),
        linear-gradient(165deg, var(--hero-a), var(--hero-b));
    color: #fff;
    text-align: center;
}
.done-hero::before {
    content: '';
    position: absolute;
    z-index: -1;
    left: 50%;
    top: -120px;
    width: 420px;
    height: 420px;
    border: 1.5px solid rgba(255, 255, 255, .14);
    border-radius: 50%;
    transform: translateX(-50%);
}
.done-mark {
    width: 78px;
    height: 78px;
    display: grid;
    place-items: center;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 0 9px rgba(255, 255, 255, .14);
}
.done-check {
    width: 44px;
    height: 44px;
    fill: none;
    stroke: #0a7f44;
    stroke-width: 4.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.done-hero h1 { font-size: clamp(1.55rem, 1.3rem + 1.2vw, 2.1rem); font-weight: 800; line-height: 1.15; letter-spacing: -.035em; }
.done-hero p { max-width: 34ch; margin: 8px auto 0; }
.done-body { display: grid; gap: 22px; padding: 20px 18px 24px; }
.done-order {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding: 10px;
    border-radius: 20px;
    background: var(--surface-2);
}
.done-order img { width: 72px; height: 72px; border-radius: 14px; object-fit: cover; background: var(--media); }
.done-order b { display: block; margin-bottom: 4px; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.done-order .now { font-size: 1.15rem; }
.done-pay { display: block; margin-top: 3px; color: var(--green-ink); font-size: .8rem; font-weight: 700; }
.done-body h2 { font-size: 1.05rem; font-weight: 800; letter-spacing: -.02em; }
.done-steps { display: grid; margin-top: -8px; list-style: none; }
.done-steps li { position: relative; padding: 0 0 18px 36px; }
.done-steps li:last-child { padding-bottom: 0; }
.done-steps li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 1px;
    width: 22px;
    height: 22px;
    border: 2px solid var(--line-2);
    border-radius: 50%;
    background: var(--surface);
}
.done-steps li:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 10px;
    top: 27px;
    bottom: 3px;
    width: 2px;
    border-radius: 2px;
    background: var(--line);
}
.done-steps .is-done::before {
    border-color: var(--green);
    background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23fff'%3E%3Cpath d='M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E") center / 14px no-repeat;
}
.done-steps .is-done::after { background: var(--green); }
.done-steps .is-next::before { border-color: var(--green); box-shadow: 0 0 0 4px var(--ring); }
.done-steps b { display: block; font-weight: 800; line-height: 1.35; }
.done-steps span { display: block; color: var(--ink-2); font-size: .86rem; }
.done-actions { display: grid; gap: 12px; justify-items: center; text-align: center; }
.done-actions .button { width: 100%; }
.done-help { color: var(--ink-2); font-size: .9rem; }
.done-help a { color: var(--green-ink); font-weight: 800; white-space: nowrap; }

/* ---------- footer: the logo's own colours ---------- */

.footer {
    margin-top: 56px;
    padding: 36px 0 calc(32px + env(safe-area-inset-bottom));
    background: var(--foot);
    color: rgba(255, 255, 255, .76);
    font-size: .9rem;
}
.footer .wrap { display: grid; gap: 14px; justify-items: start; }
.footer .brand { color: #fff; }
.footer .wordmark span { color: var(--amber); }
.footer p { max-width: 60ch; }
.footer a:not(.brand) { color: #fff; font-weight: 800; }
.footer-end p a { display: inline-flex; align-items: center; min-height: 44px; }
.footer-promises { display: grid; gap: 9px; list-style: none; }
.footer-promises li { display: flex; align-items: center; gap: 9px; color: #fff; font-weight: 700; }
.footer-promises svg { width: 18px; height: 18px; fill: var(--amber); flex: none; }
.footer .copy { color: rgba(255, 255, 255, .55); font-size: .8rem; }
.footer-help { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; }
.footer-help svg { width: 18px; height: 18px; fill: var(--amber); flex: none; }
.footer-follow { display: grid; gap: 10px; justify-items: center; }
/* contact, help and socials close the page centred, under the left-aligned promises */
.footer-end {
    display: grid;
    gap: 14px;
    justify-items: center;
    width: 100%;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, .12);
    text-align: center;
}
.footer-end .socials { justify-content: center; }
.footer-follow b { color: #fff; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; }
.footer .social {
    border-color: rgba(255, 255, 255, .16);
    background: rgba(255, 255, 255, .07);
    color: #fff;
}
.footer .social:hover { background: rgba(255, 255, 255, .14); }

/* ---------- social links: the network's own colour on the icon, the shop's on the pill ---------- */

.socials { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; }
.social {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-height: 44px;
    padding: 5px 16px 5px 5px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    color: var(--ink);
    font-size: .88rem;
    font-weight: 800;
    text-decoration: none;
    transition: background .18s, border-color .18s;
}
.social:hover { border-color: var(--line-2); background: var(--surface-2); }
.social svg { width: 32px; height: 32px; padding: 7px; border-radius: 50%; fill: #fff; flex: none; }
.is-telegram svg { background: #229ed9; }
.is-instagram svg { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fd5949 45%, #d6249f 62%, #285aeb 92%); }
.is-facebook svg { background: #1877f2; }
/* three pills overflow a phone: three equal tiles, icon over the name */
@media (max-width: 480px) {
    .socials { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; }
    .social { flex-direction: column; justify-content: center; gap: 6px; padding: 10px 4px; border-radius: 18px; font-size: .8rem; }
}

/* ---------- help page (/yordam): the thanks page's card, wider ---------- */

.help { max-width: 760px; }
.help .done-hero h1 { margin-top: 12px; }
.help .done-hero p { max-width: 46ch; }
.help-mark {
    display: inline-grid;
    place-items: center;
    width: 58px;
    height: 58px;
    border-radius: 18px;
    background: rgba(255, 255, 255, .14);
}
.help-mark svg { width: 32px; height: 32px; fill: var(--amber); }
.help .done-body { gap: 18px; padding: 24px 20px 28px; }
.help .done-steps { margin-top: -4px; counter-reset: step; }
.help-steps li { counter-increment: step; }
.help-steps li::before {
    content: counter(step);
    display: grid;
    place-items: center;
    border-color: var(--green);
    color: var(--green-ink);
    font-size: .75rem;
    font-weight: 800;
    line-height: 1;
}
.faq { display: grid; gap: 8px; margin-top: -4px; }
.faq-item { border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.faq-item[open] { border-color: var(--line-2); background: var(--surface-2); }
.faq-item summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 52px;
    padding: 12px 14px 12px 16px;
    cursor: pointer;
    list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item h3 { font-size: .95rem; font-weight: 800; line-height: 1.35; }
.faq-item summary svg { width: 22px; height: 22px; fill: var(--green-ink); flex: none; transition: transform .2s; }
.faq-item[open] summary svg { transform: rotate(45deg); }
.faq-item p { padding: 0 16px 14px; color: var(--ink-2); font-size: .92rem; line-height: 1.55; }
.help-contact { display: grid; gap: 10px; padding: 18px; border-radius: 20px; background: var(--green-wash); }
.help-contact p { color: var(--ink-2); font-size: .92rem; }

/* ---------- motion: only answers to the buyer's own actions ---------- */

@media (prefers-reduced-motion: no-preference) {
    .quick[open] { animation: sheet-up .34s cubic-bezier(.22, 1, .36, 1); }
    .quick[open]::backdrop { animation: fade-in .3s ease; }
    .done-mark { animation: pop .5s cubic-bezier(.3, 1.5, .5, 1) both; }
    .done-check path { stroke-dasharray: 36; stroke-dashoffset: 36; animation: draw .5s .3s cubic-bezier(.65, 0, .35, 1) forwards; }
}

@media (prefers-reduced-motion: no-preference) and (hover: hover) {
    .card-media img { transition: transform .5s cubic-bezier(.22, 1, .36, 1); }
    .card:hover .card-media img { transform: scale(1.04); }
}

@keyframes pop {
    from { transform: scale(.4); opacity: 0; }
    to { transform: none; opacity: 1; }
}

@keyframes draw {
    to { stroke-dashoffset: 0; }
}

@keyframes sheet-up {
    from { transform: translateY(48px); opacity: 0; }
    to { transform: none; opacity: 1; }
}

@keyframes fade-in {
    from { opacity: 0; }
}

/* the send spinner is feedback, not decoration, so it turns even with reduced motion */
.spin { animation: spin 1s linear infinite; }

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

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
}

/* ---------- breakpoints ---------- */

@media (max-width: 359px) {
    .header .wordmark { display: none; }
}

/* the language switch shares the phone header: tighter gaps keep the search readable */
@media (max-width: 400px) {
    .header .wrap { gap: 7px; }
    .lang-menu summary { gap: 4px; padding-inline: 6px; }
}

@media (min-width: 640px) {
    .shelf { grid-auto-columns: 30%; gap: 14px; }
    .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
    .card-name { font-size: .88rem; }
    .now { font-size: 1.12rem; }
    .promises { display: flex; }
    .deals-track { grid-auto-columns: calc((100% - 24px) / 2.35); padding-inline: 24px; scroll-padding-inline: 24px; }
    .deal { scroll-snap-align: start; }
    .deal-media { aspect-ratio: 1; }
    .quick {
        width: min(460px, calc(100% - 32px));
        margin: auto;
        border-radius: 26px;
        box-shadow: 0 24px 70px rgba(5, 20, 12, .35);
    }
    .quick-grip { display: none; }
    .quick-inner { padding: 20px 22px 22px; }
    .done { margin-top: 36px; }
    .done-hero { padding: 44px 32px 36px; }
    .done-body { padding: 24px 28px 28px; }
}

@media (min-width: 760px) {
    .wrap { padding-inline: 24px; }
    .strip .extra { display: inline-flex; }
    .header { position: sticky; top: 0; z-index: 30; }
    .header .wrap { gap: 24px; padding-block: 12px; }
    .mark { width: 40px; height: 40px; border-radius: 12px; }
    .wordmark b { font-size: 1.14rem; }
    .wordmark span { font-size: .62rem; }
    .search { max-width: 560px; margin-inline: auto; }
    .search input { height: 46px; padding-left: 44px; border-radius: 14px; }
    .search svg { left: 14px; width: 20px; height: 20px; }
    .hero { margin: 20px 0 0; padding: 54px 0 30px; border-radius: 32px; }
    .hero::before { top: -260px; width: 860px; height: 860px; }
    .hero-copy p { font-size: 1.1rem; }
    .deals { margin-top: 32px; }
    .deals-track { padding-inline: 28px; scroll-padding-inline: 28px; }
    .cats { grid-auto-columns: 92px; gap: 18px; width: fit-content; max-width: 100%; margin: 26px auto 0; padding-inline: 0; }
    .cat-ring { width: 86px; height: 86px; }
    .cat-name { font-size: .8rem; }
    .chips { flex-wrap: wrap; margin-inline: 0; padding-inline: 0; overflow: visible; }
    .shelf { margin-inline: -24px; padding-inline: 24px; scroll-padding-inline: 24px; }
    .section { margin-top: 48px; }
    .band { margin: 48px 0 0; padding: 28px 24px 16px; overflow: hidden; border-radius: 28px; }
    .band .section-head { padding-inline: 0; }
    .band .shelf { margin-inline: -24px; }
    .band-max { font-size: 1.35rem; }
    .how { margin: 56px 0 0; padding: 50px 36px 42px; border-radius: 32px; }
    .how-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 32px; text-align: center; }
    .how-steps li { grid-template-columns: minmax(0, 1fr); justify-items: center; padding: 28px 22px 26px; }
    .how-icon { grid-row: auto; width: 60px; height: 60px; margin-bottom: 14px; border-radius: 18px; }
    .how-icon svg { width: 28px; height: 28px; }
    /* a chevron in the gap: the order of the steps */
    .how-steps li:not(:last-child)::after {
        content: '';
        position: absolute;
        right: -14px;
        top: 50%;
        width: 9px;
        height: 9px;
        border-top: 2.5px solid var(--green-ink);
        border-right: 2.5px solid var(--green-ink);
        transform: translateY(-50%) rotate(45deg);
    }
    .footer .wrap { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); column-gap: 48px; }
    .footer .wrap > * { grid-column: 1; }
    .footer .wrap > .footer-promises { grid-column: 2; grid-row: 1 / span 4; align-self: center; }
}

@media (min-width: 960px) {
    .deals-track { grid-auto-columns: calc((100% - 24px) / 3); }
    .deal .now { font-size: 1.32rem; }
    .deals-arrow {
        position: absolute;
        top: 36%;
        z-index: 3;
        width: 46px;
        height: 46px;
        place-items: center;
        border: 0;
        border-radius: 50%;
        background: var(--surface);
        color: var(--ink);
        box-shadow: 0 8px 24px rgba(5, 30, 18, .28);
        cursor: pointer;
    }
    /* arrows only where there is something to scroll to (static/shop.js sets the class) */
    .deals.is-scrollable .deals-arrow { display: grid; }
    .deals-arrow svg { width: 24px; height: 24px; fill: currentColor; }
    .deals-arrow:hover { color: var(--green-ink); }
    .deals-arrow.prev { left: 10px; }
    .deals-arrow.next { right: 10px; }
    .deals-dots { display: none; }
    .shelf { grid-auto-columns: 22%; gap: 16px; }
    .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
}

@media (min-width: 1140px) {
    .deals-track { grid-auto-columns: calc((100% - 36px) / 4); }
    .shelf { grid-auto-columns: 18%; }
    .grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

/* ---------- my orders (Mini App): a card per order with its status ---------- */

.mine { max-width: 560px; margin: 22px auto 0; display: grid; gap: 14px; }
.mine h1 { font-size: clamp(1.45rem, 1.15rem + 1.4vw, 2rem); font-weight: 800; letter-spacing: -.035em; }
.mine-count { color: var(--ink-2); font-size: .9rem; font-weight: 700; }
.mine-list { display: grid; gap: 10px; list-style: none; }
.mine-order {
    display: grid;
    gap: 6px;
    padding: 14px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 20px;
}
.mine-head { display: flex; justify-content: space-between; gap: 10px; color: var(--ink-3); font-size: .82rem; }
.mine-head b { color: var(--ink); font-size: .95rem; }
.mine-name { font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.mine-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; color: var(--ink-2); font-size: .86rem; }
.mine-status {
    justify-self: start;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--surface-2);
    font-size: .84rem;
    font-weight: 800;
}
.mine-order.is-active .mine-status { background: var(--green-wash); color: var(--green-ink); }
.mine-note {
    display: grid;
    gap: 12px;
    justify-items: start;
    padding: 16px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 20px;
    color: var(--ink-2);
}
.mine-note .button { width: 100%; }
