/* ===== ЦВЕТОВАЯ ПАЛИТРА И ПЕРЕМЕННЫЕ ===== */
:root {
    --main-grad: linear-gradient(135deg, #b30000 0%, #5c0000 100%);
    --accent: #ff4d4d;
    --bg: #0f0f0f;
    --glass: rgba(255, 255, 255, 0.07);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-active: rgba(40, 167, 69, 0.15);
    --border-active: #28a745;
    --text-muted: #aaaaaa;
    --transition: all 0.2s ease;
}

/* ===== ОБЩИЕ СТИЛИ ===== */
* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent; /* Убираем синий блик при нажатии на мобильных */
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    background: var(--bg);
    color: #fff;
    padding-bottom: 90px; /* Отступ под фиксированный футер */
    line-height: 1.5;
}

/* ===== ШАПКА ===== */
.header {
    position: sticky;
    top: 0;
    padding: 15px;
    text-align: center;
    background: rgba(15, 15, 15, 0.9);
    backdrop-filter: blur(10px); /* Эффект размытия фона */
    border-bottom: 1px solid var(--glass-border);
    z-index: 100;
}

.logo {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 2px;
    color: #fff;
}

/* ===== ЭКРАНЫ И КОНТЕНТ ===== */
.screen {
    display: none;
    padding: 20px;
    animation: fadeIn 0.3s ease; /* Плавное появление экрана */
}

.screen.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== КАРТОЧКИ ===== */
.card {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 18px;
    padding: 16px;
    margin-bottom: 12px;
    transition: var(--transition);
}

.card.selected {
    background: var(--glass-active);
    border-color: var(--border-active);
}

.card:active {
    transform: scale(0.98); /* Визуальный отклик при нажатии */
}

/* ===== ФОРМЫ И ВВОД ===== */
label {
    font-size: 11px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 8px;
    display: block;
    padding-left: 4px;
}

input, textarea {
    width: 100%;
    padding: 14px;
    margin-bottom: 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    color: #fff;
    font-size: 16px;
    transition: var(--transition);
}

input:focus, textarea:focus {
    border-color: var(--accent);
    outline: none;
    background: rgba(255, 255, 255, 0.08);
}

/* ===== КНОПКИ ===== */
.btn {
    width: 100%;
    padding: 16px;
    border-radius: 16px;
    font-weight: 700;
    text-transform: uppercase;
    border: none;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.btn-main {
    background: var(--main-grad);
    color: #fff;
    box-shadow: 0 4px 15px rgba(179, 0, 0, 0.3);
}

.btn-main:active {
    transform: scale(0.96);
    box-shadow: 0 2px 8px rgba(179, 0, 0, 0.2);
}

.btn-outline {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: #ddd;
}

/* ===== ФУТЕР (КОРЗИНА) ===== */
.footer {
    position: fixed;
    bottom: 0;
    width: 100%;
    display: none; /* Включается через JS при наличии товаров */
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px calc(15px + env(safe-area-inset-bottom)); /* Учет челки iPhone */
    background: rgba(20, 20, 20, 0.95);
    backdrop-filter: blur(15px);
    border-top: 1px solid var(--glass-border);
    z-index: 1000;
}

.price-tag {
    color: var(--accent);
    font-weight: 800;
    font-size: 22px;
}

/* ===== ВСПОМОГАТЕЛЬНЫЕ ЭЛЕМЕНТЫ ===== */
.badge {
    background: var(--border-active);
    color: #fff;
    padding: 2px 8px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: bold;
    margin-left: 8px;
}

.loader {
    text-align: center;
    padding: 20px;
    color: var(--text-muted);
    font-style: italic;
}

#basket-list div {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--glass-border);
}

#basket-list div:last-child {
    border-bottom: none;
}