/* Google Fonts: Четкий, технологичный шрифт */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;800&display=swap');

:root {
    --bg-light: #ffffff; /* Полностью белый фон */
    --main-dark: #121212; /* Черный для текста */
    --white: #ffffff;
    --border: #e8e8e8;
    
    /* Градиент из логотипа (EW) */
    --gradient-brand: linear-gradient(135deg, #235ae8 0%, #a123e8 100%);
    --accent-blue: #235ae8; /* Синий из логотипа */
    --accent-purple: #a123e8; /* Фиолетовый из логотипа */
    
    --sale-red: #ff3b30;
    --shadow-soft: 0 10px 30px rgba(0,0,0,0.03);
    --shadow-gradient: 0 8px 15px rgba(161, 35, 232, 0.15); /* Тень в цвет градиента */
}

/* 1. GLOBAL & STICKY FOOTER */
html { margin: 0; }
body { margin: 0; }

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-family: 'Inter', Arial, sans-serif;
    background-color: var(--bg-light);
    color: var(--main-dark);
    font-size: 15px;
    line-height: 1.5;
}

/* 2. HEADER & FOOTER */
header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px); /* Эффект стекла */
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
}





/* Главный контейнер (Flex жадность) */
.shop-container {
    flex: 1 0 auto; /* Жадно забирает пустое место, выталкивая футер вниз */
    max-width: 1300px;
    margin: 40px auto;
    padding: 0 30px;
    width: 100%;
    box-sizing: border-box;
}

footer {
    flex-shrink: 0;
    background: #f8f8f8; /* Очень светло-серый футер, чтобы отделить от контента */
    border-top: 1px solid var(--border);
    text-align: center;
    padding: 50px 0;
    color: #666;
    font-size: 0.9rem;
}

footer .social-links a {
    color: #888;
    margin: 0 15px;
    text-decoration: none;
}
footer .social-links a:hover { color: var(--main-dark); }

/* 3. HERO & PAGE TITLES */
h1.page-title {
    font-weight: 800;
    font-size: 2.8rem;
    letter-spacing: -2px;
    margin-bottom: 5px;
}

.hero p { color: #666; font-size: 1.1rem; }

/* 4. SHOP GRID (index.php) */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); /* Чуть крупнее карточки */
    gap: 30px;
}

.product-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: all 0.3s ease-out;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(161, 35, 232, 0.08); /* Мягкая фиолетовая тень */
    border-color: var(--accent-purple);
}

.img-container {
    width: 100%;
    height: 300px;
    overflow: hidden;
    margin-bottom: 20px;
    background: #fcfcfc;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.img-container img {
    max-width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-card h3 {
    font-size: 1.1rem;
    margin: 0 0 10px;
    height: 48px;
    overflow: hidden;
    color: var(--main-dark);
}

/* 5. COMPONENTS & B2B */
.btn-action {
    background: var(--gradient-brand); /* ГРАДИЕНТ ДЛЯ КНОПОК */
    color: white;
    border: none;
    padding: 15px;
    font-weight: 800;
    cursor: pointer;
    width: 100%;
    border-radius: 8px;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
    box-shadow: var(--shadow-gradient);
}
.btn-action:hover { opacity: 0.9; transform: scale(1.02); }

.badge-partner {
    background: var(--gradient-brand); /* Градиент для бейджа */
    color: white;
    padding: 6px 14px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    position: absolute;
    top: 15px;
    left: 15px;
    border-radius: 20px;
    z-index: 10;
}

/* 6. CART LAYOUT (cart.php) */
.cart-wrapper {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 30px;
    margin-top: 30px;
}

.cart-list {
    background: var(--white);
    padding: 30px;
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow-soft);
}

.cart-item {
    display: flex;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid var(--border);
}

.cart-summary {
    background: var(--white);
    border: 1px solid var(--accent-purple); /* Обводка сайдбара в цвет градиента */
    padding: 30px;
    height: fit-content;
    border-radius: 16px;
    box-shadow: var(--shadow-gradient);
}

/* Делаем ссылку блочной, чтобы она занимала всё место */
.product-card-link {
    display: block;
    transition: transform 0.3s ease;
}

.product-card {
    background: white;
    border-radius: 15px;
    padding: 15px;
    border: 1px solid var(--border);
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Эффект при наведении на всю карточку */
.product-card-link:hover {
    transform: translateY(-5px);
}

.product-card-link:hover .product-card {
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    border-color: var(--accent-purple);
}

.view-details {
    margin-top: auto;
    font-size: 0.8rem;
    color: var(--accent-blue);
    font-weight: 700;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-card-link:hover .view-details {
    opacity: 1;
}


/* Сетка профиля */
.profile-layout {
    display: flex;
    gap: 30px;
    margin-bottom: 60px;
    align-items: flex-start;
}

.profile-sidebar { flex: 1; }
.profile-main { flex: 2; }

/* Общие контейнеры */
.content-box, .order-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 15px;
    padding: 25px;
}

/* Элементы инфо-блока */
.info-group { margin-bottom: 15px; }
.info-group label { display: block; font-size: 11px; text-transform: uppercase; color: #888; font-weight: bold; }
.info-group span { font-size: 16px; font-weight: 500; }

/* Карточка заказа */
.order-card { margin-bottom: 20px; transition: transform 0.2s; }
.order-card:hover { transform: translateY(-3px); box-shadow: 0 5px 15px rgba(0,0,0,0.05); }

.order-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
    margin-bottom: 15px;
}

.order-number { font-weight: bold; font-size: 18px; display: block; }
.order-date { font-size: 12px; color: #aaa; }

.order-total {
    text-align: right;
    margin-top: 15px;
    font-size: 18px;
}

/* Статусы */
.status-badge {
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: bold;
}
.status-pending { background: #fff3cd; color: #856404; }
.status-versandt { background: #d4edda; color: #155724; }
.status-storniert { background: #f8d7da; color: #721c24; }

.link-danger { color: #ff3b30; font-weight: bold; text-decoration: none; }

/* About Page Styles */
.about-hero {
    background: var(--gradient-brand);
    color: white;
    padding: 80px 20px;
    text-align: center;
    border-radius: 0 0 50px 50px;
}

.about-hero h1 {
    font-size: 3.5rem;
    margin-bottom: 10px;
}

.about-content {
    padding: 60px 0;
}

.story-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
    margin-bottom: 80px;
}

.story-image-placeholder {
    background: #f0f0f0;
    height: 300px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    border: 1px solid var(--border);
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 80px;
}

.value-card {
    background: white;
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border);
}

.value-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.05);
}

.value-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.team-section-title {
    text-align: center;
    margin-bottom: 40px;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    max-width: 900px;
    margin: 0 auto;
}

.team-member {
    text-align: center;
}

.team-photo-circle {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: var(--gradient-brand);
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    color: white;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.team-role {
    color: var(--accent-blue);
    font-weight: bold;
    margin: 5px 0;
}

.team-desc {
    font-size: 0.9rem;
    color: #666;
}

/* Адаптивность для мобилок */
@media (max-width: 768px) {
    .story-grid {
        grid-template-columns: 1fr;
    }
    .about-hero h1 {
        font-size: 2.5rem;
    }
}


.search-form {
    display: flex;
    align-items: center;
    background: #f1f1f1;
    /* Уменьшаем вертикальный padding (с 5px до 3px), чтобы овал был уже */
    padding: 3px 12px; 
    /* Делаем углы более плавными */
    border-radius: 25px; 
    /* Ограничиваем общую ширину всего контейнера */
    max-width: 200px; 
    margin: 0 15px;
    border: 1px solid transparent;
    transition: border-color 0.3s ease;
    margin-left: auto;
    margin-top: 20px;
}

/* Эффект при наведении на весь овал */
.search-form:focus-within {
    border-color: var(--accent-blue);
    background: #fff;
}

.search-form input {
    border: none;
    background: transparent;
    padding: 5px;
    outline: none;
    font-size: 0.85rem; /* Немного уменьшаем шрифт */
    width: 100%; /* Теперь инпут занимает всё место внутри макс. ширины формы */
}

.search-form button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    padding: 0;
    opacity: 0.6;
}


/* Базовые переменные, если их еще нет */
:root {
    --gradient-brand: linear-gradient(135deg, #a123e8 0%, #4411ee 100%);
    --main-dark: #1a1a1a;
    --border: #eeeeee;
}

/* Мини-геро секция */
.hero-mini {
    background: var(--gradient-brand);
    color: white;
    padding: 60px 20px;
    text-align: center;
    border-radius: 0 0 40px 40px;
    margin-bottom: 40px;
}

/* Панель фильтров */
.filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 20px;
    border-radius: 20px;
    border: 1px solid var(--border);
    margin-bottom: 30px;
}

.filter-controls { display: flex; gap: 20px; }
.control-group { display: flex; flex-direction: column; gap: 5px; }
.control-group label { font-size: 0.7rem; font-weight: 800; color: #bbb; text-transform: uppercase; }
.control-group select { border: 1px solid #ddd; padding: 8px; border-radius: 8px; font-weight: 600; }

/* Сетка — исправляем растягивание */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

/* Карточка — исправляем наложение */
.product-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 20px;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Важно! Обрезает картинку */
    transition: all 0.3s ease;
}

.product-card:hover {
    transform: translateY(-10px);
    border-color: #a123e8;
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
}

.card-image {
    width: 100%;
    aspect-ratio: 1 / 1; /* Квадрат */
    position: relative;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Картинка не растягивается, а вписывается */
    display: block;
}

.discount-tag {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--gradient-brand);
    color: white;
    padding: 4px 10px;
    border-radius: 50px;
    font-weight: 800;
    font-size: 0.8rem;
}

.card-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-content h3 { margin: 0 0 15px 0; font-size: 1.2rem; font-weight: 700; }

.card-footer {
    margin-top: auto; /* Прижимает цену к низу */
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.current-price { font-size: 1.3rem; font-weight: 800; color: var(--main-dark); }
.old-price { text-decoration: line-through; color: #999; font-size: 0.9rem; margin-left: 5px; }
.arrow { color: #a123e8; font-weight: 900; }

/* ============================================================
   MOBILE RESPONSIVE — ElectroWear
   Breakpoints: 1024px tablet, 768px mobile, 480px small mobile
   ============================================================ */

/* ── Бургер-кнопка (скрыта на десктопе) ─────────────────── */
.burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 4px;
    background: none;
    border: none;
    z-index: 1100;
}
.burger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--main-dark);
    border-radius: 2px;
    transition: all 0.3s ease;
}
.burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Tablet (≤1024px) ────────────────────────────────────── */
@media (max-width: 1024px) {
    .shop-container { padding: 0 20px; margin: 30px auto; }
}

/* ── Mobile (≤768px) ─────────────────────────────────────── */
@media (max-width: 768px) {

    /* Header — бургер-меню */
    .burger { display: flex; }

    .mobile-menu {
        display: none;
        position: fixed;
        top: 0; left: 0; right: 0; bottom: 0;
        background: rgba(255,255,255,0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 8px;
        z-index: 1050;
        padding: 80px 30px 40px;
    }
    .mobile-menu.open { display: flex; }

    .mobile-menu a {
        margin: 0;
        font-size: 1.2rem;
        padding: 12px 0;
        width: 100%;
        text-align: center;
        border-bottom: 1px solid #f0f0f0;
    }
    .mobile-menu a:last-child { border-bottom: none; }
    .mobile-menu .search-form {
        margin: 16px 0 0;
        max-width: 100%;
        width: 100%;
    }

    /* Container */
    .shop-container { padding: 0 14px; margin: 20px auto; }

    /* Hero */
    .hero-section, section.hero-section {
        padding: 60px 16px 50px !important;
        border-radius: 0 0 30px 30px !important;
    }
    .hero-section h1 { font-size: 2.4rem !important; letter-spacing: -1px !important; }
    .hero-section p { font-size: 1rem !important; }

    /* Benefits grid */
    .benefits-grid { grid-template-columns: 1fr 1fr !important; gap: 12px !important; }
    .benefit-card { padding: 20px 14px !important; }

    /* Product grid */
    .product-grid { grid-template-columns: 1fr 1fr !important; gap: 12px !important; }
    .product-grid .card-content { padding: 12px !important; }
    .product-grid h3 { font-size: 0.9rem !important; }

    /* Testimonials */
    .testimonials-grid { grid-template-columns: 1fr !important; }
    .testimonials-section { padding: 40px 16px !important; }

    /* Cart */
    .cart-wrapper { grid-template-columns: 1fr !important; }
    .cart-item { flex-wrap: wrap; gap: 10px; }
    .cart-item img { width: 70px !important; height: 70px !important; }

    /* Checkout */
    .checkout-layout { grid-template-columns: 1fr !important; }
    /* Поля имени/фамилии в одну колонку */
    [style*="grid-template-columns: 1fr 1fr"] {
        display: block !important;
    }
    [style*="grid-template-columns: 1fr 1fr"] > * {
        margin-bottom: 12px;
    }

    /* Product details */
    .details-container {
        grid-template-columns: 1fr !important;
        padding: 20px !important;
        gap: 24px !important;
    }
    .reviews-grid { grid-template-columns: 1fr !important; }

    /* Gallery thumbnails */
    .gallery-thumbs { gap: 6px !important; }
    .gallery-thumb { width: 56px !important; height: 56px !important; }

    /* Profile */
    .profile-layout { flex-direction: column !important; }
    .profile-sidebar, .profile-main { flex: none !important; width: 100% !important; }

    /* About page */
    .about-hero h1 { font-size: 2rem !important; }
    .story-grid { grid-template-columns: 1fr !important; gap: 24px !important; }
    .team-grid { grid-template-columns: 1fr 1fr !important; gap: 24px !important; }
    .about-section { padding: 24px 18px !important; }
    .anspruch-grid, .values-grid { grid-template-columns: 1fr !important; }

    /* Schulung calendar */
    .schulung-layout { grid-template-columns: 1fr !important; }
    .booking-form-box { position: static !important; }
    .cal-day { font-size: 0.8rem !important; border-radius: 6px !important; }

    /* Blog */
    .blog-grid { grid-template-columns: 1fr !important; }
    .blog-post-content { padding: 20px !important; }

    /* Testimonials page */
    .t-grid { grid-template-columns: 1fr !important; }

    /* Admin pages — скрываем боковые панели */
    .admin-grid { grid-template-columns: 1fr !important; }
    .blog-layout { grid-template-columns: 1fr !important; }

    /* Общие кнопки */
    .btn-action { font-size: 0.85rem !important; padding: 12px !important; }

    /* Footer */
    footer { padding: 40px 0 20px !important; }
    footer .shop-container > div { gap: 24px !important; }
}

/* ── Small mobile (≤480px) ───────────────────────────────── */
@media (max-width: 480px) {
    .hero-section h1 { font-size: 1.9rem !important; }
    .product-grid { grid-template-columns: 1fr !important; }
    .benefits-grid { grid-template-columns: 1fr !important; }
    .team-grid { grid-template-columns: 1fr !important; }

    /* Schulung time slots */
    .time-slots { grid-template-columns: 1fr !important; }

    /* Gallery main — квадрат */
    .gallery-main { border-radius: 14px !important; }

    /* Checkout summary */
    .checkout-summary { position: static !important; }

    /* Blog post overlay */
    .blog-post-box { border-radius: 16px 16px 0 0 !important; margin: auto 0 0 !important; }
    .blog-post-overlay { align-items: flex-end !important; padding: 0 !important; }

    /* Вариант кнопок */
    .color-options { gap: 6px !important; }
    .size-options { gap: 6px !important; }
    .size-btn { padding: 7px 12px !important; font-size: 0.82rem !important; }
}

/* ── Utility — убираем hover-эффекты на touch ────────────── */
@media (hover: none) {
    .product-card:hover { transform: none !important; box-shadow: none !important; }
    .product-card-link:hover { transform: none !important; }
    .btn-action:hover { transform: none !important; }
}