/* ------------------------------
   БАЗОВЫЕ СТИЛИ
------------------------------ */
body {
    margin: 0;
    font-family: 'Segoe UI', sans-serif;
    background-color: #f4f4f4;
    color: #222;
}

/* ------------------------------
   ШАПКА
------------------------------ */
header,
.header-top {
    background-color: #1e1d1d;
    color: white;
    padding: 10px 0;
}

.header-inner {
    display: flex;
}

.logo {
    width: 150px;
    height: auto;
    margin-left: 40px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-phone {
    color: #ffcc80;
    text-decoration: none;
    font-weight: bold;
    margin-right: 20px;
}
.mobile-header-phone {
    color: #ffcc80;
    font-weight: bold;
    text-decoration: none;
}
.header-login {
    color: white;
    text-decoration: none;
    font-weight: 500;
    margin-right: 20px;
}

.header-cart {
    color: white;
    text-decoration: none;
    font-weight: 600;
    padding: 6px 14px;
    border: 1px solid #ff7043;
    border-radius: 8px;
    transition: 0.25s;
}

.header-cart:hover {
    background-color: #ff7043;
    color: white;
}

/* ------------------------------
   КАТЕГОРИИ (верхнее меню)
------------------------------ */
.categories-bar {
    background-color: #353535;
    padding: 0;
    display: flex;
    justify-content: center;
    gap: 0;
}

.categories-bar a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    padding: 18px 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.categories-bar a:hover {
    background-color: #4a4a4a;
    color: #fff;
}

/* ------------------------------
   СЕТКА ТОВАРОВ + НОВЫЕ КАРТОЧКИ
------------------------------ */
.section-title {
    text-align: center;
    margin-top: 40px;
    font-size: 24px;
    font-weight: 600;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 28px;
    padding: 40px 10px;
}

.product-card {
    background: #ffffff;
    border-radius: 14px;
    padding: 22px 18px;
    text-align: center;
    transition: 0.25s;
    border: 1px solid #e7e7e7;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.product-card:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
    transform: translateY(-3px);
    border-color: #ff7043;
}

.product-card img {
    width: 100%;
    object-fit: contain;
    height: 180px;   /* фиксируем высоту */
    margin-bottom: 15px;
}

.product-title {
    font-size: 18px;
    font-weight: 600;
    color: #222;
    margin-bottom: 6px;
}

.product-price {
    font-size: 17px;
    font-weight: 700;
    color: #3b3b3b;
    margin-bottom: 18px;
}

.buy-btn {
    display: inline-block;
    padding: 10px 26px;
    border-radius: 30px;
    border: 2px solid #ff7043;
    color: #ff7043;
    background: #fff;
    font-weight: 600;
    text-decoration: none;
    transition: .25s;
}

.buy-btn:hover {
    background-color: #ff7043;
    color: #fff;
}

/* ------------------------------
   ПОДВАЛ
------------------------------ */
footer {
    background-color: #222;
    color: white;
    text-align: center;
    padding: 20px;
    margin-top: 40px;
}

/* ------------------------------
   МОБИЛЬНОЕ МЕНЮ
------------------------------ */
@keyframes pulseGlow {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 112, 67, 0.5);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(255, 112, 67, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 112, 67, 0);
    }
}

.mobile-menu-btn {
    position: fixed;
    top: 16px;
    left: 16px;
    font-size: 28px;
    color: #ff7043;
    background: none;
    border: 1px solid rgb(255, 112, 67);
    border-radius: 6px;
    padding: 6px 12px;
    cursor: pointer;
    z-index: 10000;
    opacity: 0;
    transform: translateY(-10px);
    animation:
            slideDownFade 0.5s ease-out forwards,
            pulseGlow 2.5s infinite ease-out 1s;
    transition: transform 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.mobile-menu-btn:hover {
    transform: scale(1.15);
    color: #ff7043;
    border-color: #ff7043;
    box-shadow: 0 0 8px rgba(255, 112, 67, 0.5);
}

@keyframes slideDownFade {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/* Скрыть кнопку меню, когда меню открыто */
.mobile-categories.open + .mobile-menu-btn {
    display: none !important;
}
@media (min-width: 992px) {
    .mobile-menu-btn {
        display: none !important;
        visibility: hidden;
        opacity: 0;
    }
}

@keyframes slideDownFade {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Скрыть кнопку меню, когда меню открыто */
.mobile-categories.open + .mobile-menu-btn {
    display: none !important;
}
.mobile-categories {
    position: fixed;
    top: 0;
    left: -100%;
    width: 80%;
    height: 100%;
    background-color: #1e1d1d;
    color: #fff;
    padding: 20px;
    transition: 0.3s ease;
    z-index: 9999;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.4);
}

.mobile-categories.open {
    left: 0;
}

.mobile-categories-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 20px;
    color: #ffccbc;
    border-bottom: 1px solid #ff7043;
    padding-bottom: 10px;
}

.mobile-categories a {
    display: block;
    color: #ffccbc;
    padding: 14px 0;
    text-decoration: none;
    font-size: 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: color 0.2s ease;
}

.mobile-categories a:hover {
    color: #ff7043;
}

/* Пульсирующий крестик */
.close-btn {
    font-size: 30px;
    cursor: pointer;
    color: #ff7043;
    transition: transform 0.3s ease;
}

.close-btn:hover {
    transform: scale(1.2);
}


/* ------------------------------
   МОБИЛЬНАЯ АДАПТАЦИЯ
------------------------------ */
@media (max-width: 992px) {
    .mobile-menu-btn {
        display: block;
    }
    .header-right {
        display: none !important;
    }
    .categories-bar {
        display: none !important;
    }

}

.mobile-cart-wrapper {
    background: #353535;
    padding: 12px;
    display: flex;
    justify-content: center;
}

.mobile-cart-btn {
    background-color: transparent;
    border: 1px solid #ff7043;
    padding: 10px 25px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 18px;
    color: #ffffff;
    text-decoration: none;
    transition: 0.2s;
}

.mobile-cart-btn:hover {
    background-color: #ff7043;
    color: #fff;
}

@media (min-width: 992px) {
    .mobile-cart-wrapper {
        display: none !important;
    }
}

/* ------------------------------
   МОБИЛЬНАЯ АДАПТАЦИЯ ДЛЯ КАРТОЧЕК
------------------------------ */
@media (max-width: 480px) {
    .product-card {
        padding: 18px 14px;
    }
    .product-card img {
        max-height: 150px;
    }
}


/* Затемнение фона */
.order-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.55);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    animation: fadeIn .25s ease-out;
}

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

/* Окно */
.order-popup {
    background: #fff;
    padding: 25px 30px;
    border-radius: 16px;
    max-width: 420px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    position: relative;
    animation: scaleIn .25s ease-out;
}

@keyframes scaleIn {
    from {transform: scale(0.85); opacity: 0;}
    to {transform: scale(1); opacity: 1;}
}

/* Заголовок */
.order-popup h2 {
    margin: 0 0 14px;
    font-size: 28px;
    font-weight: 700;
    color: #2d2d2d;
    letter-spacing: -0.3px;
}

/* Текст */
.order-popup p {
    font-size: 17px;
    margin-bottom: 25px;
    line-height: 1.55;
    color: #555;
}

.order-popup::before {
    content: "✔";
    display: block;
    font-size: 42px;
    color: #4CAF50 !important;
    margin-bottom: 15px;
    animation: popIn 0.3s ease-out;
}

@keyframes popIn {
    0% { transform: scale(0.3); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* Кнопка */
.order-popup-btn {
    background: linear-gradient(90deg, #ff7a4d, #ff5b2a);
    color: white;
    border: none;
    padding: 14px 30px;
    border-radius: 12px;
    font-size: 19px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.25s ease;
    width: 100%;
    box-shadow: 0 4px 14px rgba(255, 120, 70, 0.35);
}

.order-popup-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(255, 120, 70, 0.45);
}

.order-popup-close {
    position: absolute;
    top: 12px;
    right: 15px;
    cursor: pointer;
    font-size: 22px;
    color: #ff6f43 !important;
    transition: 0.25s;
    font-weight: 400;
}

.order-popup-close:hover {
    color: #ff5722 !important;
    transform: rotate(90deg);
}

/* Само окно — добавляю премиум стиль */
.order-popup {
    background: #ffffff;
    padding: 30px 34px;
    border-radius: 18px;
    max-width: 430px;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0,0,0,0.2);
    position: relative;
    animation: popupSlide .35s ease-out;
}

@keyframes popupSlide {
    from {
        transform: translateY(20px) scale(0.95);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}
