/* ============================================================
   STOREFRONT — каталог, фильтры, карточки, шторки, модалки
   Стили точно под реальную разметку partials/catalog.html,
   partials/drawers.html и рендер в storefrontCore.js
   Минимализм: белый, чёрный, тонкие линии, воздух
   ============================================================ */

/* ==================== КАТАЛОГ: КОНТЕЙНЕР ==================== */
.catalog-container {
    padding: 0 2%;
    max-width: 100%;
    margin: 0 auto;
}

.catalog-header {
    padding: 28px 0 8px;
    border-bottom: 1px solid var(--color-line);
}

.catalog-header h1 {
    font-size: 24px;
    font-weight: 400;
    letter-spacing: 1px;
    padding-bottom: 14px;
}

.catalog-header .items-count {
    display: block;
    font-size: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--color-muted);
    font-weight: 400;
    margin-top: 6px;
}

/* ==================== ХЛЕБНЫЕ КРОШКИ ==================== */
.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 12px;
    color: var(--color-muted);
    padding-bottom: 12px;
}

.breadcrumbs a {
    color: var(--color-muted);
    transition: var(--transition);
}

.breadcrumbs a:hover {
    color: var(--color-text);
    text-decoration: underline;
}

.breadcrumbs span {
    color: var(--color-text);
}

/* ==================== ЛЭЙАУТ: САЙДБАР + КОНТЕНТ ==================== */
.catalog-layout {
    display: flex;
    align-items: flex-start;
    gap: 40px;
    padding: 28px 0 60px;
}

/* ==================== ФИЛЬТРЫ (САЙДБАР) ==================== */
.sidebar-filters {
    flex: 0 0 240px;
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 110px);
    overflow-y: auto;
    padding: 0 16px 12px 0;
}

.filter-group {
    padding: 14px 0;
    border-bottom: 1px solid var(--color-line);
}

.filter-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    user-select: none;
    padding: 2px 0;
}

.filter-title:hover {
    opacity: 0.6;
}

.toggle-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.filter-title.opened .toggle-icon {
    transform: rotate(45deg);
}

.filter-content {
    padding: 8px 0 2px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.filter-content label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    cursor: pointer;
}

.filter-content input[type="checkbox"],
.filter-content input[type="radio"] {
    width: 15px;
    height: 15px;
    accent-color: var(--color-text);
    flex-shrink: 0;
}

/* Цветные свотчи в фильтре «Цвет» */
.color-filter-swatch {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1px solid var(--color-line);
    flex-shrink: 0;
    box-shadow: 0 0 0 1px #fff inset;
}

/* Сетка размеров */
.filter-content.size-grid {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 4px;
}

.filter-content.size-grid label {
    display: inline-flex;
    flex: 1;
    margin: 0;
}

.size-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    min-width: 0;
    padding: 3px 6px;
    border: 1px solid var(--color-line);
    background: var(--color-panel);
    font-size: 11px;
    cursor: pointer;
    transition: var(--transition);
}

.size-btn:hover {
    border-color: var(--color-text);
}

.size-btn.active {
    background: var(--color-text);
    color: #fff;
    border-color: var(--color-text);
}

/* Поля цены */
.filter-content.price-inputs {
    flex-direction: row;
    align-items: center;
    gap: 6px;
}

.filter-content.price-inputs input {
    flex: 1;
    min-width: 0;
    padding: 8px 10px;
    border: 1px solid var(--color-line);
    background: var(--color-panel);
    font-size: 12px;
}

.filter-content.price-inputs input:focus {
    outline: none;
    border-color: var(--color-text);
}

.filter-content.price-inputs input::placeholder {
    color: var(--color-muted);
}

.price-range-sep {
    color: var(--color-muted);
    font-size: 12px;
}

/* ==================== КОНТЕНТ КАТАЛОГА ==================== */
.catalog-content {
    flex: 1;
    min-width: 0;
    padding-right: 0;
}

.catalog-controls {
    display: flex;
    align-items: center;
    margin-bottom: 22px;
}

.sort-box {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
    font-size: 12px;
    color: var(--color-muted);
}

.sort-box select {
    padding: 8px 12px;
    border: 1px solid var(--color-line);
    background: var(--color-panel);
    font-size: 12px;
    cursor: pointer;
}

.sort-box select:focus {
    outline: none;
    border-color: var(--color-text);
}

/* ==================== СЕТКА ТОВАРОВ ==================== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px 20px;
}

/* Инфинити-скролл */
.products-sentinel {
    grid-column: 1 / -1;
    height: 20px;
}

/* ==================== КАРТОЧКА ТОВАРА ==================== */
.product-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--color-panel);
    transition: var(--transition);
}

.product-img {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 4;
    background: var(--color-line);
    overflow: hidden;
    cursor: pointer;
}

.product-img-lazy {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.product-card:hover .product-img-lazy {
    transform: scale(1.03);
}

/* Кнопка «В корзину» */
.quick-add {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 12px;
    padding: 11px;
    background: rgba(255, 255, 255, 0.95);
    color: var(--color-text);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    text-align: center;
    border: 1px solid var(--color-line);
    cursor: pointer;
    opacity: 0;
    transform: translateY(6px);
    transition: var(--transition);
}

.product-card:hover .quick-add {
    opacity: 1;
    transform: translateY(0);
}

.quick-add:hover {
    background: var(--color-text);
    color: #fff;
}

.quick-add:disabled {
    opacity: 1;
    background: rgba(255, 255, 255, 0.9);
    color: var(--color-muted);
    cursor: not-allowed;
}

/* Информация о товаре */
.product-info {
    display: flex;
    flex-direction: column;
    padding: 14px 4px 0;
    text-align: center;
}

.product-info .colors {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 16px;
    margin-bottom: 2px;
}

.product-info .colors .color-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1px solid var(--color-line);
    padding: 0;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 0 0 1px #fff inset;
}

.product-info .colors .color-dot:hover {
    border-color: var(--color-text);
    transform: scale(1.15);
}

.product-info .colors .color-dot.active {
    border-color: var(--color-text);
    box-shadow: 0 0 0 2px #fff inset, 0 0 0 3px var(--color-text);
}

.product-title {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    margin: 0 0 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-description {
    font-size: 12px;
    color: var(--color-muted);
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.size-select-wrap {
    margin: 8px 0 4px;
}

.size-select-wrap label {
    display: block;
    font-size: 10px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--color-muted);
    margin-bottom: 5px;
}

.size-box {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
}

.size-chip {
    min-width: 30px;
    padding: 4px 9px;
    border: 1px solid var(--color-line);
    background: var(--color-panel);
    font-size: 11px;
    cursor: pointer;
    transition: var(--transition);
}

.size-chip:hover {
    border-color: var(--color-text);
}

.size-chip.active {
    background: var(--color-text);
    color: #fff;
    border-color: var(--color-text);
}

.product-price {
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 4px;
}

.new-price {
    font-weight: 600;
}

.old-price {
    margin-left: 8px;
    font-size: 13px;
    font-weight: 400;
    color: var(--color-muted);
    text-decoration: line-through;
}

/* ==================== СКЕЛЕТОНЫ ==================== */
.product-skeleton {
    pointer-events: none;
}

.skeleton-img {
    width: 100%;
    aspect-ratio: 3 / 4;
    background: linear-gradient(90deg, var(--color-line) 25%, #f2f2f2 50%, var(--color-line) 75%);
    background-size: 800px 100%;
    animation: shimmer 1.4s infinite linear;
}

.skeleton-line {
    height: 12px;
    margin: 10px auto;
    background: linear-gradient(90deg, var(--color-line) 25%, #f2f2f2 50%, var(--color-line) 75%);
    background-size: 800px 100%;
    animation: shimmer 1.4s infinite linear;
    border-radius: 2px;
}

/* ==================== ШТОРКА КОРЗИНЫ ==================== */
.cart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 1000;
}

.cart-overlay.active {
    opacity: 1;
    visibility: visible;
}

.cart-drawer {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    max-width: 92vw;
    height: 100vh;
    background: var(--color-panel);
    z-index: 1001;
    display: flex;
    flex-direction: column;
    transition: right 0.3s ease;
    border-left: 1px solid var(--color-line);
}

.cart-drawer.open {
    right: 0;
}

.cart-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    border-bottom: 1px solid var(--color-line);
}

.cart-drawer-header h3 {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.cart-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 18px 22px;
}

.cart-empty {
    text-align: center;
    padding: 32px 0;
    color: var(--color-muted);
    font-size: 14px;
}

.cart-drawer-footer {
    padding: 16px 22px;
    border-top: 1px solid var(--color-line);
}

.cart-drawer-footer .btn {
    width: 100%;
}

.cart-drawer-footer .btn-clear {
    width: 100%;
    margin-top: 8px;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    font-size: 14px;
}

.cart-total span:last-child {
    font-size: 18px;
    font-weight: 600;
}

/* Уведомление в корзине */
.cart-drawer-notice {
    padding: 10px 14px;
    margin-bottom: 12px;
    font-size: 13px;
    border: 1px solid var(--color-line);
}

.cart-drawer-notice.success {
    color: var(--color-success);
    border-color: var(--color-success);
}

.cart-drawer-notice.error {
    color: var(--color-danger);
    border-color: var(--color-danger);
}

/* Товар в корзине */
.cart-item {
    display: flex;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--color-line);
}

.cart-item-img {
    width: 70px;
    height: 92px;
    flex-shrink: 0;
    background: var(--color-line);
}

.cart-item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-details {
    flex: 1;
}

.cart-item-title {
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    margin-bottom: 4px;
}

.cart-item-price {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.qty-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border: 1px solid var(--color-line);
    background: var(--color-panel);
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    transition: var(--transition);
}

.qty-btn:hover {
    border-color: var(--color-text);
}

.qty-value {
    min-width: 18px;
    text-align: center;
    font-size: 13px;
}

.remove-item-btn {
    background: none;
    border: none;
    font-size: 15px;
    cursor: pointer;
    opacity: 0.5;
    padding: 0 4px;
    transition: var(--transition);
}

.remove-item-btn:hover {
    opacity: 1;
}

/* ==================== МОДАЛКИ (общие) ==================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1100;
}

.close-btn {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--color-line);
    background: var(--color-panel);
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
}

.close-btn:hover {
    border-color: var(--color-text);
}

.hidden {
    display: none !important;
}

/* ==================== ЧЕКАУТ / АККАУНТ / ТРЕКИНГ (общий модальный скелет) ==================== */
.checkout-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 460px;
    max-width: 94vw;
    max-height: 90vh;
    overflow-y: auto;
    background: var(--color-panel);
    z-index: 1101;
    box-shadow: var(--shadow-hover);
    animation: popin 0.25s ease;
}

/* Личный кабинет — крупнее остальных форм */
#account-modal {
    width: 640px;
}

.checkout-modal-content {
    padding: 28px 30px;
}

.checkout-modal-content .close-btn {
    float: right;
    margin-bottom: 12px;
}

.checkout-modal-content h3 {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin: 8px 0 20px;
    clear: both;
}

/* ==================== ЧЕКАУТ: ФОРМА ==================== */
.checkout-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.account-form-group label {
    display: block;
    font-size: 11px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--color-muted);
    margin-bottom: 6px;
}

.account-form-group input {
    width: 100%;
    padding: 11px 13px;
    border: 1px solid var(--color-line);
    background: var(--color-bg);
    font-size: 14px;
    transition: var(--transition);
}

.account-form-group input:focus {
    outline: none;
    border-color: var(--color-text);
}

.account-form-group input::placeholder {
    color: var(--color-muted);
}

/* Способы получения */
.delivery-methods {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 4px;
}

.delivery-method {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--color-line);
    cursor: pointer;
    transition: var(--transition);
}

.delivery-method:hover {
    border-color: var(--color-text);
}

.delivery-method input {
    width: 16px;
    height: 16px;
    accent-color: var(--color-text);
}

.delivery-method:has(input:checked) {
    border-color: var(--color-text);
    background: #fafafa;
}

.delivery-method-box {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.delivery-method-title {
    font-size: 13px;
    font-weight: 500;
}

.delivery-method-desc {
    font-size: 12px;
    color: var(--color-muted);
}

/* Статичный блок способа оплаты (оплата только онлайн через ЮKassa) */
.delivery-method-static {
    cursor: default;
    background: #fafafa;
    border-color: var(--color-text);
}

.delivery-method-static:hover {
    border-color: var(--color-text);
}

.required-mark {
    color: #c0392b;
}

/* Поля адреса доставки */
.delivery-fields {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Результат расчёта доставки под адресом */
.delivery-quote {
    font-size: 12px;
    line-height: 1.5;
    padding: 8px 10px;
    border: 1px dashed var(--color-line);
    color: var(--color-muted);
}

.delivery-quote-ok {
    border-style: solid;
    border-color: var(--color-text);
    color: var(--color-text);
    background: #fafafa;
}

.delivery-quote-error {
    border-style: solid;
    border-color: #c0392b;
    color: #c0392b;
}

/* Итоговая сумма: товары + доставка = к оплате */
.checkout-summary {
    margin-top: 16px;
    padding: 12px 14px;
    border: 1px solid var(--color-line);
    background: #fafafa;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.checkout-summary-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    font-size: 13px;
}

.checkout-summary-row > span:first-child {
    color: var(--color-muted);
}

.checkout-summary-total {
    padding-top: 8px;
    border-top: 1px solid var(--color-line);
    font-size: 15px;
    font-weight: 600;
}

.checkout-summary-total > span:first-child {
    color: var(--color-text);
}

.checkout-summary-note {
    font-size: 12px;
    color: var(--color-muted);
}

/* Разбивка суммы в карточке заказа в личном кабинете */
.order-breakdown {
    font-size: 12px;
    color: var(--color-muted);
}

/* Согласия */
.checkout-consents {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.consent-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 12px;
}

.consent-row input {
    width: 15px;
    height: 15px;
    margin-top: 2px;
    accent-color: var(--color-text);
}

.consent-row a,
.consent-note a {
    color: var(--color-text);
    text-decoration: underline;
}

.consent-note {
    font-size: 12px;
    color: var(--color-muted);
}

.account-buttons {
    display: flex;
    gap: 10px;
    margin-top: 4px;
}

.account-buttons .btn {
    flex: 1;
}

.account-message {
    font-size: 13px;
    padding: 8px 0;
}

.account-message.error {
    color: var(--color-danger);
}

.account-message.success {
    color: var(--color-success);
}

/* ==================== БЫСТРЫЙ ПРОСМОТР ТОВАРА ==================== */
.product-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 1080px;
    max-width: 94vw;
    background: var(--color-panel);
    z-index: 1101;
    box-shadow: var(--shadow-hover);
    animation: popin 0.25s ease;
}

.product-modal-shell {
    position: relative;
}

.product-modal-shell .close-btn {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 5;
    background: rgba(255, 255, 255, 0.9);
}

.product-modal-body {
    display: flex;
    max-height: 88vh;
    overflow-y: auto;
}

/* Галерея */
.product-modal-gallery {
    flex: 1 1 48%;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--color-line);
}

.product-modal-stage {
    flex: 1;
    min-height: 480px;
    background: var(--color-line);
    position: relative;
}

.product-modal-stage-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-modal-gallery-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 12px;
    border-top: 1px solid var(--color-line);
}

.product-modal-thumbnails {
    display: flex;
    gap: 6px;
    overflow-x: auto;
}

.product-modal-thumb {
    width: 46px;
    height: 56px;
    object-fit: cover;
    background: var(--color-line);
    border: 1px solid var(--color-line);
    padding: 0;
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
}

.product-modal-thumb:hover,
.product-modal-thumb.active {
    border-color: var(--color-text);
}

/* Детали */
.product-modal-details {
    flex: 1 1 52%;
    padding: 36px;
    min-width: 0;
}

.product-modal-top h4 {
    font-size: 24px;
    font-weight: 500;
    margin-bottom: 6px;
}

.product-modal-price {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 8px;
}

.product-modal-description {
    font-size: 14px;
    color: var(--color-muted);
    margin-bottom: 18px;
}

.product-modal-section {
    margin-bottom: 16px;
}

.product-modal-section-title {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--color-muted);
    margin-bottom: 8px;
}

.product-modal-colors,
.product-modal-sizes {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.color-chip {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid var(--color-line);
    cursor: pointer;
    transition: var(--transition);
    padding: 0;
}

.color-chip:hover {
    border-color: var(--color-text);
}

.color-chip.active {
    border-color: var(--color-text);
    box-shadow: 0 0 0 2px #fff inset, 0 0 0 3px var(--color-text);
}

/* Кол-во */
.product-modal-quantity {
    margin: 18px 0;
}

.product-modal-quantity label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--color-muted);
    margin-bottom: 8px;
}

.qty-control {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.qty-control .qty-btn {
    width: 32px;
    height: 32px;
}

.qty-control span {
    font-size: 15px;
    font-weight: 500;
    min-width: 22px;
    text-align: center;
}

.product-modal-actions {
    margin-top: 10px;
}

.product-modal-actions .btn {
    width: 100%;
}

/* ==================== МОДАЛКА УСПЕХА ==================== */
.success-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 420px;
    max-width: 92vw;
    background: var(--color-panel);
    z-index: 1101;
    text-align: center;
    padding: 36px 30px;
    box-shadow: var(--shadow-hover);
    animation: popin 0.25s ease;
}

.success-modal-content h3 {
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.success-modal-content p {
    color: var(--color-muted);
    font-size: 14px;
    margin-bottom: 20px;
    line-height: 1.6;
}

.success-modal-content .close-btn {
    position: absolute;
    top: 14px;
    right: 14px;
}

.success-modal-content {
    position: relative;
}

/* ==================== ЛИЧНЫЙ КАБИНЕТ ==================== */
.account-drawer-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.btn-phone {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border: 1px solid var(--color-line);
    font-size: 13px;
    transition: var(--transition);
}

.btn-phone:hover {
    border-color: var(--color-text);
}

.account-description {
    font-size: 13px;
    color: var(--color-muted);
    line-height: 1.6;
}

/* Чекбоксы согласий */
.consent-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
}

.consent-checkbox input {
    display: none;
}

.consent-box {
    width: 18px;
    height: 18px;
    border: 1px solid var(--color-line);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    margin-top: 1px;
}

.consent-checkbox input:checked+.consent-box {
    background: var(--color-text);
    border-color: var(--color-text);
}

.consent-checkbox input:checked+.consent-box::after {
    content: '';
    width: 8px;
    height: 8px;
    background: #fff;
}

.consent-text {
    font-size: 12px;
    line-height: 1.5;
    color: var(--color-text);
}

.consent-text a {
    text-decoration: underline;
}

/* Сводка ЛК */
.account-welcome {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--color-line);
}

.account-welcome p {
    font-size: 14px;
    font-weight: 500;
}

.account-orders-section h4 {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--color-muted);
    margin: 14px 0 12px;
}

.account-orders {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.account-order {
    background: #f7f7f7;
    border: 1px solid var(--color-line);
    box-shadow: var(--shadow-card);
    border-radius: var(--radius);
    padding: 16px;
}

.account-order-head {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 12px;
}

.account-order-thumb {
    width: 52px;
    height: 64px;
    flex-shrink: 0;
    background: var(--color-line);
}

.account-order-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.account-order-info h5 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 3px;
}

.order-meta {
    font-size: 12px;
    color: var(--color-muted);
}

.account-order-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.order-item {
    display: flex;
    gap: 10px;
    align-items: center;
    padding-top: 8px;
    border-top: 1px solid var(--color-line);
}

.order-item-thumb {
    width: 40px;
    height: 50px;
    flex-shrink: 0;
    background: var(--color-line);
}

.order-item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.order-item-name {
    font-size: 13px;
    font-weight: 500;
}

.order-item-meta {
    font-size: 12px;
    color: var(--color-muted);
}

.order-delivery {
    font-size: 12px;
    color: var(--color-muted);
    margin-top: 6px;
}

/* Бейдж статуса заказа в личном кабинете */
.order-status {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.2px;
    line-height: 1.6;
}

.order-status--pending {
    background: #f2ede3;
    color: #8a6d3b;
}

.order-status--accepted {
    background: #f1e9f6;
    color: #6c3483;
}

.order-status--shipped {
    background: #e7eff8;
    color: #2f5fa3;
}

.order-status--completed {
    background: #e7f2ea;
    color: #2f7d50;
}

.order-status--cancelled {
    background: #f6e6e6;
    color: #b04141;
}

.order-status-history {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.order-status-history-item {
    font-size: 12px;
    color: var(--color-muted);
}

.order-status-history-item span {
    color: var(--color-line);
}

/* ==================== ТРЕКИНГ ДОСТАВКИ ==================== */
.tracking-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.tracking-result {
    border: 1px solid var(--color-line);
    padding: 18px;
    text-align: center;
}

.tracking-status-icon {
    color: var(--color-muted);
    margin-bottom: 10px;
}

.tracking-status-icon svg {
    margin: 0 auto;
}

.tracking-status-text {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.tracking-status-description {
    font-size: 13px;
    color: var(--color-muted);
}

.tracking-timeline {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: left;
}

.tracking-error {
    color: var(--color-danger);
    font-size: 13px;
}

/* ==================== ТОСТ ДОБАВЛЕНИЯ ==================== */
.cart-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translate(-50%, 20px);
    padding: 12px 22px;
    background: var(--color-text);
    color: #fff;
    font-size: 13px;
    z-index: 1200;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
    border-radius: var(--radius);
}

.cart-toast.visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

/* ==================== СОСТОЯНИЯ ==================== */
.loading,
.error {
    text-align: center;
    padding: 24px;
    color: var(--color-muted);
    font-size: 14px;
    grid-column: 1 / -1;
}

.error {
    color: var(--color-danger);
}

/* ==================== БЕЙДЖИ ==================== */
.badge-sale {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    width: 40px;
    height: 40px;
    background: var(--color-text);
    color: #fff;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    content: 'SALE';
}

.badge-sale::before {
    content: 'SALE';
}

/* ============================================================
   ПОЛИРОВКА (layered enhancements — сохраняют минимализм)
   Тонкие анимации, плавные ховеры, аккуратные фокус-состояния
   ============================================================ */

/* Плавное появление карточек */
.product-card {
    animation: fadeup 0.45s var(--transition-slow) both;
}

@keyframes fadeup {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Фокус-состояния для доступности */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
}

/* Кнопки — чуть более премиальный ховер */
.btn {
    will-change: transform, background;
}

.btn-primary {
    position: relative;
    overflow: hidden;
}

.btn-primary::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 50%, rgba(255, 255, 255, 0.14) 50%);
    background-size: 250% 100%;
    background-position: 100% 0;
    transition: background-position 0.5s ease;
    pointer-events: none;
}

.btn-primary:hover::after {
    background-position: 0 0;
}

/* Панель с фильтрами — лёгкая тень и закрепление */
.sidebar-filters {
    align-self: flex-start;
    background: var(--color-bg);
}

/* Заголовки фильтров — аккуратный курсор и ховер */
.filter-title {
    transition: color var(--transition);
    cursor: pointer;
}

.filter-title:hover {
    color: var(--color-text);
}

/* Сортировка — плавный ховер */
.sort-box select {
    cursor: pointer;
    transition: border-color var(--transition);
}

.sort-box select:hover {
    border-color: var(--color-text);
}

/* Модальные окна — мягче тень */
.checkout-modal,
.product-modal,
.success-modal {
    box-shadow: var(--shadow-lift);
}

/* Строка хлебных крошек — тонкие переходы */
.breadcrumbs a {
    transition: color var(--transition);
}

.breadcrumbs a:hover {
    color: var(--color-text);
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Заголовок раздела каталога */
.catalog-header h1 {
    letter-spacing: 0.5px;
}

/* Плавность появления модалок */
.checkout-modal,
.product-modal,
.success-modal {
    animation: modalin 0.3s var(--transition-slow) both;
}

@keyframes modalin {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.97);
    }

    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* Мягкое затемнение фона модалок */
.modal-overlay {
    animation: fadein 0.25s ease both;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(2px);
}