/*
Theme Name: Savoy Спецодежда
Theme URI: https://savoy-ek.ru
Author: Ваше имя
Author URI: https://savoy-ek.ru
Description: Современная адаптивная тема для магазина спецодежды с поддержкой WooCommerce. Бургер-меню, карусель, заявки без корзины.
Version: 2.0
License: GPL v2 or later
Text Domain: savoy
*/

/* ===== БАЗОВЫЕ СТИЛИ ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.5;
    color: #333;
    background: #fff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

/* ===== ШАПКА И БУРГЕР-МЕНЮ ===== */
.site-header {
    background: #1a2a3a;
    color: white;
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    color: white;
    font-size: 20px;
    font-weight: bold;
    text-decoration: none;
}

.logo span {
    color: #ff6b35;
}

.burger-menu {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
}

.burger-menu span {
    display: block;
    width: 25px;
    height: 3px;
    background: white;
    margin: 5px 0;
    transition: all 0.3s ease;
    border-radius: 3px;
}

.burger-menu.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.burger-menu.active span:nth-child(2) {
    opacity: 0;
}

.burger-menu.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

.main-menu {
    display: flex;
}

.main-menu ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

.main-menu a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
    font-size: 16px;
}

.main-menu a:hover {
    color: #ff6b35;
}

/* ===== СЛАЙДЕР ===== */
.hero-slider {
    position: relative;
    overflow: hidden;
    margin: 16px 0;
}

.slider-container {
    position: relative;
    width: 100%;
    height: 500px;
    overflow: hidden;
    border-radius: 16px;
}

.slider {
    position: relative;
    width: 100%;
    height: 100%;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
    border-radius: 16px;
    overflow: hidden;
}

.slide.active {
    opacity: 1;
    z-index: 1;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slide-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.95), rgba(0,0,0,0.6), rgba(0,0,0,0.3));
    padding: 50px 20px 40px;
    z-index: 2;
}

.slide-content-inner {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    background: rgba(0,0,0,0.45);
    padding: 24px 32px;
    border-radius: 24px;
    backdrop-filter: blur(3px);
}

.slide-content h2 {
    color: white;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.2;
    text-shadow: 0 2px 10px rgba(0,0,0,0.6);
}

.slide-content p {
    color: white;
    font-size: 1.1rem;
    margin-bottom: 20px;
    line-height: 1.4;
    text-shadow: 0 1px 5px rgba(0,0,0,0.5);
    font-weight: 500;
}

.slide-content .btn {
    display: inline-block;
    padding: 12px 32px;
    background: #ff6b35;
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.slide-content .btn:hover {
    background: #e55a2b;
    transform: scale(1.02);
}

.slider-prev,
.slider-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
}

.slider-prev {
    left: 20px;
}

.slider-next {
    right: 20px;
}

.slider-prev:hover,
.slider-next:hover {
    background: rgba(0,0,0,0.8);
    transform: translateY(-50%) scale(1.05);
}

.slider-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 20;
    background: rgba(0,0,0,0.3);
    padding: 8px 16px;
    border-radius: 50px;
    backdrop-filter: blur(4px);
}

.dot {
    width: 10px;
    height: 10px;
    background: rgba(255,255,255,0.6);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    background: #ff6b35;
    width: 28px;
    border-radius: 6px;
}

/* ===== КАТЕГОРИИ ===== */
.categories {
    padding: 40px 0;
}

.section-title {
    text-align: center;
    font-size: 32px;
    margin-bottom: 30px;
    color: #1a2a3a;
}

.categories-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin: 30px 0;
}

.category-card {
    display: inline-block;
    background: #f0f0f0;
    padding: 10px 24px;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s;
    border: 1px solid #e0e0e0;
}

.category-card:hover {
    background: #ff6b35;
    border-color: #ff6b35;
    transform: translateY(-2px);
}

.category-title {
    color: #333;
    font-size: 14px;
    font-weight: 500;
}

.category-card:hover .category-title {
    color: white;
}

.category-card img {
    display: none;
}

/* ===== ПРЕИМУЩЕСТВА ===== */
.features {
    padding: 40px 0;
    background: #f8f9fa;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.feature-card {
    text-align: center;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: transform 0.3s;
}

.feature-card:hover {
    transform: translateY(-4px);
}

.feature-icon {
    font-size: 32px;
    margin-bottom: 12px;
}

.feature-card h3 {
    font-size: 16px;
    margin-bottom: 8px;
    color: #1a2a3a;
}

.feature-card p {
    font-size: 13px;
    color: #666;
}

/* ===== О КОМПАНИИ ===== */
.about-section {
    padding: 40px 0;
    background: white;
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.about-content h2 {
    font-size: 32px;
    margin-bottom: 20px;
    color: #1a2a3a;
}

.about-content p {
    margin-bottom: 16px;
    line-height: 1.6;
    color: #555;
}

/* ===== КАТАЛОГ ===== */
.shop-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 30px;
    margin: 30px 0;
}

.shop-sidebar {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 16px;
}

.widget {
    margin-bottom: 24px;
}

.widget h3 {
    font-size: 16px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #ff6b35;
}

.widget ul {
    list-style: none;
}

.widget li {
    margin: 8px 0;
}

.widget a {
    color: #333;
    text-decoration: none;
    font-size: 14px;
}

.widget a:hover {
    color: #ff6b35;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 24px;
}

.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.3s;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.product-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.product-info {
    padding: 16px;
    background: white;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 8px;
}

.product-title a {
    color: #1a2a3a;
    text-decoration: none;
}

.product-price {
    font-size: 18px;
    font-weight: bold;
    color: #ff6b35;
    margin-bottom: 12px;
}
/* Кнопка */
.product-buttons {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.add-to-cart-btn {
    flex: 1;
    background: #28a745;
    color: white;
    text-align: center;
    padding: 10px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
}

.add-to-cart-btn:hover {
    background: #218838;
}

/* Кнопки в карточке товара (single) */
.product-buttons-single {
    display: flex;
    gap: 15px;
    align-items: stretch;
}

.add-to-cart-single {
    flex: 1;
    background: #28a745;
    color: white;
    text-align: center;
    padding: 14px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s;
}

/* Фикс высоты зелёной кнопки на десктопе */
.product-buttons-single {
    align-items: center;
}

.add-to-cart-single {
    height: 48px;
    padding: 0 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.add-to-cart-single {
    height: 48px !important;
    min-height: 48px !important;
    max-height: 48px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    line-height: 48px !important;
    display: block !important;
}

.add-to-cart-single,
.request-btn {
    flex: 1;
    min-width: 200px; /* Минимальная ширина, чтобы кнопки не сжимались */
    max-width: 100%;
}

.add-to-cart-single:hover {
    background: #218838;
}

.request-btn {
    flex: 1;
    background: #ff6b35;
    color: white;
    border: none;
    padding: 14px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s;
}

.request-btn:hover {
    background: #e55a2b;
}


/* .product-info-single .add-to-cart-single,
.product-info-single .request-btn {
    display: inline-block;
    width: 48%;
    margin: 10px 1%;
} */

/* ===== ПОДВАЛ ===== */
.site-footer {
    background: #1a2a3a;
    color: white;
    padding: 40px 0 20px;
    margin-top: 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-bottom: 30px;
}

.footer-col h3 {
    font-size: 16px;
    margin-bottom: 16px;
    color: white;
}

.footer-col p, .footer-col a {
    font-size: 13px;
    color: #ccc;
    text-decoration: none;
    line-height: 1.8;
}

.footer-col a:hover {
    color: #ff6b35;
}

.footer-col ul {
    list-style: none;
}

.footer-col li {
    margin: 8px 0;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #2c3e50;
    color: #888;
    font-size: 12px;
}

/* ===== МОДАЛЬНОЕ ОКНО ===== */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    padding: 24px;
    width: 90%;
    max-width: 400px;
    border-radius: 20px;
    position: relative;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.close {
    position: absolute;
    right: 16px;
    top: 12px;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    transition: color 0.3s;
}

.close:hover {
    color: #333;
}

.modal-content h3 {
    margin-bottom: 20px;
    text-align: center;
    color: #1a2a3a;
}

#productRequestForm input,
#productRequestForm textarea {
    width: 100%;
    padding: 12px;
    margin: 8px 0;
    border: 1px solid #ddd;
    border-radius: 12px;
    font-size: 14px;
    box-sizing: border-box;
}

#productRequestForm textarea {
    resize: vertical;
    min-height: 80px;
}

#productRequestForm button {
    width: 100%;
    padding: 12px;
    background: #ff6b35;
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    cursor: pointer;
    margin-top: 12px;
    transition: background 0.3s;
}

#productRequestForm button:hover {
    background: #e55a2b;
}

/* ===== ПАГИНАЦИЯ ===== */
.pagination {
    margin: 40px 0;
    text-align: center;
}

.pagination a, .pagination span {
    display: inline-block;
    padding: 8px 15px;
    margin: 0 5px;
    background: #f8f9fa;
    color: #333;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s;
}

.pagination a:hover {
    background: #ff6b35;
    color: white;
}

.pagination .current {
    background: #ff6b35;
    color: white;
}

/* ===== ПОЛЕ ПОИСКА ===== */
.catalog-search-wrapper {
    margin: 20px 0 30px 0;
    width: 100%;
    text-align: center;
}

.catalog-search-container {
    max-width: 500px;
    width: 100%;
    margin: 0 auto;
}

.woocommerce-product-search {
    display: flex;
    width: 100%;
    background: white;
    border-radius: 50px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.woocommerce-product-search:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.woocommerce-product-search .search-field {
    flex: 1;
    padding: 14px 20px;
    border: 1px solid #e0e0e0;
    border-right: none;
    border-radius: 50px 0 0 50px;
    font-size: 15px;
    outline: none;
    transition: all 0.3s;
    font-family: inherit;
}

.woocommerce-product-search .search-field:focus {
    border-color: #ff6b35;
}

.woocommerce-product-search button {
    padding: 14px 28px;
    background: #ff6b35;
    color: white;
    border: none;
    border-radius: 0 50px 50px 0;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s;
    white-space: nowrap;
}

.woocommerce-product-search button:hover {
    background: #e55a2b;
}

/* ===== ТОВАРЫ НЕ НАЙДЕНЫ ===== */
.products-not-found {
    text-align: center;
    padding: 60px 20px;
    background: #f8f9fa;
    border-radius: 16px;
    margin-top: 20px;
}

.products-not-found p:first-child {
    font-size: 24px;
    font-weight: 600;
    color: #1a2a3a;
    margin-bottom: 12px;
}

.products-not-found p:nth-child(2) {
    font-size: 16px;
    color: #666;
    margin-bottom: 25px;
}

.btn-back-to-shop {
    display: inline-block;
    padding: 12px 28px;
    background: #ff6b35;
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.3s;
}

.btn-back-to-shop:hover {
    background: #e55a2b;
}

.cart-icon {
    margin-left: 20px;
}

.cart-icon a {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #ff6b35;
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 40px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
}

.cart-icon a:hover {
    background: #e55a2b;
    transform: scale(1.02);
}

.cart-count {
    background: white;
    color: #ff6b35;
    padding: 2px 8px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: bold;
}

/* Страница корзины */
.woocommerce-cart .container,
.woocommerce-checkout .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.woocommerce-cart .shop_table {
    width: 100%;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    border-collapse: collapse;
}

.woocommerce-cart th {
    background: #1a2a3a;
    color: white;
    padding: 15px;
    text-align: left;
}

.woocommerce-cart td {
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.cart_totals {
    background: #f8f9fa;
    border-radius: 16px;
    padding: 20px;
}

.checkout-button {
    background: #ff6b35 !important;
    border-radius: 50px !important;
    padding: 12px 30px !important;
    font-size: 16px !important;
}

.checkout-button:hover {
    background: #e55a2b !important;
}


/* Принудительное выравнивание кнопок в карточке товара */
.product-buttons-single .add-to-cart-single,
.product-buttons-single .request-btn {
    flex: 1;
    padding: 12px 10px;
    font-size: 16px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-height: 48px;
    line-height: 1.2;
}

/* Уменьшаем высоту зелёной кнопки "В корзину" */
.add-to-cart-single {
    padding: 10px 20px !important;
    font-size: 16px !important;
    line-height: 1.2 !important;
    height: auto !important;
    display: inline-flex !important;
    align-items: center !important;
}

/* Убираем лишнее предупреждение об оплате */
.woocommerce-checkout .woocommerce-error {
    display: none;
}

/* Кнопка оформления заказа */
#place_order {
    background: #ff6b35 !important;
    border-radius: 5px !important;
    padding: 14px 28px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
}

/* ===== ЛУПА С ЛИНЗОЙ ===== */
.product-gallery {
    position: relative;
}

.zoom-container {
    position: relative;
    overflow: hidden;
    cursor: crosshair;
}

.zoom-container img {
    display: block;
    width: 100%;
    transition: transform 0.3s ease;
}

.zoom-container:hover img {
    transform: scale(1.5);
}


/* ===== АДАПТИВ ===== */
@media (max-width: 1024px) {
    .slider-container {
        height: 420px;
    }
    .slide-content h2 { font-size: 2rem; }
    .slide-content p { font-size: 1rem; }
    .slider-prev, .slider-next { width: 40px; height: 40px; font-size: 20px; }
    .features-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
    .catalog-search-container { max-width: 450px; }
    .woocommerce-product-search .search-field { padding: 12px 18px; font-size: 14px; }
    .woocommerce-product-search button { padding: 12px 24px; font-size: 14px; }
}

@media (max-width: 768px) {
    .cart-icon {
        margin-left: auto;
    }
    .cart-icon a {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .product-buttons-single {
        flex-direction: column;
        gap: 10px;
    }

    .add-to-cart-single,
    .request-btn {
        width: 100%;
    }

    .product-buttons,
    .product-buttons-single {
        flex-direction: column;
        gap: 10px;
    }
    

    .burger-menu { display: block; }
    .main-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        max-width: 280px;
        height: 100vh;
        background: #1a2a3a;
        padding: 80px 20px 20px;
        transition: right 0.3s ease;
        z-index: 1000;
        box-shadow: -2px 0 10px rgba(0,0,0,0.1);
    }
    .main-menu.active { right: 0; }
    .main-menu ul { flex-direction: column; gap: 20px; }
    .main-menu a { font-size: 18px; display: block; padding: 10px 0; }
    .slider-container { height: 320px; }
    .slide-content { padding: 20px 16px 18px; }
    .slide-content-inner { padding: 14px 16px; border-radius: 18px; }
    .slide-content h2 { font-size: 1.4rem; }
    .slide-content p { font-size: 0.85rem; }
    .slider-prev, .slider-next { width: 34px; height: 34px; font-size: 18px; }
    .features-grid { grid-template-columns: 1fr; gap: 12px; }
    .shop-layout { grid-template-columns: 1fr; }
    .shop-sidebar { order: 2; }
    .products-grid { grid-template-columns: 1fr; gap: 16px; }
    .product-card img { height: 180px; }
    .footer-grid { grid-template-columns: 1fr; text-align: center; gap: 24px; }
    .categories-grid { gap: 8px; }
    .category-card { padding: 8px 16px; }
    .category-title { font-size: 12px; }
    .section-title { font-size: 24px; }
    .about-content h2 { font-size: 24px; }
    .about-content p { font-size: 14px; }
    .catalog-search-wrapper { text-align: center;}
    .catalog-search-container { display: inline-block; text-align: left; }
    .woocommerce-product-search .search-field { padding: 11px 16px; font-size: 14px; }
    .woocommerce-product-search button { padding: 11px 20px; font-size: 13px; }
    .products-not-found { padding: 40px 15px; }
    .products-not-found p:first-child { font-size: 20px; }
    .products-not-found p:nth-child(2) { font-size: 14px; }
    .btn-back-to-shop { padding: 10px 22px; font-size: 13px; }
}

@media (max-width: 480px) {
    .container { padding: 0 12px; }
    .slider-container { height: 260px; }
    .slide-content { padding: 14px 12px 12px; }
    .slide-content h2 { font-size: 1.1rem; }
    .slide-content p { font-size: 0.7rem; }
    .slider-prev, .slider-next { width: 28px; height: 28px; font-size: 14px; }
    .dot { width: 6px; height: 6px; }
    .dot.active { width: 16px; }
    .product-card img { height: 160px; }
    .modal-content { padding: 20px; }
    .slide-content-inner { padding: 10px 12px; border-radius: 14px; }
    .catalog-search-wrapper { margin: 10px 0 15px 0; }
    .woocommerce-product-search .search-field { padding: 10px 14px; font-size: 13px; }
    .woocommerce-product-search button { padding: 10px 16px; font-size: 12px; }
}