/* ============================================
   ДОБРЫЙ БОБЁР - Брендированный дизайн
   ============================================ */

:root {
    /* Современная цветовая палитра - Темно-синий/Фиолетовый с яркими акцентами */
    --primary-color: #6366F1;      /* Индиго */
    --primary-dark: #4F46E5;
    --primary-light: #818CF8;
    --primary-glow: #8B5CF6;
    --secondary-color: #1E1B4B;     /* Темно-синий */
    --secondary-light: #312E81;
    --accent-color: #FFFFFF;        /* Белый */
    --accent-secondary: #F59E0B;    /* Яркий оранжевый для акцентов */
    --accent-gray: #F1F5F9;
    --border-color: #E2E8F0;        /* Цвет границ */
    --success-color: #10B981;
    --error-color: #EF4444;
    --warning-color: #F59E0B;
    
    /* Текст */
    --text-primary: #1A202C;        /* Темно-серый */
    --text-secondary: #4A5568;
    --text-light: #718096;
    --text-white: #FFFFFF;
    
    /* Фон */
    --bg-primary: #FFFFFF;          /* Белый */
    --bg-secondary: #F8FAFC;        /* Очень светлый синеватый */
    --bg-dark: #0F172A;             /* Очень темно-синий */
    --bg-gradient: linear-gradient(135deg, #6366F1 0%, #8B5CF6 50%, #1E1B4B 100%);
    --bg-gradient-hero: linear-gradient(135deg, #6366F1 0%, #4F46E5 50%, #312E81 100%);
    --bg-glass: rgba(255, 255, 255, 0.95);
    --bg-glass-dark: rgba(15, 23, 42, 0.9);
    
    /* Тени и эффекты */
    --shadow-sm: 0 2px 4px rgba(99, 102, 241, 0.2);
    --shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
    --shadow-lg: 0 10px 30px rgba(99, 102, 241, 0.4);
    --shadow-xl: 0 20px 50px rgba(99, 102, 241, 0.5);
    --shadow-glow: 0 0 20px rgba(139, 92, 246, 0.6);
    --shadow-neon: 0 0 10px rgba(139, 92, 246, 0.8), 0 0 20px rgba(99, 102, 241, 0.6);
    
    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --backdrop-blur: blur(10px);
    
    /* Анимации */
    --transition-fast: 0.15s ease;
    --transition: 0.3s ease;
    --transition-slow: 0.5s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-primary);
    background: linear-gradient(135deg, #F8FAFC 0%, #F1F5F9 50%, #E2E8F0 100%);
    background-attachment: fixed;
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    overscroll-behavior: none;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(99, 102, 241, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(139, 92, 246, 0.08) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
    /* Анимация убрана для улучшения производительности */
}

.main {
    position: relative;
    z-index: 1;
}

/* ========== РАСШИРЕННЫЕ АНИМАЦИИ ========== */

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

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

/* Анимация bounce убрана - слишком дерганная */

/* Премиальная анимация бобра убрана - слишком сложная и дерганная */

/* Анимация дыхания с пульсацией */
@keyframes breathe-glow {
    0%, 100% {
        filter: drop-shadow(0 0 10px rgba(99, 102, 241, 0.5)) drop-shadow(0 0 20px rgba(139, 92, 246, 0.3));
        opacity: 1;
    }
    50% {
        filter: drop-shadow(0 0 20px rgba(99, 102, 241, 0.8)) drop-shadow(0 0 30px rgba(139, 92, 246, 0.6)) drop-shadow(0 0 40px rgba(99, 102, 241, 0.4));
        opacity: 0.95;
    }
}

/* 3D волновая анимация */
@keyframes wave-3d {
    0%, 100% {
        transform: perspective(500px) rotateY(0deg) rotateX(0deg) translateZ(0px);
    }
    25% {
        transform: perspective(500px) rotateY(15deg) rotateX(5deg) translateZ(10px);
    }
    50% {
        transform: perspective(500px) rotateY(0deg) rotateX(-5deg) translateZ(15px);
    }
    75% {
        transform: perspective(500px) rotateY(-15deg) rotateX(5deg) translateZ(10px);
    }
}

/* Элегантное покачивание */
@keyframes elegant-sway {
    0%, 100% {
        transform: translateY(0) rotate(0deg) scale(1);
    }
    12.5% {
        transform: translateY(-8px) rotate(-3deg) scale(1.05);
    }
    25% {
        transform: translateY(-14px) rotate(2deg) scale(1.08);
    }
    37.5% {
        transform: translateY(-10px) rotate(-2deg) scale(1.06);
    }
    50% {
        transform: translateY(-4px) rotate(1deg) scale(1.03);
    }
    62.5% {
        transform: translateY(-12px) rotate(-2deg) scale(1.07);
    }
    75% {
        transform: translateY(-16px) rotate(3deg) scale(1.09);
    }
    87.5% {
        transform: translateY(-8px) rotate(-1deg) scale(1.05);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(229, 62, 62, 0.7);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 0 0 10px rgba(229, 62, 62, 0);
    }
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 5px var(--primary-color), 0 0 10px var(--primary-color);
    }
    50% {
        box-shadow: 0 0 10px var(--primary-color), 0 0 20px var(--primary-color), 0 0 30px var(--primary-color);
    }
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    33% {
        transform: translateY(-10px) rotate(2deg);
    }
    66% {
        transform: translateY(-5px) rotate(-2deg);
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes scale-in {
    from {
        transform: scale(0);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes slide-up {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slide-down {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes glow {
    0%, 100% {
        filter: drop-shadow(0 0 5px var(--primary-color));
    }
    50% {
        filter: drop-shadow(0 0 20px var(--primary-color)) drop-shadow(0 0 30px var(--primary-color));
    }
}

@keyframes gradient-shift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(4);
        opacity: 0;
    }
}

@keyframes typing {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

@keyframes blink {
    0%, 50% {
        opacity: 1;
    }
    51%, 100% {
        opacity: 0;
    }
}

/* Контейнер */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
    width: 100%;
}

/* Выравнивание для всех секций */
section {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    box-sizing: border-box;
}

section .container {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

/* ========== ШАПКА ========== */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.15);
    position: sticky;
    top: 0;
    z-index: 1000;
    animation: slideDown 0.5s ease;
    border-bottom: 2px solid rgba(99, 102, 241, 0.1);
    will-change: transform;
    transform: translateZ(0);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 800;
    transition: transform var(--transition);
    animation: slideInRight 0.5s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.logo-icon {
    font-size: 2.5rem;
    filter: drop-shadow(0 0 10px rgba(99, 102, 241, 0.6)) drop-shadow(0 0 20px rgba(139, 92, 246, 0.4));
    transition: all var(--transition);
    display: inline-block;
}

.beaver-svg-icon {
    display: inline-block;
    width: 2.5rem;
    height: 2.5rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cdefs%3E%3ClinearGradient id='beaverGradient' x1='0%25' y1='0%25' x2='100%25' y2='100%25'%3E%3Cstop offset='0%25' style='stop-color:%236366F1;stop-opacity:1' /%3E%3Cstop offset='50%25' style='stop-color:%238B5CF6;stop-opacity:1' /%3E%3Cstop offset='100%25' style='stop-color:%234F46E5;stop-opacity:1' /%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M50 10 C30 10, 15 25, 15 45 C15 55, 20 65, 30 70 L30 85 L50 90 L70 85 L70 70 C80 65, 85 55, 85 45 C85 25, 70 10, 50 10 Z' fill='url(%23beaverGradient)' stroke='%231E1B4B' stroke-width='2'/%3E%3Ccircle cx='40' cy='35' r='4' fill='%23FFFFFF'/%3E%3Ccircle cx='60' cy='35' r='4' fill='%23FFFFFF'/%3E%3Ccircle cx='40' cy='35' r='2' fill='%231E1B4B'/%3E%3Ccircle cx='60' cy='35' r='2' fill='%231E1B4B'/%3E%3Cellipse cx='50' cy='50' rx='8' ry='5' fill='%231E1B4B'/%3E%3Cpath d='M50 55 L45 60 L50 58 L55 60 Z' fill='%231E1B4B'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.logo:hover .logo-icon {
    transform: scale(1.05);
    filter: drop-shadow(0 0 15px rgba(99, 102, 241, 0.8)) drop-shadow(0 0 25px rgba(139, 92, 246, 0.6));
}

.logo:active .logo-icon {
    transform: scale(1.02);
}

.logo-text {
    background: var(--bg-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Навигация */
.nav {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.95rem;
    transition: all var(--transition);
    position: relative;
    padding: 0.5rem 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width var(--transition);
}

.nav-link:hover {
    color: var(--primary-color);
    transform: translateY(-2px);
}

.nav-link:hover::after {
    width: 100%;
}

.cart-link {
    position: relative;
}

.cart-count {
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    padding: 0.25rem 0.6rem;
    font-size: 0.75rem;
    font-weight: bold;
    margin-left: 0.5rem;
    /* Анимация pulse убрана */
    box-shadow: var(--shadow-sm);
}

/* Мобильное меню */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.75rem;
    cursor: pointer;
    color: var(--text-primary);
    padding: 0.5rem;
    transition: transform var(--transition);
}

.mobile-menu-btn:hover {
    transform: scale(1.1);
}

.mobile-menu-btn:active {
    transform: scale(0.95);
}

/* ========== КНОПКИ ========== */
.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition);
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    animation: fadeIn 0.6s ease backwards;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
    z-index: 0;
}

.btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    width: 400px;
    height: 400px;
}

.btn:hover::after {
    left: 100%;
}

.btn > * {
    position: relative;
    z-index: 1;
}

.btn-primary {
    background: var(--bg-gradient);
    background-size: 200% 200%;
    color: white;
    box-shadow: var(--shadow), 0 0 20px rgba(229, 62, 62, 0.3);
    animation: fadeIn 0.6s ease backwards;
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: var(--shadow-xl), var(--shadow-glow);
    /* Анимации убраны */
}

.btn-primary:active {
    transform: translateY(-1px) scale(1.02);
    animation: shake 0.3s ease;
}

.btn-secondary {
    background: var(--bg-primary);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 12px;
    width: 100%;
    margin-top: 1rem;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
    transition: all 0.3s ease;
}
.btn-large:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4);
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    border-radius: 8px;
    font-weight: 600;
    white-space: nowrap;
}

/* ========== HERO СЕКЦИЯ ========== */
.hero {
    background: linear-gradient(135deg, #6366F1 0%, #4F46E5 50%, #312E81 100%);
    color: white;
    padding: 2rem 0 1.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 30% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 70% 50%, rgba(229, 62, 62, 0.2) 0%, transparent 50%);
    animation: gradient-shift 10s ease infinite;
    background-size: 200% 200%;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 600px;
    margin: 0 auto;
}

.hero-title {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    font-weight: 900;
    text-shadow: 
        0 0 10px rgba(255, 255, 255, 0.5),
        0 0 20px rgba(255, 255, 255, 0.3),
        2px 2px 4px rgba(0, 0, 0, 0.3);
    animation: fadeIn 1s ease 0.2s backwards;
    position: relative;
    z-index: 1;
}

.highlight {
    text-decoration: underline;
    text-decoration-thickness: 3px;
    text-underline-offset: 8px;
}

.hero-subtitle {
    font-size: 1rem;
    margin-bottom: 1rem;
    opacity: 0.95;
    animation: fadeIn 1s ease 0.4s backwards;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    animation: fadeIn 1s ease 0.6s backwards;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 0.5rem;
}

.stat-label {
    display: block;
    opacity: 0.9;
    font-size: 1rem;
}

.hero-actions {
    margin-top: 2rem;
    animation: fadeIn 1s ease 0.8s backwards;
}

/* ========== СЕКЦИЯ НОВИНОК ========== */
.featured-section {
    padding: 2rem 0 3rem 0;
    background: linear-gradient(135deg, #6366F1 0%, #4F46E5 50%, #312E81 100%);
    position: relative;
}

.section-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: #FFFFFF;
    margin-bottom: 0.5rem;
    text-align: center;
    position: relative;
    display: inline-block;
    width: 100%;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.featured-section .section-subtitle {
    display: none;
}

/* ========== СЕТКА ТОВАРОВ ========== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
    animation: fadeIn 0.8s ease;
    perspective: 1000px;
}

.products-grid .product-card {
    transform-style: preserve-3d;
}

.product-card {
    background: var(--bg-primary);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 20px;
    padding: 3px;
    background: var(--bg-gradient);
    background-size: 200% 200%;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity var(--transition), background-position var(--transition-slow);
    z-index: -1;
    animation: gradient-shift 3s ease infinite;
}

.product-card:nth-child(1) { animation-delay: 0.1s; }
.product-card:nth-child(2) { animation-delay: 0.2s; }
.product-card:nth-child(3) { animation-delay: 0.3s; }
.product-card:nth-child(4) { animation-delay: 0.4s; }
.product-card:nth-child(5) { animation-delay: 0.5s; }
.product-card:nth-child(6) { animation-delay: 0.6s; }

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.product-card:hover::before {
    opacity: 1;
}

.product-card:active {
    transform: translateY(-8px) scale(1.02);
    animation: shake 0.3s ease;
}

.product-image {
    width: 100%;
    height: 180px;
    overflow: hidden;
    background: var(--bg-secondary);
    position: relative;
    flex-shrink: 0;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow), filter var(--transition);
    filter: brightness(1) saturate(1);
}

.product-card:hover .product-image img {
    transform: scale(1.15) rotate(2deg);
    filter: brightness(1.1) saturate(1.2);
}

.product-image {
    position: relative;
    overflow: hidden;
}

.product-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.6s;
}

.product-card:hover .product-image::after {
    left: 100%;
}

.product-image.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    background: linear-gradient(135deg, #F1F5F9 0%, #E2E8F0 100%);
}

.product-image.placeholder::before {
    content: '';
    width: 5rem;
    height: 5rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cdefs%3E%3ClinearGradient id='beaverGradient' x1='0%25' y1='0%25' x2='100%25' y2='100%25'%3E%3Cstop offset='0%25' style='stop-color:%236366F1;stop-opacity:1' /%3E%3Cstop offset='50%25' style='stop-color:%238B5CF6;stop-opacity:1' /%3E%3Cstop offset='100%25' style='stop-color:%234F46E5;stop-opacity:1' /%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M50 10 C30 10, 15 25, 15 45 C15 55, 20 65, 30 70 L30 85 L50 90 L70 85 L70 70 C80 65, 85 55, 85 45 C85 25, 70 10, 50 10 Z' fill='url(%23beaverGradient)' stroke='%231E1B4B' stroke-width='2'/%3E%3Ccircle cx='40' cy='35' r='4' fill='%23FFFFFF'/%3E%3Ccircle cx='60' cy='35' r='4' fill='%23FFFFFF'/%3E%3Ccircle cx='40' cy='35' r='2' fill='%231E1B4B'/%3E%3Ccircle cx='60' cy='35' r='2' fill='%231E1B4B'/%3E%3Cellipse cx='50' cy='50' rx='8' ry='5' fill='%231E1B4B'/%3E%3Cpath d='M50 55 L45 60 L50 58 L55 60 Z' fill='%231E1B4B'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    display: inline-block;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.product-image.placeholder {
    background: linear-gradient(135deg, #F1F5F9 0%, #E2E8F0 100%);
}

.error-placeholder {
    background: linear-gradient(135deg, #F1F5F9 0%, #E2E8F0 100%);
}

/* Загрузка аватарок */
.product-image img[data-loading="true"] {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

.product-image img[data-error="true"] {
    display: none;
}

.product-image img[data-error="true"] + .error-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #F1F5F9 0%, #E2E8F0 100%);
}

.error-placeholder {
    display: none;
}

.product-info {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.product-meta {
    display: flex;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.product-meta > span {
    white-space: nowrap;
}

.product-info-row {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
}

.info-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #F8FAFC 0%, #F1F5F9 100%);
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
    border: 1px solid #E2E8F0;
}

.info-badge--price {
    border-color: rgba(99, 102, 241, 0.35);
    color: var(--primary-color);
    font-weight: 800;
}

.product-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.product-title {
    font-size: 1rem;
    margin: 0;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-vk {
    background: linear-gradient(135deg, #0077FF 0%, #0088FF 100%);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 2px 8px rgba(0, 119, 255, 0.3);
}

.btn-vk:hover {
    background: linear-gradient(135deg, #0088FF 0%, #0099FF 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 119, 255, 0.4);
}

.description-note {
    background: linear-gradient(135deg, #F0F9FF 0%, #E0F2FE 100%);
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
    margin-top: 1rem;
    font-size: 0.85rem;
    font-style: italic;
}

.dump-details {
    background: linear-gradient(135deg, #F8FAFC 0%, #F1F5F9 100%);
    border-radius: 12px;
    margin: 1rem 0;
    overflow: hidden;
}

.dump-details-toggle {
    padding: 1rem 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #F8FAFC 0%, #F1F5F9 100%);
    transition: all 0.3s ease;
}

.dump-details-toggle:hover {
    background: linear-gradient(135deg, #F1F5F9 0%, #E2E8F0 100%);
}

.dump-details-toggle h4 {
    font-size: 1.1rem;
    color: var(--text-primary);
    margin: 0;
    font-weight: 600;
}

.toggle-icon {
    font-size: 1rem;
    transition: transform 0.3s ease;
    color: var(--primary-color);
}

.dump-details-toggle.active .toggle-icon {
    transform: rotate(180deg);
}

.archive-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding: 0 1.5rem;
}

.archive-content.expanded {
    max-height: 1000px;
    padding: 0 1.5rem 1.5rem 1.5rem;
}

.dump-details ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.dump-details li {
    padding: 0.4rem 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

.product-city {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.product-date {
    color: var(--text-light);
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    font-style: italic;
}

.product-size {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
}

.product-gender {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
}

.product-views {
    color: var(--text-light);
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
}

.product-quick-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin: 0.6rem 0 0.4rem;
}

.product-price-pill {
    display: inline-flex;
    align-items: baseline;
    gap: 0.5rem;
    padding: 0.35rem 0.75rem;
    border-radius: 12px;
    background: #F1F5F9;
    border: 1px solid var(--primary-light);
    box-shadow: 0 2px 10px rgba(99, 102, 241, 0.10);
}

.product-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
}

.product-price {
    /* Card price: consistent height/alignment across cards + outlined pill */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 4.75rem;
    height: 2rem;
    padding: 0 0.7rem;
    border-radius: 999px;
    border: 1px solid rgba(99, 102, 241, 0.35);
    background: rgba(99, 102, 241, 0.10);
    box-shadow: 0 2px 10px rgba(99, 102, 241, 0.10);
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--primary-color);
    line-height: 1;
    white-space: nowrap;
}

/* ========== СТРАНИЦА ТОВАРА ========== */
.product-section {
    padding: 2.2rem 0;
    animation: fadeIn 0.8s ease;
}

.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    background: var(--bg-primary);
    padding: 1.5rem;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
}

.product-main-image {
    width: 100%;
    height: 460px;
    object-fit: cover;
    border-radius: 16px;
    box-shadow: var(--shadow);
    transition: transform var(--transition);
}

.product-main-image:hover {
    transform: scale(1.02);
}

.product-main-image.placeholder {
    background: linear-gradient(135deg, #F1F5F9 0%, #E2E8F0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8rem;
}

.product-price-section {
    /* Keep price on the same “level” as other characteristics (no big card) */
    margin: 0.6rem 0 0.4rem;
    padding: 0;
    background: transparent;
    border: none;
}

.product-price-row {
    display: flex;
    align-items: baseline;
    justify-content: flex-start;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.price-discount {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.4rem;
}

.original-price {
    text-decoration: line-through;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 600;
}

.discount-badge {
    background: var(--success-color);
    color: white;
    padding: 0.18rem 0.55rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: bold;
}

.current-price {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--primary-color);
}

.discount-text {
    color: var(--success-color);
    margin-top: 0.4rem;
    font-weight: 600;
    font-size: 0.8rem;
}

.product-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.75rem;
    flex-wrap: wrap;
}

.product-actions .btn {
    flex: 1;
    min-width: 150px;
}

/* ========== КОРЗИНА ========== */
.cart-section {
    padding: 3rem 0;
    animation: fadeIn 0.8s ease;
}

.cart-empty {
    text-align: center;
    padding: 4rem 0;
}

.empty-cart-icon {
    width: 8rem;
    height: 8rem;
    margin-bottom: 1rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cdefs%3E%3ClinearGradient id='beaverGradient' x1='0%25' y1='0%25' x2='100%25' y2='100%25'%3E%3Cstop offset='0%25' style='stop-color:%236366F1;stop-opacity:1' /%3E%3Cstop offset='50%25' style='stop-color:%238B5CF6;stop-opacity:1' /%3E%3Cstop offset='100%25' style='stop-color:%234F46E5;stop-opacity:1' /%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M50 10 C30 10, 15 25, 15 45 C15 55, 20 65, 30 70 L30 85 L50 90 L70 85 L70 70 C80 65, 85 55, 85 45 C85 25, 70 10, 50 10 Z' fill='url(%23beaverGradient)' stroke='%231E1B4B' stroke-width='2'/%3E%3Ccircle cx='40' cy='35' r='4' fill='%23FFFFFF'/%3E%3Ccircle cx='60' cy='35' r='4' fill='%23FFFFFF'/%3E%3Ccircle cx='40' cy='35' r='2' fill='%231E1B4B'/%3E%3Ccircle cx='60' cy='35' r='2' fill='%231E1B4B'/%3E%3Cellipse cx='50' cy='50' rx='8' ry='5' fill='%231E1B4B'/%3E%3Cpath d='M50 55 L45 60 L50 58 L55 60 Z' fill='%231E1B4B'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    display: inline-block;
    filter: drop-shadow(0 0 15px rgba(99, 102, 241, 0.6)) drop-shadow(0 0 25px rgba(139, 92, 246, 0.4));
}

.cart-items {
    background: var(--bg-primary);
    border-radius: 16px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cart-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: #FFFFFF;
    border-radius: 12px;
    border: 1px solid #E2E8F0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    animation: fadeIn 0.5s ease;
    transition: all 0.3s ease;
}

.cart-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-image {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    transition: transform var(--transition);
    flex-shrink: 0;
}

.cart-item-image:hover {
    transform: scale(1.05);
}

.cart-item-image.placeholder {
    background: linear-gradient(135deg, #F1F5F9 0%, #E2E8F0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    width: 100px;
    height: 100px;
}

.cart-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    min-width: 0;
}

.cart-item-title {
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
}

.cart-item-city {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0;
}

.cart-item-meta {
    color: var(--text-light);
    font-size: 0.8rem;
    margin-bottom: 0;
}

.cart-item-date {
    color: var(--text-light);
    font-size: 0.8rem;
    font-style: italic;
    margin-bottom: 0;
}

.cart-item-price {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: flex-start;
    gap: 0.3rem;
    margin-left: auto;
    flex-shrink: 0;
}

.cart-item-old-price {
    font-size: 0.85rem;
    color: #94A3B8;
    text-decoration: line-through;
    font-weight: 500;
}

.cart-item-current-price {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--primary-color);
}

.cart-summary {
    background: var(--bg-primary);
    padding: 1.5rem;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    position: sticky;
    bottom: 20px;
    border: 1px solid #E2E8F0;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 1rem;
}

.summary-row.total {
    font-size: 1.5rem;
    font-weight: 900;
    border-bottom: none;
    color: var(--primary-color);
    margin-top: 0.5rem;
    padding-top: 1rem;
}

/* ========== ПОИСК И ФИЛЬТРЫ ========== */
.catalog-controls {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    max-width: 100%;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.search-box {
    flex: 1 1 100%;
    display: flex;
    gap: 0.5rem;
    min-width: 200px;
    max-width: 100%;
}

.search-input {
    flex: 1;
    padding: 0.875rem 1.25rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 1rem;
    transition: all var(--transition);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.search-btn {
    padding: 0.875rem 1.5rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1.25rem;
    transition: all var(--transition);
}

.search-btn:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

.filter-select {
    padding: 0.7rem 0.9rem;
    border: 2px solid #E2E8F0;
    border-radius: 10px;
    font-size: 0.85rem;
    min-width: 140px;
    max-width: 100%;
    flex: 0 1 auto;
    background: linear-gradient(135deg, #FFFFFF 0%, #F8FAFC 100%);
    color: var(--text-primary);
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(99, 102, 241, 0.1);
}

.filter-select:hover {
    border-color: var(--primary-light);
    box-shadow: 0 4px 8px rgba(99, 102, 241, 0.2);
    transform: translateY(-1px);
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.filter-input {
    padding: 0.7rem;
    border: 2px solid #E2E8F0;
    border-radius: 10px;
    font-size: 0.85rem;
    max-width: 100%;
    background: linear-gradient(135deg, #FFFFFF 0%, #F8FAFC 100%);
    color: var(--text-primary);
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(99, 102, 241, 0.1);
}

.filter-input:hover {
    border-color: var(--primary-light);
}

.filter-box {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 0 1 auto;
    min-width: 0;
}

.filter-box:has(input) {
    flex: 0 1 auto;
}

.filter-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* ========== ПАГИНАЦИЯ ========== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.page-btn {
    padding: 0.625rem 1.125rem;
    border: 2px solid var(--border-color);
    background: var(--bg-primary);
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--transition);
    font-weight: 600;
}

.page-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
}

.page-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

/* ========== УВЕДОМЛЕНИЯ ========== */
.notification {
    position: fixed;
    top: 100px;
    right: 20px;
    padding: 1.5rem 2rem;
    border-radius: 16px;
    box-shadow: var(--shadow-xl), var(--shadow-glow);
    z-index: 10001;
    animation: fadeIn 0.3s ease;
    max-width: 400px;
    font-weight: 700;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    transform-origin: top right;
    will-change: transform, opacity;
    transform: translateZ(0);
}

.notification::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, transparent 100%);
    pointer-events: none;
}

.notification.success {
    background: linear-gradient(135deg, var(--success-color) 0%, #38A169 100%);
    color: white;
    animation: fadeIn 0.3s ease;
}

.notification.error {
    background: linear-gradient(135deg, var(--error-color) 0%, var(--primary-dark) 100%);
    color: white;
    animation: slideInRight 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55), shake 0.5s ease 0.5s;
}

.notification.info {
    background: linear-gradient(135deg, #6366F1 0%, #4338CA 100%);
    color: #FFFFFF;
}

.notification.hidden {
    display: none;
}

.auth-guard {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    left: 1.5rem;
    max-width: 420px;
    margin: 0 auto;
    z-index: 1100;
    transition: transform 0.25s ease, opacity 0.25s ease;
    opacity: 1;
    transform: translateY(0);
}

.auth-guard.hidden {
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
}

.auth-guard__content {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.2rem 1.4rem;
    background: rgba(15, 23, 42, 0.88);
    border: 1px solid rgba(99, 102, 241, 0.35);
    border-radius: 16px;
    box-shadow: 0 20px 45px -20px rgba(15, 23, 42, 0.6);
    color: #F8FAFC;
    position: relative;
    backdrop-filter: blur(18px);
}

.auth-guard__icon {
    font-size: 1.8rem;
    line-height: 1;
}

.auth-guard__text h3 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
}

.auth-guard__text p {
    margin: 0.25rem 0 0;
    font-size: 0.9rem;
    color: rgba(226, 232, 240, 0.85);
}

.auth-guard__bot {
    color: #A5B4FC;
    font-weight: 600;
}

.auth-guard__action {
    margin-left: auto;
    background: #6366F1;
    color: #FFF;
    padding: 0.6rem 1rem;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    white-space: nowrap;
}

.auth-guard__action:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px -12px rgba(99, 102, 241, 0.8);
}

.auth-guard__close {
    position: absolute;
    top: 0.4rem;
    right: 0.6rem;
    background: transparent;
    border: none;
    color: rgba(226, 232, 240, 0.6);
    font-size: 1.2rem;
    cursor: pointer;
    transition: color 0.2s ease;
}

.auth-guard__close:hover {
    color: #FFFFFF;
}

@media (max-width: 600px) {
    .auth-guard {
        right: 1rem;
        left: 1rem;
    }

    .auth-guard__content {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .auth-guard__action {
        width: 100%;
        text-align: center;
    }
}

/* ========== ЗАГРУЗКА ========== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.3s ease;
    will-change: opacity;
    transform: translateZ(0);
    overflow: hidden;
}

.loading-overlay.hidden {
    display: none;
    animation: fadeOut 0.3s ease;
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

.loading-spinner {
    width: 100px;
    height: 100px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Внешнее кольцо - плавная анимация */
.loading-spinner::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border: 4px solid transparent;
    border-top-color: var(--primary-color);
    border-right-color: var(--primary-color);
    border-radius: 50%;
    animation: smoothSpin 1.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.3);
}

/* Внутреннее кольцо - плавная анимация в обратную сторону */
.loading-spinner::after {
    content: '';
    position: absolute;
    width: 70%;
    height: 70%;
    border: 3px solid transparent;
    border-bottom-color: var(--primary-light);
    border-left-color: var(--primary-light);
    border-radius: 50%;
    animation: smoothSpin 2s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite reverse;
}

/* Логотип бобра внутри */
.loading-spinner .beaver-logo {
    width: 40px;
    height: 40px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cdefs%3E%3ClinearGradient id='beaverGradient' x1='0%25' y1='0%25' x2='100%25' y2='100%25'%3E%3Cstop offset='0%25' style='stop-color:%236366F1;stop-opacity:1' /%3E%3Cstop offset='50%25' style='stop-color:%238B5CF6;stop-opacity:1' /%3E%3Cstop offset='100%25' style='stop-color:%234F46E5;stop-opacity:1' /%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M50 10 C30 10, 15 25, 15 45 C15 55, 20 65, 30 70 L30 85 L50 90 L70 85 L70 70 C80 65, 85 55, 85 45 C85 25, 70 10, 50 10 Z' fill='url(%23beaverGradient)' stroke='%23FFFFFF' stroke-width='2'/%3E%3Ccircle cx='40' cy='35' r='4' fill='%23FFFFFF'/%3E%3Ccircle cx='60' cy='35' r='4' fill='%23FFFFFF'/%3E%3Ccircle cx='40' cy='35' r='2' fill='%231E1B4B'/%3E%3Ccircle cx='60' cy='35' r='2' fill='%231E1B4B'/%3E%3Cellipse cx='50' cy='50' rx='8' ry='5' fill='%231E1B4B'/%3E%3Cpath d='M50 55 L45 60 L50 58 L55 60 Z' fill='%231E1B4B'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    z-index: 10;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes smoothSpin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

/* ========== ФУТЕР ========== */
.footer {
    background: linear-gradient(135deg, #000000 0%, #1A202C 100%);
    color: white;
    padding: 3rem 0 2rem;
    margin-top: 4rem;
    position: relative;
    overflow: hidden;
    animation: fadeIn 0.8s ease;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(229, 62, 62, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
    pointer-events: none;
    animation: gradient-shift 15s ease infinite;
    background-size: 200% 200%;
}

.footer .container {
    max-width: 600px !important; /* Ограничиваем ширину футера */
}

.footer-content {
    position: relative;
    z-index: 1;
    text-align: center;
    width: 100%;
}

.footer-links {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color var(--transition);
}

.footer-links a {
    position: relative;
    transition: all var(--transition);
    animation: fadeIn 0.6s ease backwards;
}

.footer-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width var(--transition);
}

.footer-links a:hover {
    color: var(--primary-color);
    transform: translateY(-2px);
}

.footer-links a:hover::after {
    width: 100%;
}

/* ========== СКРОЛЛИРУЕМЫЙ КАТАЛОГ ========== */
.scrollable-catalog-wrapper {
    position: relative;
    margin: 0.4rem 0 0;
    padding: 0.5rem 0 0;
}

.scrollable-catalog {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: linear-gradient(90deg, 
        rgba(99, 102, 241, 0.05) 0%, 
        transparent 10%, 
        transparent 90%, 
        rgba(139, 92, 246, 0.05) 100%);
    border-radius: 20px;
    padding: 0.6rem 0 0.5rem;
}

.scroll-container {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 0.3rem 0 0.2rem;
    gap: 1rem;
}

.scroll-container::-webkit-scrollbar {
    display: none;
}

.scroll-content {
    display: flex;
    gap: 1rem;
    padding: 0 0.6rem;
}

.scroll-item {
    flex: 0 0 280px;
    background: var(--bg-primary);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    transition: all var(--transition-slow);
    animation: fadeIn 0.8s ease backwards, scale-in 0.6s ease backwards;
    position: relative;
    border: 2px solid transparent;
}

.scroll-item::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 16px;
    background: var(--bg-gradient);
    background-size: 200% 200%;
    opacity: 0;
    z-index: -1;
    transition: opacity var(--transition);
    animation: gradient-shift 3s ease infinite;
}

.scroll-item:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-color);
}

.scroll-item:hover::before {
    opacity: 0.7;
}

.scroll-item:nth-child(odd) {
    animation-delay: 0.1s;
}

.scroll-item:nth-child(even) {
    animation-delay: 0.3s;
}

.scroll-media-wrapper {
    position: relative;
    width: 100%;
    height: 280px;
    overflow: hidden;
    border-radius: 12px 12px 0 0;
}

.scroll-media {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.scroll-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.scroll-item:hover .scroll-media img {
    transform: scale(1.1);
}

.video-container {
    width: 100%;
    height: 100%;
    position: relative;
    background: #000;
}

.video-container iframe,
.video-container video {
    width: 100%;
    height: 100%;
    border: none;
}

.play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(220, 38, 38, 0.8);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    transition: all var(--transition);
}

.scroll-item:hover .play-overlay {
    opacity: 0;
}

.play-icon {
    color: white;
    font-size: 1.5rem;
    margin-left: 3px;
}

.media-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #F1F5F9 0%, #E2E8F0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: var(--primary-color);
}

.media-placeholder span,
.beaver-placeholder-icon {
    display: inline-block;
    width: 4rem;
    height: 4rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cdefs%3E%3ClinearGradient id='beaverGradient' x1='0%25' y1='0%25' x2='100%25' y2='100%25'%3E%3Cstop offset='0%25' style='stop-color:%236366F1;stop-opacity:1' /%3E%3Cstop offset='50%25' style='stop-color:%238B5CF6;stop-opacity:1' /%3E%3Cstop offset='100%25' style='stop-color:%234F46E5;stop-opacity:1' /%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M50 10 C30 10, 15 25, 15 45 C15 55, 20 65, 30 70 L30 85 L50 90 L70 85 L70 70 C80 65, 85 55, 85 45 C85 25, 70 10, 50 10 Z' fill='url(%23beaverGradient)' stroke='%231E1B4B' stroke-width='2'/%3E%3Ccircle cx='40' cy='35' r='4' fill='%23FFFFFF'/%3E%3Ccircle cx='60' cy='35' r='4' fill='%23FFFFFF'/%3E%3Ccircle cx='40' cy='35' r='2' fill='%231E1B4B'/%3E%3Ccircle cx='60' cy='35' r='2' fill='%231E1B4B'/%3E%3Cellipse cx='50' cy='50' rx='8' ry='5' fill='%231E1B4B'/%3E%3Cpath d='M50 55 L45 60 L50 58 L55 60 Z' fill='%231E1B4B'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    filter: drop-shadow(0 0 10px rgba(99, 102, 241, 0.5)) drop-shadow(0 0 20px rgba(139, 92, 246, 0.3));
    text-indent: -9999px;
    overflow: hidden;
}

.scroll-overlay {
    position: absolute;
    top: 0.65rem;
    right: 0.65rem;
    z-index: 10;
}

.scroll-price {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.92), rgba(236, 72, 153, 0.95));
    color: #ffffff;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 0.02em;
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3);
    backdrop-filter: blur(6px);
}

.scroll-city {
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.375rem 0.875rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

.scroll-info {
    padding: 1rem 1.2rem;
}

.scroll-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
    color: var(--text-primary);
}

.scroll-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.scroll-date {
    color: var(--text-light);
    font-size: 0.85rem;
    font-style: italic;
}

.scroll-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(15, 23, 42, 0.65);
    color: #fff;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    font-size: 1.6rem;
    font-weight: 600;
    cursor: pointer;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.35);
}

.scroll-btn:hover {
    background: rgba(15, 23, 42, 0.85);
    transform: translateY(-50%) scale(1.08);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.45);
}

.scroll-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.scroll-btn:disabled {
    opacity: 0.25;
    cursor: not-allowed;
    box-shadow: none;
}

.scroll-btn-left {
    left: 1rem;
}

.scroll-btn-right {
    right: 1rem;
}

/* ========== СТРАНИЦА ПОИСКА ПО ГОРОДУ ========== */

.city-hero {
    position: relative;
    z-index: 1;
    text-align: center;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.city-hero-title {
    font-size: 4rem;
    font-weight: 900;
    margin-bottom: 1rem;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    animation: fadeIn 1s ease;
    position: relative;
    z-index: 1;
    letter-spacing: 2px;
    background: transparent;
    border: none;
    outline: none;
    padding: 0;
}

.city-hero-subtitle {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 
        0 2px 10px rgba(0, 0, 0, 0.6),
        0 0 20px rgba(255, 255, 255, 0.4);
    animation: fadeIn 1s ease;
    position: relative;
    z-index: 2;
    font-weight: 500;
}

.city-search-hero-section {
    position: relative;
    padding: 6rem 0;
    background: 
        linear-gradient(135deg, rgba(99, 102, 241, 0.95) 0%, rgba(139, 92, 246, 0.9) 50%, rgba(30, 27, 75, 0.95) 100%),
        url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 400"><rect fill="%23312E81" width="1200" height="400"/><g opacity="0.3"><rect x="50" y="180" width="60" height="220" fill="%23818CF8"/><rect x="130" y="140" width="70" height="260" fill="%238B5CF6"/><rect x="220" y="160" width="55" height="240" fill="%236366F1"/><rect x="295" y="120" width="65" height="280" fill="%23818CF8"/><rect x="380" y="150" width="60" height="250" fill="%238B5CF6"/><rect x="460" y="100" width="70" height="300" fill="%236366F1"/><rect x="550" y="170" width="55" height="230" fill="%23818CF8"/><rect x="625" y="130" width="60" height="270" fill="%238B5CF6"/><rect x="705" y="145" width="70" height="255" fill="%236366F1"/><rect x="795" y="110" width="60" height="290" fill="%23818CF8"/><rect x="875" y="155" width="65" height="245" fill="%238B5CF6"/><rect x="960" y="125" width="55" height="275" fill="%236366F1"/><rect x="1035" y="165" width="60" height="235" fill="%23818CF8"/><rect x="1115" y="140" width="70" height="260" fill="%238B5CF6"/></g><g opacity="0.4"><circle cx="60" cy="190" r="3" fill="%23FCD34D"/><circle cx="85" cy="170" r="3" fill="%23FCD34D"/><circle cx="145" cy="155" r="3" fill="%23FCD34D"/><circle cx="165" cy="165" r="3" fill="%23FCD34D"/><circle cx="235" cy="175" r="3" fill="%23FCD34D"/><circle cx="255" cy="185" r="3" fill="%23FCD34D"/><circle cx="310" cy="135" r="3" fill="%23FCD34D"/><circle cx="335" cy="145" r="3" fill="%23FCD34D"/><circle cx="395" cy="165" r="3" fill="%23FCD34D"/><circle cx="415" cy="175" r="3" fill="%23FCD34D"/><circle cx="475" cy="115" r="3" fill="%23FCD34D"/><circle cx="500" cy="125" r="3" fill="%23FCD34D"/><circle cx="565" cy="185" r="3" fill="%23FCD34D"/><circle cx="585" cy="195" r="3" fill="%23FCD34D"/><circle cx="640" cy="145" r="3" fill="%23FCD34D"/><circle cx="665" cy="155" r="3" fill="%23FCD34D"/><circle cx="720" cy="160" r="3" fill="%23FCD34D"/><circle cx="745" cy="170" r="3" fill="%23FCD34D"/><circle cx="810" cy="125" r="3" fill="%23FCD34D"/><circle cx="835" cy="135" r="3" fill="%23FCD34D"/><circle cx="890" cy="170" r="3" fill="%23FCD34D"/><circle cx="915" cy="180" r="3" fill="%23FCD34D"/><circle cx="975" cy="140" r="3" fill="%23FCD34D"/><circle cx="1000" cy="150" r="3" fill="%23FCD34D"/><circle cx="1050" cy="180" r="3" fill="%23FCD34D"/><circle cx="1075" cy="190" r="3" fill="%23FCD34D"/><circle cx="1130" cy="155" r="3" fill="%23FCD34D"/><circle cx="1155" cy="165" r="3" fill="%23FCD34D"/></g></svg>');
    background-size: cover;
    background-position: center bottom;
    background-attachment: fixed;
    overflow: hidden;
    box-shadow: inset 0 -100px 100px rgba(0, 0, 0, 0.2);
}

.city-search-hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 30% 40%, rgba(255, 255, 255, 0.15) 0%, transparent 60%),
        radial-gradient(circle at 70% 60%, rgba(139, 92, 246, 0.2) 0%, transparent 60%);
    pointer-events: none;
}

.city-search-section {
    padding: 4rem 0;
    background: linear-gradient(180deg, #F8FAFC 0%, #F1F5F9 100%);
    min-height: 60vh;
    position: relative;
}


.city-search-box {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.city-search-input {
    flex: 1;
    padding: 1rem 1.5rem;
    border: 3px solid var(--border-color);
    border-radius: 16px;
    font-size: 1.125rem;
    transition: all var(--transition);
    background: var(--bg-primary);
    animation: fadeIn 0.6s ease backwards;
    position: relative;
}

.city-search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(229, 62, 62, 0.2), var(--shadow-glow);
    transform: scale(1.02);
    /* Анимация убрана */
}

.city-search-btn-icon {
    padding: 1rem 1.5rem;
    background: var(--bg-gradient);
    background-size: 200% 200%;
    color: white;
    border: 3px solid white;
    border-radius: 16px;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all var(--transition);
    box-shadow: var(--shadow), 0 0 15px rgba(229, 62, 62, 0.4);
    animation: fadeIn 0.6s ease 0.2s backwards;
    position: relative;
    overflow: hidden;
}

.city-search-btn-icon::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.5s, height 0.5s;
}

.city-search-btn-icon:hover::before {
    width: 200px;
    height: 200px;
}

.city-search-btn-icon:hover {
    background: var(--primary-dark);
    transform: scale(1.1) rotate(5deg);
    box-shadow: var(--shadow-xl), var(--shadow-glow);
    /* Анимации убраны */
}

.city-search-btn-icon:active {
    transform: scale(1.05);
    animation: shake 0.3s ease;
}

.cities-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.city-card {
    background: var(--bg-primary);
    border: 3px solid var(--border-color);
    border-radius: 20px;
    padding: 2rem 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-slow);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow);
    animation: fadeIn 0.5s ease backwards;
    transform-style: preserve-3d;
}

.city-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(229, 62, 62, 0.2), transparent);
    transition: left 0.6s;
    z-index: 0;
}

.city-card::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(229, 62, 62, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
    z-index: 0;
}

.city-card:hover::before {
    left: 100%;
}

.city-card:hover::after {
    width: 300px;
    height: 300px;
}

.city-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-8px) scale(1.05) rotateX(5deg);
    box-shadow: var(--shadow-xl), var(--shadow-glow);
    background: linear-gradient(135deg, #F8FAFC 0%, #F1F5F9 100%);
}

.city-card > * {
    position: relative;
    z-index: 1;
}

.city-card-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    filter: drop-shadow(0 0 12px rgba(99, 102, 241, 0.6)) drop-shadow(0 0 20px rgba(139, 92, 246, 0.4));
    transition: all var(--transition);
    display: inline-block;
}

.city-card:hover .city-card-icon {
    transform: scale(1.1);
    filter: drop-shadow(0 0 20px rgba(99, 102, 241, 0.9)) drop-shadow(0 0 35px rgba(139, 92, 246, 0.7));
}

.city-card-name {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.city-card-count {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.city-results {
    margin-top: 3rem;
    padding-top: 1rem;
    animation: fadeIn 0.6s ease;
    scroll-margin-top: 100px; /* Отступ для плавной прокрутки */
}

.results-title {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 2rem;
    text-align: center;
    background: var(--bg-gradient);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeIn 0.6s ease;
    text-transform: none;
    letter-spacing: 0.5px;
    position: relative;
    padding-bottom: 0.75rem;
}

.results-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: var(--bg-gradient);
    border-radius: 2px;
    animation: fadeIn 0.5s ease;
}

.city-dumps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.city-load-more-btn {
    display: none;
    margin: 2rem auto 0;
    padding: 0.85rem 2.5rem;
    border: none;
    border-radius: 999px;
    background: var(--primary);
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    transition: transform var(--transition), box-shadow var(--transition), opacity var(--transition);
}

.city-load-more-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
}

.city-load-more-btn[disabled] {
    opacity: 0.6;
    cursor: default;
    transform: none;
    box-shadow: var(--shadow-lg);
}

.city-dump-card {
    background: var(--bg-primary);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    transition: all var(--transition-slow);
    animation: fadeIn 0.5s ease backwards;
    position: relative;
    border: 2px solid transparent;
}

.city-dump-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 20px;
    padding: 3px;
    background: var(--bg-gradient);
    background-size: 200% 200%;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity var(--transition);
    z-index: -1;
    animation: gradient-shift 3s ease infinite;
}

.city-dump-card:hover {
    transform: translateY(-12px) scale(1.05) rotate(1deg);
    box-shadow: var(--shadow-xl), var(--shadow-glow);
}

.city-dump-card:hover::before {
    opacity: 1;
}

.city-dump-card:nth-child(odd) {
    animation-delay: 0.1s;
}

.city-dump-card:nth-child(even) {
    animation-delay: 0.3s;
}

.city-dump-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: linear-gradient(135deg, #F1F5F9 0%, #E2E8F0 100%);
}

.city-dump-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow), filter var(--transition);
    filter: brightness(1) saturate(1);
}

.city-dump-image {
    position: relative;
    overflow: hidden;
}

.city-dump-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.6s;
}

.city-dump-card:hover .city-dump-image img {
    transform: scale(1.15) rotate(2deg);
    filter: brightness(1.1) saturate(1.2);
}

.city-dump-card:hover .city-dump-image::after {
    left: 100%;
}

.city-dump-info {
    padding: 1.25rem;
}

.city-dump-info h4 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.city-dump-info p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
}

.city-dump-price {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary-color);
}

.search-city-section {
    padding: 4rem 0;
    background: linear-gradient(135deg, #6366F1 0%, #4F46E5 50%, #312E81 100%);
    color: white;
    text-align: center;
    position: relative;
}

.city-search-hero {
    padding: 3rem 0;
}

.city-search-btn {
    margin-top: 2rem;
    background: white;
    color: var(--primary-color);
    border: 2px solid white;
}

.city-search-btn:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
}

/* ========== АДМИНКА ========== */
.admin-section {
    padding: 2rem 0;
    min-height: 70vh;
}

.admin-tabs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.tab-btn {
    width: 100%;
    padding: 0.75rem 1rem;
}

.admin-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.admin-products-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    box-sizing: border-box;
}

.admin-products-list .admin-product-item {
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 1rem;
    background: #fff;
    box-shadow: 0 10px 25px -20px rgba(15, 23, 42, 0.35);
}

.admin-products-list .admin-product-item > div {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.admin-products-list .admin-product-item img {
    flex-shrink: 0;
    width: 90px;
    height: 90px;
    object-fit: cover;
    border-radius: 0.75rem;
}

.admin-products-list .admin-product-item button {
    flex-shrink: 0;
}

.featured-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.featured-item {
    padding: 1rem;
    border-radius: 0.75rem;
    border: 2px solid #e5e7eb;
    background: #fff;
    box-shadow: 0 12px 28px -24px rgba(15, 23, 42, 0.35);
}

.gallery-input-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.gallery-input-controls {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
}

.gallery-input-controls .form-input {
    flex: 1;
    min-width: 220px;
}

.gallery-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.gallery-item {
    position: relative;
    width: 110px;
    height: 110px;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid rgba(99, 102, 241, 0.25);
    box-shadow: var(--shadow-sm);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gallery-item button {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: none;
    background: rgba(239, 68, 68, 0.9);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    transition: transform var(--transition);
}

.gallery-item button:hover {
    transform: scale(1.05);
}

.gallery-empty {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

@media (max-width: 1024px) {
    .admin-products-list .admin-product-item > div {
        flex-wrap: wrap;
        align-items: flex-start;
    }

    .admin-products-list .admin-product-item img {
        width: 120px;
        height: 120px;
    }

    .admin-products-list .admin-product-item button {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .admin-section .container {
        padding: 0 1rem;
    }

    .admin-tabs {
        grid-template-columns: 1fr;
    }

    .admin-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .admin-controls .admin-input,
    .admin-controls .btn {
        width: 100%;
    }

    .admin-products-list .admin-product-item > div {
        flex-direction: column;
        align-items: flex-start;
    }

    .admin-products-list .admin-product-item img {
        width: 100%;
        height: auto;
    }

    .admin-products-list .admin-product-item button {
        width: 100%;
    }

    .featured-item {
        flex-direction: column;
        gap: 0.75rem;
    }

    .featured-item img {
        width: 100%;
        height: auto;
    }

    .featured-item > div:last-child {
        width: 100%;
        justify-content: space-between;
    }

    .gallery-input-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .gallery-input-controls .form-input,
    .gallery-input-controls .btn {
        width: 100%;
    }

    .gallery-list {
        gap: 0.5rem;
    }

    .gallery-item {
        width: calc(33.333% - 0.5rem);
        height: auto;
        aspect-ratio: 1 / 1;
    }

    .modal-content {
        max-width: 90vw; /* Уменьшено с 96vw */
        padding: 1.5rem;
    }

    .modal-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    /* Mobile fix: remove excessive empty space under main media */
    .product-main-wrapper {
        min-height: auto;
    }

    .product-main-video {
        height: clamp(200px, 35vh, 260px);
        min-height: unset;
    }

    .product-main-video video {
        min-height: unset;
        height: 100%;
    }

    .product-main-video iframe {
        min-height: unset;
        height: 100%;
        width: 100%;
    }

}

@media (max-width: 480px) {
    .gallery-item {
        width: calc(50% - 0.5rem);
    }

    .admin-tabs {
        gap: 0.5rem;
    }

    .tab-btn {
        padding: 0.65rem 0.75rem;
        font-size: 0.95rem;
    }

    .admin-products-list .admin-product-item {
        padding: 0.85rem;
    }

    .modal-content {
        padding: 1.25rem;
    }
}

/* Модальное окно */
.modal {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 10002; /* Выше чем header и мобильное меню */
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: fadeIn 0.3s ease;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.modal.hidden {
    display: none;
    opacity: 0;
}

.modal-content {
    background: var(--bg-primary);
    border-radius: 16px;
    padding: 2rem;
    max-width: 450px; /* Уменьшено с 600px для более компактного вида */
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    animation: slideUp 0.3s ease;
    position: relative;
    z-index: 10003; /* Выше чем сам modal для кнопки закрытия */
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--accent-gray);
}

.modal-header h2 {
    margin: 0;
    font-size: 1.75rem;
    color: var(--text-primary);
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-secondary);
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color var(--transition);
}

.modal-close:hover {
    color: var(--error-color);
    transform: rotate(90deg);
    transition: all var(--transition);
}

/* Кнопка закрытия модального окна оплаты */
.modal .close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--text-secondary);
    cursor: pointer;
    line-height: 1;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color var(--transition), transform var(--transition);
    z-index: 10004; /* Выше всего в модальном окне */
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    border: 2px solid var(--border-color);
}

.modal .close:hover {
    color: var(--error-color);
    transform: rotate(90deg) scale(1.1);
    background: rgba(255, 255, 255, 1);
    border-color: var(--error-color);
}

/* ========== СТРАНИЦА ОФОРМЛЕНИЯ ЗАКАЗА ========== */
.checkout-section {
    padding: 3rem 0;
    background: linear-gradient(135deg, #F8FAFC 0%, #F1F5F9 100%);
    min-height: calc(100vh - 200px);
}

.checkout-content {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 2rem;
    margin-top: 2rem;
}

.checkout-readonly {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    background: rgba(15, 23, 42, 0.85);
    border-radius: 18px;
    border: 1px solid rgba(99, 102, 241, 0.35);
    box-shadow: 0 35px 55px -35px rgba(15, 23, 42, 0.7);
    color: #E0E7FF;
    margin-bottom: 1rem;
    backdrop-filter: blur(14px);
}

.checkout-readonly__icon {
    font-size: 3rem;
    display: inline-flex;
    width: 4rem;
    height: 4rem;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-bottom: 1rem;
    background: rgba(99, 102, 241, 0.2);
    color: #A5B4FC;
}

.checkout-readonly p {
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

.checkout-items {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.checkout-summary {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    height: fit-content;
    position: sticky;
    top: 2rem;
}

.checkout-summary h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.payment-methods {
    display: grid;
    gap: 1rem;
    margin-bottom: 2rem;
}

.payment-method {
    background: linear-gradient(135deg, #F8FAFC 0%, #F1F5F9 100%);
    border: 2px solid #E2E8F0;
    border-radius: 12px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
}

.payment-method-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.payment-method-info {
    flex: 1;
}

.payment-method-info h3 {
    font-size: 1rem;
    margin: 0 0 0.25rem 0;
    color: var(--text-primary);
    font-weight: 600;
}

.payment-method-info p {
    font-size: 0.85rem;
    margin: 0;
    color: var(--text-secondary);
}

.payment-method-check {
    font-size: 1.5rem;
    color: var(--primary-color);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.payment-method:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
}

.payment-method.selected {
    border-color: var(--primary-color);
    border-width: 3px;
    background: linear-gradient(135deg, #EEF2FF 0%, #E0E7FF 100%);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.25);
}

.payment-method.selected .payment-method-check {
    opacity: 1;
}

.payment-method.selected h3 {
    color: var(--primary-color);
}

/* Информация об оплате в модальном окне */
.payment-info {
    text-align: center;
    padding: 1rem;
}

.payment-info h3 {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    color: var(--text-primary);
}

.card-details {
    background: linear-gradient(135deg, #F8FAFC 0%, #F1F5F9 100%);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.card-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: 0.1em;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    margin: 1rem 0;
    font-family: 'Courier New', monospace;
}

.payment-amount {
    margin: 1.5rem 0;
}

.amount-large {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-color);
    margin: 0.5rem 0;
}

.payment-instructions {
    background: linear-gradient(135deg, #FFF7ED 0%, #FFEDD5 100%);
    border-left: 4px solid var(--warning-color);
    border-radius: 8px;
    padding: 1rem;
    margin: 1.5rem 0;
    text-align: left;
}

.payment-instructions ol {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
}

.payment-instructions li {
    margin: 0.5rem 0;
}

.qr-code-container {
    margin: 1.5rem 0;
    padding: 1rem;
    background: white;
    border-radius: 12px;
    display: inline-block;
}

.qr-code {
    max-width: 250px;
    width: 100%;
    height: auto;
    display: block;
}

.payment-description {
    color: var(--text-secondary);
    margin: 1rem 0;
}

.payment-note {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-top: 1rem;
    font-style: italic;
}

.payment-method p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
}

.checkout-total {
    background: linear-gradient(135deg, #F1F5F9 0%, #E2E8F0 100%);
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    background: var(--bg-primary);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: transform var(--transition), box-shadow var(--transition);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.stat-card h3 {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-weight: 600;
}

.stat-card p {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--primary-color);
    margin: 0;
}

/* ========== ДОПОЛНИТЕЛЬНЫЕ СТИЛИ ========== */

.section-subtitle {
    text-align: center;
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-weight: 400;
}

/* ========== МОБИЛЬНАЯ АДАПТАЦИЯ ========== */
@media (max-width: 768px) {
    .header-content {
        padding: 1rem 0;
        position: relative;
    }
    
    .nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 50%;
        transform: translateX(-50%);
        width: 75%;
        max-width: 320px;
        flex-direction: column;
        gap: 0;
        margin-top: 0;
        background: var(--bg-primary);
        box-shadow: var(--shadow-lg);
        padding: 0.75rem 0;
        border-radius: 0 0 12px 12px;
        z-index: 999;
        opacity: 0;
        transition: opacity 0.3s ease, transform 0.3s ease;
    }
    
    .nav.active {
        display: flex;
        opacity: 1;
        animation: slideInFromTop 0.3s ease;
    }
    
    @keyframes slideInFromTop {
        from {
            opacity: 0;
            transform: translateX(-50%) translateY(-10px);
        }
        to {
            opacity: 1;
            transform: translateX(-50%) translateY(0);
        }
    }
    
    .nav-link {
        padding: 0.75rem 1.5rem;
        border-bottom: 1px solid var(--border-color);
        width: 100%;
        text-align: left;
        font-size: 0.9rem;
    }
    
    .nav-link.admin-link {
        padding: 0.4rem 1rem;
        font-size: 0.8rem;
        margin: 0.25rem 1.5rem;
        width: auto;
        align-self: flex-start;
    }
    
    .nav-link:last-child {
        border-bottom: none;
    }
    
    .mobile-menu-btn {
        display: block;
        order: -1;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.25rem;
    }
    
    .hero-stats {
        gap: 2rem;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    
    .product-detail {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 1.15rem;
    }
    
    .product-main-image {
        height: clamp(200px, 35vh, 260px);
    }

    .product-section {
        padding: 1.25rem 0;
    }
    
    .checkout-content {
        grid-template-columns: 1fr;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .cart-item {
        flex-direction: column;
    }
    
    .cart-item-image {
        width: 100%;
        height: 200px;
    }
    
    .cart-item-price {
        margin-left: 0;
        margin-top: 1rem;
    }
    
    .product-actions {
        flex-direction: column;
    }
    
    .product-actions .btn {
        width: 100%;
    }
    
    .notification {
        right: 10px;
        left: 10px;
        max-width: none;
    }
    /* Mobile tweak: compact spacing between media and info */
    .product-info-section {
        margin-top: 0.75rem;
        gap: 0.75rem;
    }

}

@media (max-width: 768px) {
    .scroll-item {
        flex: 0 0 280px;
    }
    
    .scroll-media-wrapper {
        height: 350px;
    }
    
    .scroll-btn {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }
    
    .scroll-btn-left {
        left: 0.5rem;
    }
    
    .scroll-btn-right {
        right: 0.5rem;
    }
    
    .cities-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .city-card {
        padding: 1.5rem 1rem;
    }
    
    .city-hero-title {
        font-size: 2rem;
    }
    
    .city-hero-subtitle {
        font-size: 1.25rem;
    }
    
    /* Каталог - мобильная оптимизация */
    .catalog-controls {
        gap: 0.5rem;
        margin-bottom: 1rem;
        padding-bottom: 0.5rem;
    }
    
    .search-box {
        flex: 1 1 100%;
        min-width: 100%;
    }
    
    .filter-select {
        min-width: calc(50% - 0.25rem);
        flex: 0 1 calc(50% - 0.25rem);
        font-size: 0.8rem;
        padding: 0.6rem 0.8rem;
    }
    
    .filter-input {
        width: calc(50% - 0.25rem);
        font-size: 0.8rem;
        padding: 0.6rem;
    }
    
    /* Корзина - мобильная оптимизация */
    .cart-item {
        flex-direction: column;
        gap: 0.75rem;
        padding: 0.875rem;
    }
    
    .cart-item-image {
        width: 100%;
        height: 200px;
        align-self: center;
    }
    
    .cart-item-image.placeholder {
        width: 100%;
        height: 200px;
    }
    
    .cart-item-info {
        width: 100%;
    }
    
    .cart-item-price {
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        margin-left: 0;
        margin-top: 0.5rem;
        padding-top: 0.75rem;
        border-top: 1px solid #E2E8F0;
    }
    
    .cart-items {
        padding: 0.75rem;
        gap: 0.75rem;
    }
    
    .cart-summary {
        padding: 1.25rem;
        border-radius: 12px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .container {
        padding: 0 15px;
    }
    
    .products-grid {
        gap: 1rem;
    }
    
    .product-card {
        border-radius: 12px;
    }
    
    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .scroll-item {
        flex: 0 0 250px;
    }
    
    .scroll-media-wrapper {
        height: 300px;
    }
    
    .cities-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .city-dumps-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

/* ========== ЮРИДИЧЕСКИЕ СТРАНИЦЫ ========== */
.legal-page {
    padding: 3rem 0;
    background: linear-gradient(135deg, #F8FAFC 0%, #F1F5F9 100%);
    min-height: calc(100vh - 200px);
}

.legal-title {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    text-align: center;
}

.legal-date {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 2rem;
    font-style: italic;
}

.legal-content {
    background: white;
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    max-width: 900px;
    margin: 0 auto;
    line-height: 1.8;
}

.legal-content h2 {
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-light);
}

.legal-content h3 {
    color: var(--text-primary);
    font-size: 1.2rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.legal-content p {
    color: var(--text-primary);
    margin-bottom: 1rem;
    text-align: justify;
}

.legal-content ul {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.legal-content li {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.legal-content strong {
    color: var(--primary-color);
    font-weight: 600;
}

.legal-content a {
    color: var(--primary-color);
    text-decoration: underline;
    transition: color 0.3s ease;
}

.legal-content a:hover {
    color: var(--primary-dark);
}

.legal-footer {
    background: linear-gradient(135deg, #F1F5F9 0%, #E2E8F0 100%);
    padding: 1.5rem;
    border-radius: 12px;
    margin-top: 2rem;
    border-left: 4px solid var(--primary-color);
}

.legal-footer p {
    margin-bottom: 0.5rem;
    text-align: left;
}

.legal-acceptance {
    background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);
    padding: 1.5rem;
    border-radius: 12px;
    margin-top: 2rem;
    border: 2px solid #F59E0B;
}

.legal-acceptance p {
    font-weight: 600;
    margin-bottom: 0.75rem;
    text-align: left;
    color: #92400E;
}

.legal-acceptance ul {
    margin-left: 1.5rem;
}

.legal-acceptance li {
    color: #92400E;
    margin-bottom: 0.5rem;
}

.legal-warning {
    background: linear-gradient(135deg, #FEE2E2 0%, #FECACA 100%);
    padding: 1.5rem;
    border-radius: 12px;
    margin: 1.5rem 0;
    border: 2px solid #DC2626;
    border-left: 6px solid #DC2626;
}

.legal-warning p {
    margin-bottom: 0.75rem;
    text-align: left;
    color: #7F1D1D;
    font-weight: 500;
}

.legal-warning strong {
    color: #991B1B;
    font-weight: 700;
}

@media (max-width: 768px) {
    .legal-content {
        padding: 1.5rem;
    }
    
    .legal-title {
        font-size: 1.8rem;
    }
    
    .legal-content h2 {
        font-size: 1.3rem;
    }
    
    .checkout-content {
        grid-template-columns: 1fr;
    }
    
    .checkout-summary {
        position: static;
    }
    
    .payment-method {
        padding: 1rem;
    }
}

.nav-link.admin-link {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.95), rgba(236, 72, 153, 0.95));
    color: #ffffff;
    padding: 0.3rem 0.8rem;
    border-radius: 999px;
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.25);
    font-size: 0.85rem;
    font-weight: 600;
}

.nav-link.admin-link::after {
    display: none;
}

.product-gallery {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.product-gallery.no-thumbnails {
    /* When there is no gallery strip, keep layout compact */
    gap: 0.5rem;
}

.product-main-wrapper {
    position: relative;
    width: 100%;
    min-height: 0;
}

.product-main-video {
    width: 100%;
    height: 460px;
    position: relative;
    background: #000;
    border-radius: 16px;
    overflow: hidden;
}

.product-main-video video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    position: relative;
    z-index: 2;
}

.product-main-video .video-fallback {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

/* IMPORTANT: place mobile overrides AFTER base product-gallery rules (this file has later overrides). */
@media (max-width: 768px) {
    .product-main-wrapper {
        min-height: auto;
    }

    .product-main-image {
        height: clamp(200px, 35vh, 260px);
    }

    .product-main-video {
        height: clamp(200px, 35vh, 260px);
    }

    .product-main-video video,
    .product-main-video .video-fallback,
    .product-main-video iframe {
        min-height: unset;
        height: 100%;
        width: 100%;
    }
}

.product-thumbnails {
    display: flex;
    gap: 0.6rem;
    padding: 0.25rem 0;
    overflow-x: auto;
}

.product-thumbnails::-webkit-scrollbar {
    height: 6px;
}

.product-thumbnails::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.35);
    border-radius: 999px;
}

.product-thumb {
    border: 2px solid transparent;
    border-radius: 12px;
    padding: 0;
    background: none;
    cursor: pointer;
    transition: transform var(--transition), border-color var(--transition);
    width: 84px;
    height: 84px;
    flex: 0 0 auto;
    overflow: hidden;
}

.product-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Видео-превью в галерее товара: не даём проигрываться внутри миниатюры */
.product-thumb.product-thumb-video {
    position: relative;
}

.product-thumb.product-thumb-video video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}

.product-thumb.product-thumb-video .video-play-icon {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 800;
    color: #fff;
    background: rgba(0, 0, 0, 0.25);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.65);
    pointer-events: none;
}

.product-thumb:hover {
    transform: translateY(-2px);
}

.product-thumb.is-active {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12);
}

.product-thumb:focus {
    outline: none;
    border-color: var(--primary-dark);
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.gallery-input-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.gallery-input-controls {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
}

.gallery-input-controls .form-input {
    flex: 1;
    min-width: 220px;
}

.gallery-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.gallery-item {
    position: relative;
    width: 110px;
    height: 110px;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid rgba(99, 102, 241, 0.25);
    box-shadow: var(--shadow-sm);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gallery-item button {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: none;
    background: rgba(239, 68, 68, 0.9);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    transition: transform var(--transition);
}

.gallery-item button:hover {
    transform: scale(1.05);
}

.gallery-empty {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.product-info-row .info-badge {
    background: var(--bg-secondary);
    border-radius: 999px;
    padding: 0.5rem 1rem;
}

.product-description-block {
    margin-top: 1rem;
    margin-bottom: 1rem;
    padding: 1.25rem;
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(99, 102, 241, 0.08) 0%, rgba(79, 70, 229, 0.12) 100%);
    border: 1px solid rgba(99, 102, 241, 0.2);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.15);
}

.product-subtitle {
    margin: 0 0 0.75rem 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.product-description-text {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text-secondary);
}

.admin-dashboard {
    min-height: 100vh;
    overflow-x: hidden;
    background: linear-gradient(135deg, #F8FAFC 0%, #EEF2FF 100%);
    padding: 2rem 0;
}

.admin-dashboard .container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.5rem;
    background: linear-gradient(135deg, #FFFFFF 0%, #F8FAFC 100%);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.1);
    animation: fadeInUp 0.6s ease;
}

.admin-overline {
    margin: 0 0 0.5rem 0;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
    font-weight: 700;
}

.admin-title {
    margin: 0;
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
}

.admin-subtitle {
    margin: 0.75rem 0 0 0;
    color: var(--text-secondary);
    max-width: 640px;
}

.admin-header-meta {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-end;
}

.admin-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.85rem;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    background: rgba(99, 102, 241, 0.12);
    color: #4c51bf;
    font-weight: 600;
}

.admin-indicator--muted {
    background: rgba(148, 163, 184, 0.18);
    color: #475569;
}

.admin-layout {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.admin-nav {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 260px;
    flex-shrink: 0;
    overflow: hidden;
}

.admin-nav-btn {
    flex: 1 1 calc(50% - 0.5rem);
    min-width: 160px;
    background: linear-gradient(135deg, #FFFFFF 0%, #F8FAFC 100%);
    border: 2px solid rgba(99, 102, 241, 0.15);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.admin-nav-btn.is-active {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(79, 70, 229, 0.2));
    color: var(--text-primary);
    border-color: #6366F1;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
    transform: translateX(5px);
}

.admin-nav-btn:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(79, 70, 229, 0.15));
    color: var(--text-primary);
    border-color: rgba(99, 102, 241, 0.3);
    transform: translateX(3px);
}

.admin-nav-icon {
    font-size: 1.35rem;
    line-height: 1;
}

.admin-nav-text {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.admin-nav-text strong {
    font-weight: 700;
    font-size: 0.96rem;
}

.admin-nav-text small {
    font-size: 0.78rem;
    color: var(--text-secondary);
}

.admin-panels {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.admin-panel {
    width: 100%;
    overflow-x: hidden;
    display: none;
    flex-direction: column;
    gap: 1.5rem;
}

.admin-panel.is-active {
    display: flex;
}

.admin-card {
    background: linear-gradient(135deg, #FFFFFF 0%, #F8FAFC 100%);
    border-radius: 20px;
    border: 1px solid rgba(99, 102, 241, 0.15);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.12);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.admin-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #6366F1, #8B5CF6, #EC4899);
    background-size: 200% 100%;
    animation: shimmer 3s linear infinite;
}

.admin-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(99, 102, 241, 0.18);
}

.admin-card-header {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.admin-card-header h2 {
    margin: 0;
    font-size: 1.45rem;
    font-weight: 800;
}

.admin-card-header p {
    margin: 0;
    color: var(--text-secondary);
}

.admin-card-title h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
}

.admin-card-title p {
    margin: 0.5rem 0 0 0;
    color: var(--text-secondary);
}

.admin-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.admin-controls--stack {
    align-items: stretch;
}

.admin-input {
    flex: 1;
    min-width: 210px;
    padding: 0.7rem 1rem;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.45);
    background: rgba(248, 250, 252, 0.6);
    font-size: 0.95rem;
}

.admin-input--compact {
    max-width: 140px;
}

.admin-products-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.admin-pagination {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 2px solid rgba(99, 102, 241, 0.1);
}

.admin-pagination-info {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.admin-pagination-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

.admin-pagination-dots {
    padding: 0 0.5rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.admin-pagination .btn {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    min-width: 44px;
}

.admin-pagination .btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.admin-product-card {
    display: flex;
    gap: 1.25rem;
    border: 2px solid rgba(99, 102, 241, 0.15);
    border-radius: 16px;
    padding: 1.5rem;
    background: linear-gradient(135deg, #FFFFFF 0%, #F8FAFC 100%);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.08);
}

.admin-product-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, #6366F1, #EC4899);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.admin-product-card:hover::before {
    transform: scaleY(1);
}

.admin-product-card:hover {
    transform: translateY(-4px) translateX(4px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.2);
    border-color: #6366F1;
}

.admin-product-thumb {
    flex-shrink: 0;
    width: 120px;
    height: 120px;
    border-radius: 14px;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
    transition: all 0.3s ease;
}

.admin-product-card:hover .admin-product-thumb {
    transform: scale(1.05);
    box-shadow: 0 6px 18px rgba(99, 102, 241, 0.25);
}

.admin-product-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.admin-product-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.admin-product-head h3 {
    margin: 0 0 0.35rem 0;
    font-size: 1.1rem;
    font-weight: 700;
}

.admin-product-head p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.admin-product-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.admin-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.8rem;
    border-radius: 999px;
    font-size: 0.8rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(139, 92, 246, 0.1));
    color: #4c51bf;
    font-weight: 600;
    border: 1px solid rgba(99, 102, 241, 0.2);
    transition: all 0.3s ease;
}

.admin-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(99, 102, 241, 0.2);
}

.admin-badge--success {
    background: rgba(16, 185, 129, 0.18);
    color: #047857;
}

.admin-badge--warning {
    background: rgba(248, 113, 113, 0.16);
    color: #b91c1c;
}

.admin-badge--city {
    background: rgba(99, 102, 241, 0.15);
    color: #4c51bf;
}

.admin-badge--priority {
    background: rgba(250, 204, 21, 0.2);
    color: #b45309;
}

.admin-meta-date {
    margin-left: auto;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.admin-product-actions {
    margin-top: auto;
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.admin-product-actions .btn {
    transition: all 0.3s ease;
    border-radius: 10px;
    font-weight: 600;
}

.admin-product-actions .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.admin-featured-card {
    display: flex;
    gap: 1rem;
    align-items: center;
    padding: 1rem;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(248, 250, 252, 0.85));
}

.admin-featured-thumb {
    flex-shrink: 0;
    width: 90px;
    height: 90px;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(148, 163, 184, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
}

.admin-featured-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.admin-featured-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.admin-featured-head {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.admin-featured-head h3 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
}

.admin-featured-body p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.admin-featured-actions {
    display: flex;
    gap: 0.4rem;
}

.admin-empty {
    padding: 1.5rem;
    border-radius: 14px;
    border: 1px dashed rgba(148, 163, 184, 0.45);
    text-align: center;
    color: var(--text-secondary);
    background: rgba(248, 250, 252, 0.7);
}

.admin-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.admin-form-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.35rem;
    color: var(--text-primary);
}

.form-group small {
    display: block;
    margin-top: 0.25rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.45);
    background: rgba(248, 250, 252, 0.8);
    font-size: 0.95rem;
    transition: border var(--transition);
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: rgba(99, 102, 241, 0.6);
}

.admin-upload-row {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

.admin-upload-row .form-input {
    flex: 1;
    min-width: 220px;
}

.admin-media-preview {
    margin-top: 0.5rem;
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.admin-media-preview img,
.admin-media-preview video {
    max-width: 160px;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.35);
}

.admin-progress {
    position: relative;
    width: 100%;
    height: 38px;
    border-radius: 12px;
    background: rgba(148, 163, 184, 0.2);
    overflow: hidden;
}

.admin-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #6366F1, #8B5CF6);
    transition: width 0.3s ease;
}

.admin-progress-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: 700;
    color: white;
}

.gallery-input-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.gallery-input-controls {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.gallery-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.gallery-item {
    position: relative;
    width: 120px;
    height: 120px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.35);
    box-shadow: var(--shadow-sm);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gallery-item button {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: none;
    background: rgba(248, 113, 113, 0.92);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    transition: transform var(--transition);
}

.gallery-item button:hover {
    transform: scale(1.08);
}

.gallery-empty {
    padding: 1rem;
    border-radius: 12px;
    border: 1px dashed rgba(148, 163, 184, 0.4);
    color: var(--text-secondary);
}

.stats-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.stat-card {
    padding: 1.4rem;
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(79, 70, 229, 0.12), rgba(99, 102, 241, 0.18));
    border: 1px solid rgba(99, 102, 241, 0.18);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    color: #312e81;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.85;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 800;
}

@media (max-width: 1024px) {
    .admin-layout {
        flex-direction: column;
    }

    .admin-nav {
        width: 100%;
        position: relative;
        top: auto;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }

    .admin-nav-btn {
        flex-direction: column;
        gap: 0.35rem;
        align-items: flex-start;
    }
}

@media (max-width: 768px) {
    .admin-dashboard .container {
        padding: 0 1rem;
    }

    .admin-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .admin-header-meta {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .admin-product-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .admin-product-thumb {
        width: 100%;
        height: auto;
        aspect-ratio: 3 / 2;
    }

    .admin-meta-date {
        margin-left: 0;
    }

    .admin-featured-card {
        flex-direction: column;
        align-items: stretch;
    }

    .admin-featured-thumb {
        width: 100%;
        height: auto;
        aspect-ratio: 3 / 2;
    }

    .admin-featured-actions {
        justify-content: flex-end;
    }

    .admin-upload-row {
        flex-direction: column;
        align-items: stretch;
    }

    .gallery-item {
        width: calc(50% - 0.4rem);
    }
}

@media (max-width: 480px) {
    .admin-nav {
        grid-template-columns: 1fr;
    }

    .gallery-item {
        width: 100%;
    }

    .admin-card {
        padding: 1.25rem;
    }
}

.admin-card-header {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.admin-card-header h2 {
    margin: 0;
    font-size: 1.45rem;
    font-weight: 800;
}

.admin-card-header p {
    margin: 0;
    color: var(--text-secondary);
}

.admin-card-title h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
}

.admin-card-title p {
    margin: 0.5rem 0 0 0;
    color: var(--text-secondary);
}

.admin-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.admin-controls--stack {
    align-items: stretch;
}

.admin-input {
    flex: 1;
    min-width: 210px;
    padding: 0.7rem 1rem;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.45);
    background: rgba(248, 250, 252, 0.6);
    font-size: 0.95rem;
}

.admin-input--compact {
    max-width: 140px;
}

/* Дубли удалены - стили определены выше */

.admin-featured-card {
    display: flex;
    gap: 1rem;
    align-items: center;
    padding: 1rem;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(248, 250, 252, 0.85));
}

.admin-featured-thumb {
    flex-shrink: 0;
    width: 90px;
    height: 90px;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(148, 163, 184, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
}

.admin-featured-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.admin-featured-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.admin-featured-head {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.admin-featured-head h3 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
}

.admin-featured-body p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.admin-featured-actions {
    display: flex;
    gap: 0.4rem;
}

.admin-empty {
    padding: 1.5rem;
    border-radius: 14px;
    border: 1px dashed rgba(148, 163, 184, 0.45);
    text-align: center;
    color: var(--text-secondary);
    background: rgba(248, 250, 252, 0.7);
}

.admin-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.admin-form-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.35rem;
    color: var(--text-primary);
}

.form-group small {
    display: block;
    margin-top: 0.25rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.45);
    background: rgba(248, 250, 252, 0.8);
    font-size: 0.95rem;
    transition: border var(--transition);
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: rgba(99, 102, 241, 0.6);
}

.admin-upload-row {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

.admin-upload-row .form-input {
    flex: 1;
    min-width: 220px;
}

.admin-media-preview {
    margin-top: 0.5rem;
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.admin-media-preview img,
.admin-media-preview video {
    max-width: 160px;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.35);
}

.admin-progress {
    position: relative;
    width: 100%;
    height: 38px;
    border-radius: 12px;
    background: rgba(148, 163, 184, 0.2);
    overflow: hidden;
}

.admin-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #6366F1, #8B5CF6);
    transition: width 0.3s ease;
}

.admin-progress-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: 700;
    color: white;
}

.gallery-input-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.gallery-input-controls {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.gallery-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.gallery-item {
    position: relative;
    width: 120px;
    height: 120px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.35);
    box-shadow: var(--shadow-sm);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gallery-item button {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: none;
    background: rgba(248, 113, 113, 0.92);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    transition: transform var(--transition);
}

.gallery-item button:hover {
    transform: scale(1.08);
}

.gallery-empty {
    padding: 1rem;
    border-radius: 12px;
    border: 1px dashed rgba(148, 163, 184, 0.4);
    color: var(--text-secondary);
}

.stats-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.stat-card {
    padding: 1.4rem;
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(79, 70, 229, 0.12), rgba(99, 102, 241, 0.18));
    border: 1px solid rgba(99, 102, 241, 0.18);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    color: #312e81;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.85;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 800;
}

@media (max-width: 1024px) {
    .admin-layout {
        flex-direction: column;
    }

    .admin-nav {
        width: 100%;
        position: relative;
        top: auto;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }

    .admin-nav-btn {
        flex-direction: column;
        gap: 0.35rem;
        align-items: flex-start;
    }
}

@media (max-width: 768px) {
    .admin-dashboard .container {
        padding: 0 1rem;
    }

    .admin-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .admin-header-meta {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .admin-product-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .admin-product-thumb {
        width: 100%;
        height: auto;
        aspect-ratio: 3 / 2;
    }

    .admin-meta-date {
        margin-left: 0;
    }

    .admin-featured-card {
        flex-direction: column;
        align-items: stretch;
    }

    .admin-featured-thumb {
        width: 100%;
        height: auto;
        aspect-ratio: 3 / 2;
    }

    .admin-featured-actions {
        justify-content: flex-end;
    }

    .admin-upload-row {
        flex-direction: column;
        align-items: stretch;
    }

    .gallery-item {
        width: calc(50% - 0.4rem);
    }
}

@media (max-width: 480px) {
    .admin-nav {
        grid-template-columns: 1fr;
    }

    .gallery-item {
        width: 100%;
    }

    .admin-card {
        padding: 1.25rem;
    }
}

.admin-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.85rem;
}

.admin-summary-card {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.18), rgba(79, 70, 229, 0.15));
    border-radius: 14px;
    padding: 1.1rem;
    color: #312e81;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    border: 1px solid rgba(99, 102, 241, 0.18);
}

.summary-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.75;
}

.summary-value {
    font-size: 1.75rem;
    font-weight: 800;
}

.admin-stats-phone {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.25rem;
}

.admin-stats-card {
    background: rgba(248, 250, 252, 0.85);
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    padding: 1.25rem;
    box-shadow: 0 16px 40px -32px rgba(15, 23, 42, 0.4);
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.admin-stats-card h3 {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
    color: #0f172a;
}

.admin-stats-card-value {
    font-size: 2rem;
    font-weight: 800;
    color: #2563eb;
}

.admin-stats-card-meta {
    font-size: 0.85rem;
    color: #64748b;
    margin-top: -0.25rem;
}

.admin-stats-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.admin-stats-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.95rem;
    color: #1f2937;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 10px;
    padding: 0.6rem 0.85rem;
    background: rgba(226, 232, 240, 0.25);
}

.admin-stats-list li span {
    font-weight: 600;
    color: #0f172a;
}

.admin-stats-list li small {
    font-size: 0.8rem;
    color: #64748b;
}

@media (min-width: 768px) {
    .admin-stats-phone {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .admin-stats-card {
        flex: 1;
        min-width: 260px;
    }
}

.broadcast-status {
    margin-top: 1rem;
    padding: 0.85rem;
    border-radius: 12px;
    background: rgba(148, 163, 184, 0.12);
    color: var(--text-secondary);
    display: none;
}

.broadcast-status.is-visible {
    display: block;
}

.broadcast-status--info {
    background: rgba(148, 163, 184, 0.12);
    color: #475569;
}

.broadcast-status--success {
    background: rgba(16, 185, 129, 0.15);
    color: #047857;
}

.broadcast-status--warning {
    background: rgba(251, 191, 36, 0.18);
    color: #b45309;
}

.broadcast-status--error {
    background: rgba(248, 113, 113, 0.18);
    color: #b91c1c;
}

.product-info-section {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.product-meta-line {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

 .product-info-section .product-header {
     flex: 1;
 }

.cart-item-info {
    display: flex;
    gap: 1.5rem;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border-color);
    animation: fadeIn 0.5s ease;
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-meta {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

 .cart-item-image {
     width: 120px;
     height: 120px;
     object-fit: cover;
     border-radius: 12px;
 .cart-item-price {
     font-size: 1.2rem;
     font-weight: 700;
     color: var(--primary-color);
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.cart-item-old-price {
    text-decoration: line-through;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.cart-item-current-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
 }

@media (max-width: 768px) {
    .admin-dashboard .container {
        padding: 0 0.75rem;
        gap: 1.5rem;
    }

    .admin-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .admin-header-meta {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .admin-layout {
        flex-direction: column;
        gap: 1rem;
    }

    .admin-nav {
        position: relative;
        top: auto;
        width: 100%;
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        background: transparent;
        border: none;
        box-shadow: none;
        padding: 0.25rem 0;
        gap: 0.5rem;
    }

    .admin-nav::-webkit-scrollbar {
        height: 6px;
    }

    .admin-nav::-webkit-scrollbar-thumb {
        background: rgba(99, 102, 241, 0.25);
        border-radius: 999px;
    }

    .admin-nav-btn {
        flex: 0 0 210px;
        background: var(--bg-primary);
        border: 1px solid rgba(148, 163, 184, 0.2);
    }

    .admin-panels {
        gap: 1rem;
    }

    .admin-card {
        padding: 1.2rem;
        border-radius: 16px;
    }

    .admin-card-header h2 {
        font-size: 1.25rem;
    }

    .admin-product-card {
        flex-direction: column;
        align-items: stretch;
        gap: 0.9rem;
    }

    .admin-product-thumb {
        width: 100%;
        height: auto;
        aspect-ratio: 4 / 3;
    }

    .admin-meta-date {
        margin-left: 0;
    }

    .admin-featured-card {
        flex-direction: column;
        gap: 0.85rem;
    }

    .admin-featured-thumb {
        width: 100%;
        aspect-ratio: 4 / 3;
    }

    .admin-featured-actions {
        justify-content: flex-end;
    }

    .admin-summary-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 0.65rem;
    }

    .admin-chart-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .admin-chart {
        padding: 1rem;
    }

    .admin-chart canvas {
        height: 210px;
    }

    .admin-upload-row {
        flex-direction: column;
        align-items: stretch;
        gap: 0.6rem;
    }

    .gallery-item {
        width: calc(50% - 0.4rem);
    }

    .admin-form-grid {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    }
}

@media (max-width: 480px) {
    .admin-nav-btn {
        flex: 0 0 170px;
        padding: 0.7rem;
    }

    .admin-card {
        padding: 1rem;
    }

    .admin-chart canvas {
        height: 190px;
    }

    .gallery-item {
        width: 100%;
        height: auto;
        aspect-ratio: 1 / 1;
    }

    .admin-summary-card {
        padding: 0.9rem;
    }
}


.build-id { font-size: 0.75rem; opacity: 0.55; margin-left: 0.6rem; }
