/* LUMIÈRE — стилистика Agent Provocateur: белый, чёрный, красный, Montserrat */

:root {
    --bg: #ffffff;
    --cream: #fbf7f4;
    --ink: #000000;
    --soft: #1a1a1a;
    --muted: #8c8781;
    --line: #e8e2dd;
    --red: #e0232c;
    --red-dark: #b8161d;
    --pink: #ed699a;
    --shadow: 0 12px 40px rgba(0, 0, 0, .10);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Montserrat', system-ui, sans-serif;
    background: var(--bg);
    color: var(--ink);
    line-height: 1.5;
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-weight: 500; letter-spacing: .01em; overflow-wrap: break-word; }
p { overflow-wrap: break-word; }
.container { max-width: 1360px; margin: 0 auto; padding: 0 24px; }
/* padding-top/bottom shorthand нельзя — он затирает боковой padding .container */
.section { padding-top: 3.2rem; padding-bottom: 1rem; }
.narrow { max-width: 760px; }
.narrow-wide { max-width: 1000px; padding-top: 2rem; }
.muted { color: var(--muted); }
.small { font-size: .84rem; }
.mt { margin-top: 2rem; }

/* ---------- Промо-бар ---------- */
.promobar {
    background: var(--ink);
    color: #fff;
    text-align: center;
    font-size: .72rem;
    letter-spacing: .16em;
    text-transform: uppercase;
    padding: .55rem 1rem;
    position: relative;
    overflow: hidden;
}
.promobar span {
    display: inline-block;
    animation: promoFade 12s infinite;
    opacity: 0;
}
.promobar span:nth-child(1) { animation-delay: 0s; }
.promobar span:nth-child(2) { animation-delay: 4s; }
.promobar span:nth-child(3) { animation-delay: 8s; }
@keyframes promoFade {
    0%, 5% { opacity: 0; }
    8%, 30% { opacity: 1; }
    33%, 100% { opacity: 0; }
}
.promobar a { color: #fff; border-bottom: 1px solid rgba(255,255,255,.5); }

/* ---------- Шапка ---------- */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}
.header-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1.5rem;
    padding: 1.1rem 24px;
}
.logo {
    font-size: 1.7rem;
    font-weight: 600;
    letter-spacing: .34em;
    text-transform: uppercase;
    text-align: center;
    color: var(--ink);
    white-space: nowrap;
}
.logo img {
    display: block;
    width: 6.8em;
    height: auto;
    max-width: 100%;
}
.logo span { color: var(--red); }
.header-left { display: flex; align-items: center; gap: 1.6rem; font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; }
.header-actions {
    display: flex; align-items: center; justify-content: flex-end;
    gap: 1.4rem; font-size: .74rem; letter-spacing: .14em; text-transform: uppercase;
}
.icon-link { position: relative; transition: color .2s; display: inline-flex; align-items: center; }
.icon-link:hover { color: var(--red); }
.hdr-icn { display: none; }
.cur-switch { display: inline-flex; gap: .5rem; letter-spacing: .1em; }
.cur-switch a { color: #999; transition: color .2s; }
.cur-switch a:hover { color: var(--red); }
.cur-switch a.on { color: var(--ink); font-weight: 700; border-bottom: 1px solid var(--ink); }
.lang-select {
    appearance: none; -webkit-appearance: none;
    background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23999'/%3E%3C/svg%3E") no-repeat right .3rem center / 7px 4px;
    border: 1px solid #ddd; border-radius: 4px;
    padding: .2rem 1.1rem .2rem .4rem;
    font-family: inherit; font-size: .68rem; font-weight: 600;
    letter-spacing: .08em; color: var(--ink);
    cursor: pointer; transition: border-color .2s;
    margin-left: .4rem; line-height: 1.3;
}
.lang-select:hover, .lang-select:focus { border-color: var(--red); outline: none; }
.cart-badge {
    display: inline-block;
    background: var(--red); color: #fff;
    border-radius: 999px; font-size: .64rem;
    min-width: 1.15rem; height: 1.15rem; line-height: 1.15rem;
    text-align: center; padding: 0 .3rem; margin-left: .35rem;
    letter-spacing: 0;
}
.main-nav {
    display: flex; justify-content: center; gap: 2.2rem;
    padding: .7rem 24px .85rem;
    border-top: 1px solid var(--line);
    font-size: .74rem; letter-spacing: .16em; text-transform: uppercase;
    overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.main-nav::-webkit-scrollbar { display: none; }
.main-nav a { color: var(--soft); position: relative; padding-bottom: .2rem; white-space: nowrap; }
.main-nav a::after {
    content: ''; position: absolute; left: 0; bottom: 0;
    width: 0; height: 1px; background: var(--red); transition: width .25s;
}
.main-nav a:hover::after, .main-nav a.on::after { width: 100%; }
.main-nav a.on { color: var(--red); }
.main-nav .sale { color: var(--red); }
.search { display: flex; align-items: center; gap: .5rem; border-bottom: 1px solid var(--ink); padding-bottom: .3rem; min-width: 170px; }
.search input {
    border: none; outline: none; background: transparent;
    font: inherit; font-size: .78rem; letter-spacing: .1em;
    text-transform: uppercase; width: 100%;
}
.flash {
    background: var(--ink); color: #fff;
    padding: .8rem 1.2rem; margin: 1rem 0;
    font-size: .8rem; letter-spacing: .08em; text-transform: uppercase;
    text-align: center;
}

/* ---------- Кнопки ---------- */
.btn, .ghost-btn {
    font-family: inherit; cursor: pointer; display: inline-block;
    border-radius: 0; transition: all .25s;
    text-align: center; text-transform: uppercase;
    letter-spacing: .16em; font-size: .74rem; font-weight: 600;
}
.btn {
    background: var(--ink); color: #fff; border: 1px solid var(--ink);
    padding: 1.05rem 2.6rem;
}
.btn:hover { background: var(--red); border-color: var(--red); }
.btn.red { background: var(--red); border-color: var(--red); }
.btn.red:hover { background: var(--ink); border-color: var(--ink); }
.btn.small { padding: .55rem 1.3rem; font-size: .68rem; }
.btn.wide { width: 100%; }
.ghost-btn {
    background: transparent; color: var(--ink);
    border: 1px solid var(--ink); padding: 1rem 2.4rem;
}
.ghost-btn:hover { background: var(--ink); color: #fff; }
.ghost-btn.wide { width: 100%; }

/* ---------- Герой ---------- */
.hero { position: relative; overflow: hidden; background: var(--soft); }
.hero-media { position: relative; height: clamp(440px, 76vh, 780px); }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: center 22%; }
.hero-media::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(90deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,.15) 55%, rgba(0,0,0,0) 100%);
}
.hero-content {
    position: absolute; inset: 0; z-index: 2;
    display: flex; flex-direction: column; justify-content: center;
    max-width: 1360px; margin: 0 auto; padding: 0 48px;
    color: #fff;
}
.eyebrow {
    text-transform: uppercase; letter-spacing: .3em;
    font-size: .7rem; margin-bottom: 1.2rem; color: #fff;
}
.hero-content h1 {
    font-size: clamp(2.4rem, 5.4vw, 4.4rem);
    font-weight: 300; line-height: 1.06;
    text-transform: uppercase; letter-spacing: .04em;
    max-width: 16ch; margin-bottom: 1.4rem;
}
.hero-content h1 em { font-style: italic; color: #fff; }
.lead { max-width: 34rem; margin-bottom: 2rem; font-size: .95rem; color: rgba(255,255,255,.85); }
.hero .btn { background: #fff; color: var(--ink); border-color: #fff; }
.hero .btn:hover { background: var(--red); border-color: var(--red); color: #fff; }

/* ---------- Плашки-преимущества ---------- */
.perks {
    display: grid; grid-template-columns: repeat(4, 1fr);
    border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
    margin-top: 0;
}
.perks div {
    padding: 1.6rem 1.4rem; text-align: center;
    border-right: 1px solid var(--line);
}
.perks div:last-child { border-right: none; }
.perks b {
    display: block; font-size: .78rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: .16em; margin-bottom: .3rem;
}
.perks span { color: var(--muted); font-size: .8rem; }

/* ---------- Секции / баннеры ---------- */
.section-head {
    display: flex; align-items: baseline; justify-content: space-between;
    margin-bottom: 1.8rem; gap: .6rem 1rem; flex-wrap: wrap;
}
.section-head h2 {
    font-size: 1.5rem; font-weight: 400;
    text-transform: uppercase; letter-spacing: .18em;
}
.more {
    color: var(--ink); font-size: .72rem; letter-spacing: .16em;
    text-transform: uppercase; border-bottom: 1px solid var(--ink);
    padding-bottom: .15rem; transition: all .2s;
}
.more:hover { color: var(--red); border-color: var(--red); }

.banner {
    position: relative; overflow: hidden; margin: 3rem 0 0;
    min-height: 460px; display: flex; align-items: center;
    background: var(--soft);
}
.banner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.banner::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(90deg, rgba(0,0,0,.5), rgba(0,0,0,.05));
}
.banner-inner {
    position: relative; z-index: 2; color: #fff;
    padding: 3.4rem 48px; max-width: 620px;
}
.banner-inner h2 {
    font-size: clamp(1.7rem, 3.4vw, 2.7rem); font-weight: 300;
    text-transform: uppercase; letter-spacing: .08em; line-height: 1.15;
    margin-bottom: 1rem;
}
.banner-inner p { color: rgba(255,255,255,.85); margin-bottom: 1.8rem; font-size: .92rem; }
.banner .btn { background: #fff; color: var(--ink); border-color: #fff; }
.banner .btn:hover { background: var(--red); border-color: var(--red); color: #fff; }
.banner.right { justify-content: flex-end; }
.banner.right::after { background: linear-gradient(270deg, rgba(0,0,0,.5), rgba(0,0,0,.05)); }
.banner.right .banner-inner { text-align: right; }

/* Категорийные плитки */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin-top: 3rem; }
.tile { position: relative; overflow: hidden; aspect-ratio: 3/4; background: var(--soft); }
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s; }
.tile:hover img { transform: scale(1.05); }
.tile::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0,0,0,.55), rgba(0,0,0,0) 55%); }
.tile-label {
    position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
    padding: 1.6rem; color: #fff; text-align: center;
}
.tile-label b {
    display: block; font-size: 1.05rem; font-weight: 500;
    text-transform: uppercase; letter-spacing: .18em; margin-bottom: .4rem;
}
.tile-label span { font-size: .7rem; letter-spacing: .2em; text-transform: uppercase; border-bottom: 1px solid #fff; padding-bottom: .1rem; }

/* Редакционный блок */
.editorial { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin-top: 3.5rem; background: var(--cream); }
.editorial img { width: 100%; height: 100%; object-fit: cover; min-height: 460px; }
.editorial-text { padding: 4rem 4rem; display: flex; flex-direction: column; justify-content: center; }
.editorial-text .eyebrow { color: var(--red); }
.editorial-text h2 {
    font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 300;
    text-transform: uppercase; letter-spacing: .08em; line-height: 1.2; margin-bottom: 1.2rem;
}
.editorial-text p { color: var(--muted); margin-bottom: 1rem; font-size: .92rem; }
.editorial-text .more { align-self: flex-start; margin-top: .8rem; }

/* ---------- Карточки ---------- */
.grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2.4rem 1.6rem;
}
.card { position: relative; display: flex; flex-direction: column; }
.card-img { position: relative; aspect-ratio: 3/4; overflow: hidden; background: var(--cream); display: block; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s, opacity .4s; }
.card-img img.alt { position: absolute; inset: 0; opacity: 0; }
.card:hover .card-img img.main { opacity: 0; }
.card:hover .card-img img.alt { opacity: 1; }
.card:hover .card-img img { transform: scale(1.04); }
.badge {
    position: absolute; top: 0; left: 0; z-index: 3;
    background: var(--red); color: #fff;
    padding: .35rem .8rem; font-size: .62rem;
    letter-spacing: .16em; text-transform: uppercase;
}
/* бейдж в потоке, если он внутри карточки (заказы), а не поверх фото товара */
.badge-hit { background: var(--ink); }
.badge-new { background: var(--ink); }
.badge-sale { background: var(--red); }
.order-card .badge, .admin .badge { position: static; display: inline-block; padding: .2rem .6rem; }
.fav-btn { position: absolute; top: .6rem; right: .6rem; z-index: 4; }
.fav {
    background: rgba(255,255,255,.9); border: none;
    width: 2.1rem; height: 2.1rem; font-size: .95rem; cursor: pointer;
    color: var(--muted); transition: all .2s;
}
.fav:hover, .fav.active { color: var(--red); }
.card-body { padding: .95rem .1rem 0; text-align: center; }
.card-body h3 {
    font-size: .82rem; font-weight: 500; letter-spacing: .1em;
    text-transform: uppercase; margin-bottom: .35rem;
}
.card-body .muted { font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; }
.price-row { display: flex; align-items: baseline; justify-content: center; gap: .4rem .6rem; margin-top: .5rem; flex-wrap: wrap; }
.price-row s { color: var(--muted); font-size: .8rem; }
.price { color: var(--ink); font-weight: 600; font-size: .92rem; letter-spacing: .06em; }
.price.red { color: var(--red); }
.price-row.big { font-size: 1.3rem; margin: 1rem 0 1.4rem; justify-content: flex-start; }
.card-quick {
    position: absolute; left: 0; right: 0; bottom: 0; z-index: 3;
    background: rgba(0,0,0,.85); color: #fff; text-align: center;
    font-size: .68rem; letter-spacing: .16em; text-transform: uppercase;
    padding: .8rem; opacity: 0; transform: translateY(100%);
    transition: all .3s;
}
.card:hover .card-quick { opacity: 1; transform: translateY(0); }

/* ---------- Каталог ---------- */
.page-title {
    font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 300;
    text-transform: uppercase; letter-spacing: .16em;
    margin-bottom: 1.8rem;
}
.catalog-layout { display: grid; grid-template-columns: 230px 1fr; gap: 3rem; }
.filters h4 {
    margin: 1.6rem 0 .7rem; font-size: .7rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: .18em; color: var(--muted);
}
.filters h4:first-child { margin-top: 0; }
.filter-link {
    display: block; padding: .32rem 0; color: var(--soft);
    font-size: .84rem; transition: color .2s;
}
.filter-link:hover, .filter-link.on { color: var(--red); }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip {
    border: 1px solid var(--line); background: var(--surface, #fff);
    padding: .32rem .8rem; font-size: .74rem;
    text-transform: uppercase; letter-spacing: .08em;
}
.chip.on, .chip:hover { border-color: var(--ink); background: var(--ink); color: #fff; }
.filters select {
    width: 100%; padding: .6rem; border: 1px solid var(--line);
    border-radius: 0; font: inherit; font-size: .8rem;
    text-transform: uppercase; letter-spacing: .06em; background: #fff;
}
.found { margin-bottom: 1.4rem; font-size: .76rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }

/* ---------- Товар ---------- */
.crumbs { color: var(--muted); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 1.6rem; }
.crumbs a:hover { color: var(--red); }
.product-layout { display: grid; grid-template-columns: 1.1fr 1fr; gap: 3.4rem; }
.gallery-main img {
    width: 100%; aspect-ratio: 3/4; object-fit: cover;
    background: var(--cream);
}
.gallery-thumbs { display: flex; gap: .6rem; margin-top: .7rem; flex-wrap: wrap; }
.thumb { border: 1px solid transparent; overflow: hidden; cursor: pointer; padding: 0; background: none; width: 76px; }
.thumb.on { border-color: var(--ink); }
.thumb img { width: 100%; aspect-ratio: 3/4; object-fit: cover; }
.product-info h1 {
    font-size: clamp(1.5rem, 2.6vw, 2.1rem); font-weight: 300;
    text-transform: uppercase; letter-spacing: .1em; margin-bottom: .6rem;
}
.buy-box { margin-top: 1.6rem; }
.sizes { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.4rem; }
.size-chip input { position: absolute; opacity: 0; }
.size-chip span {
    display: inline-block; padding: .55rem 1.1rem;
    border: 1px solid var(--line); font-size: .78rem;
    letter-spacing: .1em; cursor: pointer; transition: all .15s;
}
.size-chip input:checked + span { background: var(--ink); color: #fff; border-color: var(--ink); }
.buy-row { display: flex; gap: .9rem; align-items: stretch; margin-bottom: 1rem; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); background: #fff; }
.qty button { width: 2.2rem; height: 100%; border: none; background: none; font-size: 1rem; cursor: pointer; color: var(--muted); }
.qty input { width: 2.4rem; text-align: center; border: none; font: inherit; }
.buy-row .btn { flex: 1; }
.desc { margin-top: 2rem; border-top: 1px solid var(--line); padding-top: 1.4rem; }
.desc h4 {
    margin-bottom: .6rem; font-size: .7rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: .18em; color: var(--muted);
}
.desc p { font-size: .9rem; color: var(--soft); margin-bottom: .8rem; }
.spec { display: grid; grid-template-columns: auto 1fr; gap: .4rem 1.4rem; font-size: .85rem; margin-top: 1rem; }
.spec dt { color: var(--muted); text-transform: uppercase; font-size: .7rem; letter-spacing: .1em; padding-top: .15rem; }

/* ---------- Корзина / заказ ---------- */
.cart-layout { display: grid; grid-template-columns: 1fr 340px; gap: 2.6rem; }
.cart-item {
    display: grid; grid-template-columns: 90px 1fr auto auto auto;
    gap: 1.2rem; align-items: center;
    border-bottom: 1px solid var(--line); padding: 1.1rem 0;
}
.cart-item img { width: 90px; aspect-ratio: 3/4; object-fit: cover; }
.cart-item-info b {
    font-size: .85rem; font-weight: 500;
    text-transform: uppercase; letter-spacing: .08em;
}
.cart-item-info .muted { font-size: .78rem; }
.x { background: none; border: none; font-size: 1.3rem; color: var(--muted); cursor: pointer; }
.x:hover { color: var(--red); }
.summary {
    background: var(--cream); border: 1px solid var(--line);
    padding: 1.8rem; height: fit-content; position: sticky; top: 120px;
}
.summary h3 {
    font-size: .9rem; font-weight: 600; margin-bottom: 1.2rem;
    text-transform: uppercase; letter-spacing: .18em;
}
.row { display: flex; justify-content: space-between; gap: .4rem 1rem; margin: .55rem 0; align-items: center; font-size: .88rem; flex-wrap: wrap; }
.row b, .row .price { white-space: nowrap; }
.row.total {
    border-top: 1px solid var(--ink); padding-top: 1rem; margin-top: 1rem;
    font-weight: 600; text-transform: uppercase; letter-spacing: .08em; font-size: .95rem;
}
.summary .btn { margin-top: 1.4rem; }
.empty { color: var(--muted); padding: 3rem 0; text-align: center; letter-spacing: .06em; }
.empty a { color: var(--red); border-bottom: 1px solid var(--red); }

/* ---------- Оформление заказа ---------- */
.checkout-layout { display: grid; grid-template-columns: 1fr 360px; gap: 2.6rem; }
.checkout-form h4, .product-form h4 {
    margin: 1.6rem 0 .9rem; font-size: .7rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: .18em; color: var(--muted);
    border-bottom: 1px solid var(--line); padding-bottom: .5rem;
}
.checkout-form h4:first-child { margin-top: 0; }
.checkout-form label, .auth-form label, .product-form label { display: block; margin-bottom: 1rem; font-size: .74rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.checkout-form input:not([type=radio]), .auth-form input, .product-form input:not([type=hidden]), .product-form select, .status-form select {
    width: 100%; margin-top: .4rem; padding: .8rem .9rem;
    border: 1px solid var(--line); border-radius: 0;
    font: inherit; background: #fff; font-size: .9rem;
    text-transform: none; letter-spacing: 0;
}
.pay input { margin-right: .5rem; accent-color: var(--red); }

/* подсказки адреса */
.addr-wrap { position: relative; margin-bottom: 1rem; }
.addr-wrap label { margin-bottom: 0; }
.addr-suggest {
    position: absolute; z-index: 40; left: 0; right: 0; top: 100%;
    margin-top: .2rem; background: #fff; border: 1px solid var(--line);
    box-shadow: 0 12px 28px rgba(0, 0, 0, .12); max-height: 240px; overflow-y: auto;
}
.addr-option {
    display: block; width: 100%; text-align: left; padding: .7rem .9rem;
    border: 0; border-bottom: 1px solid var(--line); background: #fff;
    font: inherit; font-size: .86rem; cursor: pointer; color: var(--ink);
}
.addr-option:last-child { border-bottom: 0; }
.addr-option:hover, .addr-option:focus { background: var(--cream); outline: none; }

.pay { text-transform: none !important; letter-spacing: 0 !important; color: var(--ink) !important; font-size: .88rem !important; }
.auth-form { max-width: 440px; }
.auth-form .btn { margin-top: .6rem; }
.auth-form p { margin-top: 1.2rem; font-size: .88rem; }
.auth-form a, .empty a, .flash a { color: var(--red); }
.success-box { background: var(--cream); border: 1px solid var(--line); padding: 2.2rem; text-align: center; }
.success-box p { margin-bottom: .7rem; }

/* ---------- Аккаунт / заказы ---------- */
.order-card {
    background: #fff; border: 1px solid var(--line);
    padding: 1.4rem 1.6rem; margin-bottom: 1rem;
}
.order-items { margin: .6rem 0 0 1.2rem; color: var(--muted); font-size: .86rem; }
.status-form { margin-top: .8rem; max-width: 360px; display: flex; gap: .6rem; }
.status-form select { margin-top: 0; flex: 1; }

/* ---------- Личный кабинет ---------- */
.acc-head { display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; margin-bottom: 1.4rem; }
.acc-avatar {
    width: 64px; height: 64px; flex: 0 0 auto;
    display: flex; align-items: center; justify-content: center;
    background: var(--ink); color: #fff;
    font-size: 1.2rem; font-weight: 500; letter-spacing: .08em;
}
.acc-id { min-width: 0; flex: 1; }
.acc-id .page-title { margin-bottom: .2rem; }
.acc-logout { margin-left: auto; }
.acc-stats {
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .8rem; margin-bottom: 1.6rem;
}
.acc-stat {
    border: 1px solid var(--line); background: #fff;
    padding: .9rem 1rem; text-align: center;
}
.acc-stat b { display: block; font-size: 1.15rem; font-weight: 500; }
.acc-stat span {
    display: block; margin-top: .2rem;
    font-size: .66rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
}
.acc-tabs { margin-bottom: 1.4rem; }
.acc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem; align-items: start; }
.acc-card h3 {
    font-size: .72rem; font-weight: 600; letter-spacing: .16em;
    text-transform: uppercase; color: var(--muted);
    border-bottom: 1px solid var(--line); padding-bottom: .6rem; margin-bottom: 1rem;
}
.acc-fields { display: grid; gap: .7rem; margin-bottom: 1rem; }
.acc-field { display: flex; justify-content: space-between; gap: 1rem; font-size: .88rem; flex-wrap: wrap; }
.acc-field span { color: var(--muted); }
.acc-field b { font-weight: 500; text-align: right; overflow-wrap: anywhere; }
.acc-form { max-width: none; }
.acc-tips { margin: 0 0 1rem 1.2rem; color: var(--muted); font-size: .86rem; }
.acc-tips li { margin-bottom: .5rem; }
.acc-card .acc-field { padding: .55rem 0; border-bottom: 1px dashed var(--line); }
.acc-card .acc-field:last-child { border-bottom: 0; }

/* ---------- Подвал ---------- */
.site-footer { background: var(--ink); color: #fff; margin-top: 4rem; }
.footer-grid {
    display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.2fr);
    gap: 2rem; padding: 3.4rem 24px 2.4rem;
}
.site-footer .logo { text-align: left; color: #fff; font-size: 1.3rem; margin-bottom: 1rem; }
.site-footer p, .site-footer a { color: rgba(255,255,255,.65); font-size: .84rem; }
.site-footer a { display: block; padding: .25rem 0; transition: color .2s; }
.site-footer a:hover { color: #fff; }
.footer-grid h4 {
    margin-bottom: .9rem; font-size: .7rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: .2em; color: #fff;
}
.newsletter { display: flex; border-bottom: 1px solid rgba(255,255,255,.4); margin-top: 1rem; min-width: 0; }
.newsletter input {
    flex: 1; background: transparent; border: none; outline: none;
    color: #fff; font: inherit; font-size: .84rem; padding: .6rem 0;
    min-width: 0; width: 100%;
}
.newsletter button {
    background: none; border: none; color: #fff; cursor: pointer;
    font-size: .7rem; letter-spacing: .16em; text-transform: uppercase;
}
.newsletter button:hover { color: var(--red); }
.copyright {
    padding: 1.4rem 24px 2.4rem; color: rgba(255,255,255,.45);
    font-size: .72rem; letter-spacing: .1em; text-transform: uppercase;
    border-top: 1px solid rgba(255,255,255,.15);
    display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}

/* ---------- Админ ---------- */
.admin-head { display: flex; justify-content: space-between; align-items: center; }
.admin-tabs { display: flex; gap: 1rem; margin: 1.2rem 0; border-bottom: 1px solid var(--line); padding-bottom: .6rem; }
.admin-tabs a {
    padding: .4rem 1rem; color: var(--muted);
    font-size: .74rem; letter-spacing: .14em; text-transform: uppercase;
}
.admin-tabs a.on { background: var(--ink); color: #fff; }
.admin-thumb { width: 56px; aspect-ratio: 3/4; object-fit: cover; }
.product-admin-row { display: flex; gap: 1rem; align-items: center; }
.admin-row-actions { display: flex; gap: .6rem; align-items: center; margin-left: auto; }
.product-admin-row form { margin: 0; }
.product-form { background: var(--cream); border: 1px solid var(--line); padding: 1.8rem; }
.form-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.4rem; }
.product-form .btn { margin-top: .6rem; }
.admin .btn, .admin .ghost-btn { padding: .6rem 1.4rem; font-size: .7rem; }
.tab-badge {
    display: inline-block; min-width: 18px; padding: 1px 5px; margin-left: .35rem;
    background: var(--red); color: #fff; border-radius: 9px;
    font-size: .66rem; font-weight: 600; text-align: center; line-height: 1.5;
}
.tab-badge[hidden] { display: none; }
.red-btn { background: var(--red); color: #fff; border: 1px solid var(--red); }
.red-btn:hover { background: var(--red-dark); color: #fff; border-color: var(--red-dark); }
.user-details { margin-top: .7rem; }
.user-details summary { cursor: pointer; font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.user-details summary:hover { color: var(--red); }
.user-details[open] summary { margin-bottom: .5rem; }
.mini-order { border-top: 1px dashed var(--line); padding: .7rem 0; }
.mini-order .row { display: flex; gap: .9rem; align-items: center; flex-wrap: wrap; }
.mini-order-actions { display: flex; gap: .7rem; margin-top: .5rem; flex-wrap: wrap; align-items: center; }
.mini-order-actions form { margin: 0; }
.status-form.inline { max-width: none; margin-top: 0; }
.user-card .row { display: flex; gap: 1rem; align-items: baseline; flex-wrap: wrap; }

/* ---------- Чат: виджет на витрине ---------- */
.chat-fab {
    position: fixed; right: 26px; bottom: 26px; z-index: 60;
    width: 56px; height: 56px; border-radius: 50%;
    background: var(--ink); color: #fff; border: none; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .3);
    transition: background .2s, transform .2s;
}
.chat-fab:hover { background: var(--red); transform: translateY(-2px); }
.chat-dot {
    position: absolute; top: 4px; right: 4px; width: 12px; height: 12px;
    background: var(--red); border: 2px solid #fff; border-radius: 50%;
}
.chat-panel {
    position: fixed; right: 26px; bottom: 94px; z-index: 61;
    width: 360px; max-width: calc(100vw - 32px); height: 460px; max-height: calc(100vh - 130px);
    background: #fff; border: 1px solid var(--line);
    box-shadow: 0 24px 70px rgba(0, 0, 0, .3);
    display: flex; flex-direction: column; overflow: hidden;
}
.chat-panel[hidden] { display: none; }
.chat-head {
    background: var(--ink); color: #fff; padding: .9rem 1.1rem;
    display: flex; justify-content: space-between; align-items: center;
}
.chat-head b { font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; }
.chat-status { display: block; font-size: .7rem; color: rgba(255, 255, 255, .55); margin-top: 2px; }
.chat-status::before { content: '●'; color: #4caf50; font-size: .6rem; margin-right: .3rem; }
.chat-close { background: none; border: none; color: #fff; font-size: 1.5rem; cursor: pointer; line-height: 1; padding: 0 .2rem; }
.chat-close:hover { color: var(--red); }
.chat-body { flex: 1; overflow-y: auto; padding: 1rem; background: var(--cream); display: flex; flex-direction: column; gap: .6rem; }
.chat-msg { max-width: 84%; padding: .6rem .85rem; font-size: .85rem; line-height: 1.45; position: relative; }
.chat-msg p { word-break: break-word; }
.chat-msg.admin { background: var(--ink); color: #fff; align-self: flex-start; }
.chat-msg.client { background: #fff; color: var(--ink); border: 1px solid var(--line); align-self: flex-end; }
.chat-time { display: block; font-size: .62rem; opacity: .55; margin-top: .3rem; text-align: right; }
.chat-form { display: flex; border-top: 1px solid var(--line); background: #fff; }
.chat-form input[type="text"] {
    flex: 1; border: none; outline: none; padding: .95rem 1rem; font: inherit; font-size: .85rem;
}
.chat-form button {
    background: var(--ink); color: #fff; border: none; padding: 0 1.2rem;
    cursor: pointer; font-size: 1rem; transition: background .2s;
}
.chat-form button:hover { background: var(--red); }

/* ---------- Чат: вкладка админки ---------- */
.chat-admin-layout { display: grid; grid-template-columns: 280px 1fr; gap: 1.4rem; align-items: start; }
.chat-conv-list { border: 1px solid var(--line); background: #fff; max-height: 640px; overflow-y: auto; }
.conv-item {
    display: block; padding: .85rem 1rem; border-bottom: 1px solid var(--line);
    transition: background .15s;
}
.conv-item:last-child { border-bottom: none; }
.conv-item:hover { background: var(--cream); }
.conv-item.on { background: var(--ink); color: #fff; }
.conv-item.on .muted, .conv-item.on .conv-time { color: rgba(255, 255, 255, .6); }
.conv-top { display: flex; justify-content: space-between; align-items: center; }
.conv-top b { font-size: .88rem; }
.conv-item .muted { display: block; margin-top: .15rem; }
.conv-time { font-size: .68rem; color: var(--muted); }
.chat-thread { border: 1px solid var(--line); background: #fff; display: flex; flex-direction: column; }
.conv-head {
    padding: .9rem 1.1rem; border-bottom: 1px solid var(--line);
    display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem;
}
.conv-head-info { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.conv-del { flex-shrink: 0; margin: 0; }
.conv-del .ghost-btn { padding: .45rem .9rem; font-size: .62rem; color: var(--red); border-color: var(--red); }
.conv-del .ghost-btn:hover { background: var(--red); color: #fff; }
.chat-msgs { height: 420px; overflow-y: auto; padding: 1.1rem; background: var(--cream); display: flex; flex-direction: column; gap: .6rem; }
.chat-msgs .empty { margin: auto; }
.chat-reply { display: flex; gap: .7rem; padding: .9rem; border-top: 1px solid var(--line); }
.chat-reply input[type="text"] {
    flex: 1; border: 1px solid var(--line); padding: .7rem .9rem;
    font: inherit; font-size: .85rem; outline: none;
}
.chat-reply input[type="text"]:focus { border-color: var(--ink); }

/* ---------- Адаптив ---------- */
/* grid-дети главных раскладок не должны растягивать колонку min-content */
.catalog-layout > *, .product-layout > *, .cart-layout > *, .checkout-layout > *,
.chat-admin-layout > *, .editorial > *, .tiles > *, .grid > * { min-width: 0; }

@media (max-width: 1000px) {
    .perks { grid-template-columns: repeat(2, 1fr); }
    .perks div:nth-child(2) { border-right: none; }
    .perks div:nth-child(1), .perks div:nth-child(2) { border-bottom: 1px solid var(--line); }
    .editorial { grid-template-columns: 1fr; }
    .editorial-text { padding: 2.6rem 1.6rem; }
    .header-row { grid-template-columns: auto 1fr auto; gap: .8rem; }
    .header-left { display: none; }
    .search { display: none; }
    .main-nav { justify-content: flex-start; gap: 1.4rem; }
    .hero-content, .banner-inner { padding-left: 24px; padding-right: 24px; }
    .form-2col { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
    /* одно колоночные раскладки */
    .product-layout, .cart-layout, .checkout-layout, .catalog-layout { grid-template-columns: 1fr; }
    .catalog-layout, .product-layout { gap: 1.8rem; }
    .cart-layout, .checkout-layout { gap: 1.6rem; }
    .chat-admin-layout { grid-template-columns: 1fr; }
    .chat-conv-list { max-height: 260px; }
    .acc-grid { grid-template-columns: 1fr; }
    .acc-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }

    /* фильтры: вертикальный список-чипы вместо разрозненных рядов */
    .filters { display: block; }
    .filters form { display: block; }
    .filters h4 { margin-top: 1.3rem; }
    .filter-link {
        display: inline-block; padding: .3rem .75rem; margin: 0 .35rem .35rem 0;
        border: 1px solid var(--line); font-size: .8rem;
    }
    .filter-link.on, .filter-link:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
    .filters select { max-width: 320px; }
    /* чипы цвета прокручиваются — подсказываем скролл затуханием */
    .filters .chips {
        max-height: 7.5rem; overflow-y: auto; padding-right: .4rem;
        -webkit-mask-image: linear-gradient(to bottom, #000 72%, rgba(0,0,0,.15));
        mask-image: linear-gradient(to bottom, #000 72%, rgba(0,0,0,.15));
    }

    /* карточка товара: лента миниатюр прокручивается в одну строку */
    /* width:100% обязателен: с одними авто-полями grid-элемент берёт fit-content
       (min-content ленты nowrap ≈ 418px) и вылезает за экран на узких телефонах */
    .gallery { width: 100%; max-width: 520px; margin-inline: auto; min-width: 0; }
    .gallery-thumbs { min-width: 0; }
    .gallery-thumbs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: .2rem; }
    .gallery-thumbs::-webkit-scrollbar { display: none; }
    .thumb { flex: 0 0 auto; }

    /* корзина: фото слева, инфо и контролы справа */
    .cart-item {
        grid-template-columns: 70px minmax(0, 1fr) auto;
        row-gap: .5rem; column-gap: .9rem;
    }
    .cart-item img { grid-row: 1 / span 2; align-self: start; }
    .cart-item-info { grid-column: 2; grid-row: 1; }
    .cart-item .qty { grid-column: 2; grid-row: 2; justify-self: start; }
    .cart-item-total { grid-column: 3; grid-row: 1; justify-self: end; align-self: center; }
    .cart-item > form:last-child { grid-column: 3; grid-row: 2; justify-self: end; }

    /* итоговая панель не липнет в одну колонку */
    .summary { position: static; padding: 1.4rem 1.5rem; }

    .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem; }
}

@media (max-width: 760px) {
    /* плитки категорий: 2 колонки с компактными подписями */
    .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tile-label { padding: 1.1rem .7rem; }
    .tile-label b { font-size: .85rem; letter-spacing: .1em; }
    .tile-label span { font-size: .62rem; letter-spacing: .14em; }

    .editorial img { min-height: 320px; }
}

@media (max-width: 560px) {
    /* шапка: профиль и корзина — иконки вместо текста */
    .logo { font-size: 1.15rem; letter-spacing: .2em; }
    .header-row { padding: .9rem 20px; }
    .header-actions { gap: 1.1rem; font-size: .66rem; white-space: nowrap; }
    .hdr-lbl { display: none; }
    .hdr-icn { display: block; width: 22px; height: 22px; }
    .icon-link .cart-badge { position: absolute; top: -7px; right: -10px; margin-left: 0; }
    .cur-switch { font-size: .62rem; gap: .4rem; }
    .lang-select { font-size: .6rem; padding: .2rem 1.2rem .2rem .35rem; margin-left: .3rem; }
    .promobar { font-size: .64rem; letter-spacing: .1em; padding: .5rem .8rem; }
    .main-nav { gap: 1.2rem; padding: .6rem 20px .7rem; font-size: .7rem; }

    /* герой и баннеры */
    .hero-media { height: clamp(420px, 64vh, 560px); }
    .hero-content { padding-left: 20px; padding-right: 20px; }
    .hero-content h1 { font-size: clamp(2.05rem, 9vw, 3rem); margin-bottom: 1rem; }
    .lead { font-size: .9rem; margin-bottom: 1.4rem; }
    .banner { min-height: 420px; }
    .banner-inner { padding: 2.4rem 20px; }
    .editorial-text { padding: 2rem 1.3rem; }

    /* секции и сетки */
    .container { padding: 0 20px; }
    .section { padding-top: 2.2rem; }
    .section-head { margin-bottom: 1.2rem; }
    .section-head h2 { font-size: 1.2rem; letter-spacing: .12em; }
    .page-title { letter-spacing: .1em; margin-bottom: 1.2rem; }
    .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem .7rem; }
    .card-body h3 { font-size: .72rem; }
    .card-body .muted { font-size: .68rem; }
    .price { font-size: .85rem; }

    /* плашки-преимущества */
    .perks div { padding: 1.1rem .5rem; }
    .perks b { font-size: .7rem; letter-spacing: .1em; }
    .perks span { font-size: .72rem; }

    /* товар */
    .product-info h1 { font-size: 1.45rem; }
    .sizes { gap: .4rem; }
    .size-chip span { padding: .5rem .85rem; font-size: .74rem; }
    .buy-row { flex-wrap: wrap; }
    .buy-row .btn { flex: 1 1 100%; padding: 1rem 1rem; }
    .btn { padding: .95rem 1.4rem; }
    .ghost-btn { padding: .9rem 1.4rem; }
    .spec { gap: .3rem 1rem; }

    /* корзина / оформление */
    .cart-item { grid-template-columns: 64px minmax(0, 1fr) auto; column-gap: .7rem; }
    .cart-item img { width: 64px; }
    .summary { padding: 1.2rem 1.1rem; }
    .success-box { padding: 1.4rem 1.1rem; }

    /* личный кабинет */
    .acc-head { gap: .9rem; }
    .acc-avatar { width: 52px; height: 52px; font-size: 1rem; }
    .acc-logout { margin-left: 0; flex: 1 1 100%; }
    .acc-logout .ghost-btn { width: 100%; }
    .acc-stats { gap: .6rem; }
    .acc-stat { padding: .7rem .5rem; }
    .acc-stat b { font-size: 1rem; }
    .acc-field b { text-align: left; }

    /* футер */
    .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.6rem 1.2rem; padding: 2.4rem 20px 1.8rem; }
    .footer-grid > div:first-child, .footer-grid > div:last-child { grid-column: 1 / -1; }
    .site-footer .logo { font-size: 1.1rem; }
    .copyright { padding: 1.2rem 20px 1.8rem; font-size: .66rem; gap: .4rem; }

    /* виджет чата */
    .chat-fab { right: 14px; bottom: 14px; width: 50px; height: 50px; }
    .chat-panel {
        right: 14px; bottom: 74px;
        width: calc(100vw - 28px); height: 72vh;
        max-width: none; max-height: calc(100vh - 110px);
    }

    /* админка */
    .admin-head { flex-wrap: wrap; gap: .6rem; }
    .admin-tabs { flex-wrap: wrap; gap: .3rem .4rem; }
    .admin-tabs a { padding: .4rem .8rem; }
    .product-form { padding: 1.2rem 1rem; }
    .product-admin-row { flex-wrap: wrap; }
    .product-admin-row > div { min-width: 0; flex: 1 1 150px; }
    .chat-msgs { height: 52vh; }
    .chat-conv-list { max-height: 210px; }
    .conv-head { flex-wrap: wrap; }
    .chat-reply input[type="text"] { min-width: 0; }
}

@media (max-width: 380px) {
    .container { padding: 0 16px; }
    .header-row { padding: .8rem 16px; }
    .grid { gap: 1.2rem .6rem; }
    .perks div { padding: .9rem .4rem; }
    .footer-grid { grid-template-columns: 1fr; }
    .footer-grid > div { grid-column: auto !important; }
}

/* ---------- Cookie баннер ---------- */
.cookie-banner {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 9999;
    background: #fff; color: #222;
    padding: 1.4rem 2rem;
    border-top: 2px solid var(--rose);
    box-shadow: 0 -4px 24px rgba(0,0,0,.18);
}
.cookie-inner {
    max-width: 1100px; margin: 0 auto;
    display: flex; align-items: center; gap: 1.6rem; flex-wrap: wrap;
}
.cookie-inner p { flex: 1 1 420px; font-size: .88rem; line-height: 1.65; margin: 0; color: #333; }
.cookie-inner a { color: var(--rose); text-decoration: underline; }
.cookie-actions { display: flex; gap: .7rem; flex-shrink: 0; }
.cookie-actions .btn.small,
.cookie-actions .ghost-btn.small { padding: .7rem 1.6rem; font-size: .76rem; letter-spacing: .1em; }
.cookie-actions .btn.small { background: var(--ink) !important; color: #fff !important; border-color: var(--ink) !important; }
.cookie-actions .btn.small:hover { background: var(--red) !important; border-color: var(--red) !important; }
.cookie-actions .ghost-btn.small { color: #444; border: 1px solid #aaa; background: transparent; }
.cookie-actions .ghost-btn.small:hover { border-color: var(--ink); color: var(--ink); }
@media (max-width: 640px) {
    .cookie-banner { padding: 1.1rem 16px; }
    .cookie-inner { gap: .9rem; }
    .cookie-inner p { flex: 1 1 100%; font-size: .82rem; }
    .cookie-actions { width: 100%; flex-wrap: wrap; gap: .6rem; }
    .cookie-actions .btn.small,
    .cookie-actions .ghost-btn.small { flex: 1 1 100%; padding: .8rem 1rem; box-sizing: border-box; }
}

/* ---------- Информационные страницы ---------- */
.info-page h2 { font-size: 1.15rem; margin: 2rem 0 .6rem; letter-spacing: .04em; }
.info-page p, .info-page li { font-size: .92rem; line-height: 1.75; color: #444; }
.info-page ul, .info-page ol { padding-left: 1.6rem; margin: .6rem 0 1rem; }
.info-page li { margin-bottom: .35rem; }
.info-page a { color: var(--rose); text-decoration: underline; }
.info-table { width: 100%; border-collapse: collapse; margin: 1rem 0 1.5rem; font-size: .9rem; }
.info-table th, .info-table td { text-align: left; padding: .6rem .8rem; border-bottom: 1px solid #eee; }
.info-table th { background: var(--cream); font-weight: 600; font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; }

/* ---------- Страница контактов ---------- */
.contact-layout { display: grid; grid-template-columns: 1fr 320px; gap: 3rem; align-items: start; }
.contact-form label { display: block; margin-bottom: 1rem; font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: #555; font-weight: 500; }
.contact-form input, .contact-form select, .contact-form textarea {
    display: block; width: 100%; margin-top: .35rem;
    font-family: inherit; font-size: .92rem; padding: .75rem .9rem;
    border: 1px solid #ccc; background: #fff; color: var(--ink);
    transition: border-color .2s;
}
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus { border-color: var(--ink); outline: none; }
.contact-form textarea { resize: vertical; min-height: 120px; }
.contact-form .req { color: var(--red); }
.contact-form .btn { margin-top: .6rem; }
.contact-info { display: flex; flex-direction: column; gap: 1.2rem; }
.contact-card { background: var(--cream); padding: 1.4rem 1.6rem; }
.contact-card h3 { font-size: .82rem; text-transform: uppercase; letter-spacing: .1em; margin: 0 0 .5rem; }
.contact-card p { font-size: .88rem; line-height: 1.6; color: #555; margin: 0; }
.contact-card a { display: block; font-size: .88rem; color: var(--rose); margin-top: .3rem; }
@media (max-width: 900px) {
    .contact-layout { grid-template-columns: 1fr; }
}
