/* =========================================
   БАЗОВЫЕ ПЕРЕМЕННЫЕ И СБРОС
   ========================================= */

:root {
    --primary: #c48c5d;
    --dark: #0a0a0a;
    --glass: rgba(255, 255, 255, 0.04);
    --glass-border: rgba(255, 255, 255, 0.1);
    --gradient-hit: linear-gradient(45deg, #ff416c, #ff4b2b);
    --gradient-new: linear-gradient(45deg, #2ecc71, #27ae60);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Montserrat', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background: var(--dark);
    color: white;
    overflow-x: hidden;
    line-height: 1.6;
}


/* =========================================
   ВИДЕО ФОН
   ========================================= */

#bg-video {
    position: fixed;
    top: 0;
    left: 0;
    min-width: 100%;
    min-height: 100%;
    z-index: -2;
    object-fit: cover;
    opacity: 0.3;
}


/* =========================================
   ПОЛНЫЙ ПРЕЛОАДЕР
   ========================================= */

#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0a0a0a;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: 0.8s;
}

.loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(196, 140, 93, 0.1);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 20px 0;
}

@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}


/* =========================================
   ШАПКА (HEADER)
   ========================================= */

header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), transparent);
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    font-family: 'Marck Script', cursive;
    font-size: 1.8rem;
}

.brand span {
    color: var(--primary);
}

.nav-controls {
    display: flex;
    gap: 15px;
}

.nav-btn {
    color: white;
    font-size: 1.4rem;
    text-decoration: none;
    position: relative;
    width: 45px;
    height: 45px;
    background: var(--glass);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid var(--glass-border);
    transition: 0.3s;
}

#cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--primary);
    color: white;
    font-size: 0.7rem;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: bold;
}


/* =========================================
   СЕКЦИЯ HERO
   ========================================= */

.hero {
    height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hero h1 {
    font-family: 'Marck Script', cursive;
    font-size: 5rem;
    color: white;
    text-shadow: 0 0 20px rgba(196, 140, 93, 0.5);
}

.hero-line {
    width: 100px;
    height: 2px;
    background: var(--primary);
    margin: 15px auto;
}


/* =========================================
   ОСНОВНОЙ КОНТЕНТ (МЕНЮ)
   ========================================= */

.wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.section-title {
    text-align: center;
    font-family: 'Marck Script';
    font-size: 2.5rem;
    color: var(--primary);
    margin: 40px 0;
}


/* КАТЕГОРИИ */

.categories {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-bottom: 20px;
    width: 100%;
    margin: 0 auto;
}

.cat-btn {
    display: flex;
    align-items: center;
    background: rgba(20, 20, 20, 0.85) !important;
    border: 1px solid var(--glass-border);
    color: white !important;
    padding: 0;
    height: 85px;
    border-radius: 15px;
    cursor: pointer;
    overflow: hidden;
    transition: 0.3s;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.cat-btn img {
    width: 110px;
    height: 100%;
    object-fit: cover;
    flex-shrink: 0;
    /* ФИКС: Всегда по центру */
    object-position: center !important;
}

.cat-btn span {
    flex-grow: 1;
    text-align: center;
    font-weight: 800;
    font-size: 1.1rem;
    text-transform: uppercase;
}

.cat-btn:hover {
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(196, 140, 93, 0.3);
}

.cat-btn:active {
    transform: scale(0.97);
}


/* =========================================
   КАРТОЧКИ ТОВАРОВ (GRID)
   ========================================= */

.menu-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

@media (min-width: 768px) {
    .menu-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 25px;
    }
}

.product-card {
    background: var(--glass);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    transition: 0.3s;
    position: relative;
    display: flex;
    flex-direction: column;
}

.img-wrapper {
    position: relative;
    width: 100%;
    padding-top: 75%;
    overflow: hidden;
}

.img-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}


/* Бейджи (Хит, Новинка) */

.product-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    color: white;
    z-index: 5;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.badge-hit {
    background: var(--gradient-hit);
}

.badge-new {
    background: var(--gradient-new);
}


/* Тэг граммовки/количества */

.p-tag-count {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.6);
    padding: 4px 8px;
    border-radius: 5px;
    font-size: 0.7rem;
    backdrop-filter: blur(5px);
    color: white;
}

.product-info {
    padding: 15px;
    text-align: center;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-info h3 {
    font-size: 1rem;
    margin-bottom: 8px;
    font-weight: 600;
}

.product-price {
    color: var(--primary);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.btn-sm {
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px;
    width: 100%;
    border-radius: 12px;
    font-weight: bold;
    cursor: pointer;
    font-size: 0.8rem;
    transition: 0.2s;
}

.btn-sm:active {
    transform: scale(0.95);
    background: #a3734a;
}


/* =========================================
   МОДАЛЬНЫЕ ОКНА (ПОЛНЫЕ)
   ========================================= */

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 5000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.modal-card {
    background: #111;
    width: 90%;
    max-width: 450px;
    border-radius: 30px;
    border: 1px solid var(--primary);
    overflow: hidden;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2.5rem;
    color: white;
    cursor: pointer;
    z-index: 100;
}

#modalImg {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.modal-info {
    padding: 20px;
}


/* Upsell (С этим часто берут) */

.upsell-item {
    cursor: pointer;
    transition: 0.2s;
    flex-shrink: 0;
}

.upsell-item:active {
    transform: scale(0.95);
}


/* =========================================
   КОНТАКТЫ И ФУТЕР
   ========================================= */

.info-card {
    background: var(--glass);
    padding: 30px;
    border-radius: 25px;
    border: 1px solid var(--glass-border);
    text-align: center;
}

.info-item {
    margin-bottom: 15px;
}

.info-item i {
    color: var(--primary);
    margin-bottom: 5px;
}

.btn-2gis {
    display: inline-block;
    background: #28ad21;
    color: white;
    padding: 15px 30px;
    border-radius: 15px;
    text-decoration: none;
    font-weight: bold;
    margin-top: 20px;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

.social-icon {
    font-size: 2.5rem;
    transition: 0.3s;
}

.social-icon:hover {
    transform: translateY(-5px);
}

.wa {
    color: #25d366;
}

.ig {
    color: #e4405f;
}


/* =========================================
   ДОПОЛНИТЕЛЬНЫЕ ЭЛЕМЕНТЫ (СНЕГ, СКРОЛЛ)
   ========================================= */


/* Анимация снега */

@keyframes fall {
    to {
        transform: translateY(105vh);
    }
}


/* Кастомный скроллбар */

::-webkit-scrollbar {
    width: 5px;
}

::-webkit-scrollbar-track {
    background: var(--dark);
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}


/* Поля ввода */

input[type="text"],
input[type="number"] {
    width: 100%;
    padding: 12px;
    margin: 8px 0;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    color: white;
    outline: none;
    font-size: 1rem;
}

input:focus {
    border-color: var(--primary);
}


/* Анимация появления товаров */

.product-card {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* Анимация для корзины */

.cart-item {
    transition: 0.3s;
}

.cart-item:hover {
    transform: translateX(5px);
}

.type-btn {
    background: rgba(255, 255, 255, 0.08);
    color: white;
    border: 1px solid rgba(196, 140, 93, 0.3);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: 0.3s;
    font-family: 'Montserrat', sans-serif;
}

.type-btn.active {
    background: #c48c5d;
    border-color: #c48c5d;
    box-shadow: 0 4px 15px rgba(196, 140, 93, 0.4);
}

.type-btn:hover {
    background: rgba(196, 140, 93, 0.2);
}