/**
 * СВЕТОФОР - Основные стили
 */

/* ===== CSS Variables ===== */
:root {
    --primary: #E53935;       /* Красный */
    --primary-dark: #C62828;
    --primary-light: #FFCDD2;
    --secondary: #43A047;      /* Зелёный */
    --secondary-dark: #2E7D32;
    --accent: #FDD835;        /* Жёлтый (светофор) */
    --success: #43A047;
    --warning: #FB8C00;
    --bg-primary: #FFFFFF;
    --bg-secondary: #F5F5F5;
    --bg-dark: #212121;
    --text-primary: #212121;
    --text-secondary: #757575;
    --text-light: #9E9E9E;
    --border: #E0E0E0;
    --shadow: rgba(0, 0, 0, 0.1);
    --shadow-lg: rgba(0, 0, 0, 0.15);
    --max-width: 1200px;
    --header-height: 80px;
    --border-radius: 8px;
    --border-radius-lg: 16px;
}

/* ===== Reset ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--primary);
}

img {
    max-width: 100%;
    height: auto;
}

ul, ol {
    list-style: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

input, textarea, select {
    font-family: inherit;
    font-size: inherit;
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

/* ===== Container ===== */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== Header ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    transition: all 0.3s ease;
}

.header-inner {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.logo-icon {
    width: 44px;
    height: 44px;
    background: var(--primary);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.5rem;
}

.logo-img {
    max-height: 50px;
    max-width: 200px;
}

.footer-logo-img {
    max-height: 40px;
    max-width: 180px;
}

.nav {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-link {
    font-weight: 500;
    color: var(--text-secondary);
    padding: 8px 0;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.header-cta {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Mobile Menu */
.menu-toggle {
    display: none;
    padding: 8px;
    font-size: 1.5rem;
    color: var(--text-primary);
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--border-radius);
    font-weight: 600;
    transition: all 0.2s ease;
    cursor: pointer;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-dark);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(229, 57, 53, 0.3);
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--border);
    color: var(--text-primary);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: #fff;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 1.125rem;
}

/* ===== Hero Section ===== */
.hero {
    padding: 160px 0 100px;
    background: linear-gradient(135deg, #fff5f5 0%, #fff 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-title {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 24px;
}

.hero-title span {
    color: var(--primary);
}

.hero-description {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 32px;
    max-width: 500px;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.hero-stats {
    display: flex;
    gap: 48px;
    margin-top: 48px;
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.hero-image {
    position: relative;
}

.hero-image-main {
    width: 100%;
    border-radius: var(--border-radius-lg);
    box-shadow: 0 20px 60px var(--shadow-lg);
}

/* ===== Sections ===== */
.section {
    padding: 80px 0;
}

.section-dark {
    background: var(--bg-dark);
    color: #fff;
}

.section-header {
    text-align: center;
    margin-bottom: 48px;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 1.125rem;
    max-width: 600px;
    margin: 0 auto;
}

.section-dark .section-subtitle {
    color: rgba(255, 255, 255, 0.7);
}

/* ===== Product Card ===== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.product-card {
    background: #fff;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: 0 2px 12px var(--shadow);
    transition: all 0.3s ease;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px var(--shadow-lg);
}

.product-image {
    position: relative;
    aspect-ratio: 1;
    background: var(--bg-secondary);
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--primary);
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.product-content {
    padding: 20px;
}

.product-category {
    color: var(--text-light);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.product-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.product-price {
    display: flex;
    align-items: center;
    gap: 12px;
}

.price-current {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
}

.price-old {
    font-size: 1rem;
    color: var(--text-light);
    text-decoration: line-through;
}

/* ===== Retail Points ===== */
.retail-points-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 24px;
}

.retail-card {
    background: #fff;
    border-radius: var(--border-radius-lg);
    padding: 24px;
    box-shadow: 0 2px 12px var(--shadow);
    transition: all 0.3s ease;
}

.retail-card:hover {
    box-shadow: 0 8px 24px var(--shadow-lg);
}

.retail-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.retail-icon {
    width: 56px;
    height: 56px;
    background: var(--primary-light);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.5rem;
}

.retail-name {
    font-size: 1.25rem;
    font-weight: 600;
}

.retail-company {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.retail-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.retail-info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.retail-info-item i {
    width: 20px;
    color: var(--primary);
}

/* ===== Promotions ===== */
.promotions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 24px;
}

.promotion-card {
    background: #fff;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: 0 2px 12px var(--shadow);
}

.promotion-image {
    position: relative;
    height: 200px;
}

.promotion-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.promotion-period {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
}

.promotion-content {
    padding: 20px;
}

.promotion-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.promotion-description {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 16px;
}

/* ===== News ===== */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 24px;
}

.news-card {
    background: #fff;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: 0 2px 12px var(--shadow);
}

.news-image {
    height: 200px;
    overflow: hidden;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.news-card:hover .news-image img {
    transform: scale(1.05);
}

.news-content {
    padding: 20px;
}

.news-date {
    color: var(--text-light);
    font-size: 0.75rem;
    margin-bottom: 8px;
}

.news-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.news-card:hover .news-title {
    color: var(--primary);
}

/* ===== Reviews ===== */
.reviews-section {
    background: var(--bg-secondary);
}

.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 24px;
}

.review-card {
    background: #fff;
    border-radius: var(--border-radius-lg);
    padding: 24px;
    box-shadow: 0 2px 12px var(--shadow);
}

.review-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.review-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.review-avatar {
    width: 48px;
    height: 48px;
    background: var(--primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-weight: 600;
    font-size: 1.125rem;
}

.review-name {
    font-weight: 600;
}

.review-date {
    color: var(--text-light);
    font-size: 0.75rem;
}

.review-stars {
    color: var(--accent);
}

.review-content {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ===== Contact Form ===== */
.contact-form {
    background: #fff;
    border-radius: var(--border-radius-lg);
    padding: 40px;
    box-shadow: 0 4px 24px var(--shadow);
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: all 0.2s ease;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.form-textarea {
    min-height: 150px;
    resize: vertical;
}

/* ===== Footer ===== */
.footer {
    background: var(--bg-dark);
    color: #fff;
    padding: 60px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 48px;
}

.footer-brand {
    max-width: 300px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 16px;
}

.footer-description {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
    line-height: 1.7;
}

.footer-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: #fff;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-link {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
    transition: color 0.2s ease;
}

.footer-link:hover {
    color: #fff;
}

.footer-social {
    display: flex;
    gap: 12px;
}

.footer-social a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: all 0.2s ease;
}

.footer-social a:hover {
    background: var(--primary);
    transform: translateY(-2px);
}

.footer-bottom {
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.5);
}

/* ===== Page Header ===== */
.page-header {
    padding: 140px 0 60px;
    background: linear-gradient(135deg, #fff5f5 0%, #fff 100%);
    text-align: center;
}

.page-title {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.page-subtitle {
    color: var(--text-secondary);
    font-size: 1.125rem;
}

/* ===== Filters ===== */
.filters {
    background: #fff;
    padding: 20px;
    border-radius: var(--border-radius-lg);
    margin-bottom: 32px;
    box-shadow: 0 2px 12px var(--shadow);
}

.filters-grid {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-select {
    min-width: 200px;
    padding: 10px 16px;
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    background: #fff;
    cursor: pointer;
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary);
}

/* ===== Stars Rating ===== */
.stars {
    display: flex;
    gap: 2px;
}

.star {
    color: #E0E0E0;
}

.star.active {
    color: var(--accent);
}

/* ===== Toast ===== */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    padding: 16px 20px;
    background: var(--bg-dark);
    color: #fff;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 12px var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    animation: slideIn 0.3s ease;
}

.toast.success { background: var(--success); }
.toast.error { background: var(--primary); }
.toast.warning { background: var(--warning); }

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-description {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-stats {
        justify-content: center;
    }

    .hero-image {
        display: none;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    :root {
        --header-height: 70px;
    }

    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }

    .nav {
        display: none;
    }

    .menu-toggle {
        display: block;
    }

    .hero {
        padding: 120px 0 60px;
        min-height: auto;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-stats {
        flex-direction: column;
        gap: 24px;
    }

    .section {
        padding: 60px 0;
    }

    .products-grid,
    .retail-points-grid,
    .promotions-grid,
    .news-grid,
    .reviews-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .filters-grid {
        flex-direction: column;
    }

    .filter-select {
        width: 100%;
    }
}

/* ===== Utilities ===== */
.hidden { display: none !important; }
.text-center { text-align: center; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }

/* ===== Select2 Custom ===== */
.select2 {
    width: 100% !important;
}

/* ===== Empty State ===== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.empty-state i {
    font-size: 64px;
    color: var(--border);
    margin-bottom: 20px;
}

.empty-state h3 {
    margin-bottom: 8px;
    color: var(--text-primary);
}

/* ===== Loading ===== */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== Scroll to top ===== */
.scroll-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-top:hover {
    background: var(--primary-dark);
    transform: translateY(-4px);
}

/* ===== Category Accordion ===== */
.category-tree-accordion {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.accordion-item {
    background: #fff;
    border-radius: var(--border-radius);
    border: 1px solid var(--border);
    overflow: hidden;
}

.accordion-item.open {
    border-color: var(--primary);
}

.accordion-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: linear-gradient(135deg, #fff5f5 0%, #fff 100%);
    cursor: pointer;
    transition: all 0.2s ease;
}

.accordion-header:hover {
    background: var(--primary-light);
}

.accordion-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    color: var(--text-primary);
}

.accordion-title i {
    color: var(--primary);
    font-size: 1.25rem;
}

.accordion-icon {
    color: var(--text-light);
    transition: transform 0.3s ease;
}

.accordion-item.open .accordion-icon {
    transform: rotate(180deg);
    color: var(--primary);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.accordion-inner {
    padding: 16px;
    background: #fff;
}

.sub-category-item {
    margin-bottom: 4px;
}

.sub-category-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.2s ease;
}

.sub-category-header:hover {
    background: var(--primary-light);
}

.sub-category-header i {
    color: var(--secondary);
}

.sub-category-header span {
    flex: 1;
    font-weight: 500;
}

.sub-icon {
    color: var(--text-light);
    font-size: 0.75rem;
    transition: transform 0.2s ease;
}

.sub-category-children {
    display: none;
    padding: 8px 0 0 32px;
}

.leaf-category {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    color: var(--text-secondary);
    border-radius: var(--border-radius);
    transition: all 0.2s ease;
}

.leaf-category:hover {
    background: var(--primary-light);
    color: var(--primary);
}

.leaf-category i {
    color: var(--primary);
    font-size: 0.75rem;
}

/* ========================================================================== 
   2026 Storefront Refresh — живой торговый дизайн
   ========================================================================== */
:root {
    --primary: #ef2b2d;
    --primary-dark: #c9151b;
    --primary-light: #ffe3e3;
    --secondary: #13a65a;
    --secondary-dark: #08783e;
    --accent: #ffd21f;
    --accent-soft: #fff6bd;
    --info: #1677ff;
    --bg-primary: #fffdfa;
    --bg-secondary: #f6f7f3;
    --bg-soft-red: #fff2f0;
    --bg-soft-green: #ecfff4;
    --bg-dark: #151b18;
    --text-primary: #20231f;
    --text-secondary: #60665f;
    --text-light: #8b918a;
    --border: #e8eae5;
    --shadow: rgba(30, 35, 31, .09);
    --shadow-lg: rgba(30, 35, 31, .17);
    --max-width: 1280px;
    --header-height: 82px;
    --border-radius: 14px;
    --border-radius-lg: 26px;
}

body {
    background:
        radial-gradient(circle at 0 0, rgba(255, 210, 31, .08), transparent 30rem),
        var(--bg-primary);
    overflow-x: hidden;
}

::selection { background: var(--accent); color: #1d211d; }

.header {
    background: rgba(255, 253, 250, .86);
    border-bottom: 1px solid rgba(32, 35, 31, .07);
    box-shadow: 0 8px 30px rgba(33, 37, 34, .04);
    backdrop-filter: blur(18px) saturate(145%);
    -webkit-backdrop-filter: blur(18px) saturate(145%);
}

.header.header-scrolled {
    height: 70px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 10px 35px rgba(30, 35, 31, .10);
}

.logo { letter-spacing: -.04em; font-weight: 800; }
.logo-icon {
    border-radius: 14px;
    background: linear-gradient(145deg, var(--primary), #ff4d3c);
    box-shadow: 0 8px 22px rgba(239, 43, 45, .28);
    transform: rotate(-3deg);
}

.nav { gap: 26px; }
.nav-link { font-weight: 650; font-size: .95rem; }
.nav-link::after {
    height: 3px;
    border-radius: 10px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
}

.btn {
    border-radius: 999px;
    min-height: 44px;
    font-weight: 750;
    letter-spacing: -.01em;
    box-shadow: none;
    transition: transform .22s ease, box-shadow .22s ease, background .22s ease, border-color .22s ease;
}
.btn-primary {
    background: linear-gradient(135deg, var(--primary), #ff4538);
    box-shadow: 0 10px 22px rgba(239, 43, 45, .22);
}
.btn-primary:hover {
    background: linear-gradient(135deg, #dd1e23, var(--primary));
    transform: translateY(-3px);
    box-shadow: 0 14px 28px rgba(239, 43, 45, .30);
}
.btn-secondary {
    background: rgba(255,255,255,.84);
    border: 1px solid rgba(32,35,31,.1);
    box-shadow: 0 6px 18px rgba(30,35,31,.06);
}
.btn-secondary:hover { transform: translateY(-2px); background: #fff; }
.btn-outline {
    border-color: rgba(239,43,45,.24);
    background: rgba(255,255,255,.64);
    backdrop-filter: blur(8px);
}

.hero {
    position: relative;
    isolation: isolate;
    padding: 150px 0 90px;
    min-height: 780px;
    background:
        radial-gradient(circle at 13% 14%, rgba(255,210,31,.30) 0 5%, transparent 24%),
        radial-gradient(circle at 88% 22%, rgba(19,166,90,.18) 0 8%, transparent 26%),
        linear-gradient(135deg, #fff7ee 0%, #fff 45%, #f1fff6 100%);
    overflow: hidden;
}
.hero::before,
.hero::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(2px);
    z-index: -1;
    opacity: .7;
}
.hero::before {
    width: 330px; height: 330px;
    right: -110px; top: 130px;
    background: linear-gradient(135deg, rgba(239,43,45,.16), rgba(255,210,31,.27));
    animation: retailFloat 9s ease-in-out infinite;
}
.hero::after {
    width: 210px; height: 210px;
    left: -80px; bottom: 40px;
    background: rgba(19,166,90,.13);
    animation: retailFloat 11s ease-in-out infinite reverse;
}
.hero-grid { gap: 72px; }
.hero-content { position: relative; z-index: 2; }
.hero-content::before {
    content: 'ВЫГОДНО КАЖДЫЙ ДЕНЬ';
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 7px 14px;
    margin-bottom: 18px;
    border-radius: 999px;
    background: var(--accent);
    color: #292d25;
    font-size: .73rem;
    font-weight: 900;
    letter-spacing: .1em;
    box-shadow: 0 8px 20px rgba(255,210,31,.24);
}
.hero-title {
    max-width: 760px;
    font-size: clamp(3rem, 5.4vw, 5.4rem);
    line-height: .98;
    letter-spacing: -.065em;
    margin-bottom: 26px;
}
.hero-title span {
    display: inline;
    color: var(--primary);
    background: linear-gradient(90deg, var(--primary), #ff5a39 58%, #f2a900);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero-description { max-width: 650px; font-size: 1.18rem; line-height: 1.75; }
.hero-buttons { gap: 12px; }
.hero-stats {
    gap: 12px;
    margin-top: 42px;
    align-items: stretch;
}
.stat-item {
    min-width: 132px;
    padding: 14px 18px;
    text-align: left;
    border: 1px solid rgba(32,35,31,.07);
    border-radius: 18px;
    background: rgba(255,255,255,.72);
    backdrop-filter: blur(10px);
    box-shadow: 0 12px 30px rgba(30,35,31,.06);
}
.stat-value { font-size: 2rem; line-height: 1; letter-spacing: -.05em; }
.stat-item:nth-child(2) .stat-value { color: var(--secondary); }
.stat-item:nth-child(3) .stat-value { color: #d89b00; }
.stat-label { margin-top: 6px; font-weight: 650; }
.hero-image { position: relative; padding: 18px; }
.hero-image::before {
    content: '';
    position: absolute;
    inset: 4% 1% 1% 8%;
    border-radius: 42px;
    background: linear-gradient(145deg, var(--accent), var(--primary));
    transform: rotate(4deg);
    opacity: .85;
    z-index: -1;
}
.hero-image::after {
    content: '●  свежие предложения';
    position: absolute;
    left: -20px;
    bottom: 42px;
    padding: 12px 18px;
    border-radius: 999px;
    color: var(--secondary-dark);
    background: rgba(255,255,255,.95);
    box-shadow: 0 14px 34px rgba(30,35,31,.14);
    font-size: .82rem;
    font-weight: 800;
    animation: retailBob 4.5s ease-in-out infinite;
}
.hero-image-main {
    border: 8px solid rgba(255,255,255,.85);
    border-radius: 34px;
    aspect-ratio: 4 / 4.4;
    object-fit: cover;
    box-shadow: 0 32px 70px rgba(30,35,31,.20);
    transition: transform .55s cubic-bezier(.2,.8,.2,1);
}
.hero-image:hover .hero-image-main { transform: scale(1.02) rotate(-1deg); }

.section { position: relative; padding: 92px 0; }
.section:nth-of-type(even):not(.hero) { background: rgba(246,247,243,.62); }
.section-header { margin-bottom: 46px; }
.section-title {
    font-size: clamp(2.1rem, 4vw, 3.25rem);
    letter-spacing: -.05em;
}
.section-title::after {
    content: '';
    display: block;
    width: 64px; height: 6px;
    margin: 14px auto 0;
    border-radius: 99px;
    background: linear-gradient(90deg, var(--primary), var(--accent), var(--secondary));
}
.section-subtitle { font-size: 1.07rem; }

.category-section {
    padding: 24px;
    border: 1px solid rgba(32,35,31,.07);
    border-radius: 28px;
    background: rgba(255,255,255,.82);
    box-shadow: 0 18px 48px rgba(30,35,31,.06);
}
.category-tree-accordion { display: grid; grid-template-columns: repeat(auto-fit,minmax(245px,1fr)); gap: 12px; }
.accordion-item {
    border: 1px solid rgba(32,35,31,.08);
    border-radius: 18px;
    box-shadow: 0 6px 16px rgba(30,35,31,.04);
}
.accordion-header { min-height: 68px; background: linear-gradient(135deg,#fff,#fff7ec); }
.accordion-item:nth-child(3n+2) .accordion-header { background: linear-gradient(135deg,#fff,#effff5); }
.accordion-item:nth-child(3n+3) .accordion-header { background: linear-gradient(135deg,#fff,#fff0ef); }
.accordion-item:hover { transform: translateY(-2px); box-shadow: 0 12px 25px rgba(30,35,31,.08); }

.filters {
    padding: 16px;
    margin: 26px 0 30px;
    border-radius: 20px;
    background: #fff;
    border: 1px solid rgba(32,35,31,.07);
    box-shadow: 0 12px 34px rgba(30,35,31,.05);
}
.filter-select,
.form-input,
.form-textarea {
    border-radius: 14px;
    border-color: #e4e8e2;
    background: #fbfcfa;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.filter-select:focus,
.form-input:focus,
.form-textarea:focus {
    border-color: rgba(239,43,45,.55);
    box-shadow: 0 0 0 4px rgba(239,43,45,.09);
    background: #fff;
}

.products-grid { gap: 22px; }
.product-card {
    border: 1px solid rgba(32,35,31,.07);
    border-radius: 24px;
    box-shadow: 0 14px 38px rgba(30,35,31,.07);
    transform: translateZ(0);
}
.product-card:hover {
    transform: translateY(-9px);
    box-shadow: 0 24px 54px rgba(30,35,31,.14);
    border-color: rgba(239,43,45,.16);
}
.product-image { background: linear-gradient(145deg,#f8f8f4,#fff3ea); }
.product-image img { transition: transform .55s cubic-bezier(.2,.8,.2,1), filter .4s ease; }
.product-card:hover .product-image img { transform: scale(1.075); filter: saturate(1.06); }
.product-badge {
    top: 14px; left: 14px;
    padding: 7px 12px;
    background: linear-gradient(135deg,var(--primary),#ff503a);
    border-radius: 999px;
    box-shadow: 0 8px 18px rgba(239,43,45,.25);
}
.product-content { padding: 20px 20px 22px; }
.product-title { font-size: 1.08rem; letter-spacing: -.02em; }
.product-price { align-items: baseline; }
.price-current { font-size: 1.3rem; color: var(--primary); font-weight: 850; }

.promotions-grid,
.news-grid,
.retail-points-grid,
.reviews-grid { gap: 24px; }
.promotion-card,
.news-card,
.retail-card,
.review-card,
.sidebar-widget,
.article-card {
    border-radius: 24px !important;
    border: 1px solid rgba(32,35,31,.07);
    box-shadow: 0 14px 38px rgba(30,35,31,.07);
    overflow: hidden;
    transition: transform .28s ease, box-shadow .28s ease, border-color .28s ease;
}
.promotion-card:hover,
.news-card:hover,
.retail-card:hover,
.review-card:hover,
.article-card:hover {
    transform: translateY(-7px);
    box-shadow: 0 22px 50px rgba(30,35,31,.13);
    border-color: rgba(239,43,45,.16);
}
.promotion-image img,
.news-image img,
.article-card img { transition: transform .55s cubic-bezier(.2,.8,.2,1); }
.promotion-card:hover img,
.news-card:hover img,
.article-card:hover img { transform: scale(1.06); }
.promotion-period { border-radius: 999px; box-shadow: 0 8px 18px rgba(30,35,31,.12); }
.retail-icon { background: linear-gradient(135deg,var(--secondary),#2bc776) !important; box-shadow: 0 8px 18px rgba(19,166,90,.22); }
.review-stars { color: #f8b400; }
.review-avatar { box-shadow: 0 0 0 4px rgba(255,210,31,.22); }

.contact-form {
    padding: 30px;
    border-radius: 28px;
    background: #fff;
    border: 1px solid rgba(32,35,31,.07);
    box-shadow: 0 20px 55px rgba(30,35,31,.08);
}

.page-header,
.page-wrapper,
.detail-container { position: relative; }
.page-header { background: linear-gradient(135deg,#fff3ed,#fff 48%,#effff5); }
.detail-container,
.page-content,
.article-main {
    border-radius: 28px;
}
.detail-image,
.article-hero-image img { border-radius: 24px; }

.footer {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 10% 10%, rgba(255,210,31,.12), transparent 25rem),
        radial-gradient(circle at 90% 0%, rgba(19,166,90,.11), transparent 26rem),
        #151b18;
}
.footer::before {
    content: '';
    position: absolute;
    width: 240px; height: 240px;
    right: -100px; bottom: -100px;
    border-radius: 50%;
    background: rgba(239,43,45,.12);
}
.footer-title { color: #fff; }
.footer-links a:hover { color: var(--accent); transform: translateX(4px); }
.scroll-top {
    width: 54px; height: 54px;
    background: linear-gradient(135deg,var(--primary),#ff4c3b);
    box-shadow: 0 12px 28px rgba(239,43,45,.28);
}

/* Reveal animations */
.js .reveal-on-scroll {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1);
}
.js .reveal-on-scroll.is-visible { opacity: 1; transform: none; }
.js .reveal-on-scroll.reveal-delay-1 { transition-delay: .07s; }
.js .reveal-on-scroll.reveal-delay-2 { transition-delay: .14s; }
.js .reveal-on-scroll.reveal-delay-3 { transition-delay: .21s; }

@keyframes retailFloat {
    0%,100% { transform: translate3d(0,0,0) rotate(0); }
    50% { transform: translate3d(-12px,18px,0) rotate(5deg); }
}
@keyframes retailBob {
    0%,100% { transform: translateY(0) rotate(-2deg); }
    50% { transform: translateY(-10px) rotate(1deg); }
}

@media (max-width: 980px) {
    .hero { min-height: auto; padding-top: 125px; }
    .hero-grid { gap: 40px; }
    .hero-title { font-size: clamp(2.8rem, 8vw, 4.4rem); }
    .hero-image::after { left: 0; bottom: 26px; }
    .category-tree-accordion { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    :root { --header-height: 70px; }
    .header { height: 70px; }
    .hero { padding: 105px 0 58px; }
    .hero-grid { grid-template-columns: 1fr; }
    .hero-title { font-size: clamp(2.65rem, 12vw, 4rem); }
    .hero-description { font-size: 1.03rem; }
    .hero-stats { flex-direction: row; flex-wrap: wrap; gap: 10px; }
    .stat-item { min-width: calc(50% - 5px); flex: 1; }
    .hero-image { max-width: 540px; margin: 10px auto 0; }
    .section { padding: 68px 0; }
    .category-tree-accordion { grid-template-columns: 1fr; }
    .mobile-nav {
        background: rgba(255,253,250,.98) !important;
        backdrop-filter: blur(18px);
    }
    .mobile-nav a { border-radius: 14px; }
}

@media (max-width: 520px) {
    .container { padding: 0 16px; }
    .hero-content::before { font-size: .66rem; }
    .hero-buttons .btn { width: 100%; }
    .hero-stats { display: grid; grid-template-columns: repeat(2,1fr); }
    .stat-item { min-width: 0; }
    .hero-image::after { font-size: .7rem; padding: 9px 12px; }
    .category-section, .contact-form { padding: 18px; }
    .product-card, .promotion-card, .news-card, .retail-card, .review-card { border-radius: 20px !important; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }
    .js .reveal-on-scroll { opacity: 1; transform: none; }
}

/* ===== Manual product badges ===== */
.product-manual-badges{
    position:absolute;
    left:12px;
    bottom:12px;
    z-index:5;
    display:flex;
    flex-wrap:wrap;
    gap:6px;
    max-width:calc(100% - 24px);
    pointer-events:none;
}

.product-detail-manual-badges{
    display:flex;
    flex-wrap:wrap;
    gap:8px;
    margin:4px 0 14px;
}

.manual-product-badge{
    display:inline-flex;
    align-items:center;
    min-height:26px;
    padding:5px 9px;
    border-radius:999px;
    border:1px solid rgba(255,255,255,.72);
    font-size:.68rem;
    line-height:1;
    font-weight:850;
    letter-spacing:.01em;
    box-shadow:0 4px 12px rgba(0,0,0,.12);
    white-space:nowrap;
}

/* Новинка */
.manual-product-badge--new{
    background:linear-gradient(135deg,#e3f2fd,#64b5f6);
    color:#0d47a1;
}

/* Выбор покупателей */
.manual-product-badge--buyers-choice{
    background:linear-gradient(135deg,#fff8e1,#ffca28);
    color:#5d4300;
}

/* Распродажа */
.manual-product-badge--sale{
    background:linear-gradient(135deg,#ffebee,#ef5350);
    color:#fff;
}

/* Подарок */
.manual-product-badge--gift{
    background:linear-gradient(135deg,#f3e5f5,#ab47bc);
    color:#fff;
}

/* Сезонный товар */
.manual-product-badge--seasonal{
    background:linear-gradient(135deg,#e8f5e9,#66bb6a);
    color:#174d1c;
}

/* Халяль */
.manual-product-badge--halal{
    background:linear-gradient(135deg,#e0f2f1,#26a69a);
    color:#073f39;
}

/* Праздничное предложение */
.manual-product-badge--holiday{
    background:linear-gradient(135deg,#fff3e0,#ff8f00);
    color:#542e00;
}

/* Осталось мало */
.manual-product-badge--low-stock{
    background:linear-gradient(135deg,#f5f5f5,#616161);
    color:#fff;
}

@media(max-width:520px){
    .product-manual-badges{left:8px;bottom:8px;gap:4px}
    .manual-product-badge{font-size:.62rem;padding:5px 7px}
}

/* ===== Gold floating "Хит!" badge for recommended products ===== */
.product-badge {
    top: 14px !important;
    right: 14px !important;
    left: auto !important;
    z-index: 7 !important;
    min-height: 34px;
    padding: 7px 14px !important;
    border: 1px solid rgba(255, 255, 255, .72);
    border-radius: 999px !important;
    background:
        linear-gradient(135deg, #fff3a8 0%, #ffd54a 28%, #f4b400 62%, #d99300 100%) !important;
    color: #4a3200 !important;
    font-size: .76rem;
    font-weight: 900 !important;
    letter-spacing: .02em;
    text-shadow: 0 1px 0 rgba(255,255,255,.55);
    box-shadow:
        0 7px 18px rgba(207, 145, 0, .30),
        inset 0 1px 0 rgba(255,255,255,.70) !important;
    overflow: hidden;
    isolation: isolate;
    animation:
        svHitFloat 2.5s ease-in-out infinite,
        svHitGlow 2.5s ease-in-out infinite !important;
}

.product-badge::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -45%;
    width: 34%;
    height: 200%;
    z-index: -1;
    transform: rotate(18deg);
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255,255,255,.82),
        transparent
    );
    animation: svHitShine 3.2s ease-in-out infinite;
}

@keyframes svHitFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50%      { transform: translateY(-5px) rotate(-1deg); }
}

@keyframes svHitGlow {
    0%, 100% {
        box-shadow:
            0 7px 18px rgba(207, 145, 0, .28),
            inset 0 1px 0 rgba(255,255,255,.70);
    }
    50% {
        box-shadow:
            0 11px 26px rgba(244, 180, 0, .48),
            0 0 0 3px rgba(255, 214, 64, .10),
            inset 0 1px 0 rgba(255,255,255,.82);
    }
}

@keyframes svHitShine {
    0%, 58% { left: -45%; opacity: 0; }
    68%     { opacity: 1; }
    88%     { left: 120%; opacity: .95; }
    100%    { left: 120%; opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .product-badge,
    .product-badge::before {
        animation: none !important;
    }
}

/* ===== Hero media: photo / carousel / video / background media ===== */
.hero {
    isolation: isolate;
}

.hero > .container {
    position: relative;
    z-index: 3;
}

.hero-background-media {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.hero-background-media::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(255,253,250,.92) 0%, rgba(255,253,250,.74) 44%, rgba(255,253,250,.52) 100%);
}

.hero-background-media img,
.hero-background-media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: var(--hero-bg-opacity, .24);
    filter: saturate(.95);
}

.hero-carousel,
.hero-video-frame {
    position: relative;
    width: 100%;
}

.hero-carousel {
    aspect-ratio: 4 / 4.4;
    border: 8px solid rgba(255,255,255,.85);
    border-radius: 34px;
    overflow: hidden;
    box-shadow: 0 32px 70px rgba(30,35,31,.20);
    background: #f5f5f2;
}

.hero-carousel .hero-image-main {
    border: 0;
    border-radius: 0;
    box-shadow: none;
    aspect-ratio: auto;
}

.hero-carousel-track {
    position: absolute;
    inset: 0;
}

.hero-carousel-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity .7s ease, visibility .7s ease;
}

.hero-carousel-slide.is-active {
    opacity: 1;
    visibility: visible;
}

.hero-carousel-slide > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-slide-caption {
    position: absolute;
    left: 26px;
    right: 26px;
    bottom: 28px;
    z-index: 3;
    max-width: 78%;
    padding: 15px 17px;
    border-radius: 18px;
    backdrop-filter: blur(9px);
    -webkit-backdrop-filter: blur(9px);
    animation: heroCaptionFloat 4.4s ease-in-out infinite;
}

.hero-slide-caption--left {
    margin-right: auto;
    text-align: left;
}

.hero-slide-caption--center {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.hero-slide-caption--right {
    margin-left: auto;
    text-align: right;
}

.hero-slide-caption--light {
    color: #fff;
    background: rgba(21,27,24,.54);
    border: 1px solid rgba(255,255,255,.22);
    text-shadow: 0 2px 12px rgba(0,0,0,.28);
}

.hero-slide-caption--dark {
    color: #20231f;
    background: rgba(255,255,255,.82);
    border: 1px solid rgba(255,255,255,.78);
}

.hero-slide-title {
    font-size: clamp(1.15rem, 2vw, 1.65rem);
    line-height: 1.12;
    font-weight: 900;
    letter-spacing: -.03em;
}

.hero-slide-subtitle {
    margin-top: 6px;
    font-size: .88rem;
    line-height: 1.45;
    opacity: .92;
}

.hero-slide-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    margin-top: 10px;
    padding: 7px 13px;
    border-radius: 999px;
    background: var(--primary);
    color: #fff !important;
    font-size: .78rem;
    font-weight: 800;
    box-shadow: 0 7px 18px rgba(239,43,45,.24);
}

.hero-carousel-arrow {
    position: absolute;
    top: 50%;
    z-index: 5;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateY(-50%);
    border-radius: 50%;
    background: rgba(255,255,255,.88);
    color: #272b26;
    box-shadow: 0 8px 22px rgba(0,0,0,.13);
    transition: transform .2s ease, background .2s ease;
}

.hero-carousel-arrow:hover {
    background: #fff;
    transform: translateY(-50%) scale(1.06);
}

.hero-carousel-prev { left: 12px; }
.hero-carousel-next { right: 12px; }

.hero-carousel-dots {
    position: absolute;
    left: 50%;
    bottom: 12px;
    z-index: 6;
    display: flex;
    gap: 6px;
    transform: translateX(-50%);
}

.hero-carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,.58);
    box-shadow: 0 1px 4px rgba(0,0,0,.18);
    transition: width .2s ease, border-radius .2s ease, background .2s ease;
}

.hero-carousel-dot.is-active {
    width: 24px;
    border-radius: 999px;
    background: #fff;
}

.hero-video-frame {
    overflow: hidden;
    border-radius: 34px;
}

.hero-video-main {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

@keyframes heroCaptionFloat {
    0%,100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

@media (max-width: 768px) {
    .hero-slide-caption {
        left: 16px;
        right: 16px;
        bottom: 18px;
        max-width: calc(100% - 32px);
    }
    .hero-carousel-arrow {
        width: 34px;
        height: 34px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-slide-caption {
        animation: none !important;
    }
    .hero-carousel-slide {
        transition-duration: .01ms !important;
    }
}

