/* ═══════════════════════════════════════════
   SALSABIL — Mobile Overrides (≤ 768px)
   ═══════════════════════════════════════════ */

/* ── Fix min-width from style.css ── */
@media (max-width: 768px) {
    .main-page { min-width: 0 !important; }
    .main-page .desktop-content { align-items: stretch !important; }

    /* Product page — force single column on mobile */
    .product-layout,
    .product-skeleton-body {
        display: flex !important;
        flex-direction: column !important;
        gap: 20px !important;
    }
    .product-skeleton-body {
        grid-template-columns: unset !important;
    }
    .product-gallery,
    .product-skeleton-gallery {
        position: static !important;
        max-width: 100% !important;
        width: 100% !important;
    }

    /* ════════════════════════════════════════
       HERO — баннеры в один ряд
    ════════════════════════════════════════ */
    .main-page .hero-section {
        display: flex !important;
        flex-direction: row !important;
        align-items: stretch !important;
        padding: 12px 14px 20px !important;
        gap: 10px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    .main-page .carousel-huge {
        flex: 1 1 60% !important;
        width: auto !important;
        height: 160px !important;
    }
    .main-page .carousel-medium {
        flex: 1 1 40% !important;
        width: auto !important;
        height: 160px !important;
    }
    .main-page .baner-hover {
        border-radius: 10px !important;
    }
    .main-page .baner {
        width: 100% !important;
        left: 0 !important;
        border-radius: 10px !important;
        align-items: center !important;
        justify-content: center !important;
    }

    /* ── Banner 1: reposition & resize SUPER SALE text ── */
    .main-page .ribbon,
    .main-page .ribbon-2 { display: none !important; }

    .main-page .baner-s-content {
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        width: 90% !important;
        gap: 6px !important;
        align-items: center !important;
    }
    .main-page .SUPER-SALE {
        font-size: 9px !important;
        line-height: 1.3 !important;
        white-space: normal !important;
        text-align: center !important;
    }
    .main-page .price {
        padding: 3px 8px !important;
        border-radius: 6px !important;
    }
    .main-page .text-wrapper-9 {
        font-size: 11px !important;
        line-height: 1.2 !important;
        white-space: normal !important;
    }

    /* ── Banner 2: "Новинка дня" ── */
    .main-page .txt {
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        padding: 8px !important;
        width: 100% !important;
    }
    .main-page .baner-s-content-2 {
        gap: 4px !important;
        align-items: center !important;
    }
    .main-page .text-wrapper-11 {
        font-size: 11px !important;
        line-height: 1.3 !important;
        white-space: normal !important;
        text-align: center !important;
    }
    .main-page .p { display: none !important; }

    /* ── "Акция" text in section ribbon ── */
    .main-page .rectangle-2 { height: 32px !important; }
    .main-page .text-wrapper-14 { font-size: 10px !important; }
    .main-page .tab-2 { padding: 2px 6px !important; }

    /* ════════════════════════════════════════
       Акции section
    ════════════════════════════════════════ */
    .main-page .section-2 {
        padding: 28px 14px !important;
        gap: 16px !important;
    }
    .main-page .text-wrapper-15 {
        font-size: 20px !important;
    }
}

/* ════════════════════════════════════════
   MOBILE DRAWER (hamburger menu)
════════════════════════════════════════ */
.mobile-drawer {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: 320px;
    max-width: 85vw;
    background: #fff;
    z-index: 1200;
    transform: translateX(-100%);
    transition: transform 0.28s ease;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    box-shadow: 8px 0 32px rgba(0,0,0,0.12);
}
.mobile-drawer.open { transform: translateX(0); }

.mobile-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid #e2e8f0;
    flex-shrink: 0;
    background: #fff;
}
.mobile-drawer-header img { height: 40px; width: auto; }
.mobile-drawer-close {
    background: #f4f6f8;
    border: none;
    color: #1a202c;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    transition: background .15s;
    width: 36px;
    height: 36px;
}
.mobile-drawer-close:hover { background: #e0f5f8; color: #02a0b4; }

/* ── Auth row ── */
.md-auth-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 20px;
    background: #e0f5f8;
    border-radius: 16px;
    margin: 16px;
}
.md-auth-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #02a0b4;
    flex-shrink: 0;
}
.md-auth-btn {
    background: none;
    border: none;
    color: #1a202c;
    font-family: 'Manrope', sans-serif;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    padding: 0;
    transition: color .12s;
}
.md-auth-btn:hover { color: #02a0b4; }
.md-auth-btn[href] { text-decoration: none; }
.md-logout-btn { color: #6b6b6b; font-weight: 500; }
.md-logout-btn:hover { color: #e65100 !important; }
.md-auth-sep {
    color: rgba(26,32,44,.3);
    font-size: 14px;
    user-select: none;
}

/* ── Catalog link (bold header row) ── */
.md-catalog-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    margin: 0 16px;
    background: #02a0b4;
    color: #fff;
    text-decoration: none;
    font-family: 'Manrope', sans-serif;
    font-size: 15px;
    font-weight: 700;
    border-radius: 999px;
    transition: background .15s;
}
.md-catalog-link:hover { background: #017f8f; }

/* ── Category items ── */
.md-cat-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px 12px 24px;
    margin: 0 16px;
    border-radius: 999px;
    color: #1a202c;
    text-decoration: none;
    font-family: 'Manrope', sans-serif;
    font-size: 15px;
    font-weight: 600;
    transition: color .12s, background .12s;
}
.md-cat-item:hover {
    color: #02a0b4;
    background: rgba(2,160,180,0.05);
}
.md-cat-item::after {
    content: '›';
    font-size: 20px;
    color: #ccc;
    margin-left: 8px;
}

/* ── Special (Новинки / Акции) ── */
.md-special-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px 12px 24px;
    margin: 0 16px;
    text-decoration: none;
    border: 1px solid transparent;
    border-radius: 999px;
    font-family: 'Manrope', sans-serif;
    font-size: 15px;
    font-weight: 700;
    transition: background .15s, border-color .15s;
    color: #02a0b4;
    border-color: #02a0b4;
}
.md-special-new  { color: #02a0b4; }
.md-special-sale { color: #02a0b4; }
.md-special-item:hover { background: rgba(2,160,180,0.05); }

/* ── Contact row ── */
.md-contact-row {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 16px 20px;
    margin: 16px;
    background: #f4f6f8;
    border-radius: 16px;
}
.md-contact-city {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #6b6b6b;
    font-family: 'Manrope', sans-serif;
    font-size: 13px;
    font-weight: 500;
}
.md-contact-phone {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #1a202c;
    text-decoration: none;
    font-family: 'Manrope', sans-serif;
    font-size: 15px;
    font-weight: 700;
    transition: color .12s;
}
.md-contact-phone:hover { color: #02a0b4; }

/* ── Social row ── */
.md-social-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 8px 20px 20px;
    margin: 0 16px;
}
.md-social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #f4f6f8;
    border-radius: 50%;
    color: #1a202c;
    transition: background .15s, color .15s;
}
.md-social-link:hover { background: #e0f5f8; color: #02a0b4; }

.mobile-drawer-section-title {
    font-family: 'Manrope', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #a0aec0;
    padding: 18px 20px 10px 36px;
}
.mobile-drawer-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px 12px 24px;
    margin: 0 16px;
    border-radius: 999px;
    color: #1a202c;
    font-family: 'Manrope', sans-serif;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: background .12s, color .12s;
}
.mobile-drawer-item:hover {
    background: rgba(2,160,180,0.05);
    color: #02a0b4;
}
.mobile-drawer-item.accent {
    color: #02a0b4;
    font-weight: 700;
}
.mobile-drawer-item.accent:hover { color: #017f8f; background: rgba(2,160,180,0.08); }

.mobile-drawer-divider {
    height: 1px;
    background: #e2e8f0;
    margin: 12px 20px;
}

.mobile-drawer-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    z-index: 1100;
    backdrop-filter: blur(2px);
}
.mobile-drawer-overlay.active { display: block; }

/* ════════════════════════════════════════
   MOBILE HEADER
════════════════════════════════════════ */
@media (max-width: 768px) {

    /* ── Preheader & additional menu: hidden ── */
    .main-page .preheader { display: none !important; }
    .main-page .additional-menu { display: none !important; }

    /* ── Main header: compact ── */
    .main-page .main-header-inner {
        height: 56px !important;
        padding: 0 14px !important;
        gap: 8px !important;
        justify-content: flex-start !important;
    }

    /* Logo smaller */
    .main-page .main-header-inner > a > .logo,
    .main-page .main-header-inner .logo {
        height: 32px !important;
        width: auto !important;
    }

    /* Hide search bar + catalog button */
    .main-page .content-2 { display: none !important; }

    /* Show hamburger */
    .mobile-hamburger { display: flex !important; }

    /* Show mobile search icon */
    .mobile-search-icon { display: flex !important; }

    /* Auth: hide text, keep person icon */
    .main-page .auth-buttons .button-4 { display: none !important; }
    .main-page .auth-buttons .button-3 { display: none !important; }
    .main-page .auth-divider { display: none !important; }

    /* Action group: push to right, icons close together */
    .main-page .action {
        margin-left: auto !important;
        gap: 4px !important;
    }

    /* Auth section: no extra margin */
    .main-page .div-2.auth-section { margin-left: 0 !important; }

    /* Person icon: reset margin */
    .main-page .header-person-icon {
        margin-left: 0 !important;
    }

    /* Buttons in action: smaller */
    .main-page .button-2,
    .main-page .button-wrapper { width: 36px !important; height: 36px !important; }
}

/* Hamburger — hidden on desktop */
.mobile-hamburger {
    display: none;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    flex-shrink: 0;
    transition: background .15s;
}
.mobile-hamburger:hover { background: rgba(255,255,255,.1); }

/* Mobile search icon — hidden on desktop */
.mobile-search-icon {
    display: none;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 6px;
    flex-shrink: 0;
    transition: background .15s;
}
.mobile-search-icon:hover { background: rgba(255,255,255,.1); }

/* ════════════════════════════════════════
   MOBILE FOOTER
════════════════════════════════════════ */
@media (max-width: 768px) {

    /* Email section */
    .main-page .email-section-inner {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 20px !important;
        padding: 32px 20px !important;
    }
    .main-page .email-section-inner .div-3 { max-width: 100% !important; }
    .main-page .email-section-inner .text-wrapper-16 { font-size: 22px !important; }
    .main-page .lorem-ipsum-dolor { width: auto !important; }

    .main-page .email-capture {
        width: 100% !important;
        flex-direction: column !important;
    }
    .main-page .input-default { width: 100% !important; }
    .main-page .button-main { width: 100% !important; }

    /* Footer columns */
    .main-page .footer-wrapper-inner { padding: 28px 20px 24px !important; }

    .main-page .content-4 {
        flex-direction: column !important;
        gap: 28px !important;
    }
    .main-page .logoa-nd-contacts { width: 100% !important; }

    .main-page .links {
        flex-direction: column !important;
        gap: 20px !important;
    }
    .main-page .footer-links-column,
    .main-page .footer-links-column-2 {
        width: 100% !important;
    }

    .main-page .section-3 {
        height: auto !important;
        flex-direction: column !important;
        gap: 20px !important;
        flex: none !important;
        width: 100% !important;
    }

    /* Bottom bar */
    .main-page .content-5 {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 8px !important;
    }

    /* Footer text smaller */
    .main-page .footer-2 { gap: 28px !important; }
}

@media (max-width: 480px) {
    .main-page .email-section-inner { padding: 24px 16px !important; }
    .main-page .footer-wrapper-inner { padding: 24px 16px 20px !important; }
}

/* ════════════════════════════════════════
   MOBILE SEARCH MODAL
════════════════════════════════════════ */
.mobile-search-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1300;
    background: var(--baseblack-500);
    transform: translateY(-100%);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.25s ease;
    opacity: 0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.mobile-search-modal.open {
    transform: translateY(0);
    opacity: 1;
}

@media (max-width: 768px) {
    .mobile-search-modal {
        display: flex;
        flex-direction: column;
    }
}

.mobile-search-modal-inner {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    height: 56px;
    gap: 0;
}

.mobile-search-form {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 0 8px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: border-color 0.15s;
}

.mobile-search-form:focus-within {
    border-color: rgba(255, 232, 23, 0.5);
    background: rgba(255, 255, 255, 0.13);
}

.mobile-search-back {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    flex-shrink: 0;
    transition: color 0.15s, background 0.15s;
}
.mobile-search-back:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.mobile-search-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font-family: 'Manrope', sans-serif;
    font-size: 15px;
    font-weight: 500;
    padding: 10px 0;
    min-width: 0;
}
.mobile-search-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}
.mobile-search-input::-webkit-search-cancel-button {
    display: none;
}

.mobile-search-submit {
    background: var(--yellow-500, #FFE817);
    border: none;
    color: var(--baseblack-500, #2e2828);
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: opacity 0.15s, transform 0.12s;
}
.mobile-search-submit:hover {
    opacity: 0.9;
    transform: scale(1.05);
}
.mobile-search-submit:active {
    transform: scale(0.96);
}

/* ══════════════════════════════════════
   NEW HEADER — Mobile overrides (≤ 768px)
══════════════════════════════════════ */
@media (max-width: 768px) {
    /* Hide desktop elements */
    .main-page .header-catalog-btn { display: none !important; }
    .main-page .header-search      { display: none !important; }
    .main-page .header-action-label { display: none !important; }
    .main-page .header-action-item.header-fav-btn { display: none !important; }

    .main-page .mobile-hamburger {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        border: none;
        background: none;
        cursor: pointer;
        color: #1a1a1a;
        flex-shrink: 0;
    }
    .main-page .mobile-search-icon {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .main-page .main-header-inner {
        height: 60px;
        gap: 10px;
    }

    /* Logo smaller on mobile */
    .main-page .header-logo-img { width: 130px; height: 36px; }
    .main-page .header-logo-brand { font-size: 14px; }
    .main-page .header-logo-small { font-size: 8px; }
}

@media (max-width: 480px) {
    .main-page .header-logo-img { width: 110px; height: 32px; }
    .main-page .main-header-inner { height: 56px; gap: 8px; padding: 0 12px; }
    .main-page .mobile-hamburger,
    .main-page .mobile-search-icon,
    .main-page .header-action-item {
        width: 36px;
        height: 36px;
    }
}

@media (max-width: 375px) {
    .main-page .header-logo-img { width: 90px; height: 28px; }
    .main-page .main-header-inner { padding: 0 10px; gap: 6px; }
    .main-page .mobile-hamburger,
    .main-page .mobile-search-icon,
    .main-page .header-action-item {
        width: 32px;
        height: 32px;
    }
    .main-page .mobile-hamburger svg,
    .main-page .mobile-search-icon svg,
    .main-page .header-action-item svg {
        width: 18px;
        height: 18px;
    }
}

