/* ===========================
   CSS ПЕРЕМЕННЫЕ
   =========================== */
:root {
    --bg-primary: #0D0D0D;
    --bg-secondary: #1A1A1A;
    --card-bg: #2A2A2A;
    --text-primary: #F0F0F0;
    --text-secondary: #B0B0B0;
    --accent: #8A2BE2;
    --accent-hover: #9D4EED;
    --success: #25D366;
    --danger: #FF4444;
    --border: #3A3A3A;
    --shadow: rgba(0, 0, 0, 0.5);
}

/* ===========================
   ОБЩИЕ СТИЛИ
   =========================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    min-width: 0; /* предотвращает расширение flex/grid детей */
}

html {
    overflow-x: hidden;
    max-width: 100%;
}

/* Убираем 300ms задержку iOS на всех кликабельных элементах */
a, button, label, input, select, textarea,
[onclick], [role="button"] {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
    position: relative;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===========================
   ТИПОГРАФИЯ
   =========================== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

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

@media (max-width: 768px) {
    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
}

/* ===========================
   КНОПКИ
   =========================== */
.btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 8px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-size: 1rem;
    text-align: center;
}

.btn-primary {
    background: var(--accent);
    color: white;
}

.btn-primary:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(138, 43, 226, 0.3);
}

.btn-light {
    background: white;
    color: var(--accent);
}

.btn-light:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(255, 255, 255, 0.2);
}

.btn-success {
    background: var(--success);
    color: white;
    width: 100%;
}

.btn-success:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--card-bg);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: #3A3A3A;
}

/* ===========================
   HEADER
   =========================== */
.header {
    background: var(--bg-secondary);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px var(--shadow);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
    flex-shrink: 0;
}

.logo-icon {
    font-size: 1.8rem;
    flex-shrink: 0;
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.logo-service {
    font-size: 0.7rem;
    font-weight: 400;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block;
}

.nav {
    display: flex;
    gap: 1.2rem;
    flex-wrap: nowrap;
    align-items: center;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.88rem;
    transition: color 0.3s ease;
    position: relative;
    white-space: nowrap;
}

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

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.cart-btn {
    position: relative;
    padding: 10px 16px;
    background: var(--card-bg);
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.cart-btn:hover {
    background: var(--accent);
    transform: scale(1.05);
}

.cart-icon {
    font-size: 1.5rem;
}

.cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--accent);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 50%;
    min-width: 20px;
    text-align: center;
}

.burger-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.8rem;
    cursor: pointer;
}

@media (max-width: 1080px) {
    .burger-btn {
        display: block !important;
    }
    .logo-service {
        display: none;
    }
}

@media (min-width: 1081px) {
    .burger-btn {
        display: none !important;
    }
}

@media (max-width: 1080px) {
    .nav {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: var(--bg-secondary);
        flex-direction: column;
        padding: 2rem;
        transition: left 0.3s ease;
        gap: 1rem;
        z-index: 999;
    }

    .nav .nav-link {
        font-size: 1.1rem;
    }
    
    .nav.active {
        left: 0;
    }
    
    .burger-btn {
        display: block;
    }
}

/* ===========================
   HERO
   =========================== */
.hero {
    position: relative;
    min-height: 600px;
    display: flex;
    align-items: center;
    background: url('../images/hero-bg.jpg') center/cover no-repeat;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(135deg, rgba(138,43,226,0.45) 0%, rgba(13,13,13,0.0) 50%),
        linear-gradient(to bottom, rgba(13,13,13,0.3) 0%, rgba(13,13,13,0.82) 100%);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    animation: fadeInUp 0.8s ease;
}

.hero-title {
    font-size: 2.8rem;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 8px var(--shadow);
    background: linear-gradient(135deg, #ffffff 40%, #c084fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 2rem;
    color: var(--text-secondary);
}

@media (max-width: 768px) {
    .hero {
        min-height: 500px;
        padding: 2rem 0;
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
}

/* ===========================
   SECTIONS
   =========================== */
.section {
    padding: 5rem 0;
}

.section-dark {
    background: linear-gradient(180deg, var(--bg-secondary) 0%, #110a1f 100%);
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-primary);
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #8A2BE2, #c084fc);
    border-radius: 2px;
    margin: 0.6rem auto 0;
}

.section-subtitle {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 3rem;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.section-cta {
    text-align: center;
    margin-top: 3rem;
}

/* ===========================
   DIRECTIONS GRID
   =========================== */
.directions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.direction-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s ease;
    opacity: 1;
    transform: translateY(0);
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.direction-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(138,43,226,0.0) 0%, rgba(138,43,226,0.06) 100%);
    opacity: 0;
    transition: opacity 0.3s;
}

.direction-card:hover::before {
    opacity: 1;
}

.direction-card.clickable {
    cursor: pointer;
}

.direction-card.clickable:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 8px 32px rgba(138,43,226,0.25);
    border-color: var(--accent);
}

.direction-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.direction-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px var(--shadow);
}

.direction-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.direction-title {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.direction-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ===========================
   ADVANTAGES
   =========================== */
.advantages-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 900px;
    margin: 0 auto;
}

.advantage-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 1.5rem;
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--border);
    opacity: 1;
    transform: translateX(0);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.advantage-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, #8A2BE2, #c084fc);
    border-radius: 2px 0 0 2px;
}

.advantage-item.visible {
    opacity: 1;
    transform: translateX(0);
}

.advantage-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.advantage-text {
    flex: 1;
    line-height: 1.6;
}

/* ===========================
   STEPS GRID
   =========================== */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.step-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    text-align: center;
    opacity: 1;
    transform: scale(1);
    transition: all 0.3s ease;
}

.step-card:hover {
    border-color: var(--accent);
    box-shadow: 0 6px 24px rgba(138,43,226,0.18);
    transform: scale(1) translateY(-4px) !important;
}

.step-card.visible {
    opacity: 1;
    transform: scale(1);
}

.step-number {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #8A2BE2, #c084fc);
    color: white;
    font-size: 1.8rem;
    font-weight: 700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    box-shadow: 0 4px 16px rgba(138,43,226,0.4);
}

.step-title {
    margin-bottom: 0.5rem;
}

.step-desc {
    color: var(--text-secondary);
}

/* ===========================
   PROMO BANNER
   =========================== */
.promo-banner {
    background: linear-gradient(135deg, var(--accent) 0%, #6A0DAD 100%);
    padding: 3rem 0;
}

.promo-content {
    display: flex;
    align-items: center;
    gap: 2rem;
    justify-content: space-between;
    flex-wrap: wrap;
}

.promo-icon {
    font-size: 3rem;
}

.promo-text {
    flex: 1;
}

.promo-title {
    margin-bottom: 0.5rem;
    color: white;
}

.promo-subtitle {
    color: rgba(255,255,255,0.9);
    font-size: 1.1rem;
}

@media (max-width: 768px) {
    .promo-content {
        text-align: center;
        justify-content: center;
    }
}

/* ===========================
   PRODUCTS GRID
   =========================== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.product-card {
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--border);
    overflow: hidden;
    transition: all 0.3s ease;
    opacity: 1;
    transform: translateY(0);
}

.product-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.product-card:hover {
    transform: translateY(-6px);
    border-color: var(--accent);
    box-shadow: 0 10px 32px rgba(138,43,226,0.22);
}

.product-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    background: #1a1a1a;
}

.product-content {
    padding: 1.5rem;
}

.product-category {
    display: inline-block;
    background: var(--accent);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.product-name {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.product-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-prices {
    margin-bottom: 1rem;
}

.product-price-old {
    text-decoration: line-through;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.product-price-new {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
}

.product-savings {
    display: inline-block;
    background: rgba(138, 43, 226, 0.2);
    color: var(--accent);
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 0.5rem;
}

.product-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-add-to-cart {
    flex: 1;
    padding: 12px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-add-to-cart:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
}

/* ===========================
   FOOTER
   =========================== */
.footer {
    background: var(--bg-secondary);
    padding: 3rem 0 1rem;
    border-top: 1px solid var(--border);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1rem;
    font-size: 1.25rem;
    font-weight: 600;
}

.footer-desc {
    color: var(--text-secondary);
    line-height: 1.6;
}

.footer-title {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.footer-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-link {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: var(--accent);
}

.footer-contacts {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    color: var(--text-secondary);
}

/* ===========================
   iOS Safari: отключить авто-ссылки на адреса/телефоны
   =========================== */
a[x-apple-data-detectors] {
    color: inherit !important;
    text-decoration: none !important;
    font-size: inherit !important;
    font-family: inherit !important;
    font-weight: inherit !important;
    line-height: inherit !important;
    pointer-events: none !important;
    cursor: default !important;
}
/* Класс-обёртка адреса — запрет кликабельности */
.no-link-address {
    pointer-events: none;
    -webkit-user-select: text;
    user-select: text;
    color: var(--text-secondary);
    font-style: normal;
    text-decoration: none;
}
.no-link-address a {
    pointer-events: none;
    color: inherit;
    text-decoration: none;
    cursor: default;
}

.footer-contacts a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-contacts a:hover {
    color: var(--accent);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    color: var(--text-secondary);
}

/* ===========================
   WHATSAPP FLOAT
   =========================== */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: var(--success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    z-index: 1001;
    transition: all 0.3s ease;
    text-decoration: none;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
}

.whatsapp-icon {
    font-size: 2rem;
}

/* ===========================
   ANIMATIONS
   =========================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.cart-btn.shake {
    animation: shake 0.5s ease;
}

/* ===========================
   CATALOG PAGE
   =========================== */
.catalog-header {
    padding: 3rem 0 2rem;
}

.catalog-controls {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.search-box {
    flex: 1;
    min-width: 250px;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 12px 40px 12px 16px;
    background: var(--card-bg);
    border: 2px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--accent);
}

.search-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
}

.filter-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 20px;
    background: var(--card-bg);
    color: var(--text-primary);
    border: 2px solid transparent;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.filter-btn:hover {
    border-color: var(--accent);
}

.filter-btn.active {
    background: var(--accent);
    color: white;
}

/* ===========================
   SERVICES PAGE
   =========================== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.service-card {
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--border);
    padding: 2rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.service-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #8A2BE2, #c084fc);
    transform: scaleX(0);
    transition: transform 0.3s ease;
    border-radius: 0 0 12px 12px;
}

.service-card:hover::after {
    transform: scaleX(1);
}

.service-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
    box-shadow: 0 10px 32px rgba(138,43,226,0.2);
}

.service-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.service-icon {
    font-size: 2.5rem;
}

.service-title {
    flex: 1;
    margin: 0;
}

.service-desc {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.service-benefit {
    background: rgba(37, 211, 102, 0.1);
    border-left: 3px solid var(--success);
    padding: 1rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* ===========================
   MODAL
   =========================== */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.8);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    /* iOS: фон не скроллится когда модалка открыта */
    -webkit-overflow-scrolling: auto;
    touch-action: none;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 2rem;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    /* iOS плавный скролл ТОЛЬКО внутри модалки */
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: pan-y;
    position: relative;
    animation: fadeInUp 0.3s ease;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: var(--accent);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 12px;
    background: var(--bg-primary);
    border: 2px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--accent);
}

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

/* ===========================
   CART PAGE
   =========================== */
.cart-empty {
    text-align: center;
    padding: 4rem 0;
}

.cart-empty-icon {
    font-size: 5rem;
    margin-bottom: 1rem;
}

.cart-items {
    margin-bottom: 2rem;
}

.cart-item {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.cart-item-image {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
}

.cart-item-info {
    flex: 1;
}

.cart-item-name {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.cart-item-price {
    color: var(--accent);
    font-size: 1.2rem;
    font-weight: 600;
}

.cart-item-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quantity-btn {
    width: 32px;
    height: 32px;
    background: var(--bg-primary);
    border: 2px solid var(--border);
    border-radius: 6px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.quantity-btn:hover {
    border-color: var(--accent);
}

.quantity-value {
    min-width: 40px;
    text-align: center;
    font-weight: 600;
}

.btn-remove {
    background: var(--danger);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-remove:hover {
    filter: brightness(1.1);
}

.cart-summary {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 2rem;
    max-width: 400px;
    margin-left: auto;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    font-weight: 700;
}

.cart-total-price {
    color: var(--accent);
}

/* ===========================
   CHECKOUT PAGE
   =========================== */
.checkout-container {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 2rem;
}

.checkout-form {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 2rem;
}

.checkout-summary {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 2rem;
}

.order-items {
    margin-bottom: 1.5rem;
}

.order-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
}

@media (max-width: 992px) {
    .checkout-container {
        grid-template-columns: 1fr;
    }
}

/* ===========================
   ABOUT PAGE
   =========================== */
.about-section {
    padding: 3rem 0;
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.about-highlight {
    background: linear-gradient(135deg, var(--accent) 0%, #6A0DAD 100%);
    padding: 2rem;
    border-radius: 12px;
    margin: 2rem 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin: 2rem 0;
    width: 100%;
    box-sizing: border-box;
}

.stat-card {
    text-align: center;
    padding: 1.5rem 0.75rem;
    background: var(--card-bg);
    border-radius: 12px;
    min-width: 0;
    overflow: hidden;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-secondary);
}

.principles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.principle-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
}

.principle-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* ===========================
   CONTACTS PAGE
   =========================== */
.contacts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.contact-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
}

.contact-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.contact-info {
    color: var(--text-secondary);
}

.contact-info a {
    color: var(--accent);
    text-decoration: none;
}

.contact-info a:hover {
    text-decoration: underline;
}

.map-container {
    border-radius: 12px;
    overflow: hidden;
    height: 400px;
    margin-top: 3rem;
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* ===========================
   UTILITY CLASSES
   =========================== */
.text-center {
    text-align: center;
}

.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }

.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }

/* ===========================
   NOTIFICATION
   =========================== */
.notification {
    position: fixed;
    top: 100px;
    right: 20px;
    background: var(--success);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px var(--shadow);
    z-index: 2000;
    animation: slideInRight 0.3s ease;
    display: none;
}

.notification.show {
    display: block;
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ===========================
   LOADING
   =========================== */
.loading {
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
}

.loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* ===========================
   SUCCESS MESSAGE
   =========================== */
.success-message {
    background: var(--card-bg);
    border: 2px solid var(--success);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    margin: 2rem 0;
}

.success-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.success-title {
    color: var(--success);
    margin-bottom: 1rem;
}

.success-text {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ===========================
   DIRECTION MODAL
   =========================== */
.direction-modal-content {
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    /* iOS плавный скролл ТОЛЬКО внутри модалки */
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: pan-y;
}

.direction-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.direction-modal-icon {
    font-size: 3rem;
}

.direction-modal-title {
    flex: 1;
    margin: 0;
}

.direction-description {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 2rem;
}

.price-section {
    margin-bottom: 2rem;
}

.price-section-title {
    color: var(--accent);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.price-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

.price-table th,
.price-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.price-table th {
    background: var(--bg-primary);
    color: var(--accent);
    font-weight: 600;
}

.price-table tr:hover {
    background: rgba(138, 43, 226, 0.1);
}

.price-value {
    color: var(--accent);
    font-weight: 600;
    white-space: nowrap;
}

.loading-prices {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
}

/* ===========================
   МОБИЛЬНЫЕ ИСПРАВЛЕНИЯ
   Плавающий экран + модальные окна
   =========================== */

/* Глобальный фикс переполнения */
html {
    overflow-x: hidden;
    width: 100%;
}

/* Все секции не шире экрана */
section, header, footer, .section, .promo-banner {
    max-width: 100%;
    overflow-x: hidden;
}

/* Контейнер на мобиле */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
        max-width: 100%;
        box-sizing: border-box;
    }

    /* Шапка */
    .header-content {
        flex-wrap: nowrap;
        gap: 0.5rem;
    }

    .logo-text {
        font-size: 1rem;
    }

    .logo-service {
        font-size: 0.6rem;
    }

    /* Направления — 2 колонки на мобиле */
    .directions-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .direction-card {
        padding: 1rem 0.75rem;
    }

    .direction-icon {
        font-size: 2rem;
    }

    .direction-title {
        font-size: 0.85rem;
        margin-bottom: 0.25rem;
    }

    .direction-desc {
        font-size: 0.75rem;
    }

    /* Преимущества */
    .advantage-item {
        flex-direction: row;
        align-items: flex-start;
        padding: 1rem;
    }

    /* Шаги */
    .steps-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    /* Хиты продаж / каталог */
    .products-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .product-image {
        height: 180px;
    }

    /* Акционный баннер */
    .promo-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
        padding: 0 1rem;
    }

    .promo-title {
        font-size: 1rem;
    }

    /* Таблица корзины */
    .cart-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .cart-item-image {
        width: 100%;
        height: 160px;
    }

    .cart-item-controls {
        width: 100%;
        justify-content: space-between;
    }

    /* Оформление заказа */
    .checkout-container {
        grid-template-columns: 1fr;
    }

    /* Контакты */
    .contacts-grid {
        grid-template-columns: 1fr;
    }

    /* Услуги */
    .services-grid {
        grid-template-columns: 1fr;
    }

    /* О нас */
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
        margin: 1rem 0;
    }

    .stat-card {
        padding: 1rem 0.5rem;
    }

    .stat-number {
        font-size: 1.4rem;
        word-break: break-word;
    }

    .stat-label {
        font-size: 0.75rem;
        line-height: 1.3;
    }

    .about-section {
        padding: 2rem 0;
        overflow: hidden;
    }

    .about-content {
        padding: 0;
        overflow: hidden;
    }

    .about-highlight {
        padding: 1.5rem 1rem;
        margin: 1rem 0;
        box-sizing: border-box;
    }

    .about-highlight p {
        font-size: 0.9rem;
    }

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

    /* Футер */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    /* Карта */
    .map-container {
        height: 250px;
    }

    /* Кнопки */
    .btn {
        padding: 12px 20px;
        font-size: 0.95rem;
    }
}

/* ===========================
   МОДАЛЬНЫЕ ОКНА — МОБИЛЬНЫЙ ФИЛ
   =========================== */
@media (max-width: 768px) {
    .modal {
        padding: 0;
        align-items: flex-end;
    }

    .modal-content {
        border-radius: 16px 16px 0 0;
        max-height: 92vh;
        width: 100%;
        max-width: 100%;
        padding: 1.5rem 1rem;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Модальное окно направления */
    .direction-modal-content {
        max-height: 92vh;
        border-radius: 16px 16px 0 0;
    }

    .direction-header {
        gap: 0.75rem;
        margin-bottom: 1rem;
    }

    .direction-modal-icon {
        font-size: 2rem;
    }

    .direction-modal-title {
        font-size: 1.25rem;
    }

    /* Таблица цен в модалке */
    .price-table {
        font-size: 0.8rem;
    }

    .price-table th,
    .price-table td {
        padding: 0.5rem 0.4rem;
    }

    /* Кнопка закрытия модалки */
    .modal-close {
        top: 0.75rem;
        right: 0.75rem;
        font-size: 1.4rem;
        width: 32px;
        height: 32px;
        background: var(--bg-primary);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Форма в модалке */
    .form-input,
    .form-select,
    .form-textarea {
        font-size: 16px; /* Запрет зума на iOS */
    }
}