/* Демо-магазин: теплий нейтральний фон, чорні акценти, теракотова деталь. */
:root {
    --bg: #f6f3ee;
    --bg-2: #efe9e0;
    --surface: #ffffff;
    --ink: #17140f;
    --ink-2: #3b352c;
    --muted: #5e564b;
    --line: #e2dbd0;
    --line-2: #cfc6b8;
    --accent: #b4482a;
    --accent-soft: #f6e3da;
    --danger: #a11d1d;
    --ok: #1b6a3a;
    --ok-soft: #e3f1e7;
    --focus: #1a4fd6;
    --radius: 20px;
    --radius-sm: 12px;
    --shadow: 0 1px 2px rgb(23 20 15 / 6%), 0 8px 24px rgb(23 20 15 / 6%);
    --shadow-lg: 0 2px 4px rgb(23 20 15 / 6%), 0 18px 48px rgb(23 20 15 / 12%);
    --font:
        'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto,
        sans-serif;
}
*,
*::before,
*::after {
    box-sizing: border-box;
}
html {
    scroll-behavior: smooth;
    scroll-padding-top: 84px;
    -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    *,
    *::before,
    *::after {
        transition: none !important;
        animation: none !important;
    }
}
body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font: 16px/1.55 var(--font);
    overflow-wrap: anywhere;
    -webkit-font-smoothing: antialiased;
}
.wrap {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 16px;
}
@media (min-width: 768px) {
    .wrap {
        padding: 0 32px;
    }
}
h1,
h2,
h3 {
    line-height: 1.15;
    margin: 0 0 12px;
    letter-spacing: -0.02em;
}
h2 {
    font-size: clamp(1.6rem, 3vw, 2.1rem);
}
h3 {
    font-size: 1.1rem;
}
p {
    margin: 0 0 12px;
}
a {
    color: inherit;
}
.muted {
    color: var(--muted);
}
.small {
    font-size: 0.9rem;
}
:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 2px;
}
.sr {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}
.skip {
    position: absolute;
    left: -999px;
    top: 0;
    background: var(--ink);
    color: #fff;
    padding: 8px 12px;
    z-index: 50;
    border-radius: 8px;
}
.skip:focus {
    left: 8px;
    top: 8px;
}
code {
    background: var(--bg-2);
    padding: 1px 6px;
    border-radius: 6px;
    font-size: 0.9em;
}

/* ---------- Кнопки ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 10px 18px;
    border: 1.5px solid var(--line-2);
    border-radius: 999px;
    background: var(--surface);
    color: var(--ink);
    font: 600 0.95rem/1.2 var(--font);
    text-decoration: none;
    cursor: pointer;
    transition:
        transform 0.15s ease,
        background-color 0.15s ease,
        border-color 0.15s ease,
        box-shadow 0.15s ease;
}
.btn:hover:not(:disabled) {
    border-color: var(--ink);
}
.btn:active:not(:disabled) {
    transform: translateY(1px);
}
.btn:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}
.btn--primary {
    background: var(--ink);
    border-color: var(--ink);
    color: #fff;
}
.btn--primary:hover:not(:disabled) {
    background: var(--ink-2);
    box-shadow: 0 6px 18px rgb(23 20 15 / 22%);
}
.btn--primary.is-done {
    background: var(--ok);
    border-color: var(--ok);
}
.btn--ghost {
    background: transparent;
}
.btn--lg {
    min-height: 52px;
    padding: 14px 26px;
    font-size: 1rem;
}
.btn--block {
    width: 100%;
}
.btn--small {
    min-height: 36px;
    padding: 6px 12px;
    font-size: 0.85rem;
}

/* ---------- Шапка ---------- */
.top {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgb(246 243 238 / 86%);
    backdrop-filter: saturate(1.4) blur(12px);
    border-bottom: 1px solid var(--line);
}
.top__row {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 64px;
    flex-wrap: wrap;
    padding-top: 8px;
    padding-bottom: 8px;
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 1.1rem;
    letter-spacing: -0.02em;
    text-decoration: none;
    margin-right: auto;
}
.brand__mark {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--ink);
    color: #fff;
    font-size: 1rem;
}
.brand--small {
    font-size: 1rem;
}
.brand--small .brand__mark {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    font-size: 0.85rem;
}
.top__nav {
    display: flex;
    gap: 4px;
    order: 3;
    width: 100%;
}
.top__nav a {
    padding: 8px 12px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--ink-2);
}
.top__nav a:hover {
    background: var(--bg-2);
}
.cart-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.badge {
    display: inline-grid;
    place-items: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
}
.top__msg {
    display: flex;
    gap: 6px;
}
@media (min-width: 760px) {
    .top__nav {
        order: 0;
        width: auto;
        margin-right: 8px;
    }
}

/* ---------- Месенджери ---------- */
.icon {
    display: block;
    flex: none;
}
.msg-icon {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    cursor: pointer;
    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease;
}
.msg-icon:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}
.msg-icon.is-off,
.msg-tile.is-off {
    filter: grayscale(1);
    opacity: 0.5;
    cursor: not-allowed;
}
.messengers {
    display: grid;
    gap: 12px;
    align-content: start;
}
.msg-tile {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--ink);
    font: inherit;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease,
        border-color 0.15s ease;
}
.msg-tile:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}
.msg-tile--telegram:hover:not(:disabled) {
    border-color: #229ed9;
}
.msg-tile--viber:hover:not(:disabled) {
    border-color: #7360f2;
}
.msg-tile--instagram:hover:not(:disabled) {
    border-color: #d62976;
}
.msg-tile__text {
    display: grid;
}
.msg-tile__text strong {
    font-size: 1.05rem;
}
.msg-tile__text small {
    color: var(--muted);
    font-size: 0.88rem;
}

/* ---------- Перший екран ---------- */
.hero {
    padding: 40px 0 28px;
    background:
        radial-gradient(
            60% 80% at 85% 20%,
            rgb(180 72 42 / 10%),
            transparent 70%
        ),
        radial-gradient(50% 70% at 10% 90%, rgb(76 122 85 / 10%), transparent);
}
.hero__grid {
    display: grid;
    gap: 28px;
    align-items: center;
}
.eyebrow {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.hero h1 {
    font-size: clamp(2.2rem, 6vw, 3.8rem);
    font-weight: 800;
    letter-spacing: -0.035em;
    margin: 12px 0 16px;
}
.hero h1 em {
    font-style: normal;
    color: var(--accent);
}
.hero__lead {
    font-size: 1.1rem;
    color: var(--ink-2);
    max-width: 34em;
}
.hero__cta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
}
.hero__art {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 12px;
    min-height: 300px;
}
.hero__tile {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}
.hero__tile:first-child {
    grid-row: span 2;
}
.hero__tile svg {
    display: block;
    width: 100%;
    height: 100%;
}
@media (min-width: 900px) {
    .hero {
        padding: 64px 0 40px;
    }
    .hero__grid {
        grid-template-columns: 1.1fr 1fr;
        gap: 48px;
    }
    .hero__art {
        min-height: 440px;
    }
}

/* ---------- Переваги ---------- */
.perks {
    list-style: none;
    display: grid;
    gap: 12px;
    margin-top: 8px;
    margin-bottom: 8px;
}
.perks li {
    display: grid;
    padding: 16px 18px;
    border-radius: var(--radius-sm);
    background: var(--surface);
    border: 1px solid var(--line);
}
.perks span {
    color: var(--muted);
    font-size: 0.9rem;
}
@media (min-width: 760px) {
    .perks {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ---------- Розділи ---------- */
.section {
    padding-top: 48px;
}
.section__head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 4px 16px;
    margin-bottom: 20px;
}
.section__head h2,
.section__head p {
    margin: 0;
}
.panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
}
@media (min-width: 760px) {
    .panel {
        padding: 28px;
    }
}
.state {
    padding: 28px;
    text-align: center;
    background: var(--surface);
    border: 1px dashed var(--line-2);
    border-radius: var(--radius);
}

/* ---------- Каталог ---------- */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
    gap: 20px;
}
.card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}
.card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}
.card__top {
    position: relative;
}
.card__media {
    aspect-ratio: 4 / 5;
    background: var(--bg-2);
    overflow: hidden;
}
.card__media svg,
.card__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.card:hover .card__media svg,
.card:hover .card__media img {
    transform: scale(1.03);
}
.tag {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgb(255 255 255 / 92%);
    color: var(--ink);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}
.card__body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 18px;
    flex: 1;
}
.card__body h3 {
    margin: 0;
    font-size: 1.15rem;
}
.card__brand {
    margin: 0 0 -8px;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.card__sku {
    margin: 0;
    color: var(--muted);
    font-size: 0.8rem;
}
.card__stock {
    margin: 0.15rem 0 0;
    color: var(--danger);
    font-weight: 600;
}
.card__stock[hidden] {
    display: none;
}
.card__buy {
    display: grid;
    gap: 12px;
    margin-top: auto;
    padding-top: 4px;
}
.price {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}
.opt {
    border: 0;
    margin: 0;
    padding: 0;
    min-width: 0;
}
.opt legend {
    padding: 0;
    margin-bottom: 6px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--muted);
}
.opt__row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.pill {
    display: inline-grid;
    place-items: center;
    min-width: 44px;
    height: 38px;
    padding: 0 12px;
    border: 1.5px solid var(--line-2);
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition:
        border-color 0.15s ease,
        background-color 0.15s ease;
}
.pill:hover {
    border-color: var(--ink);
}
input:checked + .pill {
    background: var(--ink);
    border-color: var(--ink);
    color: #fff;
}
.swatch {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border: 2px solid transparent;
    border-radius: 999px;
    cursor: pointer;
    transition: border-color 0.15s ease;
}
.swatch__dot {
    width: 26px;
    height: 26px;
    border-radius: 999px;
    box-shadow: inset 0 0 0 1px rgb(0 0 0 / 18%);
}
.swatch:hover {
    border-color: var(--line-2);
}
input:checked + .swatch {
    border-color: var(--ink);
}
input:disabled + .pill,
input:disabled + .swatch {
    opacity: 0.35;
    cursor: not-allowed;
    text-decoration: line-through;
}
input:focus-visible + .pill,
input:focus-visible + .swatch {
    outline: 3px solid var(--focus);
    outline-offset: 2px;
}

/* ---------- Кошик і оформлення ---------- */
.checkout {
    display: grid;
    gap: 20px;
    align-items: start;
}
@media (min-width: 900px) {
    .checkout {
        grid-template-columns: 1.3fr 1fr;
    }
    .checkout:has(#order-form[hidden]) {
        grid-template-columns: 1fr;
    }
    .checkout__form {
        position: sticky;
        top: 88px;
    }
}
.empty {
    text-align: center;
    padding: 20px 0;
}
.cart-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.cart-item {
    display: grid;
    grid-template-columns: 64px 1fr auto;
    gap: 6px 14px;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
}
.cart-item:first-child {
    padding-top: 0;
}
.thumb {
    width: 64px;
    height: 80px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--bg-2);
    grid-row: span 2;
}
.thumb svg,
.thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.cart-item__name {
    font-weight: 700;
}
.cart-item__meta {
    color: var(--muted);
    font-size: 0.88rem;
}
.line-sum {
    font-weight: 700;
    white-space: nowrap;
    text-align: right;
}
.cart-item__controls {
    grid-column: 2 / -1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}
.cart-item--gone {
    grid-template-columns: 1fr auto;
    color: var(--danger);
}
.cart-item--gone .cart-item__name {
    font-weight: 600;
}
#confirm-items .cart-item {
    grid-template-columns: 1fr auto;
}
.qty-btn {
    width: 38px;
    min-height: 38px;
    padding: 0;
    font-size: 1.1rem;
}
.cart-item__controls input {
    width: 58px;
    min-height: 38px;
    text-align: center;
}
.cart-item__controls .btn--small {
    margin-left: auto;
    border-color: transparent;
    color: var(--muted);
}
.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin: 16px 0 0;
    font-size: 1.05rem;
}
.cart-total strong {
    font-size: 1.5rem;
    letter-spacing: -0.02em;
}
.panel--ok {
    border-color: #bfdcc8;
    background: linear-gradient(180deg, var(--ok-soft), var(--surface) 140px);
}
.ok-mark {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 999px;
    background: var(--ok);
    color: #fff;
    font-size: 1.5rem;
    font-weight: 800;
}

/* ---------- Поля ---------- */
.field {
    display: grid;
    gap: 6px;
    margin: 0 0 14px;
    border: 0;
    padding: 0;
    min-width: 0;
}
.field label,
.field legend {
    font-weight: 600;
    font-size: 0.92rem;
}
.field-row {
    display: grid;
    gap: 0 14px;
}
@media (min-width: 560px) {
    .field-row {
        grid-template-columns: 1fr 1fr;
    }
}
input,
textarea,
select {
    width: 100%;
    min-height: 46px;
    padding: 10px 14px;
    border: 1.5px solid var(--line-2);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--ink);
    font: inherit;
    transition: border-color 0.15s ease;
}
input:hover,
textarea:hover {
    border-color: var(--muted);
}
input:focus,
textarea:focus {
    border-color: var(--ink);
}
textarea {
    resize: vertical;
}
[aria-invalid='true'] {
    border-color: var(--danger);
}
.pay {
    gap: 8px;
}
.choice {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border: 1.5px solid var(--line-2);
    border-radius: var(--radius-sm);
    font-weight: 500;
    cursor: pointer;
}
.choice input {
    width: 18px;
    min-height: 18px;
    accent-color: var(--ink);
}
.choice:has(input:checked) {
    border-color: var(--ink);
    background: var(--bg);
}
.err {
    margin: 0;
    color: var(--danger);
    font-size: 0.88rem;
}
.err:empty,
.ok:empty {
    display: none;
}
.err--form {
    margin-bottom: 12px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    background: #fbeaea;
}
.ok {
    margin-bottom: 12px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    background: var(--ok-soft);
    color: var(--ok);
    font-weight: 600;
}
.hp {
    position: absolute;
    left: -9999px;
}

/* ---------- Звʼязок ---------- */
.contact {
    display: grid;
    gap: 20px;
    align-items: start;
}
@media (min-width: 900px) {
    .contact {
        grid-template-columns: 1fr 1.4fr;
    }
}

/* ---------- Підвал ---------- */
.foot {
    margin-top: 64px;
    padding: 28px 0;
    border-top: 1px solid var(--line);
    font-size: 0.92rem;
}
.foot__row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    align-items: center;
    justify-content: space-between;
}

/* ---------- Політика, видалення даних ---------- */
.doc {
    max-width: 760px;
    line-height: 1.6;
}
.doc h2 {
    margin-top: 28px;
}
.doc ul {
    padding-left: 20px;
}

/* ---------- Демо-чат ---------- */
.chat {
    position: fixed;
    right: 16px;
    bottom: 16px;
    left: 16px;
    z-index: 40;
    display: flex;
    flex-direction: column;
    max-height: min(560px, calc(100vh - 32px));
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 24px 64px rgb(23 20 15 / 24%);
    overflow: hidden;
}
.chat[hidden] {
    display: none;
}
@media (min-width: 560px) {
    .chat {
        left: auto;
        width: 380px;
    }
}
.chat__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
    background: var(--bg);
}
.chat[data-channel='telegram'] .chat__head {
    border-top: 4px solid #229ed9;
}
.chat[data-channel='viber'] .chat__head {
    border-top: 4px solid #7360f2;
}
.chat[data-channel='instagram'] .chat__head {
    border-top: 4px solid #d62976;
}
.chat__head h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-size: 1rem;
    letter-spacing: 0;
}
.chat__head h2 span {
    display: grid;
}
.chat__head small {
    color: var(--muted);
    font-weight: 400;
    font-size: 0.8rem;
}
.chat__close {
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--ink);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}
.chat__close:hover {
    background: var(--bg-2);
}
.chat__log {
    flex: 1;
    min-height: 160px;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: var(--bg);
}
.msg {
    max-width: 82%;
    padding: 9px 13px;
    border-radius: 16px;
    white-space: pre-wrap;
    font-size: 0.95rem;
}
.msg--in {
    align-self: flex-end;
    background: var(--ink);
    color: #fff;
    border-bottom-right-radius: 4px;
}
.msg--out {
    align-self: flex-start;
    background: var(--surface);
    border: 1px solid var(--line);
    border-bottom-left-radius: 4px;
}
.chat__form {
    display: grid;
    gap: 8px;
    padding: 12px;
    border-top: 1px solid var(--line);
}
.chat__form input {
    min-height: 40px;
}
.chat__send {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    align-items: end;
}
.chat__send textarea {
    min-height: 44px;
}

[hidden] {
    display: none !important;
}
