/* ============================================================
   ТАРТАЛЕТКА — Главный стиль фронта
   Кунг-фу Панда Вебмастер approved 🐼
   ============================================================ */

/* ========== ПЕРЕМЕННЫЕ ========== */
:root {
    --primary: #d4794a;
    --primary-hover: #c0683a;
    --primary-light: #fdf0e8;
    --accent: #e8a87c;
    --bg: #fefaf6;
    --white: #ffffff;
    --text: #3d2c23;
    --text-light: #7a6458;
    --border: #e8ddd4;
    --success: #2e7d32;
    --danger: #d9534f;
    --info: #1565c0;
    --radius: 16px;
    --radius-sm: 8px;
    --shadow: 0 4px 20px rgba(61, 44, 35, 0.08);
    --shadow-hover: 0 8px 30px rgba(61, 44, 35, 0.15);
    --transition: 0.25s ease;
    --container: 1200px;
}

/* ========== СБРОС И БАЗА ========== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main { flex: 1; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 20px; }

a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-hover); }
img { max-width: 100%; height: auto; display: block; }

h1, h2, h3 { line-height: 1.3; }
h1 { font-size: 2.2rem; margin-bottom: 0.5em; }
h2 { font-size: 1.8rem; margin-bottom: 1em; }
h3 { font-size: 1.3rem; }

/* ========== КНОПКИ ========== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: 2px solid transparent;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    text-align: center;
    white-space: nowrap;
}

.btn-primary { background: var(--primary); color: var(--white); border-color: var(--primary); }
.btn-primary:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    color: var(--white);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.btn-cart { background: var(--white); color: var(--primary); border-color: var(--primary); font-size: 0.9rem; padding: 8px 20px; }
.btn-cart:hover { background: var(--primary); color: var(--white); }
.btn-lg { padding: 16px 36px; font-size: 1.1rem; }
.btn-sm { padding: 6px 14px; font-size: 0.85rem; }
.btn-danger { background: var(--danger); color: var(--white); border-color: var(--danger); }
.btn-danger:hover { background: #c9302c; color: var(--white); }
.btn-block { width: 100%; }

/* ========== HEADER ========== */
.header {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}

.header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.logo { font-size: 1.6rem; font-weight: 800; color: var(--primary); letter-spacing: -0.5px; }
.logo:hover { color: var(--primary-hover); }

.nav { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.nav a { color: var(--text); font-weight: 500; font-size: 0.95rem; position: relative; }
.nav a:hover { color: var(--primary); }

.cart-link { position: relative; }
.cart-badge {
    position: absolute;
    top: -10px;
    right: -14px;
    background: var(--primary);
    color: var(--white);
    font-size: 0.7rem;
    font-weight: 700;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    display: none; /* Скрыта по умолчанию, JS покажет */
}

/* ========== HERO ========== */
.hero {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--white) 100%);
    text-align: center;
    padding: 80px 20px;
    border-bottom: 1px solid var(--border);
}

.hero h1 { font-size: 2.8rem; color: var(--text); margin-bottom: 15px; }
.hero p {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 30px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* ========== СЕКЦИИ ========== */
section { padding: 60px 0; }
.categories, .popular, .related-products { background: var(--white); }
.promotions { background: var(--primary-light); }
.delivery, .contacts { background: var(--bg); }

/* ========== КАРТОЧКИ КАТЕГОРИЙ ========== */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.category-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all var(--transition);
    display: block;
    color: var(--text);
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    color: var(--text);
}

.category-card__image {
    height: 200px;
    overflow: hidden;
    background: var(--primary-light);
}

.category-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.category-card:hover .category-card__image img { transform: scale(1.05); }

.category-card__image--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
}

.category-card__content { padding: 20px; }
.category-card__content h3 { margin-bottom: 5px; }
.category-card__count { color: var(--text-light); font-size: 0.9rem; margin-bottom: 8px; }
.category-card__desc { color: var(--text-light); font-size: 0.9rem; }

/* ========== КАРТОЧКИ ТОВАРОВ ========== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
}

.product-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all var(--transition);
    display: flex;
    flex-direction: column;
}

.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.product-card__link { color: var(--text); display: block; }

.product-card__image {
    position: relative;
    height: 220px;
    overflow: hidden;
    background: var(--primary-light);
}

.product-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.product-card:hover .product-card__image img { transform: scale(1.05); }

.no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: 0.9rem;
}

.discount-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--danger);
    color: var(--white);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
}

.product-card__info { padding: 16px; flex: 1; }
.product-card__info h3 { font-size: 1.1rem; margin-bottom: 4px; }
.weight { color: var(--text-light); font-size: 0.85rem; margin-bottom: 8px; }

.price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.old-price { text-decoration: line-through; color: var(--text-light); font-size: 0.9rem; }
.current-price { font-weight: 700; font-size: 1.2rem; color: var(--primary); }

.product-card__actions { padding: 0 16px 16px; }
.product-card__actions .btn { width: 100%; }

/* ========== КАТАЛОГ (LAYOUT) ========== */
.catalog-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 30px;
    padding-top: 30px;
    padding-bottom: 60px;
}

.catalog-sidebar {
    background: var(--white);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    height: fit-content;
    position: sticky;
    top: 100px;
}

.catalog-sidebar h3 { margin-bottom: 15px; }
.sidebar-categories { list-style: none; }
.sidebar-categories li { margin-bottom: 4px; }

.sidebar-categories a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    color: var(--text);
    transition: all var(--transition);
}

.sidebar-categories a:hover,
.sidebar-categories a.active {
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 600;
}

.sidebar-categories .count {
    background: var(--border);
    color: var(--text-light);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
}

/* ========== ХЛЕБНЫЕ КРОШКИ ========== */
.breadcrumbs { margin-bottom: 20px; font-size: 0.9rem; color: var(--text-light); }
.breadcrumbs a { color: var(--text-light); }
.breadcrumbs a:hover { color: var(--primary); }

/* ========== КАРТОЧКА ТОВАРА ========== */
.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding: 30px 0 60px;
}

.product-gallery { position: sticky; top: 100px; }

.gallery-main {
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--primary-light);
    margin-bottom: 15px;
    aspect-ratio: 1 / 1;
}

.gallery-main__img { width: 100%; height: 100%; object-fit: cover; }

.no-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: 1.1rem;
    min-height: 400px;
}

.gallery-thumbs { display: flex; gap: 10px; flex-wrap: wrap; }

.gallery-thumb {
    width: 70px;
    height: 70px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color var(--transition);
    opacity: 0.7;
}

.gallery-thumb.active { border-color: var(--primary); opacity: 1; }
.gallery-thumb:hover { opacity: 1; }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }

.product-info h1 { margin-bottom: 10px; }
.product-meta { display: flex; gap: 15px; color: var(--text-light); font-size: 0.9rem; margin-bottom: 20px; }
.product-price { margin-bottom: 25px; }
.product-price .old-price { font-size: 1.1rem; }
.product-price .current-price { font-size: 2rem; }

.product-actions {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.quantity-selector {
    display: flex;
    align-items: center;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.qty-btn {
    width: 40px;
    height: 44px;
    border: none;
    background: var(--bg);
    cursor: pointer;
    font-size: 1.3rem;
    color: var(--text);
    transition: background var(--transition);
}

.qty-btn:hover { background: var(--border); }

.quantity-selector input {
    width: 50px;
    text-align: center;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    -moz-appearance: textfield;
}

.quantity-selector input::-webkit-outer-spin-button,
.quantity-selector input::-webkit-inner-spin-button { -webkit-appearance: none; }

.product-description,
.product-composition,
.product-delivery-info {
    margin-bottom: 25px;
    padding: 20px;
    background: var(--bg);
    border-radius: var(--radius-sm);
}

.product-description h3,
.product-composition h3,
.product-delivery-info h3 { margin-bottom: 10px; font-size: 1.1rem; }

/* ========== АКЦИИ ========== */
.promotions-slider {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.promo-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.promo-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    margin-bottom: 15px;
}

.promo-card .discount-badge {
    position: absolute;
    top: 36px;
    left: 36px;
    font-size: 1rem;
    padding: 6px 14px;
}

/* ========== КОРЗИНА ========== */
.cart-table {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-bottom: 30px;
}

.cart-row {
    display: grid;
    grid-template-columns: 80px 2fr 1fr 1fr 40px;
    align-items: center;
    gap: 20px;
    padding: 20px;
    border-bottom: 1px solid var(--border);
}

.cart-row:last-child { border-bottom: none; }
.cart-row img { border-radius: var(--radius-sm); }

.cart-row .quantity-controls {
    display: flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    width: fit-content;
}

.cart-row .qty-input { width: 40px; text-align: center; border: none; font-weight: 600; }

.item-price { font-weight: 700; color: var(--primary); }

.remove-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--text-light);
    cursor: pointer;
    transition: color var(--transition);
}

.remove-btn:hover { color: var(--danger); }

.cart-summary {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 30px;
    text-align: right;
}

.cart-summary p { margin-bottom: 10px; font-size: 1.1rem; }
.delivery-hint { color: var(--text-light); font-size: 0.95rem; }
.free-delivery { color: var(--success); font-weight: 600; }

.empty-cart {
    text-align: center;
    padding: 80px 20px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.empty-cart p { font-size: 1.3rem; margin-bottom: 20px; color: var(--text-light); }

/* ========== ОФОРМЛЕНИЕ ========== */
.checkout-form {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 30px;
    max-width: 700px;
}

.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-weight: 600; margin-bottom: 6px; }

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-family: inherit;
    transition: border-color var(--transition);
    background: var(--bg);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
}

.payment-methods { margin-bottom: 20px; }

.payment-methods label {
    display: block;
    padding: 12px;
    margin-bottom: 8px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition);
}

.payment-methods label:hover { border-color: var(--accent); }
.payment-methods input[type="radio"] { width: auto; margin-right: 10px; }

.requisites-info {
    background: var(--primary-light);
    padding: 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
}

.requisite-item {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border);
}

.requisite-item:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }

.order-summary { background: var(--bg); padding: 20px; border-radius: var(--radius-sm); margin: 20px 0; }
.order-summary p { margin-bottom: 8px; font-size: 1.1rem; }

.errors {
    background: #fff0f0;
    border: 1px solid #ffcccc;
    color: var(--danger);
    padding: 15px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
}

.errors p { margin-bottom: 5px; }

/* ========== ФУТЕР ========== */
.footer {
    background: var(--text);
    color: #d4c8bf;
    margin-top: auto;
}

.footer__inner {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 30px;
    padding: 50px 20px 30px;
}

.footer__col h3 { color: var(--white); font-size: 1.3rem; margin-bottom: 12px; }
.footer__col h4 { color: var(--white); font-size: 1rem; margin-bottom: 12px; font-weight: 600; }
.footer__col p { font-size: 0.9rem; line-height: 1.7; margin-bottom: 8px; }
.footer__col ul { list-style: none; }
.footer__col ul li { margin-bottom: 8px; }

.footer__col ul li a {
    color: #d4c8bf;
    font-size: 0.9rem;
    transition: color var(--transition);
}

.footer__col ul li a:hover { color: var(--accent); }
.footer__col a { color: var(--accent); }

.footer__bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 20px;
    text-align: center;
    font-size: 0.85rem;
    color: #a8988c;
}

.footer__bottom p { margin-bottom: 4px; }

/* ========== АВТОРИЗАЦИЯ ========== */
.auth-page {
    max-width: 500px;
    margin: 40px auto;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 40px;
}

.auth-page h1 { text-align: center; margin-bottom: 5px; }
.auth-page > p { text-align: center; margin-bottom: 25px; color: var(--text-light); }

.auth-form { margin-top: 10px; }
.auth-form .btn { margin-top: 10px; }

/* ========== ПРОФИЛЬ ========== */
.profile-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin: 30px 0;
}

.profile-section {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 30px;
}

.profile-section h2 { font-size: 1.3rem; margin-bottom: 20px; }

/* ========== МИНИ-СПИСОК ЗАКАЗОВ В ПРОФИЛЕ ========== */
.empty-state-sm {
    text-align: center;
    padding: 30px 0;
    color: var(--text-light);
}

.empty-state-sm p { margin-bottom: 15px; }

.orders-mini-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.order-mini-card {
    display: block;
    background: var(--bg);
    border-radius: var(--radius-sm);
    padding: 15px;
    color: var(--text);
    transition: all var(--transition);
    border: 2px solid transparent;
}

.order-mini-card:hover {
    border-color: var(--primary);
    color: var(--text);
}

.order-mini__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.order-mini__number { font-weight: 600; }
.order-mini__info { display: flex; justify-content: space-between; font-size: 0.9rem; color: var(--text-light); }

/* ========== ПОЛНЫЙ СПИСОК ЗАКАЗОВ ========== */
.orders-full-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 30px 0;
}

.order-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.order-card__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
    gap: 10px;
}

.order-date { color: var(--text-light); font-size: 0.85rem; margin-left: 10px; }

.order-card__body {
    padding: 16px 20px;
    font-size: 0.95rem;
    color: var(--text-light);
}

.order-card__footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
    gap: 10px;
}

.order-total { font-weight: 700; font-size: 1.1rem; color: var(--primary); }
.order-payment { font-size: 0.85rem; color: var(--text-light); margin-left: 10px; }

/* ========== СТАТУС БОЛЬШОЙ ========== */
.order-status-big { margin: 15px 0; }
.status-badge--lg { font-size: 1rem; padding: 8px 20px; }

/* ========== АЛЕРТЫ ========== */
.alert {
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    font-weight: 500;
}

.alert-success {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

small {
    display: block;
    color: var(--text-light);
    font-size: 0.8rem;
    margin-top: 4px;
}

/* Адаптив профиля */
@media (max-width: 768px) {
    .profile-layout {
        grid-template-columns: 1fr;
    }
    
    .auth-page {
        padding: 25px;
        margin: 20px;
    }
}

/* ========== МИНИ-КОРЗИНА (МОДАЛКА) ========== */
.cart-modal {
    position: fixed;
    inset: 0;
    z-index: 200;
}

.cart-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
}

.cart-modal__content {
    position: absolute;
    top: 0;
    right: 0;
    width: 400px;
    max-width: 90vw;
    height: 100vh;
    background: var(--white);
    display: flex;
    flex-direction: column;
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

.cart-modal__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border);
}

.cart-modal__close {
    background: none;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    color: var(--text-light);
    padding: 5px;
}

.cart-modal__close:hover { color: var(--text); }
.cart-modal__body { flex: 1; overflow-y: auto; padding: 20px; }
.cart-modal__footer { padding: 20px; border-top: 1px solid var(--border); }

/* Контент мини-корзины */
.mini-cart-empty { text-align: center; padding: 30px 0; }
.mini-cart-empty p { font-size: 1.1rem; color: var(--text-light); margin-bottom: 15px; }
.mini-cart-items { display: flex; flex-direction: column; gap: 12px; }

.mini-cart-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: var(--radius-sm);
    background: var(--bg);
    position: relative;
}

.mini-cart-item__img { width: 50px; height: 50px; object-fit: cover; border-radius: 6px; }
.mini-cart-item__info { flex: 1; min-width: 0; }

.mini-cart-item__name {
    font-weight: 600;
    font-size: 0.9rem;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mini-cart-item__price { font-size: 0.85rem; color: var(--primary); font-weight: 600; }

.mini-cart-item__remove {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    font-size: 1.1rem;
    padding: 5px;
    transition: color var(--transition);
    flex-shrink: 0;
}

.mini-cart-item__remove:hover { color: var(--danger); }

.mini-cart-total {
    padding-top: 15px;
    margin-top: 15px;
    border-top: 2px solid var(--border);
    display: flex;
    justify-content: space-between;
    font-size: 1.1rem;
}

/* ========== УВЕДОМЛЕНИЯ (единый стиль) ========== */
.notification {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--text);
    color: var(--white);
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
    z-index: 300;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    max-width: 400px;
    transform: translateX(120%);
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.notification--visible { transform: translateX(0); }
.notification--success { background: var(--success); }
.notification--error { background: var(--danger); }
.notification--info { background: var(--info); }

.notification__icon { font-size: 1.2rem; flex-shrink: 0; }
.notification__text { font-size: 0.95rem; }

/* ========== ЛЕТЯЩИЙ ТОВАР ========== */
.flying-item { pointer-events: none; z-index: 1000; }

/* ============================================================
   АДАПТИВ (всё в одном месте)
   ============================================================ */
@media (max-width: 768px) {
    .header__inner { flex-direction: column; text-align: center; }
    .nav { justify-content: center; gap: 15px; }
    .hero h1 { font-size: 2rem; }
    .product-detail { grid-template-columns: 1fr; }
    .product-gallery { position: static; }
    .catalog-layout { grid-template-columns: 1fr; }
    .catalog-sidebar { position: static; }
    
    .cart-row {
        grid-template-columns: 60px 1fr;
        gap: 10px;
    }
    
    .cart-row > *:nth-child(3),
    .cart-row > *:nth-child(4) {
        grid-column: span 1;
    }
    
    .footer__inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
    .products-grid { grid-template-columns: 1fr; }
    .categories-grid { grid-template-columns: 1fr; }
    .product-actions { flex-direction: column; }
    .checkout-form { padding: 15px; }
    .footer__inner { grid-template-columns: 1fr; }
    
    .notification {
        left: 15px;
        right: 15px;
        bottom: 15px;
        max-width: none;
    }
    
    .cart-modal__content {
        width: 100vw;
        max-width: 100vw;
    }
    
    .hero { padding: 50px 15px; }
    .hero h1 { font-size: 1.8rem; }
    section { padding: 40px 0; }
}