/* ==========================================
   ASTROMIA STORE: LUXURY CYBER-SPACE 5.2 (FINAL TWEAKS)
========================================== */

:root {
    --accent-cyan: #00E5FF;
    --accent-cyan-glow: rgba(0, 229, 255, 0.4);
    --accent-gold: #FFB800;
    --accent-pink: #ff3366;
    --bg-dark: #050508;
    --glass-bg: rgba(20, 15, 25, 0.3);
    --glass-border: rgba(255, 255, 255, 0.08);
    --text-main: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.4);
    --color-out: #444444;
}

/* БАЗА И АНТИ-СКРОЛЛ НА МОБИЛКАХ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
.hidden-item { display: none !important; }

.luxury-dark {
    margin: 0; padding: 0;
    background-color: var(--bg-dark);
    background-image: 
        radial-gradient(circle at 0% 0%, rgba(0, 229, 255, 0.03) 0%, transparent 40%),
        radial-gradient(circle at 100% 100%, rgba(176, 38, 255, 0.03) 0%, transparent 40%);
    background-attachment: fixed;
    color: var(--text-main);
    font-family: 'Inter', 'Montserrat', sans-serif;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

.store-body { display: flex; flex-direction: column; min-height: 100vh; }
.store-container { padding-top: 100px; flex: 1; }

/* ==========================================
   ШАПКА И ЯЗЫКИ
========================================== */
.luxury-header {
    position: fixed; top: 0; left: 0; right: 0; height: 70px;
    display: flex; justify-content: space-between; align-items: center; padding: 0 5%;
    background: rgba(5, 5, 8, 0.95); backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--glass-border); z-index: 1000;
}
.header-left, .header-right { flex: 1; display: flex; align-items: center; }
.header-center { flex: 2; text-align: center; }
.header-right { justify-content: flex-end; gap: 15px; }

.nav-back-link { 
    font-size: 0.8rem; font-weight: 600; letter-spacing: 2px; 
    color: var(--text-muted); text-decoration: none; transition: 0.3s; text-transform: uppercase; 
}
.nav-back-link:hover { color: var(--accent-cyan); text-shadow: 0 0 10px var(--accent-cyan-glow); }
.nav-back-link .icon { margin-right: 5px; }

.store-title-logo { margin: 0; font-family: 'Montserrat', sans-serif; font-weight: 300; font-size: 1.2rem; letter-spacing: 4px; color: #fff; }
.store-title-logo .accent { font-weight: 600; color: var(--accent-cyan); }

/* Выпадающее меню языков */
.lang-dropdown-wrapper { position: relative; display: inline-block; }
.lang-btn { 
    background: transparent; border: 1px solid var(--glass-border); 
    color: #fff; padding: 6px 12px; border-radius: 20px; font-size: 0.85rem; 
    font-weight: 600; cursor: pointer; display: flex; align-items: center; gap: 5px; transition: 0.3s; 
}
.lang-btn:hover { border-color: var(--accent-cyan); color: var(--accent-cyan); }
.lang-menu { 
    position: absolute; top: 130%; right: 0; background: rgba(5, 5, 8, 0.98); 
    border: 1px solid var(--glass-border); border-radius: 12px; box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    padding: 8px; display: flex; flex-direction: column; min-width: 80px; 
    opacity: 0; pointer-events: none; transform: translateY(-10px); transition: 0.2s ease-in-out; z-index: 1001;
}
.lang-menu.show { opacity: 1; pointer-events: auto; transform: translateY(0); }
.lang-menu a { 
    color: var(--text-muted); text-decoration: none; padding: 10px 15px; 
    font-size: 0.85rem; font-weight: 600; border-radius: 8px; transition: 0.3s; text-align: center; 
}
.lang-menu a:hover, .lang-menu a.active { background: rgba(0, 229, 255, 0.1); color: var(--accent-cyan); }

/* Корзина */
.cart-toggle-btn { background: none; border: none; cursor: pointer; position: relative; padding: 5px; color: #fff; transition: 0.3s; }
.cart-toggle-btn:hover { transform: scale(1.1); color: var(--accent-cyan); }
.cart-icon { width: 24px; height: 24px; stroke: currentColor; stroke-width: 1.5; fill: none; }
.count-badge { position: absolute; top: -5px; right: -8px; background: var(--accent-cyan); color: #000; font-size: 0.65rem; font-weight: 800; min-width: 18px; height: 18px; border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 10px var(--accent-cyan-glow); }

/* ==========================================
   ВЫБОР ОРАКУЛА (СЛАЙДЕР)
========================================== */
.top-picks-hero { margin-bottom: 60px; }
.section-label { padding-left: 5%; font-family: 'Montserrat', sans-serif; font-size: 0.8rem; font-weight: 600; letter-spacing: 3px; color: #fff; margin-bottom: 20px; text-transform: uppercase; opacity: 0.8; }

.lookbook-slider { 
    display: flex; gap: 20px; overflow-x: auto; padding: 0 5% 20px; 
    scroll-snap-type: x mandatory; 
    scrollbar-width: thin; 
    scrollbar-color: var(--accent-cyan) rgba(255,255,255,0.05);
}
/* СТИЛЬНЫЙ СКРОЛЛБАР ДЛЯ ПК */
.lookbook-slider::-webkit-scrollbar { height: 6px; }
.lookbook-slider::-webkit-scrollbar-track { background: rgba(255,255,255,0.05); border-radius: 10px; }
.lookbook-slider::-webkit-scrollbar-thumb { background: var(--accent-cyan); border-radius: 10px; }

.lookbook-item {
    flex: 0 0 280px; 
    scroll-snap-align: start;
    background: var(--glass-bg); border: 1px solid var(--glass-border);
    border-radius: 16px; display: flex; flex-direction: column;
    transition: 0.3s ease; text-decoration: none; padding: 15px; box-sizing: border-box;
    overflow: hidden;
}
.lookbook-item:hover { border-color: var(--accent-cyan); box-shadow: 0 10px 20px rgba(0,0,0,0.4); transform: translateY(-3px); }

/* ЖЕСТКИЙ КОНТЕЙНЕР ДЛЯ ФОТО В СЛАЙДЕРЕ */
.item-visual { 
    position: relative; width: 100%; height: 240px; 
    background: rgba(0,0,0,0.4); border-radius: 12px; margin-bottom: 15px; 
    display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.item-visual img { max-width: 90%; max-height: 90%; object-fit: contain; filter: drop-shadow(0 5px 15px rgba(0,0,0,0.5)); transition: 0.3s; }
.lookbook-item:hover .item-visual img { transform: scale(1.05); }

.item-meta { text-align: left; display: flex; flex-direction: column; flex-grow: 1; }
.item-meta h4 { margin: 0 0 10px; font-size: 1.05rem; font-weight: 500; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-meta .price-block-small { margin-bottom: 15px; font-size: 1.1rem; font-weight: 600; color: var(--accent-cyan); }
.old-price-inline { text-decoration: line-through; color: var(--text-muted); font-size: 0.85rem; margin-right: 8px; font-weight: 400; }
.sale-price-inline { color: var(--accent-pink); }

.btn-cyber-outline { 
    padding: 10px; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 1px;
    border: 1px solid rgba(0, 229, 255, 0.4); color: var(--accent-cyan); 
    background: transparent; border-radius: 8px; text-align: center; margin-top: auto; transition: 0.3s; 
}
.lookbook-item:hover .btn-cyber-outline { background: var(--accent-cyan); color: #000; box-shadow: 0 0 15px var(--accent-cyan-glow); }

/* ==========================================
   УГЛОВЫЕ ПЛАШКИ (БЕЙДЖИ)
========================================== */
.card-badges {
    position: absolute; top: 10px; left: 10px;
    display: flex; flex-direction: column; gap: 6px; z-index: 10;
    align-items: flex-start;
}
.status-badge {
    padding: 5px 15px 5px 10px; 
    font-size: 0.65rem; font-weight: 800; letter-spacing: 1px; text-transform: uppercase;
    clip-path: polygon(0 0, 100% 0, 90% 100%, 0% 100%); 
    width: fit-content;
}
.badge-top { background: var(--accent-gold); color: #000; }
.badge-sale { background: var(--accent-pink); color: #fff; }
.badge-pre { background: var(--accent-cyan); color: #000; }
.badge-out { background: var(--color-out); color: rgba(255,255,255,0.7); }

/* ==========================================
   КАТАЛОГ С САЙДБАРОМ
========================================== */
.catalog-grid-layout { display: grid; grid-template-columns: 240px 1fr; gap: 40px; padding: 0 5% 80px; max-width: 1400px; margin: 0 auto; }
.catalog-sidebar { position: sticky; top: 100px; height: fit-content; }

.search-block input { width: 100%; background: rgba(0,0,0,0.3); border: 1px solid var(--glass-border); border-radius: 8px; padding: 12px 15px; color: #fff; font-size: 0.9rem; outline: none; transition: 0.3s; }
.search-block input:focus { border-color: var(--accent-cyan); box-shadow: 0 0 10px var(--accent-cyan-glow); }

.filter-group { margin-top: 40px; }
.filter-group label { display: block; font-size: 0.7rem; font-weight: 600; letter-spacing: 2px; color: var(--text-muted); margin-bottom: 20px; text-transform: uppercase; }
.filter-links button { display: block; width: 100%; text-align: left; background: none; border: none; color: var(--text-muted); padding: 10px 0; font-size: 0.9rem; cursor: pointer; transition: 0.3s; border-bottom: 1px solid var(--glass-border); }
.filter-links button:hover, .filter-links button.active { color: var(--accent-cyan); padding-left: 10px; border-color: rgba(0, 229, 255, 0.3); }

/* ==========================================
   СЕТКА ТОВАРОВ В КАТАЛОГЕ
========================================== */
.products-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); 
    gap: 25px; align-items: start; 
}

.glass-card { 
    background: var(--glass-bg); border: 1px solid var(--glass-border); 
    border-radius: 16px; padding: 15px; transition: 0.3s ease; 
    display: flex; flex-direction: column; text-decoration: none; 
    overflow: hidden; box-sizing: border-box;
}
.glass-card:hover { border-color: var(--accent-cyan); transform: translateY(-4px); box-shadow: 0 10px 20px rgba(0,0,0,0.3); }

.card-img-wrap { 
    position: relative; width: 100%; height: 220px; 
    background: rgba(0,0,0,0.2); border-radius: 12px; margin-bottom: 15px; 
    display: flex; align-items: center; justify-content: center; overflow: hidden; 
}
.card-img-wrap img { max-width: 90%; max-height: 90%; object-fit: contain; filter: drop-shadow(0 5px 10px rgba(0,0,0,0.3)); transition: 0.4s ease; }
.glass-card:hover .card-img-wrap img { transform: scale(1.05); }

.card-info { display: flex; flex-direction: column; flex-grow: 1; }
.card-info h4 { margin: 0 0 8px; font-size: 1rem; font-weight: 500; color: #fff; }
.card-price { margin: 0 0 15px; font-size: 1.1rem; font-weight: 600; color: var(--accent-cyan); }

.btn-card-buy { width: 100%; padding: 10px; background: rgba(0, 229, 255, 0.05); border: 1px solid rgba(0, 229, 255, 0.3); color: var(--accent-cyan); border-radius: 8px; font-size: 0.75rem; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; cursor: pointer; transition: 0.3s ease; margin-top: auto; text-align: center; }
.glass-card:hover .btn-card-buy { background: var(--accent-cyan); color: #000; box-shadow: 0 0 15px var(--accent-cyan-glow); }

/* АНИМАЦИЯ ОШИБКИ РАЗМЕРА */
@keyframes errorPulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 51, 102, 0); }
    50% { box-shadow: 0 0 20px 5px rgba(255, 51, 102, 0.5); border-color: var(--accent-pink); }
    100% { box-shadow: 0 0 0 0 rgba(255, 51, 102, 0); }
}
.size-error-glow { animation: errorPulse 0.5s ease-in-out; border: 1px solid transparent; border-radius: 12px; }

/* ==========================================
   КОРЗИНА И ФУТЕР
========================================== */
.cart-drawer { position: fixed; inset: 0; z-index: 2000; pointer-events: none; }
.cart-drawer.open { pointer-events: auto; }
.cart-overlay { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.7); opacity: 0; transition: 0.4s; }
.cart-drawer.open .cart-overlay { opacity: 1; }
.cart-content { position: absolute; top: 0; right: 0; bottom: 0; width: 400px; max-width: 100vw; background: rgba(5, 4, 10, 0.98); border-left: 1px solid var(--glass-border); transform: translateX(100%); transition: 0.4s ease-out; display: flex; flex-direction: column; }
.cart-drawer.open .cart-content { transform: translateX(0); }
.cart-header { padding: 25px; border-bottom: 1px solid var(--glass-border); display: flex; justify-content: space-between; }
.cart-header h3 { margin: 0; font-size: 1rem; color: #fff; letter-spacing: 1px; }
.close-cart { background: none; border: none; color: #fff; font-size: 1.5rem; cursor: pointer; }
.cart-items { flex: 1; overflow-y: auto; padding: 25px; }
.empty-cart-msg { color: var(--text-muted); text-align: center; margin-top: 50px; }
.cart-item-row { display: flex; align-items: center; gap: 15px; margin-bottom: 20px; }
.cart-item-row img { width: 50px; height: 50px; object-fit: contain; background: rgba(255,255,255,0.05); border-radius: 6px; padding: 5px; }
.cart-item-details { flex: 1; }
.cart-item-details h5 { margin: 0 0 5px; font-size: 0.9rem; color: #fff; }
.cart-item-details .price { margin: 0; color: var(--accent-cyan); font-size: 0.9rem; }
.remove-item { background: none; border: none; color: rgba(255,255,255,0.3); cursor: pointer; font-size: 1.2rem; }
.cart-footer { padding: 25px; background: #020105; border-top: 1px solid var(--glass-border); }
.total-row { display: flex; justify-content: space-between; font-size: 1rem; margin-bottom: 20px; }
#cart-total-price { color: var(--accent-cyan); font-weight: bold; font-size: 1.2rem; }
.btn-premium-action { width: 100%; padding: 15px; background: var(--accent-cyan); color: #000; border: none; border-radius: 6px; font-weight: 700; cursor: pointer; transition: 0.3s; letter-spacing: 1px; }
.btn-premium-action:hover { box-shadow: 0 0 20px var(--accent-cyan-glow); }

.luxury-footer { padding: 40px 5%; border-top: 1px solid var(--glass-border); text-align: center; background: var(--bg-dark); }
.footer-links { display: flex; justify-content: center; align-items: center; gap: 30px; margin-bottom: 20px; }
.footer-links a { color: var(--text-muted); text-decoration: none; font-size: 0.8rem; font-weight: 500; transition: 0.3s; display: flex; align-items: center; gap: 8px; }
.footer-links a:hover { color: var(--accent-cyan); }
.footer-links svg { width: 20px; height: 20px; fill: currentColor; transition: 0.3s; }
.footer-links a:hover svg { filter: drop-shadow(0 0 5px var(--accent-cyan)); transform: translateY(-2px); }
.footer-bottom { color: rgba(255,255,255,0.3); font-size: 0.7rem; letter-spacing: 1px; }

/* ==========================================
   СТРАНИЦА КОНКРЕТНОГО ТОВАРА (PRODUCT.HTML)
========================================== */
.product-page-container { max-width: 1200px; margin: 0 auto; padding: 40px 5% 100px; display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: start; }
.breadcrumbs { grid-column: 1 / -1; margin-bottom: 20px; font-size: 0.85rem; letter-spacing: 2px; color: var(--text-muted); text-transform: uppercase; }
.breadcrumbs a { color: var(--text-muted); text-decoration: none; transition: 0.3s; }
.breadcrumbs a:hover { color: var(--accent-cyan); }
.product-title { font-family: 'Montserrat', sans-serif; font-size: 2.5rem; font-weight: 300; margin: 0 0 10px; color: #fff; letter-spacing: 1px; }
.product-gender { display: inline-block; padding: 4px 10px; border: 1px solid var(--glass-border); border-radius: 4px; font-size: 0.7rem; letter-spacing: 2px; color: var(--text-muted); margin-bottom: 30px; text-transform: uppercase; }
.price-block { margin-bottom: 40px; display: flex; align-items: baseline; gap: 15px; }
.current-price { font-size: 2.5rem; font-weight: 600; color: var(--accent-cyan); }
.old-price { font-size: 1.5rem; color: rgba(255,255,255,0.3); text-decoration: line-through; }
.product-desc { font-size: 1rem; line-height: 1.6; color: var(--text-muted); margin-bottom: 40px; font-weight: 300; white-space: pre-line; }
.size-selector { margin-bottom: 40px; padding: 10px; }
.size-label { display: block; font-size: 0.8rem; letter-spacing: 2px; color: var(--text-muted); margin-bottom: 15px; text-transform: uppercase;}
.size-options { display: flex; gap: 10px; flex-wrap: wrap; }
.size-btn { background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.1); color: #fff; padding: 12px 20px; border-radius: 8px; cursor: pointer; font-family: 'Montserrat', sans-serif; font-size: 0.9rem; font-weight: 600; transition: 0.3s; }
.size-btn:hover { border-color: rgba(0,229,255,0.5); }
.size-btn.selected { background: rgba(0,229,255,0.1); border-color: var(--accent-cyan); color: var(--accent-cyan); box-shadow: 0 0 15px var(--accent-cyan-glow); }
.btn-add-massive { width: 100%; padding: 20px; background: #fff; color: #000; border: none; border-radius: 8px; font-family: 'Montserrat', sans-serif; font-size: 1rem; font-weight: 800; letter-spacing: 3px; text-transform: uppercase; cursor: pointer; transition: 0.3s; }
.btn-add-massive:hover { transform: translateY(-3px); box-shadow: 0 15px 25px rgba(255,255,255,0.2); }

.product-gallery-wrapper { display: flex; flex-direction: column; gap: 15px; }
.product-gallery { position: relative; background: var(--glass-bg); border: 1px solid var(--glass-border); border-radius: 16px; padding: 20px; height: 500px; display: flex; justify-content: center; align-items: center; overflow: hidden; }
.product-gallery img { max-width: 100%; max-height: 100%; object-fit: contain; filter: drop-shadow(0 10px 20px rgba(0,0,0,0.5)); transition: 0.3s ease; }
.gallery-thumbnails { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 5px; scrollbar-width: thin; }
.thumb-box { width: 80px; height: 80px; flex-shrink: 0; background: rgba(0,0,0,0.5); border: 2px solid transparent; border-radius: 8px; padding: 5px; cursor: pointer; transition: 0.3s; overflow: hidden; }
.thumb-box:hover { border-color: rgba(255,255,255,0.3); }
.thumb-box img { width: 100%; height: 100%; object-fit: contain; }

/* ==========================================
   МОБИЛЬНАЯ АДАПТАЦИЯ (ИДЕАЛЬНАЯ ШАПКА И СЕТКА)
========================================== */
@media (max-width: 900px) {
    .luxury-header { padding: 0 4%; height: 65px; }
    
    /* Уменьшили шрифт логотипа и сделали отступы меньше, чтобы шапка дышала */
    .store-title-logo { font-size: 0.85rem; letter-spacing: 1px; }
    .header-right { gap: 8px; }
    .lang-btn { padding: 6px 10px; font-size: 0.75rem; }
    
    .header-left .nav-back-link { font-size: 0; } 
    .header-left .nav-back-link .icon { font-size: 1.2rem; margin: 0; }
    
    .store-container { padding-top: 85px; overflow-x: hidden; }
    
    /* На мобилке скрываем скроллбар, так как есть палец */
    .lookbook-slider { scrollbar-width: none; }
    .lookbook-slider::-webkit-scrollbar { display: none; }
    
    .lookbook-item { flex: 0 0 80vw; max-width: 320px; padding: 15px; } 
    .item-visual { height: 200px; margin-bottom: 10px; }
    
    /* Фильтры и отступы */
    .catalog-grid-layout { display: flex; flex-direction: column; padding-top: 0; gap: 20px; }
    .catalog-sidebar { position: static; border-bottom: 1px solid var(--glass-border); padding-bottom: 15px; }
    .filter-group { margin-top: 10px; }
    
    /* Горизонтальный скролл фильтров */
    .filter-links { display: flex; overflow-x: auto; gap: 10px; padding-bottom: 5px; scrollbar-width: none; }
    .filter-links::-webkit-scrollbar { display: none; }
    .filter-links button { width: auto; white-space: nowrap; padding: 8px 16px; border: 1px solid var(--glass-border); border-radius: 20px; font-size: 0.8rem; }
    .filter-links button.active { border-color: var(--accent-cyan); color: var(--accent-cyan); background: rgba(0, 229, 255, 0.05); }
    
    .products-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .glass-card { padding: 10px; border-radius: 12px; }
    .card-img-wrap { height: 160px; margin-bottom: 10px; padding: 5px; }
    
    .card-info h4 { font-size: 0.8rem; margin-bottom: 5px; }
    .card-price { font-size: 0.95rem; margin-bottom: 10px; }
    .card-price .old-price-inline { font-size: 0.75rem; margin-right: 5px; }
    .btn-card-buy { padding: 8px; font-size: 0.65rem; }
    
    /* Страница товара на мобилке */
    .product-page-container { grid-template-columns: 1fr; gap: 30px; padding-top: 20px; }
    .product-title { font-size: 1.8rem; }
    .product-gallery { height: 350px; }
}

/* ==========================================
   ТЕРМИНАЛ БОССА (АДМИНКА) 
========================================== */
.admin-body { background-color: var(--bg-dark); color: #fff; margin: 0; }
#login-screen { position: fixed; inset: 0; background: var(--bg-dark); display: flex; flex-direction: column; align-items: center; justify-content: center; z-index: 9999; }
.pin-input { background: transparent; border: 1px solid var(--accent-cyan); color: var(--accent-cyan); text-align: center; font-size: 2rem; padding: 10px; width: 250px; letter-spacing: 0.5em; outline: none; border-radius: 4px; }
#admin-dashboard { display: none; padding: 30px; max-width: 1200px; margin: 0 auto; }
.tab-nav { display: flex; gap: 20px; border-bottom: 1px solid rgba(255, 255, 255, 0.1); margin-bottom: 30px; padding-bottom: 10px; }
.tab-btn { background: none; border: none; color: var(--text-muted); font-size: 1rem; cursor: pointer; transition: 0.3s; }
.tab-btn.active { color: var(--accent-cyan); border-bottom: 2px solid var(--accent-cyan); }
.admin-table { width: 100%; border-collapse: collapse; background: rgba(255, 255, 255, 0.02); border-radius: 8px; }
.admin-table th, .admin-table td { padding: 15px; border-bottom: 1px solid var(--glass-border); }
.admin-table th { color: var(--accent-cyan); }
.admin-table img { max-width: 50px; border-radius: 4px; }
.admin-form-group { display: flex; gap: 15px; margin-bottom: 20px; flex-wrap: wrap; }
.admin-input { background: rgba(0, 0, 0, 0.5); border: 1px solid rgba(255, 255, 255, 0.2); color: #fff; padding: 10px; border-radius: 4px; flex-grow: 1; }

.btn-disabled { background: var(--color-out) !important; color: rgba(255,255,255,0.4) !important; border: none !important; cursor: not-allowed !important; }