/* ==========================================================================
   1. ДИЗАЙН-СИСТЕМА И БАЗОВЫЕ СТИЛИ
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700;900&display=swap');

:root {
    --color-primary: #ff2a00;
    --color-primary-hover: #e02500;
    --color-text: #1d1d1f;
    --color-text-muted: #86868b;
    --color-bg: #f5f5f7;
    --color-white: #ffffff;
    --color-border: #e8e8ed;
    --font-family: 'Inter', -apple-system, sans-serif;
    --border-radius: 16px;
    --transition: cubic-bezier(0.4, 0, 0.2, 1) 0.2s;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    outline: none;
}

html {
    scroll-behavior: smooth;
    /* Включает безупречно плавную прокрутку к якорям */
}

body {
    font-family: var(--font-family);
    background-color: var(--color-white);
    color: var(--color-text);
    -webkit-font-smoothing: antialiased;
    line-height: 1.5;
}

.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Кнопки */
.btn {
    padding: 12px 24px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}

.btn-primary {
    background: var(--color-primary);
    color: var(--color-white);
}

.btn-primary:hover {
    background: var(--color-primary-hover);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--color-border);
    color: var(--color-text);
}

.btn-outline:hover {
    border-color: var(--color-text);
}

/* ==========================================================================
   2. ШАПКА САЙТА (YOKAI STYLE - FLEXBOX СИНХРОНИЗАЦИЯ)
   ========================================================================== */
.main-header {
    background: var(--color-white);
    padding: 16px 0;
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 100;
    height: 115px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
    /* Легкая тень, чтобы шапка "парила" над товарами */
}

/* Идеальный Flexbox-баланс для центровки */
.header-grid {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.header-left {
    flex: 1;
    /* Левая часть тянется, прижимая центр */
    display: flex;
}

.header-center {
    flex: initial;
    /* Центр занимает ровно столько, сколько нужно */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.header-logo {
    height: 42px;
    width: auto;
    display: block;
    object-fit: contain;
}

.logo-text {
    font-size: 1.8rem;
    font-weight: 900;
    letter-spacing: -1px;
    color: var(--color-text);
    text-decoration: none;
    line-height: 1;
}

.header-info-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.info-pill {
    background: var(--color-bg);
    padding: 6px 14px;
    border-radius: 40px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-text);
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    /* Убираем подчеркивание для ссылок-плашек */
    transition: var(--transition);
}

/* Эффект наведения на кликабельные плашки */
a.info-pill:hover {
    background: var(--color-border);
    transform: translateY(-1px);
}

.status-pill {
    color: #1d1d1f;
}

.status-pill .dot {
    width: 6px;
    height: 6px;
    background: #34c759;
    border-radius: 50%;
    display: inline-block;
    animation: blink 2s infinite;
}

@keyframes blink {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }

    100% {
        opacity: 1;
    }
}

.header-right {
    flex: 1;
    /* Правая часть тоже тянется, балансируя левую */
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.btn-header-action {
    background: var(--color-bg);
    border: none;
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-text);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    transition: var(--transition);
}

.btn-header-action:hover {
    background: var(--color-border);
}

.btn-header-cart {
    background: #fff0ed;
    color: var(--color-primary);
}

.btn-header-cart:hover {
    background: #ffdcd6;
}

.header-svg-icon {
    width: 16px;
    height: 16px;
    display: block;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.cart-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--color-primary);
    color: white;
    font-size: 0.7rem;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(255, 42, 0, 0.2);
}

/* --- ИДЕАЛЬНОЕ ПРИЛИПАНИЕ КАТЕГОРИЙ --- */
.categories-nav {
    display: flex;
    overflow-x: auto;
    gap: 10px;
    padding: 12px 0;
    margin-top: 10px;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 115px;
    /* Прилипает под десктопную шапку */
    background: var(--color-white);
    z-index: 90;
    box-shadow: 0 10px 10px -10px rgba(0, 0, 0, 0.03);
    -webkit-overflow-scrolling: touch;
}

.categories-nav::-webkit-scrollbar {
    display: none;
}

.cat-link {
    text-decoration: none;
    color: var(--color-text-muted);
    font-weight: 600;
    font-size: 0.9rem;
    padding: 8px 16px;
    border-radius: 20px;
    transition: var(--transition);
    align-content: center;
}

.cat-link:hover,
.cat-link.active {
    color: var(--color-primary);
    background: #fff0ed;
}

/* ==========================================================================
      3. КАТАЛОГ: КАРТОЧКИ ТОВАРОВ
      ========================================================================== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    /* Ровно 4 колонки во весь ряд на десктопе! */
    gap: 24px;
    /* Компактный зазор между карточками */
    margin-bottom: 50px;
}

.product-card {
    background: var(--color-white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    display: flex;
    flex-direction: column;
    border: 1px solid var(--color-border);
    
    /* АППАРАТНОЕ УСКОРЕНИЕ (GPU ACCELERATION) */
    transform: translate3d(0, 0, 0); /* Переносит рендеринг на видеокарту устройства */
    will-change: transform; /* Заранее готовит GPU к плавной анимации скролла */
}

.product-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.product-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-name {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.product-name a {
    text-decoration: none;
    color: var(--color-text);
    transition: var(--transition);
}

.product-name a:hover {
    color: var(--color-primary);
}

.product-desc {
    color: var(--color-text-muted);
    font-size: 0.85rem;
    margin-bottom: 15px;
    flex-grow: 1;
}

.product-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.product-price {
    font-size: 1.25rem;
    font-weight: 800;
}

.product-kbju {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-bottom: 10px;
    background: var(--color-bg);
    padding: 6px 12px;
    border-radius: 8px;
    display: inline-block;
}

.kbju-details {
    font-size: 0.75rem;
    margin-top: 2px;
}

.ingredients-text {
    font-size: 0.85rem;
    color: var(--color-text);
    margin-top: 5px;
}

/* ==========================================================================
      4. ЛЕЙБЛЫ (МЕТКИ) НА ФОТО ТОВАРА
      ========================================================================== */
.product-labels {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    z-index: 2;
}

.label-badge {
    color: #fff;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* ==========================================================================
      5. СОСТАВ СЕТОВ И ВСПЛЫВАЮЩИЕ ПОДСКАЗКИ (TOOLTIPS)
      ========================================================================== */
.set-composition {
    font-size: 0.85rem;
    margin-top: 5px;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.set-composition strong {
    width: 100%;
    margin-bottom: 2px;
}

.set-item-tooltip {
    position: relative;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    padding: 2px 8px;
    border-radius: 6px;
    cursor: help;
    display: inline-block;
}

.set-item-tooltip:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.tooltip-text {
    visibility: hidden;
    background-color: #1d1d1f;
    color: #fff;
    text-align: center;
    border-radius: 8px;
    padding: 8px 12px;
    position: absolute;
    z-index: 10;
    bottom: 125%;
    left: 50%;
    margin-left: -100px;
    width: 200px;
    font-size: 0.8rem;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #1d1d1f transparent transparent transparent;
}

.set-item-tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* ==========================================================================
      6. ГЕРОЙ-СЕКЦИЯ, ПРОМО И ПРИЛОЖЕНИЯ
      ========================================================================== */
.hero-slider {
    margin-top: 30px;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.promo-blocks {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 30px 0;
}

.promo-box {
    padding: 35px;
    border-radius: var(--border-radius);
    color: var(--color-white);
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 160px;
}

.promo-red {
    background: #ff2a00;
}

.promo-black {
    background: #111111;
}

.promo-subtitle {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.9;
    margin-bottom: 8px;
}

.promo-title {
    font-size: 1.6rem;
    font-weight: 900;
    line-height: 1.2;
}

.app-links-block {
    background: var(--color-bg);
    padding: 30px 40px;
    border-radius: var(--border-radius);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 50px;
}

.app-text h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.app-text p {
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.app-buttons {
    display: flex;
    gap: 12px;
    align-items: center;
}

.app-btn img {
    height: 38px;
    display: block;
    object-fit: contain;
}

.app-links-block {
    background: var(--color-bg);
    padding: 30px 40px;
    border-radius: var(--border-radius);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 50px;
}

.app-text h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.app-text p {
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.app-buttons {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* Наша новая белая капсула-рамка */
.app-btn-capsule {
    background: #ffffff;
    border: 1px solid #e1e1e8;
    border-radius: 12px;
    /* Идеальное закругление углов */
    padding: 6px 14px;
    height: 44px;
    /* Фиксированная высота капсулы */
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: var(--transition);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
}

.app-btn-capsule:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.app-btn-capsule img {
    height: 24px;
    /* Идеальная высота картинок внутри капсулы */
    width: auto;
    display: block;
    object-fit: contain;
}

/* ==========================================================================
      7. МОДАЛЬНЫЕ ОКНА И КОРЗИНА
      ========================================================================== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: var(--color-white);
    width: 90%;
    max-width: 600px;
    border-radius: var(--border-radius);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.modal-header,
.modal-footer {
    padding: 20px;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-footer {
    border-bottom: none;
    border-top: 1px solid var(--color-border);
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--color-text-muted);
}

.close-modal:hover {
    color: var(--color-text);
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
}

.cart-item,
.addon-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px dashed var(--color-border);
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.qty-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--color-primary);
    background: var(--color-white);
    color: var(--color-primary);
    cursor: pointer;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.qty-btn:hover {
    background: var(--color-primary);
    color: white;
}

.qty-val {
    width: 24px;
    text-align: center;
    font-weight: 600;
}

.cart-addons {
    margin-top: 20px;
    background: var(--color-bg);
    padding: 20px;
    border-radius: var(--border-radius);
}

.addon-info small {
    display: block;
    color: var(--color-text-muted);
    font-size: 0.8rem;
}

.free {
    color: #28a745;
    font-weight: bold;
    font-size: 0.9rem;
}

.paid {
    color: var(--color-primary);
    font-weight: bold;
    font-size: 0.9rem;
}

.cart-grand-total {
    font-size: 1.4rem;
    font-weight: 800;
}

.input-field {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    font-size: 1rem;
    margin-top: 10px;
}

/* ==========================================================================
      8. СТРАНИЦА ОДНОГО ТОВАРА (SINGLE PRODUCT PAGE)
      ========================================================================== */
.breadcrumbs a {
    color: var(--color-text-muted);
    text-decoration: none;
    font-weight: 600;
}

.single-product-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
    margin-top: 20px;
}

.sp-image-wrapper {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--color-border);
}

.sp-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.sp-title {
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 20px;
    letter-spacing: -1px;
}

.sp-kbju-box {
    background: var(--color-bg);
    padding: 20px;
    border-radius: var(--border-radius);
    margin-bottom: 25px;
}

.sp-weight {
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: 10px;
}

.sp-kbju-items {
    display: flex;
    gap: 20px;
    font-size: 0.9rem;
    color: var(--color-text-muted);
    font-weight: 600;
}

.sp-price-row {
    display: flex;
    align-items: center;
    gap: 25px;
    margin-bottom: 30px;
    padding-bottom: 25px;
    border-bottom: 1px solid var(--color-border);
}

.sp-price {
    font-size: 2.2rem;
    font-weight: 900;
}

.sp-btn {
    font-size: 1.05rem;
    padding: 16px 32px;
}

.sp-desc {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 25px;
}

.sp-ingredients h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.sp-price-row .product-price {
    display: none !important;
}

/* Фиксируем растягивание кнопки внутри правого контейнера */
.sp-price-row .add-to-cart {
    width: 100% !important;
}

/* ==========================================================================
      9. АДАПТИВНОСТЬ И СТРЕЛОЧКИ СЛАЙДЕРА
      ========================================================================== */
.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.8);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    z-index: 5;
}

.slider-arrow:hover {
    background: var(--color-primary);
    color: white;
}

.arrow-left {
    left: 15px;
}

.arrow-right {
    right: 15px;
}

.hero-slider .slide {
    transition: opacity 0.5s ease-in-out;
}

.status-pill-closed {
    color: #dc3545;
    border-color: #f8d7da;
    background: #fff8f8;
}

.status-pill-closed .dot {
    width: 6px;
    height: 6px;
    background: #dc3545;
    border-radius: 50%;
    display: inline-block;
    animation: blink 2s infinite;
}

/* Footer Yokai */
.footer-top-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    align-items: center;
    padding-bottom: 25px;
    border-bottom: 1px solid var(--color-border);
}

.f-title {
    display: block;
    font-size: 0.8rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.f-phone {
    font-size: 1.4rem;
    font-weight: 900;
    color: var(--color-text);
}

.f-social-icon {
    display: inline-block;
    transition: var(--transition);
}

.f-social-icon:hover {
    transform: translateY(-2px);
    /* Эффект парения */
    opacity: 0.8;
}

.footer-svg-social {
    transition: var(--transition);
}

.f-link {
    text-decoration: none;
    color: var(--color-text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    transition: var(--transition);
}

.f-link:hover {
    color: var(--color-primary);
}

/* ==========================================================================
   8. ЛИЧНЫЙ КАБИНЕТ (PROFILE PAGE - IOS STYLE CONTRAST)
   ========================================================================== */
.profile-page-bg {
    /* background-color: var(--color-bg); */
    /* Красивый серый фон для контраста */
    padding: 40px 0;
    min-height: 80vh;
}

.profile-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
    align-items: start;
}

.profile-card {
    background: var(--color-white);
    padding: 30px 20px;
    border-radius: var(--border-radius);
    border: 1px solid var(--color-border);
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
}

.avatar-circle {
    width: 80px;
    height: 80px;
    background: var(--color-bg);
    border-radius: 50%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
}

.points-badge-big {
    background: #f8fff9;
    border: 1px solid #d4edda;
    padding: 15px;
    border-radius: 12px;
    margin-top: 25px;
}

/* Карточки заказов */
.profile-order-card {
    background: var(--color-white);
    border-radius: var(--border-radius);
    border: 1px solid var(--color-border);
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
}

.po-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 12px;
    margin-bottom: 12px;
}

.p-status {
    font-size: 0.8rem;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 20px;
}

.po-items {
    margin-bottom: 15px;
}

.po-item-row {
    display: flex;
    justify-content: space-between;
    /* Жестко разводит имя ролла и цену по бокам */
    align-items: center;
    font-size: 0.95rem;
    padding: 8px 0;
    border-bottom: 1px dashed #f0f0f5;
}

.po-item-row:last-child {
    border-bottom: none;
}

.poi-name {
    font-weight: 600;
    color: var(--color-text);
}

.poi-price {
    font-weight: 700;
    color: var(--color-text);
}

.po-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    border-top: 1px solid var(--color-border);
    padding-top: 15px;
    margin-top: 5px;
}

/* Мобильная адаптация */
/* ==========================================================================
   9. АДАПТИВНОСТЬ И МОБИЛЬНЫЕ СТИЛИ (PIXEL PERFECT - FINAL OVERHAUL)
   ========================================================================== */
   @media (max-width: 768px) {
    .main-header {
        height: 72px; /* Фиксируем компактную высоту на мобилке */
        padding: 12px 0;
    }
    .header-grid {
        grid-template-columns: 1fr auto;
        gap: 15px;
    }
    .header-left, .header-info-row { 
        display: none !important; 
    }
    .header-center {
        align-items: flex-start;
    }
    .btn-text {
        display: none; /* Скрываем текст кнопок войти и корзина, оставляя только SVG-иконки */
    }
    .btn-header-action {
        width: 40px;
        height: 40px;
        padding: 0;
        justify-content: center;
        border-radius: 50% !important; /* На мобилке кнопки становятся круглыми */
    }
    .cart-badge {
        position: absolute;
        top: -4px;
        right: -4px;
        margin-left: 0;
    }

    /* --- КОМПАКТНЫЕ ПРИЛИПАЮЩИЕ КАТЕГОРИИ НА МОБИЛКЕ (УЛЬТРА-ТОНКАЯ ЛЕНТА) --- */
    .categories-nav {
        top: 71px; /* Прилипает под мобильную шапку */
        margin-top: 5px;
        margin-bottom: 20px;
        padding: 8px 0 !important; /* Сжали высоту контейнера до минимума */
        transform: translate3d(0, 0, 0);
        will-change: transform;
    }
    .cat-link {
        font-size: 0.8rem !important; /* Сжали шрифт плашек */
        padding: 6px 12px !important; /* Сжали отступы плашек */
    }

    .footer-top-grid { grid-template-columns: 1fr; text-align: center; gap: 20px; }
    .footer-col { text-align: center !important; }
    .f-socials { justify-content: center !important; }
    .footer-bottom-grid { grid-template-columns: 1fr !important; text-align: center !important; gap: 20px; }
    .fb-col { text-align: center !important; }
    .promo-blocks { grid-template-columns: 1fr; }
    .app-links-block { flex-direction: column; text-align: center; padding: 30px 20px; }
    .app-buttons { margin-top: 15px; }
    .single-product-grid { grid-template-columns: 1fr; gap: 20px; }
    .sp-title { font-size: 1.8rem; }
    .sp-kbju-items { flex-wrap: wrap; gap: 10px; }

    /* --- МОБИЛЬНЫЙ РЕДИЗАЙН КАТАЛОГА (ДВЕ КОЛОНКИ PIXEL PERFECT) --- */
    .products-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
        margin-bottom: 30px;
    }
    .product-card {
        border-radius: 12px;
    }
    .product-image {
        height: 135px;
    }
    .product-info {
        padding: 10px !important;
    }
    .product-name {
        font-size: 0.9rem !important;
        margin-bottom: 4px !important;
        font-weight: 700;
    }
    .product-kbju {
        padding: 4px 8px !important;
        font-size: 0.68rem !important;
        margin-bottom: 6px !important;
        border-radius: 6px;
    }
    .ingredients-text {
        font-size: 0.72rem !important;
        margin-bottom: 10px !important;
        line-height: 1.3 !important;
    }
    .product-price {
        font-size: 1.05rem !important;
        font-weight: 800;
    }
    .product-info .btn-primary {
        padding: 8px 14px !important;
        font-size: 0.8rem !important;
        border-radius: 20px;
    }

    .catalog-qty-pill {
        height: 34px !important;
        padding: 0 4px !important;
    }
    .qty-pill-btn {
        width: 26px !important;
        height: 26px !important;
        font-size: 0.85rem !important;
    }
    .qty-pill-price {
        font-size: 0.75rem !important;
        white-space: nowrap !important;
    }

    /* --- МОБИЛЬНЫЙ РЕДИЗАЙН СТРАНИЦЫ ТОВАРА (ФИКС СТОПКИ И ЦЕНЫ) --- */
    .sp-price-row {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 15px !important;
        padding-bottom: 20px;
        border-bottom: 1px solid var(--color-border);
    }
    .sp-price-row .sp-price {
        text-align: center !important;
        font-size: 2.2rem !important;
        white-space: nowrap !important;
    }
    .sp-price-row .product-card {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
    }
    .sp-price-row .product-bottom {
        max-width: 100% !important;
    }
    .sp-price-row .catalog-qty-pill {
        height: 46px !important;
        padding: 0 10px !important;
    }
    .sp-price-row .qty-pill-price {
        font-size: 0.95rem !important;
        white-space: nowrap !important;
    }

    /* Стек для кнопок в футере корзины */
    .modal-footer {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;
        padding: 15px;
    }
    .modal-footer .btn {
        width: 100% !important;
        margin-left: 0 !important;
        padding: 12px !important;
    }

    /* Мобильный редизайн содержимого корзины */
    .cart-item, .addon-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        position: relative;
        padding: 15px 0;
    }
    .item-info, .addon-info {
        max-width: 100%;
        margin-bottom: 5px;
    }
    .cart-item .quantity-controls, .addon-item .quantity-controls {
        width: auto;
        justify-content: flex-start;
    }
    .item-sum, .addon-sum {
        position: absolute;
        bottom: 15px;
        right: 0;
        font-weight: 700;
        font-size: 1.05rem;
    }
    .cart-grand-total {
        font-size: 1.2rem;
        white-space: nowrap;
    }
    #cartStep1 div[style*="display: flex; gap: 10px;"] {
        flex-direction: column;
        gap: 8px !important;
        background: var(--color-bg);
        padding: 10px;
        border-radius: var(--border-radius);
    }
    #promoInput {
        width: 100% !important;
        margin-top: 0 !important;
    }
    #applyPromoBtn {
        width: 100% !important;
        padding: 10px !important;
    }
    .input-field {
        padding: 10px;
    }

    /* --- ПОЛНАЯ АДАПТАЦИЯ ЛИЧНОГО КАБИНЕТА ПОД МОБИЛЬНЫЕ (YOKAI IOS STYLE) --- */
    .profile-page-bg {
        padding: 20px 0; /* Меньше отступы по краям */
    }
    .profile-layout {
        grid-template-columns: 1fr !important; /* Складываем сайдбар и контент в стек */
        gap: 20px !important;
    }
    .profile-card {
        padding: 20px 15px;
    }
    .profile-order-card {
        padding: 15px !important; /* Меньше паддинг, чтобы текст не зажимался */
    }
    
    /* Шапка заказа: складываем номер и цветной статус в стек */
    .po-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    .po-header div:last-child {
        width: 100%;
    }
    .p-status {
        display: inline-block;
        text-align: center;
        width: 100%; /* Статус растягивается на всю ширину для аккуратности */
    }

    /* Подвал заказа: складываем баллы, сумму и кнопку отслеживания в стопку */
    .po-footer {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 12px !important;
    }
    .po-footer div {
        text-align: center !important; /* Центрируем тексты баллов и сумму */
    }
    .po-footer div:last-child {
        display: flex;
        flex-direction: column;
        gap: 10px;
        align-items: stretch !important;
    }
    .po-footer .btn {
        width: 100% !important; /* Кнопки Отследить и Оплатить на 100% ширины */
        padding: 12px !important;
    }
}

/* Оверлей количества на фото товара (YOKAI STYLE) */
.product-cart-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    /* Полупрозрачный темный фон */
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 3;
    pointer-events: none;
    /* Пропускаем клики сквозь оверлей на ссылку товара */
}

.product-cart-overlay span {
    color: var(--color-white);
    font-size: 3rem;
    font-weight: 900;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

/* Красная капсула управления на витрине (YOKAI STYLE) */
.catalog-qty-pill {
    background: var(--color-primary);
    width: 100%;
    border-radius: 30px;
    height: 44px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 6px;
    box-shadow: 0 4px 15px rgba(255, 42, 0, 0.2);
}

.qty-pill-btn {
    background: transparent;
    border: none;
    color: white;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.qty-pill-btn:hover {
    transform: scale(1.2);
}

.qty-pill-price {
    color: white;
    font-weight: 800;
    font-size: 1rem;
    user-select: none;
}

@media (max-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr); /* 3 колонки на средних экранах */
    }
}
@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr) !important; /* 2 колонки на смартфонах */
        gap: 15px !important;
    }
}
@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr) !important; /* 2 колонки на смартфонах */
    }
}