/* 1. СБРОС И БАЗОВЫЕ СТИЛИ */
* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    outline: none;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #f5f7fb;
    color: #222;
    margin: 0;
    padding: 0;
    line-height: 1.4;
}

/* 2. ШАПКА И ПОИСК */
.header-search {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 100;
}

.filter-btn {
    background: #f1f3f5;
    border: none;
    border-radius: 12px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #536dfe;
}
.bottom-sheet.active .sheet-content {
    transform: translateY(0);
}

.section-title-wrap {
    padding: 0 15px;
    margin-top: 10px;
}

.section-title {
    font-size: 20px;
    font-weight: 700;
}

/* 4. СЕТКА ТОВАРОВ (2 В РЯД) */
.products-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 15px;
}

.product-card {
    background: #fff;
    border-radius: 20px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
    transition: transform 0.1s;
}

.product-card:active {
    transform: scale(0.97);
}

.card-img-wrap {
    width: 100%;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

.card-img-wrap img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.product-price {
    font-size: 17px;
    font-weight: 800;
    color: #000;
    margin-bottom: 4px;
}

.product-name {
    font-size: 13px;
    color: #777;
    height: 32px; /* Ограничение в 2 строки */
    line-height: 1.2;
    overflow: hidden;
    margin-bottom: 12px;
}

.card-btn {
    background: #f0f4f8;
    color: #536dfe;
    border: none;
    border-radius: 12px;
    padding: 10px;
    font-weight: 700;
    font-size: 12px;
    width: 100%;
}

.card-btn-more {
    background: none;
    border: none;
    color: #bbb;
    font-size: 10px;
    text-transform: uppercase;
    margin-top: 8px;
    letter-spacing: 0.5px;
}

/* 5. ЭКРАН ТОВАРА (FULLSCREEN MODAL) */
/* ЭКРАН ТОВАРА (FULLSCREEN MODAL) */
.product-screen {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: #fff;
    z-index: 2000;
    overflow-y: auto;
    display: none; /* Мы будем менять это на flex через JS */
    flex-direction: column;
    
    /* Анимация появления */
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Класс, который мы будем добавлять через JS для показа */
.product-screen.active {
    display: flex;
    transform: translateY(0);
}

.product-header {
    background: #f8f9fa;
    padding: 50px 20px 30px;
    position: relative;
    text-align: center;
}

#modal-img {
    max-width: 90%;
    height: 280px;
    object-fit: contain;
}

/* Блок кнопок */
.header-controls {
    position: absolute;
    top: 15px;      /* Отступ сверху */
    right: 15px;    /* Отступ справа */
    display: flex;
    flex-direction: column; /* Кнопки друг над другом */
    gap: 10px;      /* Расстояние между ними */
    z-index: 100;   /* Поднимаем над слайдером */
}
.btn-close, .btn-share {
    background: #fff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-body {
    padding: 25px;
    padding-bottom: 120px;
}

#modal-price {
    font-size: 30px;
    font-weight: 900;
    margin: 0 0 5px 0;
}

#modal-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 10px 0;
}



.option-group {
    margin-top: 20px;
}

.option-group label {
    display: block;
    font-weight: 700;
    margin-bottom: 10px;
}

.option-group select {
    width: 100%;
    padding: 15px;
    border-radius: 12px;
    border: 1px solid #eee;
    background: #f8f9fa;
    font-size: 16px;
}

.product-footer {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    padding: 20px;
    background: #fff;
    border-top: 1px solid #f0f0f0;
    z-index: 2001;
}

.btn-add-main {
    width: 100%;
    background: #536dfe;
    color: #fff;
    border: none;
    padding: 18px;
    border-radius: 18px;
    font-size: 16px;
    font-weight: 700;
}



.qty-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
}

.qty-btn {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: 1px solid #ddd;
    background: #fff;
    font-size: 18px;
}

.cart-summary-card {
    background: #fff;
    margin: 20px 15px;
    padding: 20px;
    border-radius: 20px;
}

.summary-line {
    display: flex;
    justify-content: space-between;
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 15px;
}

.action-button {
    width: 100%;
    background: #2481cc;
    color: #fff;
    border: none;
    padding: 16px;
    border-radius: 15px;
    font-size: 16px;
    font-weight: 700;
}

/* 7. ФОРМЫ */
.input-group {
    padding: 10px 15px;
}

.input-group label {
    display: block;
    font-size: 13px;
    color: #888;
    margin-bottom: 5px;
}

.input-group input {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid #ddd;
    font-size: 15px;
}




/* Начальное состояние карточки: невидимая и чуть смещена вниз */
.product-card {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

/* Состояние при появлении */
.product-card.visible {
    opacity: 1;
    transform: translateY(0);
}
/* Стиль кнопки при успешном добавлении */
.card-btn.success {
    background-color: #4caf50 !important; /* Зеленый цвет */
    color: white !important;
}

/* Анимация пульсации карточки */
@keyframes added-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}
.added-anim {
    animation: added-pulse 0.4s ease;
}


/* Контейнер оформления */
.checkout-container { padding: 10px 15px 40px; }

/* Карточки */
.checkout-card {
    background: #fff;
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}

.card-title {
    font-size: 13px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0 0 15px 0;
}

/* Поля ввода */
.input-field { margin-bottom: 15px; }
.input-field label { display: block; font-size: 12px; font-weight: 600; color: #777; margin-bottom: 6px; }
.input-field input {
    width: 100%;
    background: #f8f9fa;
    border: 1px solid #eee;
    padding: 14px 16px;
    border-radius: 14px;
    font-size: 16px;
    transition: 0.2s;
}
.input-field input:focus { border-color: #536dfe; background: #fff; }

/* Геолокация внутри строки */
.location-input-wrap { display: flex; gap: 8px; }
.btn-geo {
    background: #536dfe;
    color: #fff;
    border: none;
    border-radius: 14px;
    width: 52px;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Радио-кнопки (Оплата) */
.radio-group { display: flex; flex-direction: column; gap: 10px; }
.radio-item {
    display: flex;
    align-items: center;
    background: #f8f9fa;
    padding: 14px;
    border-radius: 14px;
    cursor: pointer;
}
.radio-item input { width: 20px; height: 20px; margin-right: 12px; accent-color: #536dfe; }
.radio-label { display: block; font-weight: 700; font-size: 15px; }
.radio-content small { color: #888; font-size: 12px; }

/* Финальная кнопка */
.final-info-card { text-align: center; margin-top: 10px; }
.total-line { display: flex; justify-content: space-between; font-size: 20px; font-weight: 800; margin-bottom: 15px; padding: 0 10px; }



.screen-header {
    padding: 15px;
    background: #fff;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    flex-direction: row; /* Выстраиваем в ряд */
    align-items: center; /* Центрируем по вертикали */
    justify-content: space-between; /* Расталкиваем в разные стороны */
}

.screen-header h1 {
    margin: 0;
    font-size: 22px;
    font-weight: 800;
}

/* Обновленный стиль кнопки "Назад", чтобы она была компактнее в ряду */
.text-link {
    background: #f1f3f5;
    color: #536dfe;
    border: none;
    padding: 6px 12px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s;
}


/* Вся карточка подсвечивается зеленым */
.product-card.added-success {
    border: 2px solid #4caf50 !important;
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.3);
    transform: scale(1.01); /* Микро-увеличение для эффекта */
    transition: all 0.2s ease;
}

/* Кнопка становится зеленой */
.card-btn.success {
    background: #4caf50 !important;
    color: white !important;
    border: none;
}
/* Анимация пульсации (встряски) */
@keyframes shake {
    0% { transform: scale(1.02); }
    50% { transform: scale(0.98); }
    100% { transform: scale(1.02); }
}
.added-success {
    animation: shake 0.3s ease-in-out;
}

/* 3. КАТЕГОРИИ (ЧИСТЫЙ КОД БЕЗ ЛИШНИХ ПОЛОС) */
.categories-container {
    display: flex;
    overflow-x: auto;
    padding: 10px 15px;
    gap: 12px;
    /* Убираем полосу прокрутки */
    scrollbar-width: none; 
    -ms-overflow-style: none;
}

.categories-container::-webkit-scrollbar {
    display: none; /* Для Chrome и Safari */
}

.category-item {
    flex: 0 0 auto;
    width: 75px; /* Вернули аккуратный размер */
    height: 85px;
    background: #ffffff !important;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 2px solid transparent !important;
    box-shadow: 0 4px 10px rgba(0,0,0,0.03);
    transition: all 0.2s ease;
    cursor: pointer;
}

.category-item img {
    width: 38px; /* Компактный размер иконки */
    height: 38px;
    object-fit: contain;
    margin-bottom: 5px;
}

.category-item span {
    font-size: 10px;
    font-weight: 600;
    color: #777;
    text-align: center;
}

/* Активное состояние */
.category-item.active {
    border: 2px solid #536dfe !important;
    background: #f0f4ff !important;
}

.category-item.active span {
    color: #536dfe !important;
    font-weight: 700;
}

.search-box {
    display: flex;
    align-items: center;
    background: #f1f3f4; /* или твой цвет фона */
    border-radius: 12px;
    padding: 5px 12px;
    width: 100%;
}

.search-icon {
    flex-shrink: 0;
    color: #888;
}

.search-box input {
    border: none;
    background: transparent;
    width: 100%;
    font-size: 15px;
    color: #333;
    padding: 0; /* Убираем лишние внутренние отступы */
}

/* Кнопка фильтра справа остается без изменений */
.filter-btn {
    flex-shrink: 0;
    background: #f1f3f5;
    border: none;
    border-radius: 12px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #536dfe;
}



.filter-item {
    padding: 15px;
    border-bottom: 1px solid #eee;
    font-size: 16px;
    font-weight: 500;
}

.filter-item:active { background: #f8f9fa; color: #536dfe; }

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}


#main-title {
    transition: all 0.3s ease;
    text-transform: capitalize; /* Делает первую букву заглавной */
}

/* Эффект при клике на категорию (опционально) */
@keyframes fadeInText {
    from { opacity: 0; transform: translateX(-10px); }
    to { opacity: 1; transform: translateX(0); }
}
.title-appear {
    animation: fadeInText 0.4s ease-out;
}



.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 5px;
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.cart-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--tg-theme-text-color, #222);
}

.btn-clear-cart {
    display: flex;
    align-items: center;
    gap: 5px;
    background: rgba(255, 59, 48, 0.1); /* Легкий красный фон */
    color: #ff3b30;
    border: none;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-clear-cart:active {
    transform: scale(0.95);
    background: rgba(255, 59, 48, 0.2);
}

.btn-clear-cart svg {
    flex-shrink: 0;
}



#search-clear {
    cursor: pointer;
    flex-shrink: 0;
    line-height: 1;
}

#search-clear:active {
    transform: scale(0.8);
    color: #536dfe;
}


.filter-section {
    margin-bottom: 20px;
}

.filter-label {
    font-size: 14px;
    color: #999;
    text-transform: uppercase;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
}

.price-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.price-tag {
    background: #f1f3f5;
    padding: 10px 16px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    color: #444;
    transition: all 0.2s;
}

.price-tag:active {
    background: #536dfe;
    color: #fff;
}

.btn-reset-filters {
    width: 100%;
    background: #fff;
    color: #ff3b30;
    border: 1px solid #ff3b30;
    padding: 14px;
    border-radius: 14px;
    font-weight: 700;
    margin-top: 10px;
}


.product-card {
    display: flex;
    flex-direction: column;
    height: 100%; /* Карточки будут одной высоты в ряду */
}

.product-name {
    flex-grow: 1; /* Название заберет всё свободное место, толкая кнопки вниз */
    margin-bottom: 10px;
}

.card-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    margin-top: auto; /* Финальный толчок вниз */
}

.card-btn-more {
    background: none;
    border: none;
    color: #bbb;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 5px;
    cursor: pointer;
}


/* Внешний контейнер для центровки */
.product-header {
    padding: 16px;
    background: #fff;
}

/* Контейнер для фото */
.photo-card {
    position: relative; /* Обязательно для позиционирования кнопок внутри */
    background: #f8f9fa;
    border-radius: 24px;
    aspect-ratio: 1 / 1;
    overflow: hidden;
}

#modal-img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

/* Блок кнопок в правом верхнем углу */
.header-controls {
    position: absolute;
    top: 16px;
    right: 16px;
    display: flex;
    flex-direction: column; /* Друг над другом */
    gap: 12px; /* Расстояние между кнопками */
}

/* Квадратные белые кнопки как на скрине */
.btn-control-sq {
    width: 44px;
    height: 44px;
    background: #ffffff;
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #333;
    cursor: pointer;
    transition: transform 0.1s;
}

.btn-control-sq:active {
    transform: scale(0.92);
}

/* Точки пагинации (серые снизу) */
.swiper-pagination {
    bottom: 12px !important;
}

.swiper-pagination-bullet {
    background: #ccc !important;
    opacity: 0.5;
}

.swiper-pagination-bullet-active {
    background: #888 !important;
    opacity: 1;
}


/* Тело модалки */
.product-body {
    padding: 0 20px 120px; /* Большой отступ снизу для кнопок */
}

#modal-price {
    font-size: 32px;
    font-weight: 800;
    display: block;
    margin-bottom: 8px;
}

#modal-title {
    font-size: 22px;
    font-weight: 700;
    margin: 0;
}

#modal-category {
    color: #b0b0b0; /* Светло-серый как на скрине */
    font-size: 16px;
    margin: 4px 0 20px 0;
}

/* Стили выпадающего списка */
.option-group label {
    display: block;
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 12px;
}

.select-wrapper {
    position: relative;
    background: #f1f3f5;
    border-radius: 16px;
    overflow: hidden;
}

#steaks-cooking {
    width: 100%;
    padding: 16px;
    border: none;
    background: transparent;
    font-size: 16px;
    appearance: none;
    outline: none;
}

/* Стрелочка для селекта */
.select-arrow {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    border-right: 2px solid #888;
    border-bottom: 2px solid #888;
    rotate: 45deg;
    pointer-events: none;
}

.stock-label {
    margin-top: 20px;
    font-weight: 600;
    font-size: 14px;
}

/* Кнопки в футере */
.product-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px 20px 30px;
    background: #fff;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-action-primary, .btn-action-secondary {
    width: 100%;
    padding: 18px;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: 0.2s;
}

.btn-action-primary {
    background: #2481cc; /* Синий Telegram */
    color: #fff;
}

.btn-action-secondary {
    background: #348edb; /* Чуть светлее или такой же */
    color: #fff;
}

.btn-action-primary:active, .btn-action-secondary:active {
    transform: scale(0.98);
    opacity: 0.9;
}

.swiper-container {
    width: 100%;
    height: 100%;
    position: relative;
}

.swiper-slide {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

/* Стили для точек пагинации, чтобы они были поверх фото */
.swiper-pagination {
    bottom: 10px !important;
}


.location-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}



.btn-geo {
    position: absolute;
    right: 8px;
    background: #f1f3f4;
    border: none;
    border-radius: 8px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    z-index: 5;
}

.btn-geo:active {
    background: #e2e4e5;
}



.btn-apply-promo {
    position: absolute;
    right: 5px;
    background: #536dfe;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

#order-comment {
    width: 100%;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 12px;
    font-family: inherit;
    font-size: 14px;
    resize: none;
    outline: none;
}

#order-comment:focus {
    border-color: #536dfe;
}


/* Полная перезапись контейнера */
#order-loader {
    display: none !important; /* Управляется через JS */
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: #ffffff !important;
    z-index: 99999 !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    transition: opacity 0.5s ease;
}

/* Основной контейнер лоадера */
#order-loader {
    display: none; /* Переключается на flex через JS */
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background-color: #ffffff !important; /* Убедись, что фон непрозрачный */
    z-index: 999999 !important; /* Чтобы был выше всех окон */
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Контейнер полоски */
.progress-container {
    width: 200px;
    height: 4px;
    background: #f0f0f0;
    border-radius: 10px;
    position: relative;
    overflow: hidden;
    margin-top: 20px;
}

/* Сама бегущая полоска */
.progress-bar-line {
    width: 100px;
    height: 100%;
    background: #536dfe;
    position: absolute;
    left: -100px;
    animation: move-progress 1.5s infinite linear;
}

@keyframes move-progress {
    0% { left: -100px; }
    100% { left: 200px; }
}

.photo-card { position: relative; width: 100%; height: 300px; background: #f0f0f0; overflow: hidden; }
.custom-slider { width: 100%; height: 100%; position: relative; }
.slider-track { display: flex; transition: transform 0.3s ease-out; height: 100%; }
.slider-track img { min-width: 100%; height: 100%; object-fit: cover; }

.slider-dots {
    position: absolute; bottom: 15px; left: 0; right: 0;
    display: flex; justify-content: center; gap: 6px; z-index: 10;
}
.dot { width: 8px; height: 8px; background: rgba(255,255,255,0.5); border-radius: 50%; transition: 0.3s; }
.dot.active { background: #fff; transform: scale(1.2); }

.slider-nav-btns {
    position: absolute; top: 50%; width: 100%; transform: translateY(-50%);
    display: flex; justify-content: space-between; padding: 0 10px; pointer-events: none;
}
.slider-nav-btns button {
    pointer-events: auto; background: rgba(0,0,0,0.2); border: none; color: white;
    width: 30px; height: 30px; border-radius: 50%; cursor: pointer;
}

#search-input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    padding: 8px;
    font-size: 16px;
}

.filter-btn-inline {
    background: none;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    cursor: pointer;
    margin-left: 5px;
    border-left: 1px solid #ddd; /* небольшая разделительная линия */
}

.filter-btn-inline:active {
    transform: scale(0.9);
    opacity: 0.7;
}



/* 6. КОРЗИНА (ОБНОВЛЕННЫЙ БЛОК) */
#screen-cart {
    background: #f8f9fa;
    min-height: 100vh;
}

/* Единый контейнер для всех элементов корзины */
.cart-content-wrapper {
    padding: 0 16px 30px; /* Боковые отступы 16px */
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px; /* Расстояние между блоками */
}

.main-confirm-btn {
    width: 100%;
    background: #536dfe;
    color: white;
    border: none;
    padding: 16px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    margin-top: 20px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(83, 109, 254, 0.4);
    transition: all 0.2s ease;
}

.main-confirm-btn:active {
    transform: scale(0.97);
    box-shadow: 0 2px 6px rgba(83, 109, 254, 0.4);
}
.cart-list {
    width: 100%;
    padding: 0; /* Убираем падинги здесь, они теперь в wrapper */
    margin-top: 15px;
}

/* Карточка товара в корзине */
.cart-item {
    display: flex;
    align-items: center;
    background: #fff;
    padding: 12px;
    margin-bottom: 12px;
    border-radius: 18px; /* Округлили как на макетах */
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    width: 100%;
    box-sizing: border-box;
}

.cart-item img {
    width: 70px;
    height: 70px;
    border-radius: 14px;
    object-fit: cover;
    margin-right: 15px;
    background: #f9f9f9;
}

.item-details {
    flex: 1;
}

.item-name {
    font-weight: 600;
    font-size: 15px;
    display: block;
    margin-bottom: 4px;
}

.item-price {
    color: #2481cc;
    font-weight: 700;
}

/* Кнопки +- в корзине */
.qty-controls {
    display: flex;
    align-items: center;
    background: #f1f3f4;
    border-radius: 12px;
    padding: 4px;
}

.qty-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: #fff;
    border-radius: 10px;
    font-size: 18px;
    font-weight: bold;
    color: #2481cc;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-num {
    margin: 0 12px;
    font-weight: 700;
    min-width: 20px;
    text-align: center;
}

/* ПРОМОКОД (ИСПРАВЛЕНО: ШИРИНА И ОТСТУПЫ) */
.promo-box {
    display: flex;
    align-items: center;
    background: #fff;
    padding: 6px 6px 6px 16px; /* Больше отступ слева для текста */
    border-radius: 18px;
    border: 1px solid #eee;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 4px; /* Небольшой зазор до сообщения */
}

.promo-box input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    background: transparent;
    padding: 0;
}

.promo-box button {
    background: #2481cc;
    color: #fff;
    border: none;
    padding: 10px 18px;
    border-radius: 14px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.2s;
}

.promo-msg {
    font-size: 12px;
    margin: 0 5px 12px;
    display: none;
}

/* ИТОГОВАЯ КАРТОЧКА (ИСПРАВЛЕНО: ВЫРАВНИВАНИЕ) */
.cart-summary-card {
    background: #fff;
    padding: 20px;
    border-radius: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    width: 100%;
    box-sizing: border-box;
    margin: 0; /* Убрали внешние отступы, так как есть wrapper */
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
}

.total-price {
    font-size: 22px;
    font-weight: 800;
    color: #000;
}




.final-info-card {
    background: var(--tg-theme-secondary-bg-color, #f9f9f9);
    border-radius: 16px;
    padding: 20px;
    margin-top: 20px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

.final-info-card .summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.final-info-card .discount-info {
    color: #4caf50; /* Зеленый цвет для скидки */
    font-size: 14px;
    font-weight: 500;
}

.final-info-card .total-row {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed #ddd;
}

.final-info-card .total-row span:first-child {
    font-size: 18px;
    font-weight: 700;
}

.total-price {
    font-size: 22px;
    font-weight: 800;
    color: #536dfe;
}

.old-price {
    font-size: 16px;
    text-decoration: line-through;
    color: #999;
    margin-right: 8px;
}



.price-container {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.old-price {
    text-decoration: line-through;
    color: #a0a0a0;
    font-size: 14px;
    margin-bottom: 2px;
}

.discount-info {
    color: #4caf50; /* Зеленый цвет для скидки */
    font-size: 14px;
    margin-bottom: 10px;
    font-weight: 600;
}

.total-row {
    border-top: 1px solid #f0f0f0;
    padding-top: 15px;
    margin-top: 5px;
}


.search-box {
    display: flex;
    align-items: center;
    background: #f1f3f4;
    border-radius: 14px;
    padding: 0 12px;
    height: 48px;
}

#search-input {
    flex: 1;
    min-width: 0; /* Важно для flex-контейнеров */
    background: transparent;
    border: none;
    padding: 10px 8px;
    font-size: 16px;
}

.search-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

#search-clear {
    background: none;
    border: none;
    color: #bbb;
    font-size: 18px;
    padding: 5px;
    cursor: pointer;
}

.filter-btn-inline {
    border-left: 1px solid #ddd;
    padding-left: 8px;
}

.cat-icon {
    width: 40px; 
    height: 40px; 
    object-fit: contain;
    display: block;
    margin: 0 auto 5px;
}

.card-img-wrap { position: relative; overflow: hidden; border-radius: 8px; }

/* Накладываем блюр на всё фото */
.product-card.out-of-stock .card-img-wrap img {
    filter: blur(2px) grayscale(1);
    opacity: 0.8;
}

/* Белая матовая плашка по центру */
.out-of-stock-badge {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.4); /* Полупрозрачный темный фон */
    color: white;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}



/* Анимация для экранов */
.app-screen {
    animation: fadeInScale 0.3s ease-out forwards;
    will-change: transform, opacity;
}
/* ОТСТУП ДЛЯ ЭКРАНОВ (Чтобы контент не заходил под меню) */
.app-screen {
    padding-bottom: 80px !important;
}

@keyframes fadeInScale {
    0% {
        opacity: 0;
        transform: translateY(10px) scale(0.98);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Красивое оформление карточки профиля (дополнение) */
.user-profile-card {
    transition: transform 0.2s ease;
}

.user-profile-card:active {
    transform: scale(0.97); /* Эффект нажатия */
}

/* Плавное появление списка заказов */
.orders-history-list div {
    animation: slideInLeft 0.4s ease-out both;
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}


.toast-wrap {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    
    /* ИСПРАВЛЕНИЕ: Ограничиваем высоту */
    width: auto;
    height: auto; 
    pointer-events: none; /* Пропускает клики сквозь пустую область тоста */
}

.toast-content {
    /* Чтобы можно было нажать на само уведомление, если нужно */
    pointer-events: auto; 
    
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    padding: 12px 24px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    
    /* Анимация появления сверху */
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-icon input {
    padding-right: 40px !important; /* Оставляем место для иконки */
    width: 100%;
}

.icon-edit-btn {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.icon-edit-btn:active {
    transform: scale(0.8); /* Эффект нажатия */
}




/* Контейнер деталей заказа */
.order-details-body {
    padding: 12px 16px;
    max-height: 55vh;
    overflow-y: auto;
    z-index: 99999;
}

/* Строка товара — максимально компактная */
.order-item-row {
    display: flex;
    justify-content: space-between;
    align-items: center; /* Центрируем по вертикали */
    padding: 6px 0; /* Минимальный отступ */
    border-bottom: 1px solid #f2f2f2;
}

.order-item-name {
    font-size: 13px; /* Уменьшенный шрифт */
    font-weight: 500;
    color: #222;
    flex: 1; /* Позволяет тексту занимать всё место слева */
    padding-right: 10px;
    line-height: 1.2;
}

.order-item-price {
    font-size: 13px;
    font-weight: 700;
    color: #2481cc;
    white-space: nowrap; /* Цена всегда в одну строку */
}

/* Итоговая черта внизу списка */
.order-details-total {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 2px solid #eee;
    text-align: right;
    font-weight: bold;
    font-size: 15px;
}



/* НИЖНЕЕ МЕНЮ (TAB BAR) */
.tab-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 65px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px); /* Для поддержки iOS */
    display: flex;
    justify-content: space-around;
    align-items: center;
    border-top: 1px solid rgba(0,0,0,0.1);
    z-index: 10005;
    padding-bottom: env(safe-area-inset-bottom);
}

.tab-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #8e8e93;
    cursor: pointer;
    flex: 1;
    transition: all 0.2s;
    -webkit-tap-highlight-color: transparent; /* Убираем синий блик при нажатии */
}

.tab-item svg {
    width: 24px;
    height: 24px;
    margin-bottom: 4px;
    transition: transform 0.2s ease;
}

.tab-item span {
    font-size: 10px;
    font-weight: 500;
}

/* Активное состояние кнопки в меню */
.tab-item.active {
    color: #2481cc;
}

/* КОНТЕЙНЕР КОРЗИНЫ И КРАСНЫЙ КРУЖОК (BADGE) */
.cart-badge-container {
    position: relative;
    display: inline-flex;
}

.badge {
    position: absolute;
    top: -6px;
    right: -10px;
    background: #ff3b30;
    color: white;
    font-size: 11px;
    font-weight: bold;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
    z-index: 10;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* АНИМАЦИЯ ПРЫЖКА КОРЗИНЫ */
@keyframes cartBounce {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

.cart-animate {
    animation: cartBounce 0.4s ease-in-out;
}




/* Класс для скрытия нижнего меню */
.tab-bar-hidden {
    transform: translateY(100%);
}

/* Обязательно добавь плавность перехода основным элементам */
.search-container, .tab-bar {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

@keyframes pulse-loading {
    0% { background-color: rgba(83, 109, 254, 0.05); }
    50% { background-color: rgba(83, 109, 254, 0.15); }
    100% { background-color: rgba(83, 109, 254, 0.05); }
}

.loading-field {
    animation: pulse-loading 1.5s infinite;
    color: #888;
}
/* Твои текущие стили остаются */
.loading-field {
    animation: pulse-loading 1.5s infinite;
    color: #888; /* Серый цвет для служебного текста */
    font-style: italic; /* Добавим курсив, чтобы отличить от обычного адреса */
}

#order-address {
    width: 100%;
    padding-right: 45px !important; 
    transition: all 0.3s ease; /* Добавь это для плавности эффектов */
}

#clear-address {
    transition: color 0.2s;
    z-index: 10;
}

#clear-address:hover {
    color: #536dfe; /* Цвет при наведении как у твоей темы */
}


/* Убедись, что у header-search есть эти свойства */
.header-search {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 1001;
    /* Плавность: 0.4s — это идеальная скорость для глаза */
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    will-change: transform; /* Подсказка браузеру для плавной анимации */
}

/* Красивое скрытие хедера */
.header-hidden {
    transform: translateY(-100%); /* Уезжает вверх */
    opacity: 0;
}



/* Когда поиск уехал, категории плавно прижимаются к 0 */
.categories-sticky-up {
    top: 0 !important;
}






.empty-cart-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    color: var(--tg-theme-text-color, #222);
}

.empty-cart-icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.8;
    /* Можно добавить легкую анимацию покачивания */
    animation: swing 2s infinite ease-in-out;
}

.empty-cart-container h3 {
    margin: 0 0 10px 0;
    font-size: 20px;
    font-weight: 700;
}

.empty-cart-container p {
    font-size: 14px;
    color: #888;
    margin-bottom: 10px;
    line-height: 1.4;
}

.btn-back-to-catalog {
    background: #536dfe;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(83, 109, 254, 0.3);
    transition: transform 0.2s;
}

.btn-back-to-catalog:active {
    transform: scale(0.95);
}

@keyframes swing {
    0%, 100% { transform: rotate(-5deg); }
    50% { transform: rotate(5deg); }
}

.btn-close-sheet {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 32px;
    height: 32px;
    background: var(--tg-theme-secondary-bg-color, #efeff4);
    color: #999;
    border: none;
    border-radius: 50%;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 100;
    line-height: 1;
    padding: 0;
}

.btn-close-sheet:active {
    transform: scale(0.9);
    background: #e0e0e0;
    color: #666;
}


.product-card {
    position: relative; /* Чтобы кнопка позиционировалась внутри */
}

.btn-fav {
    position: absolute;
    top: 10px;
    right: 10px;
    background: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    z-index: 5;
    cursor: pointer;
    font-size: 16px;
    transition: transform 0.2s;
}

.btn-fav:active {
    transform: scale(1.2); /* Эффект пульсации при нажатии */
}


/* Оставь только это в CSS */
#favorites-list .product-card {
    animation: fadeIn 0.3s ease forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}




.product-body {
    padding: 20px;
    background: #fff;
    border-radius: 25px 25px 0 0;
    margin-top: -25px;
    position: relative;
}

/* Цена */
.price-section {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 10px;
}
.main-price {
    font-size: 28px;
    font-weight: 900;
    color: #2481cc;
}
.old-price {
    font-size: 18px;
    color: #b0b0b0;
    text-decoration: line-through;
}
.discount-badge {
    background: #ff3b30;
    color: #fff;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: bold;
}

/* Заголовок и Тэги */
#modal-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
    color: #222;
}
.meta-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.category-tag {
    background: #f0f7ff;
    color: #2481cc;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
}

/* Блок описания */
.description-container {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 15px;
    margin-bottom: 80px; /* Отступ под кнопку */
}
.description-container h3 {
    font-size: 15px;
    margin-bottom: 8px;
    color: #444;
}
#modal-description {
    font-size: 14px;
    line-height: 1.5;
    color: #666;
}









/* Заголовки секций */
.section-label {
    font-size: 16px;
    font-weight: 700;
    margin: 20px 0 10px 0;
    color: #333;
}

/* Текст описания и состава */
.short-text {
    font-size: 14px;
    color: #555;
    line-height: 1.5;
    margin-bottom: 5px;
}

/* Кнопка "Показать больше" */
.show-more-btn {
    background: none;
    border: none;
    color: #f44336; /* Оранжево-красный как на скрине */
    font-size: 14px;
    font-weight: 600;
    padding: 0;
    cursor: pointer;
    margin-bottom: 15px;
}



/* Дисклеймер внизу */
.disclaimer {
    font-size: 12px;
    color: #bbb;
    margin-top: 20px;
    line-height: 1.4;
}


.spec-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 12px 0;
    border-bottom: 1px solid #f2f2f2;
}

.spec-name {
    color: #8e8e8e;
    font-size: 14px;
    max-width: 50%;
}

.spec-value {
    color: #000;
    font-size: 14px;
    text-align: right;
    font-weight: 400;
}

/* Добавь это в свой CSS файл */
.specs-container {
    margin-top: 20px;
}

.spec-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #f2f2f2;
}

.spec-label {
    color: #8e8e8e; /* Светло-серый как на скрине */
    font-size: 14px;
    font-weight: 400;
}

.spec-data {
    color: #000;
    font-size: 14px;
    font-weight: 400;
    text-align: right;
}

.disclaimer-text {
    font-size: 12px;
    color: #bbb;
    margin-top: 15px;
    line-height: 1.4;
}

/* Подсветка выбранной карточки оплаты */
.radio-item input[type="radio"]:checked + .radio-content {
    border: 2px solid #5D5FEF;
    background-color: #f5f5ff;
}

.status-container {
    padding: 40px 20px;
}
.status-icon {
    font-size: 80px;
    margin-bottom: 20px;
}
.status-icon.success { color: #28a745; }
.status-icon.warning { color: #ffc107; }

/* Контейнер способов оплаты */
#payment-methods-list {
    padding: 10px 0;
}

/* Сама карточка */
.payment-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    margin-bottom: 12px;
    border: 1.5px solid #e0e0e0;
    border-radius: 14px;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

/* Активное состояние карточки */
.payment-card.active {
    border-color: var(--tg-theme-button-color, #248bcf);
    background-color: var(--tg-theme-secondary-bg-color, #f9f9f9);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

/* Иконка слева */
.payment-icon-box {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f2f5;
    border-radius: 10px;
    color: #555;
    font-size: 1.2rem;
}

.payment-card.active .payment-icon-box {
    background: var(--tg-theme-button-color, #248bcf);
    color: #fff;
}

/* Тексты */
.payment-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--tg-theme-text-color, #000);
}

.payment-description {
    font-size: 0.8rem;
    display: block;
}

/* Галочка справа */
.payment-status {
    font-size: 1.2rem;
    color: var(--tg-theme-button-color, #248bcf);
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.2s ease;
}

.payment-card.active .payment-status {
    opacity: 1;
    transform: scale(1);
}

#load-more-wrap {
    display: block !important; /* Принудительно покажем для теста */
    min-height: 60px;
    padding-bottom: 20px;
    z-index: 9999;
}



/* 1. Основной контейнер (Overlay) */
.bottom-sheet {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 5000;
    display: none; 
    align-items: flex-end; /* Всегда прижимаем контент к низу */
    justify-content: center;
}

.bottom-sheet.show {
    display: flex !important;
}

/* 1. Основной контейнер (Подложка) */
.bottom-sheet {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 5000;
    display: none; /* Управляется через JS (flex) */
    align-items: flex-end; /* Прижимает всё содержимое к нижнему краю */
    justify-content: center;
}

/* Состояние открытия */
.bottom-sheet.show {
    display: flex !important;
}

/* Фон-затемнение */
.sheet-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.bottom-sheet.show .sheet-overlay {
    opacity: 1;
}

/* 2. Контент модалки (Универсальный) */
.sheet-content {
    position: relative;
    background: #fff;
    width: 100%;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    margin-top: auto; 
    border-radius: 24px 24px 0 0;
    transform: translateY(100%); 
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    z-index: 5001;
    display: flex;
    flex-direction: column;
    
    /* ИСПРАВЛЕНИЕ ТУТ: Добавляем отступ 80px для ВСЕХ модалок */
    /* Теперь даже фильтр поднимется над NavBar */
    padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px));
    
    box-sizing: border-box;
    overflow: hidden;
}

/* 3. КЛАСС-МОДИФИКАТОР для больших модалок */
.sheet-large {
    height: 85vh !important;
    max-height: 85vh !important;
    /* Здесь оставляем как было или чуть увеличиваем, если нужно */
    padding-bottom: calc(90px + env(safe-area-inset-bottom, 0px)) !important;
}

.bottom-sheet.show .sheet-content {
    transform: translateY(0);
}



/* 4. Внутренние элементы */
.sheet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #f2f2f2;
    flex-shrink: 0; /* Чтобы заголовок не сжимался */
}

.sheet-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    -webkit-overflow-scrolling: touch;
}

/* Исправление для модалок без явной высоты (Фильтры, Редактирование) */
#filter-sheet .sheet-content, 
#edit-data-modal .sheet-content {
    height: auto !important;
    max-height: 90vh;
}

/* Кнопка "Загрузить еще" */
#load-more-wrap {
    padding: 15px 20px;
    background: #fff;
    border-top: 1px solid #f2f2f2;
    z-index: 5002;
}
/* Класс для блокировки скролла на фоне */
body.modal-open {
    overflow: hidden !important;
    position: fixed; /* Для iOS, чтобы экран не дергался */
    width: 100%;
}
/* Списки */
#full-orders-list, #order-items-list {
    padding: 0 10px;
}


.delivery-tabs-ui {
    display: flex;
    background: #f0f0f5;
    padding: 3px;
    border-radius: 12px;
    margin-bottom: 15px;
}

.tab-item {
    flex: 1;
    cursor: pointer;
}

.tab-item input {
    display: none;
}

.tab-name {
    padding: 10px;
    text-align: center;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    color: #8e8e93;
    transition: all 0.2s ease;
}

.tab-item input:checked + .tab-name {
    background: #fff;
    color: #000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Скелетон-контейнер */
.skeleton-card {
    background: #fff;
    border-radius: 16px;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #f0f0f0;
}

.skeleton-img {
    width: 100%;
    aspect-ratio: 1/1;
    background: #f2f2f7;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
}

.skeleton-text {
    height: 14px;
    background: #f2f2f7;
    margin-top: 10px;
    border-radius: 4px;
    width: 80%;
    position: relative;
    overflow: hidden;
}

.skeleton-price {
    height: 18px;
    background: #f2f2f7;
    margin-top: 8px;
    border-radius: 4px;
    width: 40%;
    position: relative;
    overflow: hidden;
}

/* Анимация волны (Shimmer Effect) */
.skeleton-img::after, .skeleton-text::after, .skeleton-price::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}


.auth-error-msg {
    color: #dc3545;
    background: #fff5f5;
    border: 1px solid #ffc10745;
    padding: 10px;
    border-radius: 10px;
    font-size: 13px;
    margin-top: 15px;
    display: none; /* Скрыто по умолчанию */
    animation: fadeIn 0.3s ease;
    font-weight: 500;
    text-align: center;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}


/* Стили для блока статуса */
#auth-status-msg {
    margin-top: 15px;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    text-align: center;
    transition: all 0.3s ease;
    display: none; /* По умолчанию скрыт */
    animation: slideInUp 0.3s ease;
}

/* Анимация появления */
@keyframes slideInUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Анимация ошибки (тряска) */
@keyframes shakeError {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.auth-msg-error {
    color: #e74c3c !important;
    background: #fff5f5 !important;
    border: 1px solid #ffe5e5 !important;
    animation: shakeError 0.2s ease-in-out 0s 2 !important;
}

.auth-msg-success {
    color: #2481cc !important;
    background: #f0f8ff !important;
    border: 1px solid #e1efff !important;
}



/* Этот стиль принудительно центрирует окно, когда оно активно */
#profile-auth-guest {
    display: none; /* По умолчанию скрыто */
}

/* Когда JS убирает display:none или ставит любое другое значение */
#profile-auth-guest[style*="display: block"], 
#profile-auth-guest[style*="display: flex"] {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}