/* M Store storefront — clean modern theme */

:root {
    --brand: #e21f26;
    --brand-dark: #b8161c;
    --brand-soft: #fdeeee;
    --ink: #16181d;
    --ink-2: #4a505e;
    --ink-3: #7b8191;
    --line: #e6e8ec;
    --line-2: #f0f1f4;
    --surface: #f6f7f9;
    --white: #ffffff;
    --success: #13803f;
    --success-soft: #e7f6ed;
    --warn: #a35a06;
    --warn-soft: #fdf3e3;
    --danger: #c0262d;
    --radius: 14px;
    --radius-sm: 10px;
    --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .06);
    --shadow-lg: 0 12px 32px -8px rgba(16, 24, 40, .18);
    --container: 1240px;
    --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.55;
    color: var(--ink);
    background: var(--white);
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
main { flex: 1 0 auto; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--brand); }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.3rem); font-weight: 750; }
h2 { font-size: clamp(1.3rem, 1.1rem + .7vw, 1.65rem); font-weight: 700; }
h3 { font-size: 1.1rem; font-weight: 650; }
p { margin: 0 0 1em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.section { padding: 48px 0; }
.section-alt { background: var(--surface); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.section-head h2 { margin: 0; }
.section-head a { color: var(--brand); font-weight: 600; font-size: .95rem; display: inline-flex; align-items: center; gap: 4px; }
.muted { color: var(--ink-3); }
.icon { flex-shrink: 0; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 46px; padding: 0 22px; border-radius: 999px; border: 1px solid transparent;
    font-weight: 600; font-size: .95rem; cursor: pointer; white-space: nowrap;
    transition: background .15s, border-color .15s, color .15s, transform .05s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: var(--white); }
.btn-primary:hover { background: var(--brand-dark); color: var(--white); }
.btn-dark { background: var(--ink); color: var(--white); }
.btn-dark:hover { background: #000; color: var(--white); }
.btn-outline { background: var(--white); border-color: var(--line); color: var(--ink); }
.btn-outline:hover { border-color: var(--ink); color: var(--ink); }
.btn-sm { height: 36px; padding: 0 14px; font-size: .875rem; }
.btn-block { width: 100%; }
.btn[disabled], .btn.is-disabled { opacity: .5; pointer-events: none; }
.link { color: var(--brand); font-weight: 600; background: none; border: 0; padding: 0; cursor: pointer; }
.link:hover { text-decoration: underline; }

/* ---------- Top strip & header ---------- */
.strip { background: var(--ink); color: #d6d8de; font-size: .8rem; }
.strip .container { display: flex; justify-content: space-between; gap: 12px; height: 34px; align-items: center; }
.strip a { color: #fff; }
.strip span { display: inline-flex; align-items: center; gap: 6px; }
@media (max-width: 640px) { .strip .hide-sm { display: none; } .strip .container { justify-content: center; } }

.header { position: sticky; top: 0; z-index: 40; background: var(--white); border-bottom: 1px solid var(--line); }
.header-main { display: flex; align-items: center; gap: 20px; height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 750; font-size: 1.1rem; letter-spacing: -.02em; }
.brand img { width: 42px; height: 42px; border-radius: 9px; }
.brand small { display: block; font-size: .7rem; font-weight: 500; color: var(--ink-3); letter-spacing: 0; }
.header-search { flex: 1; max-width: 640px; position: relative; }
.header-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.icon-btn {
    position: relative; display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 12px;
    border-radius: 999px; background: none; border: 0; cursor: pointer; font-weight: 550; font-size: .9rem;
}
.icon-btn:hover { background: var(--surface); color: var(--ink); }
.icon-wrap { position: relative; display: inline-flex; }
.badge-count {
    position: absolute; top: -7px; right: -9px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
    background: var(--brand); color: #fff; font-size: .7rem; font-weight: 700; display: grid; place-items: center;
}
.badge-count:empty, .badge-count[data-count="0"] { display: none; }
.menu-toggle { display: none; }

.search-box { display: flex; align-items: center; height: 46px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 0 6px 0 16px; transition: border-color .15s, background .15s; }
.search-box:focus-within { background: var(--white); border-color: var(--ink); }
.search-box input { flex: 1; border: 0; background: transparent; height: 100%; outline: none; min-width: 0; }
.search-box button { width: 36px; height: 36px; border-radius: 999px; border: 0; background: var(--brand); color: #fff; display: grid; place-items: center; cursor: pointer; }
.suggest {
    position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: var(--white); border: 1px solid var(--line);
    border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 6px; list-style: none; margin: 0; z-index: 60;
}
.suggest a { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: var(--radius-sm); }
.suggest a:hover, .suggest a.is-active { background: var(--surface); color: var(--ink); }
.suggest img { width: 40px; height: 40px; object-fit: contain; background: var(--surface); border-radius: 8px; }
.suggest .s-name { flex: 1; font-size: .9rem; }
.suggest .s-price { font-weight: 650; font-size: .9rem; }
.suggest .s-all { justify-content: center; color: var(--brand); font-weight: 600; font-size: .9rem; }

.catnav { border-top: 1px solid var(--line-2); }
.catnav { position: relative; }
.catnav > .container { display: flex; align-items: center; gap: 4px; height: 48px; }
.catnav-all {
    display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px; border-radius: 999px;
    background: var(--ink); color: #fff; border: 0; font-weight: 600; font-size: .875rem; cursor: pointer; flex-shrink: 0;
}
.catnav-links { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.catnav-links::-webkit-scrollbar { display: none; }
.catnav-links a { white-space: nowrap; padding: 6px 12px; border-radius: 999px; font-size: .875rem; font-weight: 500; color: var(--ink-2); }
.catnav-links a:hover, .catnav-links a.is-active { background: var(--surface); color: var(--ink); }
.mega {
    position: absolute; left: 0; right: 0; top: 100%; z-index: 50; background: var(--white);
    border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
    box-shadow: 0 24px 48px -12px rgba(16, 24, 40, .25); padding: 20px 0 24px;
    max-height: calc(100vh - 170px); overflow-y: auto;
}
.mega-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.mega-head strong { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); }
.mega-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px 24px; }
.mega-grid a { padding: 7px 10px; border-radius: 8px; font-size: .9rem; color: var(--ink-2); }
.mega-grid a:hover { background: var(--surface); color: var(--ink); }

/* Mobile drawer */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(15, 17, 21, .45); z-index: 80; }
.drawer {
    position: fixed; top: 0; bottom: 0; left: 0; width: min(86vw, 360px); background: var(--white); z-index: 90;
    display: flex; flex-direction: column; box-shadow: var(--shadow-lg);
}
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.drawer-body { overflow-y: auto; padding: 8px; }
.drawer-body a { display: flex; justify-content: space-between; align-items: center; padding: 11px 12px; border-radius: 10px; font-weight: 500; }
.drawer-body a:hover { background: var(--surface); }
.drawer-title { padding: 14px 12px 6px; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); }

@media (max-width: 960px) {
    .header-main { flex-wrap: wrap; height: auto; padding-block: 12px; gap: 12px; }
    .header-search { order: 3; flex-basis: 100%; max-width: none; }
    .menu-toggle { display: inline-flex; padding: 0 8px; }
    .brand small, .icon-btn .label { display: none; }
    .catnav { display: none; }
}

/* ---------- Alerts & toast ---------- */
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; border-radius: var(--radius-sm); font-size: .925rem; margin: 16px 0; }
.alert-success { background: var(--success-soft); color: #0c5d2d; }
.alert-error { background: var(--brand-soft); color: #8f1419; }
.alert-warn { background: var(--warn-soft); color: #7a4305; }
.toast-wrap { position: fixed; z-index: 100; left: 50%; bottom: 24px; transform: translateX(-50%); display: grid; gap: 8px; width: min(92vw, 420px); }
.toast {
    display: flex; align-items: center; gap: 12px; background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 12px;
    box-shadow: var(--shadow-lg); font-size: .925rem; animation: toast-in .2s ease-out;
}
.toast.is-error { background: #8f1419; }
.toast a { color: #fff; text-decoration: underline; margin-left: auto; font-weight: 600; white-space: nowrap; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; background: #f3f1ee; }
.hero-inner { position: relative; display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; min-height: 420px; }
.hero-copy { padding: 56px 0; position: relative; z-index: 2; }
.hero-copy .eyebrow { display: inline-flex; align-items: center; gap: 6px; background: var(--white); border-radius: 999px; padding: 6px 12px; font-size: .8rem; font-weight: 600; color: var(--ink-2); box-shadow: var(--shadow); margin-bottom: 18px; }
.hero-copy h1 { font-size: clamp(2rem, 1.3rem + 2.6vw, 3.25rem); letter-spacing: -.03em; margin-bottom: 14px; }
.hero-copy h1 em { font-style: normal; color: var(--brand); }
.hero-copy p { font-size: 1.05rem; color: var(--ink-2); max-width: 30em; margin-bottom: 26px; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-media { position: absolute; inset: 0 0 0 40%; }
.hero-media picture { display: block; width: 100%; height: 100%; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: 70% center; }
.hero-media::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, #f3f1ee 0%, rgba(243, 241, 238, .6) 22%, rgba(243, 241, 238, 0) 48%); z-index: 1; }
@media (max-width: 860px) {
    .hero-inner { grid-template-columns: 1fr; min-height: 0; }
    .hero-media { position: relative; inset: auto; height: 200px; margin: 0 -20px; }
    .hero-media::before { background: linear-gradient(180deg, #f3f1ee 0%, rgba(243, 241, 238, 0) 40%); }
    .hero-copy { padding: 36px 0 20px; }
}

.perks { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.perk { display: flex; gap: 12px; align-items: center; }
.perk-icon { width: 42px; height: 42px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; flex-shrink: 0; }
.perk strong { display: block; font-size: .925rem; }
.perk span { font-size: .825rem; color: var(--ink-3); }
@media (max-width: 860px) { .perks { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .perks { grid-template-columns: 1fr; } }

/* ---------- Category tiles ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
@media (max-width: 1080px) { .cat-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 760px) {
    .cat-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
    .cat-tile { padding: 12px 8px; }
    .cat-tile .cat-img { width: 64px; height: 64px; }
}
@media (max-width: 420px) { .cat-grid { grid-template-columns: repeat(2, 1fr); } }
.cat-tile {
    display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding: 16px 12px 14px;
    background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); transition: border-color .15s, box-shadow .15s, transform .15s;
}
.cat-tile:hover { border-color: transparent; box-shadow: var(--shadow-lg); transform: translateY(-2px); color: var(--ink); }
.cat-tile .cat-img { width: 84px; height: 84px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; overflow: hidden; }
.cat-tile .cat-img img { width: 70%; height: 70%; object-fit: contain; mix-blend-mode: multiply; }
.cat-tile strong { font-size: .875rem; font-weight: 600; line-height: 1.3; }
.cat-tile small { color: var(--ink-3); font-size: .75rem; }

/* ---------- Product cards ---------- */
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
@media (max-width: 1080px) { .product-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 760px) { .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; } }
.card {
    position: relative; display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--line);
    border-radius: var(--radius); overflow: hidden; transition: box-shadow .15s, border-color .15s;
}
.card:hover { box-shadow: var(--shadow-lg); border-color: transparent; }
.card-media { position: relative; aspect-ratio: 1; background: var(--white); display: grid; place-items: center; padding: 14px; }
.card-media img { width: 100%; height: 100%; object-fit: contain; transition: transform .25s; }
.card:hover .card-media img { transform: scale(1.03); }
.card-tag { position: absolute; top: 10px; left: 10px; background: var(--brand); color: #fff; font-size: .72rem; font-weight: 700; padding: 3px 8px; border-radius: 999px; }
.card-body { padding: 12px 14px 14px; border-top: 1px solid var(--line-2); display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-title { font-size: .875rem; font-weight: 550; line-height: 1.35; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.7em; }
.card-title::after { content: ""; position: absolute; inset: 0; }
.card-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; margin-top: auto; }
.card-foot .add-btn { position: relative; z-index: 2; }
.add-btn { width: 38px; height: 38px; border-radius: 999px; border: 1px solid var(--line); background: var(--white); display: grid; place-items: center; cursor: pointer; color: var(--ink); transition: background .15s, color .15s, border-color .15s; }
.add-btn:hover { background: var(--brand); border-color: var(--brand); color: #fff; }
.add-btn.is-done { background: var(--success); border-color: var(--success); color: #fff; }

.price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
.price-now { font-weight: 750; font-size: 1.05rem; color: var(--ink); }
.price-was { color: var(--ink-3); text-decoration: line-through; font-size: .825rem; }
.price-off { color: var(--success); font-size: .8rem; font-weight: 650; }
.stock { display: inline-flex; align-items: center; gap: 5px; font-size: .78rem; font-weight: 550; }
.stock::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.stock.in { color: var(--success); }
.stock.out { color: var(--ink-3); }

/* ---------- Listing pages ---------- */
.page-head { padding: 28px 0 8px; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: .825rem; color: var(--ink-3); margin-bottom: 12px; }
.crumbs a:hover { color: var(--ink); }
.crumbs .sep { opacity: .5; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin: 18px 0 20px; }
.select {
    height: 40px; padding: 0 36px 0 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--white)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%237b8191' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center;
    appearance: none; font-size: .875rem; font-weight: 550; cursor: pointer;
}
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.chip { display: inline-flex; align-items: center; height: 34px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; font-size: .85rem; font-weight: 500; background: var(--white); }
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chips-more { display: contents; }
.chips-more summary { list-style: none; cursor: pointer; color: var(--brand); border-style: dashed; }
.chips-more summary::-webkit-details-marker { display: none; }
.chips-more[open] summary { display: none; }
.empty { text-align: center; padding: 64px 20px; border: 1px dashed var(--line); border-radius: var(--radius); background: var(--surface); }
.empty .icon { color: var(--ink-3); margin: 0 auto 12px; }
.empty p { color: var(--ink-3); }

.pager { display: flex; justify-content: center; gap: 6px; margin: 36px 0 8px; flex-wrap: wrap; }
.pager a, .pager span { min-width: 40px; height: 40px; padding: 0 12px; display: grid; place-items: center; border-radius: 999px; border: 1px solid var(--line); font-weight: 550; font-size: .9rem; }
.pager a:hover { border-color: var(--ink); color: var(--ink); }
.pager .is-current { background: var(--ink); border-color: var(--ink); color: #fff; }
.pager .is-gap { border: 0; min-width: 20px; padding: 0; color: var(--ink-3); }

/* ---------- Product page ---------- */
.pdp { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 48px; padding: 8px 0 48px; }
@media (max-width: 900px) { .pdp { grid-template-columns: 1fr; gap: 24px; } }
.gallery { display: grid; grid-template-columns: 76px 1fr; gap: 14px; align-self: start; position: sticky; top: 140px; }
.gallery-main { aspect-ratio: 1; border: 1px solid var(--line); border-radius: var(--radius); display: grid; place-items: center; padding: 28px; background: var(--white); }
.gallery-main img { width: 100%; height: 100%; object-fit: contain; }
.gallery-thumbs { display: flex; flex-direction: column; gap: 10px; }
.gallery-thumbs button { width: 76px; height: 76px; border: 1px solid var(--line); border-radius: 12px; padding: 6px; background: var(--white); cursor: pointer; }
.gallery-thumbs button.is-active { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: contain; }
.gallery.single { grid-template-columns: 1fr; }
@media (max-width: 900px) {
    .gallery { position: static; grid-template-columns: 1fr; }
    .gallery-thumbs { flex-direction: row; order: 2; overflow-x: auto; }
    .gallery-thumbs button { flex-shrink: 0; width: 64px; height: 64px; }
}
.pdp-info h1 { font-size: clamp(1.35rem, 1.1rem + 1vw, 1.9rem); font-weight: 700; margin-bottom: 10px; }
.pdp-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .85rem; color: var(--ink-3); margin-bottom: 18px; }
.pdp-meta a { color: var(--ink-2); text-decoration: underline; text-underline-offset: 2px; }
.pdp-price { padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.pdp-price .price-now { font-size: 1.9rem; letter-spacing: -.02em; }
.pdp-price .price-was { font-size: 1rem; }
.pdp-price .price-off { font-size: .95rem; }
.pdp-price small { display: block; color: var(--ink-3); font-size: .8rem; margin-top: 4px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; font-size: .8rem; font-weight: 600; }
.pill-success { background: var(--success-soft); color: var(--success); }
.pill-muted { background: var(--surface); color: var(--ink-2); }
.pill-brand { background: var(--brand-soft); color: var(--brand); }
.buy-row { display: flex; gap: 12px; margin: 20px 0; flex-wrap: wrap; }
.buy-row .btn { flex: 1; min-width: 180px; height: 52px; font-size: 1rem; }
.qty { display: inline-flex; align-items: center; height: 52px; border: 1px solid var(--line); border-radius: 999px; padding: 0 4px; }
.qty button { width: 40px; height: 40px; border-radius: 999px; border: 0; background: none; cursor: pointer; display: grid; place-items: center; }
.qty button:hover { background: var(--surface); }
.qty input { width: 44px; text-align: center; border: 0; outline: none; font-weight: 650; background: transparent; }
.qty-sm { height: 38px; }
.qty-sm button { width: 30px; height: 30px; }
.qty-sm input { width: 34px; }
.delivery-check { background: var(--surface); border-radius: var(--radius); padding: 16px; margin-bottom: 20px; }
.delivery-check label { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: .9rem; margin-bottom: 10px; }
.inline-form { display: flex; gap: 8px; }
.inline-form .input { flex: 1; }
.delivery-result { font-size: .85rem; margin-top: 8px; font-weight: 550; }
.delivery-result.ok { color: var(--success); }
.delivery-result.no { color: var(--danger); }
.desc { color: var(--ink-2); font-size: .95rem; }
.desc h3 { color: var(--ink); font-size: 1rem; margin-top: 22px; }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label { font-size: .85rem; font-weight: 600; color: var(--ink-2); }
.field label .req { color: var(--brand); }
.field .hint { font-size: .8rem; color: var(--ink-3); }
.field .error { font-size: .8rem; color: var(--danger); }
.input, .textarea {
    width: 100%; height: 46px; padding: 0 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--white);
    outline: none; transition: border-color .15s, box-shadow .15s;
}
.textarea { height: auto; min-height: 110px; padding: 12px 14px; resize: vertical; }
.input:focus, .textarea:focus { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(22, 24, 29, .08); }
.input[readonly] { background: var(--surface); color: var(--ink-2); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 560px) { .grid-2 { grid-template-columns: 1fr; } }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .875rem; color: var(--ink-2); cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--brand); flex-shrink: 0; }
.check a { color: var(--brand); text-decoration: underline; }

/* ---------- Panels, cart, checkout ---------- */
.panel { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.panel + .panel { margin-top: 16px; }
.two-col > .panel + .panel, .contact-grid > .panel + .panel { margin-top: 0; }
.panel h2, .panel h3 { margin-bottom: 16px; }
.panel h2 { font-size: 1.25rem; }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 28px; align-items: start; padding: 8px 0 56px; }
@media (max-width: 960px) { .two-col { grid-template-columns: 1fr; } }
.sticky { position: sticky; top: 140px; }
@media (max-width: 960px) { .sticky { position: static; } }

.line { display: grid; grid-template-columns: 84px 1fr auto; gap: 16px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line); }
.line:first-child { padding-top: 0; }
.line:last-child { border-bottom: 0; padding-bottom: 0; }
.line-img { width: 84px; height: 84px; border: 1px solid var(--line); border-radius: 12px; padding: 6px; display: grid; place-items: center; }
.line-img img { width: 100%; height: 100%; object-fit: contain; }
.line-name { font-weight: 550; font-size: .925rem; line-height: 1.35; display: block; margin-bottom: 4px; }
.line-sub { font-size: .825rem; color: var(--ink-3); }
.line-actions { display: flex; align-items: center; gap: 14px; margin-top: 10px; }
.line-total { font-weight: 700; text-align: right; white-space: nowrap; }
@media (max-width: 560px) {
    .line { grid-template-columns: 64px 1fr; }
    .line-img { width: 64px; height: 64px; }
    .line-total { grid-column: 2; text-align: left; }
}
.remove { display: inline-flex; align-items: center; gap: 4px; background: none; border: 0; color: var(--ink-3); font-size: .825rem; cursor: pointer; padding: 0; }
.remove:hover { color: var(--danger); }

.summary-row { display: flex; justify-content: space-between; padding: 7px 0; font-size: .95rem; color: var(--ink-2); }
.summary-row strong { color: var(--ink); }
.summary-total { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 14px; font-size: 1.1rem; color: var(--ink); font-weight: 700; }
.ship-progress { background: var(--surface); border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 16px; font-size: .85rem; }
.ship-progress .bar { height: 6px; border-radius: 999px; background: var(--line); margin-top: 8px; overflow: hidden; }
.ship-progress .bar span { display: block; height: 100%; background: var(--brand); border-radius: 999px; }
.ship-progress.done { background: var(--success-soft); color: #0c5d2d; }
.secure-note { display: flex; gap: 8px; align-items: center; justify-content: center; font-size: .8rem; color: var(--ink-3); margin-top: 12px; }
.mini-line { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line-2); font-size: .875rem; }
.mini-line img { width: 48px; height: 48px; object-fit: contain; border: 1px solid var(--line); border-radius: 10px; padding: 4px; }
.mini-line span { flex: 1; line-height: 1.35; }
.mini-line strong { white-space: nowrap; }

/* ---------- Auth & account ---------- */
.auth-wrap { max-width: 460px; margin: 40px auto 64px; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; background: var(--surface); border-radius: 999px; padding: 4px; margin-bottom: 24px; }
.tabs button { height: 40px; border-radius: 999px; border: 0; background: none; font-weight: 600; cursor: pointer; color: var(--ink-2); }
.tabs button.is-active { background: var(--white); color: var(--ink); box-shadow: var(--shadow); }
.account { display: grid; grid-template-columns: 240px 1fr; gap: 28px; padding: 8px 0 56px; align-items: start; }
@media (max-width: 860px) { .account { grid-template-columns: 1fr; } }
.account-nav { display: flex; flex-direction: column; gap: 2px; }
.account-nav a, .account-nav button { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 10px; font-weight: 550; font-size: .925rem; color: var(--ink-2); background: none; border: 0; cursor: pointer; text-align: left; width: 100%; }
.account-nav a:hover, .account-nav button:hover { background: var(--surface); color: var(--ink); }
.account-nav a.is-active { background: var(--ink); color: #fff; }
@media (max-width: 860px) { .account-nav { flex-direction: row; overflow-x: auto; } .account-nav a, .account-nav button { white-space: nowrap; width: auto; } }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); font-weight: 650; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.table td { padding: 14px 12px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; white-space: nowrap; }
.status { display: inline-flex; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 650; background: var(--surface); color: var(--ink-2); }
.status-ordered, .status-packed { background: var(--warn-soft); color: var(--warn); }
.status-dispached { background: #e8f0fe; color: #1d4ed8; }
.status-delivered { background: var(--success-soft); color: var(--success); }
.status-cancel { background: var(--brand-soft); color: var(--danger); }
.dl { display: grid; grid-template-columns: 150px 1fr; gap: 8px 16px; font-size: .9rem; margin: 0; }
.dl dt { color: var(--ink-3); }
.dl dd { margin: 0; }
@media (max-width: 560px) { .dl { grid-template-columns: 1fr; } .dl dd { margin-bottom: 8px; } }
.result { text-align: center; max-width: 560px; margin: 56px auto 72px; }
.result-icon { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 18px; }
.result-icon.ok { background: var(--success-soft); color: var(--success); }
.result-icon.bad { background: var(--brand-soft); color: var(--brand); }

/* ---------- Prose (policy pages) ---------- */
.prose { max-width: 760px; margin: 0 auto; padding: 8px 0 64px; color: var(--ink-2); font-size: 1rem; }
.prose h1 { color: var(--ink); margin: 1.4em 0 .5em; font-size: 1.5rem; }
.prose h1:first-child { margin-top: 0; font-size: clamp(1.7rem, 1.3rem + 1.4vw, 2.3rem); }
.prose h2 { color: var(--ink); font-size: 1.2rem; margin: 1.4em 0 .5em; }
.prose h3 { color: var(--ink); font-size: 1.05rem; margin: 1.2em 0 .4em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin: .3em 0; }
.prose li p { margin: 0; }
.prose a { color: var(--brand); text-decoration: underline; }
.prose strong { color: var(--ink); }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 360px; gap: 28px; align-items: start; padding: 8px 0 64px; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-item { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line-2); }
.contact-item:last-child { border-bottom: 0; }
.contact-item strong { display: block; font-size: .9rem; }
.contact-item span, .contact-item a { color: var(--ink-2); font-size: .9rem; }

/* ---------- Footer ---------- */
.footer { background: #111317; color: #b9bdc7; margin-top: 24px; font-size: .9rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 32px; padding-block: 52px 36px; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }
.footer h4 { color: #fff; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 14px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.footer a:hover { color: #fff; }
.footer .brand { color: #fff; margin-bottom: 14px; }
.footer-item { display: flex; gap: 10px; align-items: flex-start; }
.footer-bottom { border-top: 1px solid #23262d; padding-block: 18px; font-size: .8rem; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
