/* ======================================================
   БАЗА
====================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    background: #fff;
    color: #1f2937;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Контейнер */
.container {

    margin: 0 auto;
    padding-left: 1rem;
    padding-right: 1rem;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    width: 100%;
}





@media (min-width: 640px) {
    .container { max-width: 640px; }
}

@media (min-width: 768px) {
    .container { max-width: 768px; }
}

@media (min-width: 1024px) {
    .container { max-width: 1024px; }
}
@media (min-width: 1280px) {
    .container { max-width: 1280px; }
}

@media (min-width: 1536px) {
    .container { max-width: 1536px; }
}
/* Flex */
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }

/* Typography */
h1 { font-size: 2rem; font-weight: 700; }
h2 { font-size: 1.25rem; font-weight: 700; }
h3 { font-size: 1.125rem; font-weight: 600; }

.text-sm { font-size: 0.875rem; }
.text-base { font-size: 1rem; }

.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }

.text-primary { color: #AC1414; }
.text-gray { color: #6b7280; }

/* ======================================================
   HEADER
====================================================== */

header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 50;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(6px);
    border-bottom: 1px solid #e5e7eb;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.header-inner.hidden {
    display: none;
}
.logo {
    /*font-family: 'Pacifico', cursive;*/
    font-family: 'Aptos', cursive;
    font-size: 1.5rem;
    font-weight: 700;
    color: #AC1414;
}

@media (min-width: 768px) {
    .logo { font-size: 1.875rem; }
}

/* Навигация */
.header-nav {
    display: none;
    gap: 32px;
}

.header-nav a {
    font-size: 0.875rem;
    color: #374151;
    transition: color .2s;
}

.header-nav a:hover {
    color: #AC1414;
}

@media (min-width: 768px) {
    .header-nav {
        display: flex;
    }
    .header-nav a {
        font-size: 1rem;
    }
}

/* Кнопки справа */
.header-user {
    display: flex;
    align-items: center;
    gap: 16px;
}
.header-button
{
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #374151;
    font-family: 'Montserrat', sans-serif;

    font-size: 1.25rem;
    line-height: 1.75rem;
}

@media (min-width: 768px) {
    .header-user button {
        font-size: 1rem;
    }
}

/* Корзина — счетчик */
.cart-btn {
    position: relative;
}

.cart-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 20px;
    height: 20px;
    background: #AC1414;
    color: #fff;
    font-size: 0.625rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-text,
.cart-text {
    display: none;
}

@media (min-width: 768px) {
    .login-text,
    .cart-text {
        display: inline;
    }
}

/* Бургер */
.mobile-menu-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.6rem;
}

@media (min-width: 768px) {
    .mobile-menu-btn { display: none; }
}

/* Мобильное меню */
.mobile-menu {
    display: none;
    background: #fff;
    border-top: 1px solid #e5e7eb;
    padding: 16px;
}

.mobile-menu.show {
    display: block;
}

.mobile-menu nav {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.mobile-menu a {
    font-size: 1rem;
    color: #374151;
}

.mobile-menu a:hover {
    color: #AC1414;
}

/* Основной отступ под фиксированный header */
.main {
    padding-top: 2rem;
}

/* ======================================================
   СЕТКА
====================================================== */

.grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

@media (min-width: 768px) {
    .grid { grid-template-columns: repeat(2,1fr); gap: 32px; }
}

@media (min-width: 1024px) {
    .grid { grid-template-columns: repeat(3,1fr); }
}

/* ======================================================
   CARD (карточки пицц)
====================================================== */

.card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: .3s;
}

.card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);

    --tw-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --tw-shadow-colored: 0 20px 25px -5px #000, 0 8px 10px -6px #000;
    box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
    box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
}

.card img {
    width: 100%;
    height: 12rem;
    object-fit: cover;
}

.card-content {
    padding: 16px;
}

@media (min-width: 768px) {
    .card-content { padding: 24px; }
}

/* ======================================================
   CHECKBOXES
====================================================== */

.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkbox-label input {
    accent-color: #AC1414;
}

/* ======================================================
   BUTTONS
====================================================== */

.btn {
    cursor: pointer;
    border-radius: 8px;
    font-size: 1rem;
    line-height: 1.5rem;
    text-align: center;
    transition: .3s;
    border: none;
}

.btn-primary {
    background: #AC1414;
    color: #fff;
    padding: 8px 24px;
}

.btn-primary:hover {
    background: rgba(172,20,20,0.9);
}

/* ======================================================
   MODAL
====================================================== */

.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
}

.cart-modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
    z-index: 1000;
}

/* ======================================================
   FOOTER
====================================================== */

footer {
    background: #f9fafb;
    padding: 32px 0;
}

.footer-grid {
    display: grid;
    gap: 16px;
}

@media (min-width: 640px) {
    .footer-grid { grid-template-columns: repeat(2,1fr); }
}

@media (min-width: 768px) {
    .footer-grid { grid-template-columns: repeat(3,1fr); }
}

.footer-grid h3 {
    margin-bottom: 12px;
    font-size: 1.125rem;
    font-weight: 700;
}

.footer-grid p,
.footer-grid li {
    font-size: 1rem;
    color: #4b5563;
    list-style-type:none;
    line-height: 1.5rem;
    padding: 5px 0;
}


/* ===== Сетка ===== */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 2rem;
    margin-bottom: 24px;
}

@media (min-width: 768px) {
    .cards-grid {
        grid-template-columns: repeat(2, 1fr);

    }
}

@media (min-width: 1024px) {
    .cards-grid {
        grid-template-columns: repeat(5, 1fr);
        margin-bottom: 64px;
    }
}

/* ===== Карточка ===== */
.card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: 0.3s;
}

.card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.card img {
    width: 100%;
    height: 12rem;
    object-fit: cover;
}

/* ===== Контент ===== */
.card-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 20px;
}

/* ===== Заголовок (2 строки макс) ===== */
.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.2;

    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ===== Описание (2 строки макс) ===== */
.card-desc {
    font-size: .95rem;
    color: #555;
    line-height: 1.35;
    margin-bottom: 16px;

    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ===== Модификаторы ===== */
.modifier-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}

.modifier-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .9rem;
    color: #666;
}

/* ===== Нижний блок (прибит к низу) ===== */
.card-bottom {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.price {
    font-weight: 700;
    font-size: 1.1rem;
}

/* ===== Кнопка ===== */
.btn {
    cursor: pointer;
    border-radius: 8px;

    border: none;
    padding: 8px 24px;
    transition: .3s;
}

.btn-primary {
    background: #AC1414;
    color: #fff;
}

.btn-primary:hover {
    background: rgba(172,20,20,0.9);
}


/* ===== Исправления для карточки: отступы и чекбоксы ===== */

/* кардинально: контент карточки — стандартные отступы как было раньше */
.card-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 16px; /* вернули 16px для мобильных */
    padding-bottom: 24px; /* отступ снизу — чтобы нижний блок был на 24px от границы карточки */
}

/* на больших экранах — 24px */
@media (min-width: 768px) {
    .card-content {
        padding: 24px;
        padding-bottom: 24px; /* сохраняем 24px снизу */
    }
}

/* заголовок — чуть меньше пробел вниз */
.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 6px; /* уменьшили расстояние до описания */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* описание — отступ поменьше чтобы чекбоксы не уезжали */
.card-desc {
    font-size: .95rem;
    color: #555;
    line-height: 1.35;
    margin: 0 0 12px; /* было 16px — уменьшили до 12px */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Модификаторы — вернули компактный вертикальный список с ровными отступами */
.modifier-group {
    display: flex;
    flex-direction: column;
    gap: 8px;           /* чуть больше пространства между чекбоксами */
    margin: 0 0 16px;   /* отступ снизу перед нижним блоком */
}

/* отдельная строка чекбокса — ровно по центру */
.modifier-item {
    display: flex;
    align-items: center;
    gap: 10px;          /* расстояние между чекбоксом и текстом */
    font-size: .95rem;
    color: #555;
    line-height: 1;     /* чтобы текст и чекбокс были ровнее */
}

/* явные размеры для чекбокса, чтобы он не выглядел маленьким/неравномерным в разных браузерах */
.modifier-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
    -webkit-appearance: none;
    appearance: none;
    border: 1.5px solid #cfcfcf;
    border-radius: 3px;
    display: inline-block;
    position: relative;
    vertical-align: middle;
    background: #fff;
    cursor: pointer;
}

/* чекбокс — состояние checked (используем accent-color fallback и небольшой визуал) */
.modifier-item input[type="checkbox"]:checked {
    background: #AC1414;
    border-color: #AC1414;
}

.modifier-item input[type="checkbox"]:checked::after {
    content: "";
    position: absolute;
    left: 4px;
    top: 1px;
    width: 4px;
    height: 8px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* текст рядом с чекбоксом — плотнее */
.modifier-item span {
    display: inline-block;
    margin: 0;
    color: #6b7280;
}

/* Нижний блок — прижат к низу и с отступом 0 сверху (padding снизу контролируется card-content) */
.card-bottom {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

/* цена */
.price {
    font-weight: 700;
    font-size: 1.1rem;
}

/* кнопка — сохраняем размеры и вертикальное выравнивание */
.btn {
    cursor: pointer;
    border-radius: 8px;

    border: none;
    padding: 8px 20px;
    transition: .2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-primary {
    background: #AC1414;
    color: #fff;
}

.btn-primary:hover {
    background: rgba(172,20,20,0.95);
}
.back-link
{
    margin-right: 1rem;
}
.ri-arrow-left-line
{
    font-size: 1.5rem;
}

.categories-bar {
    position: sticky;
    top: 0;
    z-index: 1000;

    padding: 12px 0;
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0,0,0,0.05);

    /* скрыта до момента прокрутки */
    opacity: 0;
    transform: translateY(-18px);
    pointer-events: none;
    transition: 0.3s ease;
}

.categories-bar.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}


/* --- Центрирование --- */
.categories-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
    width: 100%;
    overflow: hidden;
}

/* --- Тени как у Додо --- */
.categories-wrapper::before,
.categories-wrapper::after {
    content: "";
    position: absolute;
    top: 0;
    width: 60px;
    height: 100%;
    z-index: 5;
    pointer-events: none;
}

.categories-wrapper::before {
    left: 0;
    background: linear-gradient(to right, rgba(255,255,255,0.9), rgba(255,255,255,0));
}

.categories-wrapper::after {
    right: 0;
    background: linear-gradient(to left, rgba(255,255,255,0.9), rgba(255,255,255,0));
}

/* --- Scroller --- */
.categories-scroll {
    display: inline-flex;
    gap: 16px;
    overflow-x: auto;
    padding: 0 20px;
    scrollbar-width: none;
}

.categories-scroll::-webkit-scrollbar {
    display: none;
}

/* --- Категории --- */
.category-item {
    white-space: nowrap;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 15px;
    font-weight: 600;
    background: rgba(0,0,0,0.05);
    color: #333;
    transition: 0.25s;
    cursor: pointer;
}

.category-item.active {
    background: #AC1414;
    color: #fff;
}

.carousel {
    width: 700px;
    margin: 40px auto;
    overflow: hidden;
    position: relative;
}

.carousel-track {
    display: flex;
    gap: 40px;
    transition: transform 0.4s ease;
}

.carousel-item {
    width: 200px;
    height: 200px;
    object-fit: cover;
    transition: 0.4s;
    filter: blur(4px);
    opacity: 0.4;
    transform: scale(0.8);
}

/* Центральный элемент */
.carousel-item.active {
    filter: none;
    opacity: 1;
    transform: scale(1.2);
}

