/* ============================================================
   Mr&Mrs KIDS — розово-синий стиль
   Нежно-голубая база + розовые акценты
   ============================================================ */

:root {
    --bg: #f5f8fd;
    --bg-tint: #fdeef5;
    --card: #ffffff;
    --ink: #33323e;
    --ink-soft: #757a8c;
    --pink: #e7549b;
    --pink-dark: #c94081;
    --pink-soft: #fbd9ea;
    --blue: #4a8ad4;
    --blue-dark: #2f5f9e;
    --blue-soft: #dce9f9;
    --sky: #a8c8ee;
    --line: #e5e7f0;
    --accent: #f5a623;
    --radius: 14px;
    --shadow: 0 6px 24px rgba(47, 63, 110, .08);
    --shadow-hover: 0 12px 32px rgba(47, 63, 110, .14);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
    color: var(--ink);
    background:
        radial-gradient(1200px 400px at 85% -10%, rgba(231, 84, 155, .10), transparent 60%),
        radial-gradient(900px 350px at 10% -10%, rgba(74, 138, 212, .12), transparent 55%),
        linear-gradient(180deg, var(--bg-tint) 0, var(--bg) 340px);
    line-height: 1.55;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

img { max-width: 100%; }

a { color: var(--blue-dark); text-decoration: none; }
a:hover { color: var(--pink-dark); text-decoration: underline; }

h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .6em; font-weight: 650; }
h1 { font-size: 1.9rem; }
h2 { font-size: 1.45rem; }

.container { max-width: 1240px; margin: 0 auto; padding: 0 16px; width: 100%; }

/* ---------- Шапка ---------- */
.topbar { background: rgba(255, 255, 255, .92); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.topbar__inner { display: flex; align-items: center; gap: 20px; padding: 12px 16px; flex-wrap: wrap; }

.logo { display: flex; align-items: center; color: var(--ink); text-decoration: none; }
.logo:hover { text-decoration: none; }
.logo__img { height: 52px; width: auto; display: block; border-radius: 8px; }
.logo__text { font-size: .98rem; font-weight: 750; color: var(--pink-dark); line-height: 1.2; }
.logo__text small { font-size: .68rem; font-weight: 500; color: var(--ink-soft); }

.search { flex: 1 1 320px; display: flex; }
.search input {
    flex: 1; padding: 10px 14px; border: 1.5px solid var(--line); border-right: 0;
    border-radius: 10px 0 0 10px; font-size: .95rem; background: #fff; outline: none;
}
.search input:focus { border-color: var(--sky); }
.search button {
    padding: 10px 20px; border: 0; border-radius: 0 10px 10px 0; cursor: pointer;
    background: var(--blue); color: #fff; font-size: .95rem; font-weight: 600;
}
.search button:hover { background: var(--blue-dark); }

.topbar__actions { display: flex; align-items: center; gap: 14px; }
.link-icon { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); font-size: .9rem; position: relative; }
.link-icon:hover { text-decoration: none; color: var(--pink); }
.link-icon svg { width: 22px; height: 22px; fill: currentColor; }
.cart-badge {
    position: absolute; top: -6px; left: 12px; background: var(--pink); color: #fff;
    border-radius: 999px; font-size: .68rem; font-weight: 700; min-width: 17px; height: 17px;
    display: grid; place-items: center; padding: 0 4px;
}

.menu { border-top: 1px solid var(--line); background: #fff; }
.menu__inner { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.menu__inner > a { padding: 10px 14px; color: var(--ink); font-weight: 550; font-size: .95rem; border-bottom: 2px solid transparent; }
.menu__inner > a:hover { color: var(--pink); text-decoration: none; border-bottom-color: var(--pink-soft); }
.menu__phones { margin-left: auto; display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.menu__phone { font-weight: 700; color: var(--blue-dark); padding: 10px 0; }
.menu__phone--extra { font-weight: 600; font-size: .88rem; }
.max-link { display: inline-flex; align-items: center; line-height: 0; border-radius: 6px; transition: transform .15s, box-shadow .15s; }
.max-link:hover { transform: scale(1.1); box-shadow: 0 2px 8px rgba(122, 92, 255, .4); }

/* ---------- Flash ---------- */
.flash { max-width: 1240px; margin: 14px auto 0; padding: 12px 18px; border-radius: var(--radius); font-weight: 550; }
.flash--ok  { background: var(--blue-soft); color: var(--blue-dark); border: 1px solid #bcd6f2; }
.flash--err { background: #fbe3ee; color: #9c2b60; border: 1px solid #f2c3da; }

/* ---------- Каркас ---------- */
.layout { display: grid; grid-template-columns: 280px 1fr; gap: 22px; padding: 22px 0 40px; flex: 1; }
.sidebar__box { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.sidebar__box h3 { font-size: 1.05rem; padding-bottom: 8px; border-bottom: 2px solid var(--bg-tint); }

.cat-tree, .cat-tree ul { list-style: none; margin: 0; padding: 0; }
.cat-tree ul { padding-left: 14px; margin-top: 2px; }
.cat-tree li { margin: 2px 0; }
.cat-tree a { display: block; padding: 6px 8px; border-radius: 8px; color: var(--ink); font-size: .93rem; }
.cat-tree a:hover { background: var(--bg); text-decoration: none; color: var(--pink-dark); }
.cat-tree li.active > a, .cat-tree__item--active > a { background: var(--pink-soft); color: var(--pink-dark); font-weight: 650; }

.content { min-width: 0; }

/* ---------- Hero ---------- */
.hero {
    background: linear-gradient(120deg, #fff 40%, rgba(220, 233, 249, .7)),
                repeating-linear-gradient(90deg, transparent 0 46px, rgba(74, 138, 212, .06) 46px 48px);
    border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
    padding: 38px 40px; margin-bottom: 26px;
}
.hero h1 { max-width: 560px; }
.hero p { max-width: 520px; color: var(--ink-soft); font-size: 1.05rem; }
.hero__cta { margin-top: 18px; display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- Кнопки ---------- */
.btn {
    display: inline-block; border: 0; cursor: pointer; border-radius: 10px;
    background: var(--pink); color: #fff; font-weight: 650; font-size: 1rem;
    padding: 11px 26px; text-align: center; transition: background .15s, transform .1s;
}
.btn:hover { background: var(--pink-dark); text-decoration: none; color: #fff; }
.btn:active { transform: translateY(1px); }
.btn--ghost { background: transparent; color: var(--blue-dark); border: 1.5px solid var(--blue); }
.btn--ghost:hover { background: var(--blue-soft); color: var(--blue-dark); }
.btn--small { padding: 8px 16px; font-size: .9rem; width: 100%; }
.btn--accent { background: var(--accent); }
.btn--accent:hover { background: #d18d12; }
.btn--danger { background: #b0432a; }
.btn--danger:hover { background: #93351f; }

/* ---------- Сетка товаров ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }

.card {
    background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column;
    transition: box-shadow .18s, transform .18s;
}
.card:hover { box-shadow: var(--shadow-hover); transform: translateY(-3px); }
.card__img { display: block; aspect-ratio: 6 / 5; background: #f8f9fd; }
.card__img img { width: 100%; height: 100%; object-fit: cover; border-radius: calc(var(--radius) - 1px) calc(var(--radius) - 1px) 0 0; }
.card__body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card__name { color: var(--ink); font-weight: 600; font-size: .94rem; line-height: 1.35; min-height: 2.6em; }
.card__name:hover { color: var(--pink-dark); text-decoration: none; }
.card__price { font-size: 1.15rem; font-weight: 750; color: var(--blue-dark); margin-top: auto; }
.card__price small { font-size: .78rem; font-weight: 550; color: var(--ink-soft); }

.section-title { display: flex; align-items: baseline; gap: 12px; margin: 26px 0 14px; }
.section-title h2 { margin: 0; }
.section-title a { font-size: .9rem; }

/* ---------- Товар ---------- */
.product { display: grid; grid-template-columns: 420px 1fr; gap: 30px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 26px; }
.product__img { background: #f8f9fd; border-radius: var(--radius); display: grid; place-items: center; height: 400px; overflow: hidden; }
.product__img img { width: 100%; height: 100%; object-fit: cover; }
.product__price { font-size: 2rem; font-weight: 800; color: var(--pink-dark); margin: 14px 0 20px; }
.product__price small { font-size: 1rem; color: var(--ink-soft); font-weight: 550; }
.qty { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 10px; overflow: hidden; margin-right: 10px; }
.qty button { width: 36px; height: 42px; border: 0; background: var(--bg); font-size: 1.2rem; cursor: pointer; }
.qty input { width: 56px; height: 42px; border: 0; text-align: center; font-size: 1rem; }

.breadcrumbs { font-size: .88rem; color: var(--ink-soft); margin-bottom: 14px; }
.breadcrumbs a { color: var(--ink-soft); }

/* ---------- Корзина / таблицы ---------- */
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: .82rem; text-transform: uppercase; letter-spacing: .4px; color: var(--ink-soft); padding: 10px 12px; border-bottom: 2px solid var(--line); }
.table td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:hover td { background: #f8f9fd; }
.table img { width: 56px; height: 56px; object-fit: contain; border-radius: 8px; background: #f8f9fd; }

.cart-total { display: flex; justify-content: space-between; align-items: center; padding: 18px 4px 0; font-size: 1.25rem; font-weight: 750; }
.cart-total__sum { color: var(--pink-dark); font-size: 1.5rem; }

/* ---------- Формы ---------- */
.form { max-width: 460px; }
.form--wide { max-width: 640px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 6px; }
.field input, .field select, .field textarea {
    width: 100%; padding: 11px 14px; border: 1.5px solid var(--line); border-radius: 10px;
    font-size: .97rem; background: #fff; outline: none; font-family: inherit;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--sky); box-shadow: 0 0 0 3px rgba(168, 200, 238, .25); }
.field__hint { font-size: .82rem; color: var(--ink-soft); margin-top: 4px; }
.field__error { font-size: .85rem; color: #b0432a; margin-top: 4px; }
.checkbox { display: flex; align-items: center; gap: 8px; }
.checkbox input { width: auto; }

/* ---------- Пагинация / бейджи ---------- */
.pagination { display: flex; gap: 6px; margin: 24px 0; flex-wrap: wrap; }
.pagination__item { min-width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; border: 1.5px solid var(--line); background: #fff; color: var(--ink); font-weight: 600; }
a.pagination__item:hover { border-color: var(--pink); color: var(--pink-dark); text-decoration: none; }
.pagination__item--current { background: var(--pink); border-color: var(--pink); color: #fff; }

.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 650; }
.badge--green { background: var(--blue-soft); color: var(--blue-dark); }
.badge--blue { background: var(--pink-soft); color: var(--pink-dark); }
.badge--orange { background: #fdf0da; color: #9a6a12; }
.badge--red { background: #f9e3dd; color: #93351f; }
.badge--gray { background: #edeef4; color: var(--ink-soft); }

/* ---------- Кабинет ---------- */
.cabinet-nav { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.cabinet-nav a { padding: 9px 16px; border-radius: 10px; border: 1.5px solid var(--line); background: #fff; font-weight: 600; }
.cabinet-nav a.active { background: var(--pink); border-color: var(--pink); color: #fff; }
.cabinet-nav a:hover { text-decoration: none; }

/* ---------- Футер ---------- */
.footer { margin-top: auto; background: var(--blue-dark); color: #e6eefb; }
.footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 30px; padding: 36px 16px 24px; }
.footer a { color: #c9dcf5; display: block; margin: 4px 0; }
.footer a:hover { color: #fff; }
.footer h4 { color: #fff; }
.footer p { color: #aac4e8; margin: 6px 0; }
.footer .logo__img { height: 40px; border-radius: 6px; }
.footer__bottom { border-top: 1px solid rgba(255, 255, 255, .15); padding: 14px 16px; text-align: center; font-size: .85rem; color: #9db9de; }

/* ---------- Контент информационных страниц ---------- */
.page-content .price-table { width: 100%; max-width: 680px; margin: 0 auto 18px; border-collapse: collapse; background: #fff; font-size: .95rem; }
.page-content .price-table th, .page-content .price-table td { border: 1px solid var(--line); padding: 10px 14px; text-align: left; }
.page-content .price-table th { background: var(--blue-soft); color: var(--blue-dark); font-weight: 700; }
.page-content .price-table tr:nth-child(even) td { background: #f8f9fd; }
.page-content .price-table td + td { text-align: center; white-space: nowrap; }
.page-content h3 { color: var(--pink-dark); margin-top: 22px; }

/* ---------- Утилиты ---------- */
.muted { color: var(--ink-soft); }
.mt { margin-top: 18px; }
.center { text-align: center; }
.flex { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* ---------- Адаптив ---------- */
@media (max-width: 960px) {
    .layout { grid-template-columns: 1fr; }
    .product { grid-template-columns: 1fr; }
    .footer__grid { grid-template-columns: 1fr; }
    .menu__phones { display: none; }

    /* Сворачиваемый каталог в сайдбаре */
    .sidebar__toggle { cursor: pointer; user-select: none; display: flex; justify-content: space-between; align-items: center; }
    .sidebar__chev { width: 0; height: 0; border-left: 6px solid transparent; border-right: 6px solid transparent; border-top: 7px solid var(--pink); transition: transform .2s; }
    .sidebar__box.is-collapsed .cat-tree { display: none; }
    .sidebar__box.is-collapsed .sidebar__chev { transform: rotate(-90deg); }
}
