/* ═══════════════════════════════════════════════════════
   LAYOUT — шапка, навигация, мегаменю, подвал, кнопка звонка
   ═══════════════════════════════════════════════════════ */

/* ─── ШАПКА ─── */
.header-top {
    background: white;
}
.header-top .container {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 10px;
    padding-bottom: 10px;
    flex-wrap: nowrap;
}

.logo a {
    display: block;
    background: white;
    border-radius: 6px;
    padding: 3px 10px;
    line-height: 0;
}
.logo img {
    display: block;
    height: 40px;
    width: auto;
}
.logo span { display: block; font-size: 10px; font-weight: 400; color: #aaa; letter-spacing: 1px; text-transform: uppercase; }

/* ─── ПОИСК ─── */
.search-outer {
    position: relative;
    flex: 1;
}
.search-wrap { flex: 1; display: flex; max-width: 520px; margin: 0 12px; }
.search-wrap input {
    flex: 1; padding: 9px 14px; border: 1px solid #e8e8e8; border-radius: 6px 0 0 6px;
    font-size: 14px; outline: none; background: #f5f5f5; color: #222;
}
.search-wrap:focus-within {
    border-radius: 6px;
    box-shadow: 0 0 0 2px #ffc4c4;
    transition: box-shadow 0.2s;
}
.search-wrap:focus-within button {
    background: #e01616;
}
.search-wrap input::placeholder { color: #888; }
.search-wrap button {
    transition: background 0.15s, transform 0.1s;
    padding: 9px 18px; background: #f25e5e; color: white; border: none;
    border-radius: 0 6px 6px 0; cursor: pointer; font-size: 14px; font-weight: 700;
}
.search-wrap button:hover { background: #d11313; }
.search-wrap button:active { transform: scale(0.96); background: #ad0a0a; }

/* ─── ПРАВАЯ ЧАСТЬ ШАПКИ ─── */
.header-right { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.header-right a { text-decoration: none; }

.phone-block {
    position: relative;
    cursor: pointer;
    user-select: none;
}
.phone-block-right-side { text-align: right; }
.phone-block-left-side  { text-align: left; }
.phone-block .num { color: #222; font-size: 15px; font-weight: 700; white-space: nowrap; }
.phone-block .hint { color: #888; font-size: 11px; }

.phone-arrow {
    font-size: 21px;
    opacity: 0.6;
    transition: transform 0.2s;
    display: inline-block;
    margin-left: 4px;
}
.phone-block.open .phone-arrow { transform: rotate(180deg); }
.phone-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    background: white;
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    padding: 6px 0;
    min-width: 200px;
    z-index: 500;
    text-align: left;
}
.phone-block.open .phone-menu { display: block; }
.phone-menu a {
    display: block;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 600;
    color: #222;
    text-decoration: none;
    transition: background 0.15s;
    white-space: nowrap;
}
.phone-menu a:hover { background: #fff5f0; color: #f25e5e; }

.btn-login {
    transition: background 0.15s, transform 0.1s, border-color 0.15s, color 0.15s;
    padding: 7px 14px; border: 1px solid #ddd; border-radius: 6px;
    color: #444; background: transparent; cursor: pointer; font-size: 13px; white-space: nowrap;
}
.btn-login:hover { border-color: #f25e5e; color: #f25e5e; background: rgba(255,107,43,0.06); }
.btn-login:active { transform: scale(0.96); background: rgba(255,107,43,0.12); }

.cart-btn {
    transition: background 0.15s, transform 0.1s;
    display: flex; align-items: center; gap: 8px; padding: 8px 16px;
    background: #f25e5e; border: none; border-radius: 6px; color: white;
    cursor: pointer; font-size: 13px; font-weight: 700; white-space: nowrap;
}
.cart-btn:hover { background: #d11313; }
.cart-btn:active { transform: scale(0.96); background: #ad0a0a; }

.cart-count {
    background: white; color: #f25e5e; border-radius: 50%;
    width: 20px; height: 20px; display: flex; align-items: center;
    justify-content: center; font-size: 11px; font-weight: 900;
}

/* ─── НАВИГАЦИЯ ─── */
.header-nav { background: #2a2a2a; }
.header-nav .container { display: flex; align-items: stretch; }
.catalog-btn {
    display: flex; align-items: center; gap: 8px;
    padding: 11px 20px; background: #f25e5e; color: white;
    border: none; cursor: pointer; font-size: 14px; font-weight: 700;
    white-space: nowrap;
}
.nav-links { display: flex; }
.nav-links a {
    padding: 11px 14px; color: rgba(255,255,255,0.65); text-decoration: none;
    font-size: 13px; transition: color 0.2s; white-space: nowrap; display: flex; align-items: center;
}
.nav-links a:hover { color: white; }
.nav-links a.hot { color: #f25e5e; }

/* ─── ПОЛОСА КАТЕГОРИЙ ─── */
.categories-bar {
    background: white;
    border-bottom: 3px solid #f57f7f;
}
.categories-bar .container {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
}
.categories-bar .container::-webkit-scrollbar { display: none; }
.cat-tab {
    padding: 10px 13px;
    text-decoration: none; color: #555;
    font-size: 13px; white-space: nowrap;
    border-bottom: 3px solid transparent;
    margin-bottom: -3px;
    transition: all 0.15s;
    cursor: pointer;
    background: none; border-top: none; border-left: none; border-right: none;
    display: flex; align-items: center; gap: 5px;
}
.cat-tab:hover { color: #f25e5e; border-bottom-color: #f25e5e; }
.cat-tab.active { color: #f25e5e; border-bottom-color: #f25e5e; font-weight: 700; background: #fff5f0; }
.cat-tab-arrow {
    font-size: 17px;
    color: #bbb;
    margin-left: 2px;
    transition: color 0.15s;
}
.cat-tab:hover .cat-tab-arrow,
.cat-tab.active .cat-tab-arrow { color: #f25e5e; }

/* ─── ПОДКАТЕГОРИИ ─── */
.subcats-panel { display: none; }
.subcats-panel:not(:empty) {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 20px;
    background: #fff8f5;
    border-bottom: 1px solid #ffe0cc;
}
.subcats-panel.open { display: flex; }
.subcat-link {
    padding: 5px 14px; background: white; border: 1px solid #f57f7f;
    border-radius: 20px; font-size: 13px; color: #f57f7f;
    text-decoration: none; transition: all 0.15s; white-space: nowrap;
}
.subcat-link:hover { background: #f57f7f; color: white; border-color: #f57f7f; }

/* ─── МЕГАМЕНЮ ─── */
.mega-cat-arrow { display: none; }
.mega-sub-all { display: none; }
.mega-cat-toggle {
    font-family: inherit;
    font-size: inherit;
    border: none;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    width: 100%;
}

.megamenu-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 200;
}
.megamenu-overlay.open { display: block; }
.megamenu {
    position: absolute; top: 0; left: 0; bottom: 0;
    width: 820px; max-width: 95vw;
    background: white; overflow-y: auto;
    display: flex; flex-direction: column;
}
.megamenu-header {
    background: #1c1c1c; color: white; padding: 16px 20px;
    display: flex; align-items: center; justify-content: space-between;
    position: sticky; top: 0; z-index: 1;
}
.megamenu-header h3 { font-size: 16px; font-weight: 700; }
.megamenu-close {
    background: none; border: none; color: white; font-size: 22px;
    cursor: pointer; padding: 0 4px; line-height: 1;
}
.megamenu-body {
    display: flex;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

/* Левая колонка — список категорий */
.megamenu-list {
    display: flex;
    flex-direction: column;
    width: 280px;
    flex-shrink: 0;
    overflow-y: auto;
    border-right: 1px solid #f0f0f0;
}
.mega-cat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
    color: #222;
    text-decoration: none;
    border: none;
    background: transparent;
    cursor: pointer;
    font-family: inherit;
    border-bottom: 1px solid #f4f4f4;
    transition: background 0.12s, color 0.12s;
    width: 100%;
    text-align: left;
}
.mega-cat-item:hover,
.mega-cat-item.active {
    background: #fff5f0;
    color: #f25e5e;
}
.mega-cat-item .ico { font-size: 16px; }
.mega-cat-chevron {
    margin-left: auto;
    color: #ccc;
    transition: color 0.15s;
    flex-shrink: 0;
}
.mega-cat-item:hover .mega-cat-chevron,
.mega-cat-item.active .mega-cat-chevron { color: #f25e5e; }

/* Стрелка-плюс для мобильного аккордеона — скрыта на десктопе */
.mega-cat-arrow { display: none; }

/* Мобильные подкатегории — скрыты на десктопе */
.mega-sub-mobile { display: none; }

/* Правая панель — подкатегории */
.megamenu-subcats {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
    background: #fafafa;
}
.mega-sub-panel {
    display: none;
}
.mega-sub-panel.active {
    display: block;
}
.mega-sub-panel-header {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #eee;
}
.mega-sub-panel-title {
    font-size: 16px;
    font-weight: 800;
    color: #222;
}
.mega-sub-panel-all {
    font-size: 12px;
    font-weight: 700;
    color: #f25e5e;
    text-decoration: none;
    margin-left: auto;
    white-space: nowrap;
    transition: color 0.15s;
}
.mega-sub-panel-all:hover { color: #d11313; text-decoration: underline; }
.mega-sub-link {
    display: block;
    padding: 8px 0;
    font-size: 14px;
    color: #555;
    text-decoration: none;
    border-bottom: 1px solid #f0f0f0;
    transition: color 0.15s;
}
.mega-sub-link:last-child { border-bottom: none; }
.mega-sub-link:hover { color: #f25e5e; }
.mega-sub-link::before { content: '—'; margin-right: 8px; color: #ddd; font-size: 12px; }

/* Шеврон скрыт у категорий без детей */
.mega-cat-item:not(.has-children) .mega-cat-chevron { display: none; }

/* Убираем старые стили */
.mega-sub-all { display: none; }
.mega-sub a::before { content: '—'; margin-right: 6px; color: #ccc; font-size: 11px; }

/* ─── ПОДВАЛ ─── */
footer { margin-top: 40px; }


.footer-newsletter {
    position: relative;
    background: #0f0f0f;
    padding: 64px 0;
    overflow: hidden;
}
.footer-newsletter::before {
    content: '';
    position: absolute;
    right: -200px;
    top: 50%;
    transform: translateY(-50%);
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: transparent;
    box-shadow:
        0 0 0 1px rgba(242,94,94,0.08),
        0 0 0 40px rgba(242,94,94,0.04),
        0 0 0 80px rgba(242,94,94,0.04),
        0 0 0 120px rgba(242,94,94,0.03),
        0 0 0 160px rgba(242,94,94,0.02),
        0 0 0 200px rgba(242,94,94,0.01);
    pointer-events: none;
}
.footer-newsletter::after {
    content: '';
    position: absolute;
    right: 100px;
    top: 50%;
    transform: translateY(-50%);
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(242,94,94,0.12) 0%, transparent 70%);
    pointer-events: none;
}

.newsletter-wrap {
    display: flex;
    align-items: center;
    gap: 48px;
    position: relative;
    z-index: 1;
}
.newsletter-ico {
    font-size: 64px;
    flex-shrink: 0;
    filter: drop-shadow(0 0 20px rgba(242,94,94,0.5));
    animation: floatIco 3s ease-in-out infinite;
}
@keyframes floatIco {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-8px); }
}
.newsletter-info { flex: 1; }
.newsletter-title {
    font-size: 28px;
    font-weight: 900;
    color: white;
    letter-spacing: -0.5px;
    line-height: 1.2;
}
.newsletter-title span { color: #f25e5e; }
.newsletter-sub {
    font-size: 14px;
    color: rgba(255,255,255,0.45);
    margin-top: 8px;
    line-height: 1.6;
}
.newsletter-form { flex-shrink: 0; }
.newsletter-fields { display: flex; flex-direction: column; gap: 12px; }
.newsletter-inputs {
    display: flex;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.newsletter-inputs:focus-within {
    border-color: rgba(242,94,94,0.5);
    box-shadow: 0 0 0 3px rgba(242,94,94,0.1);
}
.newsletter-inputs input {
    padding: 14px 18px;
    border: none;
    font-size: 14px;
    width: 280px;
    outline: none;
    background: transparent;
    color: white;
}
.newsletter-inputs input::placeholder { color: rgba(255,255,255,0.3); }
.newsletter-inputs button {
    padding: 14px 24px;
    background: #f25e5e;
    color: white;
    border: none;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
}
.newsletter-inputs button:hover { background: #d94f4f; }
.newsletter-agree {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    cursor: pointer;
}
.newsletter-agree input[type=checkbox] {
    margin-top: 2px;
    accent-color: #f25e5e;
    flex-shrink: 0;
}
.newsletter-agree span {
    font-size: 12px;
    color: rgba(255,255,255,0.3);
    line-height: 1.4;
}
.newsletter-agree a {
    color: rgba(255,255,255,0.55);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.newsletter-agree a:hover { color: #f25e5e; }



.footer-main { background: #1a1a1a; padding: 48px 0; }
.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 2fr;
    gap: 48px;
}
.footer-col-title {
    font-size: 11px;
    font-weight: 700;
    color: white;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.footer-col a {
    display: block;
    color: rgba(255,255,255,0.5);
    text-decoration: none;
    font-size: 13px;
    margin-bottom: 9px;
    transition: color 0.15s;
}
.footer-col a:hover { color: #f25e5e; }
.footer-col .footer-hot { color: #f25e5e; }
.footer-col .footer-all { color: rgba(255,255,255,0.3); margin-top: 4px; font-size: 12px; }

.footer-bottom-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}
.footer-hours { margin-bottom: 4px; }
.hours-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: rgba(255,255,255,0.5);
    padding: 6px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.hours-row.muted { opacity: 0.65; }
.footer-socials { display: flex; gap: 8px; margin-top: 10px; }
.social-btn {
    padding: 7px 16px;
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.6) !important;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none !important;
    transition: background 0.15s, color 0.15s !important;
    border: 1px solid rgba(255,255,255,0.08);
}
.social-btn:hover { background: #f25e5e !important; color: white !important; border-color: #f25e5e !important; }

.footer-contact { margin-bottom: 14px; }
.contact-phone { font-size: 18px; font-weight: 800; color: white; letter-spacing: -0.3px; }
.contact-hint { font-size: 11px; color: rgba(255,255,255,0.35); margin-top: 3px; }
.contact-email { font-size: 13px; color: rgba(255,255,255,0.5); }
.address-city { font-size: 12px; font-weight: 700; color: rgba(255,255,255,0.65); letter-spacing: 1px; }
.address-street { font-size: 12px; color: rgba(255,255,255,0.35); margin-top: 3px; }
.magazine-type { font-size: 12px; font-weight: 700; color: rgba(255,255,255,0.65); text-transform: uppercase; letter-spacing: 1px; }

.footer-map-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: rgba(255,255,255,0.4);
    text-decoration: none;
    margin-top: 5px;
    transition: color 0.15s;
}
.footer-map-link:hover { color: #f25e5e; }

.footer-bottom {
    background: #111;
    padding: 16px 0;
    padding-bottom: calc(50px + env(safe-area-inset-bottom));
    border-top: 1px solid rgba(255,255,255,0.04);
}
.footer-bottom .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: rgba(255,255,255,0.25);
}

/* ─── КНОПКА ЗВОНКА ─── */
.call-btn {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 56px;
    height: 56px;
    background: #2ecc71;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    z-index: 500;
    box-shadow: 0 4px 16px rgba(46,204,113,0.4);
    animation: pulse 2s infinite;
}
.call-btn:hover { animation: none; background: #27ae60; transform: scale(1.08); }
@keyframes pulse {
    0%   { box-shadow: 0 0 0 0 rgba(46,204,113,0.5); }
    70%  { box-shadow: 0 0 0 14px rgba(46,204,113,0); }
    100% { box-shadow: 0 0 0 0 rgba(46,204,113,0); }
}

.call-menu {
    position: fixed;
    bottom: 100px;
    right: 32px;
    width: 300px;
    background: white;
    border-radius: 14px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.18);
    z-index: 499;
    overflow: hidden;
    opacity: 0;
    transform: translateY(12px) scale(0.97);
    pointer-events: none;
    transition: opacity 0.2s, transform 0.2s;
    transform-origin: bottom right;
}
.call-menu.open { opacity: 1; transform: translateY(0) scale(1); pointer-events: all; }
.call-menu-title {
    padding: 14px 18px 10px;
    font-size: 12px;
    font-weight: 700;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid #f0f0f0;
}
.call-menu-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    text-decoration: none;
    color: #222;
    border-bottom: 1px solid #f8f8f8;
    transition: background 0.15s;
}
.call-menu-item:last-child { border-bottom: none; }
.call-menu-item:hover { background: #f8f8f8; }
.call-menu-item.call-callback:hover { background: #fff5f0; }
.call-menu-ico {
    font-size: 22px;
    width: 40px;
    height: 40px;
    background: #f4f4f4;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.call-menu-label { font-size: 14px; font-weight: 600; }
.call-menu-hint { font-size: 12px; color: #aaa; margin-top: 2px; }
