:root {
    --primary: #00ff88;
    --primary-dark: #00cc6a;
    --secondary: #b026ff;
    --bg-main: #121212;
    --bg-card: #1e1e1e;
    --text-main: #ffffff;
    --text-muted: #aaaaaa;
    --danger: #ff4d4d;
    --nav-height: 60px;
    --header-height: 60px;
    --accent-gradient: linear-gradient(45deg, var(--primary), var(--secondary));
}

body {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, Roboto, Helvetica, sans-serif;
    background-color: var(--bg-main);
    background-image: linear-gradient(135deg, #121212 0%, #1a0a1f 100%);
    color: var(--text-main);
    margin: 0; padding: 0;
    padding-bottom: calc(var(--nav-height) + 30px); 
    padding-top: var(--header-height);
    -webkit-tap-highlight-color: transparent;
}

/* ВКЛАДКИ */
.page-section { display: none; animation: fadeIn 0.4s cubic-bezier(0.165, 0.84, 0.44, 1); }
.page-section.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* ШАПКА */
.top-bar {
    position: fixed; top: 0; left: 0; width: 100%; height: var(--header-height);
    background: rgba(18, 18, 18, 0.8); backdrop-filter: blur(15px);
    display: flex; justify-content: space-between; align-items: center;
    padding: 0 20px; box-sizing: border-box; 
    border-bottom: 1px solid rgba(255, 255, 255, 0.1); z-index: 100;
}
.logo { font-size: 22px; font-weight: 900; background: var(--accent-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; text-shadow: 0 0 15px rgba(0, 255, 136, 0.4); }
.header-actions { display: flex; align-items: center; gap: 15px; } 
.header-cart { font-size: 1.3rem; cursor: pointer; position: relative; }
.cart-badge { background: var(--accent-gradient); color: #fff; font-size: 11px; font-weight: bold; padding: 3px 7px; border-radius: 10px; position: absolute; top: -8px; right: -12px; box-shadow: 0 2px 10px rgba(0, 255, 136, 0.5); }
.reload-btn, .info-btn { font-size: 1.5rem; cursor: pointer; color: var(--text-muted); transition: 0.3s; }
.reload-btn:hover { color: var(--primary); transform: rotate(90deg); }
.info-btn:hover { color: var(--secondary); transform: scale(1.1); }

@keyframes shake { 0% { transform: rotate(0deg); } 25% { transform: rotate(-10deg); } 50% { transform: rotate(10deg); } 75% { transform: rotate(-10deg); } 100% { transform: rotate(0deg); } }
.header-cart.shake { animation: shake 0.4s ease-in-out; color: var(--primary); }

/* БАННЕР */
.promo-banner { background: linear-gradient(110deg, var(--primary-dark) 0%, var(--secondary) 100%); border-radius: 20px; padding: 25px; margin-bottom: 30px; box-shadow: 0 10px 30px -10px rgba(176, 38, 255, 0.6); color: #fff; position: relative; overflow: hidden; }
.banner-content h3 { margin: 0 0 8px 0; font-weight: 900; font-style: italic; text-transform: uppercase; font-size: 1.4rem; }

/* ОБЩИЕ СТИЛИ */
.section-title h2, .cart-container h2, .info-card h2 { font-weight: 800; text-transform: uppercase; text-shadow: 0 0 10px rgba(176, 38, 255, 0.3); }
.cart-container h2 { margin-bottom: 20px; }

/* БАННЕР В КОРЗИНЕ (НОВОЕ) */
.delivery-banner {
    background: rgba(0, 255, 136, 0.05); /* Легкий зеленый фон */
    border: 1px solid var(--primary);
    border-radius: 15px;
    padding: 15px;
    margin-bottom: 20px;
    text-align: left;
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.1);
}
.delivery-banner h4 {
    margin: 0 0 10px 0;
    color: var(--primary);
    font-size: 1.1rem;
    font-weight: 800;
    text-transform: uppercase;
}
.delivery-banner p {
    margin: 5px 0;
    font-size: 0.9rem;
    color: #eee;
    font-weight: 500;
}
.banner-note {
    font-weight: bold;
    color: var(--secondary) !important;
}

/* КОРЗИНА */
.cart-list-wrapper { display: flex; flex-direction: column; gap: 12px; }
.cart-item { display: flex; justify-content: space-between; align-items: center; background: rgba(30, 30, 30, 0.6); border: 1px solid rgba(255, 255, 255, 0.05); border-radius: 16px; padding: 15px; backdrop-filter: blur(10px); transition: 0.3s; }
.cart-item:hover { border-color: rgba(255, 255, 255, 0.2); box-shadow: 0 5px 20px rgba(0,0,0,0.3); transform: translateX(5px); }
.cart-item-info { display: flex; flex-direction: column; gap: 4px; }
.cart-item-title { font-weight: 700; font-size: 1rem; color: #fff; }
.cart-item-flavor { font-size: 0.8rem; color: var(--primary); text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; opacity: 0.8; }
.cart-item-right { display: flex; align-items: center; gap: 15px; }
.cart-item-price { font-weight: 800; font-size: 1.1rem; color: #fff; text-shadow: 0 0 10px rgba(255,255,255,0.2); }
.remove-btn { width: 32px; height: 32px; background: rgba(255, 77, 77, 0.1); color: var(--danger); border-radius: 10px; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: 0.3s; font-size: 1.4rem; line-height: 1; }
.remove-btn:hover { background: var(--danger); color: #fff; box-shadow: 0 0 15px var(--danger); }
.remove-btn:active { transform: scale(0.9); }

/* +/- кнопки */
.cart-controls { display: flex; align-items: center; gap: 10px; background: rgba(0,0,0,0.3); padding: 5px; border-radius: 12px; }
.qty-btn { width: 28px; height: 28px; background: rgba(255,255,255,0.1); color: #fff; border-radius: 8px; display: flex; align-items: center; justify-content: center; cursor: pointer; font-weight: bold; font-size: 1.2rem; user-select: none; }
.qty-btn:active { background: var(--primary); color: #000; }
.qty-val { font-weight: bold; min-width: 20px; text-align: center; }

.promo-block { display: flex; gap: 10px; margin: 25px 0 15px 0; }
.promo-block input { flex-grow: 1; background: #252525; border: 1px solid rgba(255,255,255,0.1); border-radius: 12px; padding: 14px; color: white; outline: none; transition: 0.3s; }
.promo-block input:focus { border-color: var(--secondary); box-shadow: 0 0 15px rgba(176, 38, 255, 0.3); }
.btn-apply { background: rgba(255, 255, 255, 0.05); color: #fff; border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 12px; padding: 0 20px; font-weight: bold; cursor: pointer; transition: 0.3s; }
.btn-apply:hover { background: var(--primary); color: #000; border-color: transparent; box-shadow: 0 0 15px var(--primary); }

.total-row { display: flex; justify-content: space-between; align-items: center; background: linear-gradient(90deg, rgba(0, 255, 136, 0.05) 0%, rgba(176, 38, 255, 0.05) 100%); padding: 20px; border-radius: 16px; margin-bottom: 30px; border: 1px dashed rgba(255, 255, 255, 0.15); }
.total-label { font-size: 1.1rem; color: #ccc; font-weight: 600; text-transform: uppercase; }
.total-price { font-size: 1.6rem; font-weight: 900; background: var(--accent-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; filter: drop-shadow(0 0 5px rgba(0,255,136,0.3)); }

/* КАТАЛОГ И ПОИСК */
.filters-row { display: flex; gap: 10px; margin-bottom: 20px; align-items: center; justify-content: space-between; }
.sort-select, .search-input { background: #252525; color: white; border: 1px solid rgba(255,255,255,0.1); padding: 12px; border-radius: 12px; font-size: 0.95rem; outline: none; transition: 0.3s; }
.search-input { width: 100%; margin-bottom: 15px; box-sizing: border-box; }
.search-input:focus, .sort-select:focus { border-color: var(--secondary); box-shadow: 0 0 15px rgba(176, 38, 255, 0.3); }
.stock-filter { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; color: var(--text-muted); font-weight: 500; }
.filters-scroll { display: flex; overflow-x: auto; gap: 10px; padding-bottom: 10px; scrollbar-width: none; }
.filters-scroll::-webkit-scrollbar { display: none; }
.filter-btn { white-space: nowrap; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); color: var(--text-muted); padding: 10px 20px; border-radius: 30px; transition: 0.3s; font-weight: 600; }
.filter-btn.active { background: var(--accent-gradient); color: #fff; border-color: transparent; box-shadow: 0 5px 15px rgba(0, 255, 136, 0.4); }

.products-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; }
.product-card { background: rgba(30, 30, 30, 0.8); backdrop-filter: blur(10px); border-radius: 18px; padding: 12px; display: flex; flex-direction: column; position: relative; min-height: 260px; border: 1px solid rgba(255, 255, 255, 0.08); }
.product-img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; margin-bottom: 12px; background: #2a2a2a; cursor: pointer; transition: 0.2s; }
.product-img:active { transform: scale(0.95); opacity: 0.8; }
.product-name { font-size: 1rem; font-weight: 700; margin-bottom: 8px; flex-grow: 1; line-height: 1.3; }
.product-price { font-size: 1.2rem; font-weight: 800; background: var(--accent-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.stock-badge { position: absolute; top: 15px; left: 15px; background: rgba(255, 77, 77, 0.9); color: white; padding: 4px 8px; border-radius: 8px; font-size: 0.75rem; font-weight: bold; z-index: 10; }
.fav-btn { position: absolute; top: 15px; right: 15px; background: rgba(0,0,0,0.5); border-radius: 50%; width: 34px; height: 34px; display: flex; justify-content: center; align-items: center; cursor: pointer; z-index: 10; font-size: 16px; border: 1px solid rgba(255,255,255,0.1); }
.fav-btn.active { color: #ff4d4d; background: rgba(255, 255, 255, 1); box-shadow: 0 0 15px rgba(255, 77, 77, 0.5); }
.btn-buy { margin-top: 12px; background: transparent; border: 2px solid var(--primary); color: var(--primary); padding: 10px; border-radius: 12px; font-weight: 700; cursor: pointer; font-size: 0.9rem; text-transform: uppercase; }

/* ДЕТАЛИ ТОВАРА */
.back-btn { background: none; border: none; color: var(--primary); font-size: 1.1rem; cursor: pointer; margin-bottom: 15px; font-weight: bold; }
.details-card { background: rgba(30, 30, 30, 0.8); border-radius: 20px; border: 1px solid rgba(255, 255, 255, 0.1); padding: 20px; backdrop-filter: blur(10px); }
#detail-img { width: 100%; border-radius: 15px; margin-bottom: 20px; box-shadow: 0 5px 20px rgba(0,0,0,0.5); }
#detail-name { font-size: 1.5rem; margin: 0 0 10px 0; }
.detail-price { font-size: 1.8rem; font-weight: 900; color: var(--primary); margin-bottom: 15px; }
.stock-status { display: inline-block; padding: 5px 10px; border-radius: 8px; font-size: 0.9rem; font-weight: bold; margin-bottom: 20px; }
.stock-status.ok { background: rgba(0, 255, 136, 0.2); color: #00ff88; }
.stock-status.no { background: rgba(255, 77, 77, 0.2); color: #ff4d4d; }
.detail-description h3 { border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 10px; margin-bottom: 15px; }
#detail-specs-list { list-style: none; padding: 0; margin-bottom: 20px; }
#detail-specs-list li { margin-bottom: 8px; display: flex; justify-content: space-between; border-bottom: 1px dashed rgba(255,255,255,0.1); padding-bottom: 5px; }
#detail-specs-list li span:first-child { color: var(--text-muted); }
#detail-specs-list li span:last-child { font-weight: bold; }

/* ФОРМА */
.order-form { margin-top: 30px; background: rgba(30, 30, 30, 0.6); padding: 25px; border-radius: 20px; border: 1px solid rgba(255,255,255,0.05); backdrop-filter: blur(10px); }
.input-group { margin-bottom: 20px; text-align: left; }
.input-group label { display: block; font-size: 0.85rem; color: var(--text-muted); margin-bottom: 8px; margin-left: 5px; font-weight: 600; }
.order-form input[type="text"], .order-form textarea, .phone-wrapper { width: 100%; background: #252525; border: 2px solid transparent; border-radius: 15px; color: white; box-sizing: border-box; font-size: 1rem; transition: 0.3s; background-clip: padding-box; box-shadow: inset 0 2px 5px rgba(0,0,0,0.3); }
.order-form input[type="text"], .order-form textarea { padding: 15px; }
.order-form input:focus, .order-form textarea:focus, .phone-wrapper:focus-within { border-color: var(--secondary); box-shadow: 0 0 20px rgba(176, 38, 255, 0.4); background: #2a1a2f; outline: none; }
.phone-wrapper { display: flex; align-items: center; overflow: hidden; padding: 0; }
.phone-static { padding: 15px 12px; background: rgba(255,255,255,0.05); color: var(--text-muted); font-weight: bold; font-size: 1rem; border-right: 1px solid rgba(255,255,255,0.1); }
.phone-select { background: rgba(255,255,255,0.05); color: white; border: none; border-right: 1px solid rgba(255,255,255,0.1); padding: 15px 8px; font-size: 1rem; outline: none; cursor: pointer; font-weight: bold; text-align: center; }
#phoneNumber { flex-grow: 1; border: none; background: transparent; color: white; padding: 15px; font-size: 1rem; outline: none; font-weight: 600; }
.btn-order { width: 100%; background: var(--accent-gradient); color: #fff; font-weight: 900; font-size: 1.2rem; padding: 18px; border: none; border-radius: 15px; cursor: pointer; text-transform: uppercase; box-shadow: 0 10px 30px -10px rgba(176, 38, 255, 0.6); margin-top: 15px; transition: 0.3s; }
.input-error { border-color: var(--danger) !important; box-shadow: 0 0 20px rgba(255, 77, 77, 0.4) !important; animation: shakeInput 0.3s; }
@keyframes shakeInput { 0% { transform: translateX(0); } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } 100% { transform: translateX(0); } }

/* НИЖНЕЕ МЕНЮ */
.bottom-nav { 
    position: fixed; bottom: 0; left: 0; width: 100%; height: var(--nav-height); 
    background: rgba(18, 18, 18, 0.95); backdrop-filter: blur(15px);
    border-top: 1px solid rgba(255,255,255,0.1); 
    display: flex; justify-content: space-around; align-items: center; z-index: 100;
}
.nav-item { 
    display: flex; flex-direction: column; align-items: center; 
    color: var(--text-muted); 
    width: 20%; 
    transition: 0.3s; 
}
.nav-item.active { color: var(--primary); transform: translateY(-4px); }
.nav-icon { font-size: 1.4rem; margin-bottom: 3px; }
.nav-text { font-size: 0.6rem; font-weight: 600; }

.info-card { background: var(--bg-card); padding: 25px; border-radius: 20px; border: 1px solid rgba(255,255,255,0.05); }
.modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.9); z-index: 2000; justify-content: center; align-items: center; backdrop-filter: blur(10px); }
.modal-content { background: #1e1e1e; padding: 30px; border: 2px solid var(--primary); width: 85%; max-width: 400px; text-align: center; border-radius: 20px; position: relative; box-shadow: 0 0 30px rgba(0, 255, 136, 0.3); }
.close-modal { position: absolute; top: 15px; right: 15px; font-size: 26px; color: var(--text-muted); padding: 5px; cursor: pointer; }
.flavor-chip { padding: 12px 18px; background: rgba(255,255,255,0.05); border-radius: 25px; font-size: 0.95rem; cursor: pointer; border: 1px solid rgba(255,255,255,0.1); transition: 0.3s; font-weight: 600; }
.flavor-chip:hover { border-color: var(--primary); background: rgba(0, 255, 136, 0.1); }
.skeleton { background: #2a2a2a; position: relative; overflow: hidden; pointer-events: none; border-radius: 18px; }
.skeleton::after { content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent); animation: shimmer 1.5s infinite; }
.sk-img { height: 140px; background: #333; border-radius: 12px; margin-bottom: 12px; }

/* ЗАСТАВКА */
#app-splash { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: #121212; z-index: 9999; display: flex; justify-content: center; align-items: center; transition: opacity 0.5s ease; }
.splash-logo { font-size: 2.5rem; font-weight: 900; background: var(--accent-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; text-shadow: 0 0 20px rgba(0, 255, 136, 0.5); margin-bottom: 20px; animation: pulseGlow 2s infinite; }
.loader { width: 40px; height: 40px; border: 4px solid rgba(255,255,255,0.1); border-top: 4px solid var(--primary); border-radius: 50%; animation: spin 1s linear infinite; margin: 0 auto; }
@keyframes pulseGlow { 0% { text-shadow: 0 0 5px var(--primary); } 50% { text-shadow: 0 0 20px var(--primary), 0 0 10px var(--secondary); } 100% { text-shadow: 0 0 5px var(--primary); } }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* --- КАРТА --- */
.map-wrapper {
    width: 100%;
    height: 400px;
    border-radius: 20px;
    overflow: hidden;
    border: 2px solid var(--primary);
    box-shadow: 0 0 25px rgba(0, 255, 136, 0.15);
    position: relative;
    z-index: 1;
}

#map {
    width: 100%;
    height: 100%;
    background: #121212;
}

.leaflet-popup-content-wrapper, .leaflet-popup-tip {
    background: #1e1e1e;
    color: #fff;
    border: 1px solid var(--primary);
}

/* --- ВЫБОР АДРЕСА --- */
.btn-map-select {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    border-radius: 12px;
    width: 50px;
    font-size: 1.5rem;
    cursor: pointer;
    transition: 0.3s;
}
.btn-map-select:active {
    background: var(--primary);
    color: #000;
}

.map-confirm-btn {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--primary);
    color: #000;
    padding: 12px 25px;
    border-radius: 30px;
    font-weight: 800;
    box-shadow: 0 5px 20px rgba(0,0,0,0.5);
    z-index: 1000;
    cursor: pointer;
    transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    opacity: 0;
    pointer-events: none;
    white-space: nowrap;
}

.map-confirm-btn.visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    pointer-events: all;
}