/*
    Webasyst-утилиты (служебные страницы checkout/кабинет/отзывы/сравнение)
    Компактный самодостаточный слой, не зависящий от дефолтного default.css.
    Подключается ПОСЛЕ default.shop.css, чтобы не перебивать O4-дизайн.
    Единый акцент — var(--accent) #749926, шрифт — Exo 2.
*/

/* Базовые текстовые утилиты */
.small { font-size: 0.875em; }
.gray { color: var(--muted); }
.hint { color: var(--muted); font-size: 0.875em; }
.bold { font-weight: 600; }
.semibold { font-weight: 500; }
.underline { text-decoration: underline; }
.nowrap { white-space: nowrap; }
.align-center { text-align: center; }
.align-right { text-align: right; }
.muted { color: var(--muted); }
.text-gray { color: var(--muted); }
.text-green { color: #2e7d32; }
.text-orange { color: #e07b00; }
.text-black-auto { color: var(--ink); }
.wa-hide { display: none !important; }

/* Контейнер */
.container { max-width: var(--container); margin-inline: auto; width: 100%; padding-inline: var(--gutter); }

/* Grid: row/col (Webasyst 12-колоночная сетка) */
.row { display: flex; flex-wrap: wrap; }
.row.gap6 { gap: 6px; }
.row.gap8 { gap: 8px; }
.row.gap20 { gap: 20px; }
.row.gap32 { gap: 32px; }
.row.gap-2 { gap: 2rem; }
.col { min-width: 0; }
.col.w2 { width: 16.6667%; }
.col.w3 { width: 25%; }
.col.w4 { width: 33.3333%; }
.col.w6 { width: 50%; }
.col.w9 { width: 75%; }
.col.w12 { width: 100%; }
.cols1-mobile, .cols2-mobile, .cols3-tablet, .cols1-tablet, .cols2, .cols3, .cols4 { }
@media (max-width: 760px) {
    .cols1-mobile > .col { width: 100%; }
    .cols2-mobile > .col { width: 50%; }
}
@media (max-width: 1020px) {
    .cols3-tablet > .col { width: 33.3333%; }
    .cols2 > .col { width: 50%; }
}
@media (max-width: 640px) {
    .cols2 > .col, .cols3 > .col, .cols4 > .col { width: 100%; }
}

/* Flexbox-утилиты Webasyst */
.wa-flex { display: flex; }
.wa-flex-wrap { flex-wrap: wrap; }
.wa-flex-fill { flex: 1 1 0%; }
.wa-flex-column { flex-direction: column; }
.wa-flex-box { display: flex; align-items: center; }
.wa-flex-none { flex: none; }
.align-items-center { align-items: center; }
.align-items-end { align-items: flex-end; }
.align-items-baseline { align-items: baseline; }
.justify-content-between { justify-content: space-between; }
.justify-content-center { justify-content: center; }
.wa-inline-block { display: inline-block; }
.space-025 { gap: 0.25rem; }
.space-05 { gap: 0.5rem; }
.space-075 { gap: 0.75rem; }
.space-1 { gap: 1rem; }
.space-2 { gap: 2rem; }

/* Отступы Webasyst */
.wa-mt-0 { margin-top: 0; }
.wa-mt-4 { margin-top: 4px; }
.wa-mt-8 { margin-top: 0.5rem; }
.wa-mt-12 { margin-top: 0.75rem; }
.wa-mt-16 { margin-top: 1rem; }
.wa-mt-20 { margin-top: 1.25rem; }
.wa-mt-32 { margin-top: 2rem; }
.wa-mb-0 { margin-bottom: 0; }
.wa-mb-4 { margin-bottom: 4px; }
.wa-mb-8 { margin-bottom: 0.5rem; }
.wa-mb-12 { margin-bottom: 0.75rem; }
.wa-mb-16 { margin-bottom: 1rem; }
.wa-mb-20 { margin-bottom: 1.25rem; }
.wa-mb-24 { margin-bottom: 1.5rem; }
.wa-mb-28 { margin-bottom: 1.75rem; }
.wa-mb-32 { margin-bottom: 2rem; }
.wa-ml-4 { margin-left: 4px; }
.wa-ml-8 { margin-left: 0.5rem; }
.wa-ml-12 { margin-left: 0.75rem; }
.wa-ml-auto { margin-left: auto; }
.wa-mr-4 { margin-right: 4px; }
.wa-mr-8 { margin-right: 0.5rem; }
.wa-mr-16 { margin-right: 1rem; }
.wa-mr-auto { margin-right: auto; }
.wa-mx-auto { margin-inline: auto; }
.wa-my-8 { margin-block: 0.5rem; }
.wa-pt-16 { padding-top: 1rem; }
.wa-pb-12 { padding-bottom: 0.75rem; }
.wa-pl-12 { padding-left: 0.75rem; }
.wa-pr-12 { padding-right: 0.75rem; }

/* Кнопки */
.button, button { cursor: pointer; }
.button {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
    height: 48px; padding: 0 24px; border-radius: var(--radius-pill);
    border: 1px solid transparent; background: var(--accent); color: #fff;
    font-size: 14px; font-weight: 500; font-family: var(--font-body);
    text-decoration: none; transition: background var(--transition), color var(--transition);
}
.button:hover { background: var(--accent-hover); }
.button.gray { background: #ececf0; color: var(--ink); }
.button.gray:hover { background: #e0e0e6; }
.button.small { height: 38px; padding: 0 16px; font-size: 13px; }
.button.w-100 { width: 100%; }
input[type="button"], input[type="submit"] { cursor: pointer; }

/* Списки */
ul.unstyled, ol.unstyled { list-style: none; padding: 0; margin: 0; }
ul.menu-h { margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.625rem; list-style: none; }
ul.menu-h > li { display: inline-block; }
ul.menu-h a { padding: 0.5rem 0.625rem; text-decoration: none; color: var(--ink); }
ul.menu-h a:hover { color: var(--accent); }
ul.tree { list-style: none; padding-left: 0; }
ul.tree li a { padding: 0.3125rem 0.625rem; display: block; text-decoration: none; }
ul.menu-v { list-style: none; padding: 0; margin: 0; }
ul.menu-v li a { padding: 0.3125rem 0.625rem; display: block; text-decoration: none; }
ul.menu-v li.collapsible { position: relative; }
.block { margin-bottom: 20px; }

/* Бейджи */
.badge { display: inline-block; padding: 0.35em 0.6em; font-size: 11px; font-weight: 600; line-height: 1; text-align: center; border-radius: 4px; background: var(--accent); color: #fff; }
.badge.red { background: #d32f2f; }
.badge.low-price { background: #f5f5f7; color: var(--accent); }
.badge.green { background: #2e7d32; }
.badge.yellow { background: #ffb300; color: var(--ink); }

/* Цены */
.price { font-size: 1.05em; font-weight: 500; color: var(--ink); }
.price.tiny { font-size: 0.85em; }
.compare-at-price { color: var(--muted); text-decoration: line-through; font-size: 0.85em; }
.s-price { font-size: 1.15em; font-weight: 500; }

/* Рейтинг */
.rating { display: inline-flex; align-items: center; gap: 2px; }
.rating i.icon10.star { display: inline-block; width: 14px; height: 14px; }
.rating .star:after { content: "★"; color: var(--accent); }
.rating-bad { color: var(--muted); }
.rating-distribution { width: 100%; border-collapse: collapse; }
.rating-distribution td { padding: 4px 8px; }
.rating-distribution .bar { background: #f0f0f3; border-radius: 4px; overflow: hidden; height: 12px; }
.rating-distribution .filling { background: var(--accent); height: 100%; }
.min-width { min-width: 40px; }

/* Формы */
form input[type="text"], form input[type="search"], form input[type="email"], form input[type="password"], form input[type="tel"], form input[type="number"], form select, form textarea {
    width: 100%; padding: 12px 14px; border: 1px solid #e0e0e6; border-radius: 8px;
    font-family: var(--font-body); font-size: 14px; color: var(--ink); background: #fff;
}
form input:focus, form select:focus, form textarea:focus { outline: none; border-color: var(--accent); }
form label { cursor: pointer; }
input[type="radio"], input[type="checkbox"] { width: auto; }

/* Таблицы */
table { width: 100%; border-collapse: collapse; }
table td, table th { padding: 10px 12px; border-bottom: 1px solid #ececf0; text-align: left; font-size: 14px; }
table th { font-weight: 600; color: var(--ink); }

/* Товарный блок в каталоге/отзывах */
.thumbs { list-style: none; padding: 0; margin: 0; }
.thumbs.product-list { }
.image { position: relative; overflow: hidden; }
.image img { display: block; width: 100%; height: auto; }
.text-center { text-align: center; }

/* Аккуратная сетка товаров в списке (4/3/2 по O4) */
.thumbs.product-list > li { min-width: 0; }
.thumbs.product-list.cols2-mobile > li { width: 50%; }
.thumbs.product-list.cols3-tablet > li { width: 33.3333%; }
@media (max-width: 760px) {
    .thumbs.product-list.cols2-mobile > li { width: 100%; }
}
@media (max-width: 1020px) {
    .thumbs.product-list.cols3-tablet > li { width: 50%; }
}

/* Блок отзывов */
.s-review-wrapper { display: flex; flex-direction: column; }
.out-of-stock { }

/* Проверка оформления заказа */
.cart { }
.cart__product { display: flex; gap: 16px; align-items: center; margin-bottom: 16px; }
.cart__img { width: 96px; height: auto; border-radius: 8px; }
.cart__info { flex: 1; }
.cart__name { font-weight: 600; margin-bottom: 4px; }
.cart__actions { }

/* Кнопка «Купить» в O4-стиле внутри форм (для cart-диалога) */
.buy { display: inline-flex; align-items: center; justify-content: center; height: 54px; padding: 0 28px; border-radius: var(--radius-pill); background: var(--accent); color: #fff; font-size: 15px; font-weight: 500; font-family: var(--font-body); border: none; cursor: pointer; transition: background var(--transition); }
.buy:hover { background: var(--accent-hover); }
.buy:disabled { background: #d0d0d6; cursor: not-allowed; }
.buy__note { margin-top: 8px; font-size: 12px; color: var(--muted); }
