* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: #f5f9ff;
    color: #1a3c4a;
    line-height: 1.5;
}

/* ===== ШАПКА ===== */
.header {
    background: linear-gradient(135deg, #0f5e7e 0%, #0a4c6e 100%);
    color: white;
    padding: 15px 20px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo span {
    color: #ffd166;
}

.header-buttons {
    display: flex;
    gap: 10px;
}

.cart-btn, .admin-btn {
    background: #ffd166;
    color: #1a3c4a;
    border: none;
    padding: 10px 20px;
    border-radius: 50px;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.2s;
}

.admin-btn {
    background: #2c7da0;
    color: white;
}

.cart-btn:active, .admin-btn:active {
    transform: scale(0.95);
}

/* ===== ГЕРОЙ СЕКЦИЯ ===== */
.hero {
    background: linear-gradient(120deg, #2c7da0, #61a5c2);
    color: white;
    padding: 40px 20px;
    text-align: center;
}

.hero h1 {
    font-size: 1.8rem;
    margin-bottom: 10px;
}

/* ===== ОСНОВНОЙ КОНТЕЙНЕР ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* ===== ВКЛАДКИ (ТАБЫ) ===== */
.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    justify-content: center;
}

.tab-btn {
    background: #e0e8ef;
    border: none;
    padding: 12px 25px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    color: #1a3c4a;
}

.tab-btn.active {
    background: #0f5e7e;
    color: white;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.section-title {
    font-size: 1.6rem;
    margin-bottom: 20px;
    border-left: 5px solid #ffd166;
    padding-left: 15px;
}

/* ===== СЕТКА ТОВАРОВ ===== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

/* ===== КАРТОЧКА ТОВАРА С ГАЛЕРЕЕЙ ===== */
.product-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.15);
}

/* КОНТЕЙНЕР ДЛЯ ГАЛЕРЕИ */
.product-gallery {
    position: relative;
    background: #f8f8f8;
}

/* ОСНОВНОЕ ИЗОБРАЖЕНИЕ */
.main-image {
    width: 100%;
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    background: linear-gradient(135deg, #e8f4f8 0%, #d4eaf1 100%);
    transition: all 0.3s ease;
    cursor: pointer;
    overflow: hidden;
     width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ДОПОЛНИТЕЛЬНЫЕ ИЗОБРАЖЕНИЯ (скрыты по умолчанию) */
.extra-images {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    gap: 8px;
    padding: 12px;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(8px);
    justify-content: center;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    opacity: 0;
    visibility: hidden;
}

.product-card:hover .extra-images {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

/* МИНИАТЮРЫ ДОПОЛНИТЕЛЬНЫХ ФОТО */
.extra-thumb {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    background: rgba(255,255,255,0.2);
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
     overflow: hidden;
      width: 100%;
    height: 100%;
    object-fit: cover;
}

.extra-thumb:hover {
    background: rgba(255,255,255,0.4);
    transform: scale(1.05);
    border-color: #ffd166;
}

/* ИНДИКАТОР, ЧТО ЕЩЁ ЕСТЬ ФОТО */
.image-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    color: #ffd166;
    font-weight: bold;
    z-index: 2;
}

.product-info {
    padding: 18px;
}

.product-title {
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 8px;
}

.product-desc {
    color: #5a7c8a;
    font-size: 0.85rem;
    margin-bottom: 12px;
    line-height: 1.4;
}

.product-price {
    font-size: 1.6rem;
    font-weight: bold;
    color: #0f5e7e;
    margin: 10px 0;
}

.add-to-cart {
    background: #ffd166;
    border: none;
    padding: 12px;
    width: 100%;
    border-radius: 50px;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
}

.add-to-cart:hover {
    background: #ffc233;
    transform: scale(1.02);
}

/* АНИМАЦИЯ СМЕНЫ ФОТО */
@keyframes imageChange {
    0% { opacity: 0.5; transform: scale(0.98); }
    100% { opacity: 1; transform: scale(1); }
}

.main-image-change {
    animation: imageChange 0.3s ease;
}


/* ===== МОДАЛЬНОЕ ОКНО КОРЗИНЫ ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-content {
    background: white;
    border-radius: 28px;
    max-width: 500px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    padding: 20px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #eee;
}

.close-modal {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #999;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #e0e0e0;
    gap: 10px;
    flex-wrap: wrap;
}

.cart-total {
    font-size: 1.3rem;
    font-weight: bold;
    text-align: right;
    margin: 15px 0;
    padding-top: 10px;
    border-top: 2px solid #eee;
}

.order-form input {
    width: 100%;
    padding: 12px 15px;
    margin: 8px 0;
    border: 1px solid #ddd;
    border-radius: 50px;
    font-size: 1rem;
}

.submit-order {
    background: #0f5e7e;
    color: white;
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    margin-top: 10px;
}

.empty-cart {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.remove-item {
    background: #ef4444;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 20px;
    cursor: pointer;
}


/* ===== УВЕДОМЛЕНИЯ ===== */
.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #1a3c4a;
    color: #ffd166;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: bold;
    z-index: 1100;
    animation: fadeInOut 2s ease;
    white-space: nowrap;
}

@keyframes fadeInOut {
    0% { opacity: 0; transform: translateX(-50%) translateY(20px); }
    15% { opacity: 1; transform: translateX(-50%) translateY(0); }
    85% { opacity: 1; transform: translateX(-50%) translateY(0); }
    100% { opacity: 0; transform: translateX(-50%) translateY(-20px); }
}

/* ===== ПОДВАЛ ===== */
.footer {
    background: #1a3c4a;
    color: white;
    text-align: center;
    padding: 25px 20px;
    margin-top: 40px;
}

/* ===== АДАПТИВ ===== */
@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.4rem;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .tab-btn {
        padding: 8px 16px;
        font-size: 0.85rem;
    }
    
    .section-title {
        font-size: 1.3rem;
    }
    
    .toast {
        white-space: normal;
        text-align: center;
        max-width: 90%;
    }
    
    .extra-thumb {
        width: 45px;
        height: 45px;
        font-size: 1.5rem;
    }
}

@media (min-width: 768px) and (max-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

button {
    touch-action: manipulation;
}
/* КНОПКИ ОФОРМЛЕНИЯ ЗАКАЗА */
.submit-order.whatsapp {
    background: #25D366;
    color: white;
    border: none;
}

.submit-order.telegram {
    background: #0088cc;
    color: white;
    border: none;
}

.submit-order.whatsapp:hover {
    background: #1da851;
}

.submit-order.telegram:hover {
    background: #0077b3;
}
