/* ===================================================================
   tna W rna — Modern Mobile (Header + Bottom Nav + Hero fixes)
   v2 — targets the actual .header--mobile partial
   =================================================================== */

:root {
    --mh-green: #16a34a;
    --mh-green-dark: #15803d;
    --mh-green-light: #4ade80;
    --mh-blue: #2563eb;
    --mh-blue-dark: #1e40af;
    --mh-blue-light: #60a5fa;
    --mh-accent: #facc15;
    --mh-dark: #0f1f1a;
    --mh-bg-soft: #f0fdf4;
    --mh-text: #1e293b;
    --mh-border: #e2e8f0;
}

/* =============================================================
   FIX: Hero slider overlap when Swiper not yet initialized
   ============================================================= */
.mh-hero__slider:not(.swiper-initialized) .swiper-wrapper {
    display: block;
}
.mh-hero__slider:not(.swiper-initialized) .swiper-slide {
    display: none !important;
}
.mh-hero__slider:not(.swiper-initialized) .swiper-slide:first-child {
    display: flex !important;
}
.mh-hero__slider .swiper-slide {
    flex-shrink: 0 !important;
}

/* =============================================================
   MOBILE HEADER — Botble's .header--mobile partial overhaul
   ============================================================= */
.tnw-mobile-header,
.header.header--mobile {
    background: rgba(255, 255, 255, .95) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    box-shadow: 0 2px 16px -4px rgba(15, 31, 26, .12) !important;
    border-bottom: 1px solid rgba(22, 163, 74, .08) !important;
    padding: 0 !important;
    position: sticky;
    top: 0;
    z-index: 999;
}

/* Top bar — single row */
.tnw-mh__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 14px;
    height: 60px;
}

/* Logo center */
.tnw-mh__logo {
    flex: 0 1 auto;
    display: flex !important;
    align-items: center;
    text-decoration: none;
    transition: transform .25s ease;
}
.tnw-mh__logo:active { transform: scale(.96); }
.tnw-mh__logo img {
    max-height: 42px !important;
    width: auto !important;
    object-fit: contain;
}

/* Icon buttons (menu, search, cart, user) */
.tnw-mh__icon-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px !important;
    border: 0;
    cursor: pointer;
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
    color: var(--mh-green-dark) !important;
    transition: all .25s cubic-bezier(.4,0,.2,1) !important;
    flex-shrink: 0;
    text-decoration: none !important;
    position: relative;
    padding: 0;
}
.tnw-mh__icon-btn:active {
    transform: scale(.92);
    background: linear-gradient(135deg, var(--mh-green) 0%, var(--mh-green-dark) 100%);
    color: #fff !important;
}
.tnw-mh__icon-btn svg { display: block; }

.tnw-mh__user {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%) !important;
    color: var(--mh-blue) !important;
}
.tnw-mh__user:active {
    background: linear-gradient(135deg, var(--mh-blue) 0%, var(--mh-blue-dark) 100%) !important;
    color: #fff !important;
}

.tnw-mh__cart {
    background: linear-gradient(135deg, #fef9c3 0%, #fef08a 100%) !important;
    color: #a16207 !important;
}
.tnw-mh__cart:active {
    background: linear-gradient(135deg, #facc15 0%, #ca8a04 100%) !important;
    color: #fff !important;
}

/* Cart badge */
.tnw-mh__badge {
    position: absolute;
    top: -4px;
    inset-inline-end: -4px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    min-width: 18px;
    height: 18px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid #fff;
    animation: tnw-badge-bounce 1.5s ease-in-out infinite;
}
@keyframes tnw-badge-bounce {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.15); }
}

/* Right group */
.tnw-mh__right {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

/* Collapsible search */
.tnw-mh__search {
    max-height: 0;
    overflow: hidden;
    transition: max-height .35s cubic-bezier(.4,0,.2,1);
    background: linear-gradient(135deg, var(--mh-bg-soft) 0%, #ecfdf5 100%);
    border-top: 1px solid rgba(22, 163, 74, .12);
}
.tnw-mh__search.is-open {
    max-height: 200px;
}
.tnw-mh__search form {
    padding: 12px 14px;
    margin: 0;
}
.tnw-mh__search-wrap {
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 999px;
    padding: 4px 4px 4px 14px;
    box-shadow: 0 4px 14px -4px rgba(15, 31, 26, .12);
    border: 2px solid transparent;
    transition: border-color .2s;
}
[dir="rtl"] .tnw-mh__search-wrap { padding: 4px 14px 4px 4px; }
.tnw-mh__search-wrap:focus-within {
    border-color: var(--mh-green);
    box-shadow: 0 0 0 4px rgba(22, 163, 74, .12);
}
.tnw-mh__search-icon {
    color: var(--mh-green-dark);
    flex-shrink: 0;
    margin-inline-end: 8px;
}
.tnw-mh__search-wrap input {
    flex: 1;
    border: 0 !important;
    outline: none;
    padding: 8px 0 !important;
    font-size: 14px;
    background: transparent !important;
    color: var(--mh-text) !important;
    box-shadow: none !important;
    min-width: 0;
}
.tnw-mh__search-wrap input::placeholder { color: #94a3b8; }
.tnw-mh__search-wrap button {
    background: linear-gradient(135deg, var(--mh-green) 0%, var(--mh-green-dark) 100%);
    color: #fff;
    border: 0;
    border-radius: 999px;
    padding: 8px 18px;
    font-weight: 700;
    cursor: pointer;
    font-size: 13px;
    flex-shrink: 0;
    transition: transform .2s;
}
.tnw-mh__search-wrap button:active { transform: scale(.95); }

/* Hide old desktop header on mobile */
@media (max-width: 991px) {
    .header.header--1 {
        display: none !important;
    }
}

/* On larger screens, hide our custom mobile header */
@media (min-width: 992px) {
    .tnw-mobile-header,
    .header.header--mobile {
        display: none !important;
    }
}

/* =============================================================
   MOBILE BOTTOM NAVIGATION — animated
   ============================================================= */
.navigation--list {
    background: linear-gradient(180deg, rgba(255,255,255,.92) 0%, rgba(255,255,255,.98) 100%) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    border-top: 1px solid rgba(22, 163, 74, .15) !important;
    box-shadow: 0 -10px 30px -10px rgba(15, 31, 26, .15) !important;
    padding: 8px 4px calc(8px + env(safe-area-inset-bottom, 0px)) !important;
}

.navigation--list .navigation__content {
    display: flex !important;
    justify-content: space-around;
    align-items: stretch;
    gap: 4px;
}

.navigation--list .navigation__item {
    flex: 1;
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 4px !important;
    border-radius: 14px;
    color: #64748b !important;
    transition: all .3s cubic-bezier(.4, 0, .2, 1);
    position: relative;
    overflow: hidden;
    text-decoration: none !important;
    min-height: 56px;
}

/* Tap ripple */
.navigation--list .navigation__item::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(22, 163, 74, .3) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width .5s ease, height .5s ease;
    pointer-events: none;
}
.navigation--list .navigation__item:active::before {
    width: 200%;
    height: 200%;
}

.navigation--list .navigation__item > * {
    position: relative;
    z-index: 1;
}
.navigation--list .navigation__item i {
    font-size: 22px !important;
    transition: transform .3s cubic-bezier(.34,1.56,.64,1), color .3s ease !important;
}
.navigation--list .navigation__item span {
    font-size: 10px !important;
    font-weight: 600 !important;
    letter-spacing: .2px;
    transition: color .3s ease;
}

.navigation--list .navigation__item:active,
.navigation--list .navigation__item:hover {
    background: linear-gradient(135deg, rgba(22, 163, 74, .12) 0%, rgba(37, 99, 235, .12) 100%) !important;
    color: var(--mh-green-dark) !important;
}
.navigation--list .navigation__item:active i {
    color: var(--mh-green) !important;
    transform: scale(1.18) translateY(-2px);
}

/* =============================================================
   MOBILE HERO — animated entrance
   ============================================================= */
@media (max-width: 991px) {
    .mh-hero__slide { min-height: 580px !important; }

    .mh-hero__slider .swiper-slide-active .mh-hero__content > * {
        animation: tnw-mh-fade-up .8s cubic-bezier(.4,0,.2,1) both;
    }
    .mh-hero__slider .swiper-slide-active .mh-hero__eyebrow  { animation-delay: .1s; }
    .mh-hero__slider .swiper-slide-active .mh-hero__title    { animation-delay: .25s; }
    .mh-hero__slider .swiper-slide-active .mh-hero__subtitle { animation-delay: .4s; }
    .mh-hero__slider .swiper-slide-active .mh-hero__ctas     { animation-delay: .55s; }
    .mh-hero__slider .swiper-slide-active .mh-hero__stats    { animation-delay: .7s; }
    .mh-hero__slider .swiper-slide-active .mh-hero__visual   { animation: tnw-mh-zoom-in 1s ease both .5s; }

    .mh-hero__pagination .swiper-pagination-bullet {
        width: 24px !important;
        height: 4px !important;
    }
    .mh-hero__pagination .swiper-pagination-bullet-active {
        width: 36px !important;
    }

    /* Chip placement on mobile - corners, not on mascots */
    .mh-hero__chip { font-size: 11px; padding: 7px 12px; }
    .mh-hero__chip--1 { top: 0;    left: 0;     right: auto; bottom: auto; }
    .mh-hero__chip--2 { top: 0;    right: 0;    left: auto;  bottom: auto; }
    .mh-hero__chip--3 { bottom: 0; left: 0;     right: auto; top: auto; }
    .mh-hero__chip--4 { bottom: 0; right: 0;    left: auto;  top: auto; }

    .mh-hero__nav { display: none !important; }
    .mh-hero__stats { justify-content: center; text-align: center; }
    .mh-hero__content { text-align: center; }
    .mh-hero__ctas { justify-content: center; }
}

/* =============================================================
   FOOTER — mobile redesign
   ============================================================= */
@media (max-width: 768px) {
    .ps-footer { padding: 40px 0 0 !important; }
    .ps-footer__widgets {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 24px !important;
    }
    .ps-footer__widgets aside,
    .ps-footer__widgets > div { width: 100% !important; }
    .ps-footer .widget-title,
    .ps-footer h4 { font-size: 14px !important; margin-bottom: 14px !important; }
    .ps-footer ul li a { font-size: 13px !important; }

    .ps-footer .ps-list--social {
        margin-top: 12px !important;
        flex-wrap: wrap;
        gap: 8px;
        display: flex !important;
        padding: 0 !important;
        list-style: none !important;
    }
    .ps-footer .ps-list--social li {
        animation: tnw-mh-pop .5s cubic-bezier(.34,1.56,.64,1) both;
    }
    .ps-footer .ps-list--social li:nth-child(1) { animation-delay: 0s; }
    .ps-footer .ps-list--social li:nth-child(2) { animation-delay: .08s; }
    .ps-footer .ps-list--social li:nth-child(3) { animation-delay: .16s; }
    .ps-footer .ps-list--social li:nth-child(4) { animation-delay: .24s; }
    .ps-footer .ps-list--social li:nth-child(5) { animation-delay: .32s; }
    .ps-footer .ps-list--social li a {
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(255,255,255,.1);
        border-radius: 50%;
        transition: transform .25s, background .25s;
    }
    .ps-footer .ps-list--social li a:active {
        background: linear-gradient(135deg, var(--mh-green) 0%, var(--mh-green-dark) 100%);
        transform: scale(.92);
    }

    .ps-footer__copyright {
        flex-direction: column !important;
        gap: 12px !important;
        text-align: center !important;
        padding: 20px 0 calc(70px + env(safe-area-inset-bottom, 0px)) !important;
    }
}
@media (max-width: 480px) {
    .ps-footer__widgets { grid-template-columns: 1fr !important; }
}

/* =============================================================
   ANIMATIONS
   ============================================================= */
@keyframes tnw-mh-pop {
    0%   { transform: scale(0); opacity: 0; }
    60%  { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}
@keyframes tnw-mh-fade-up {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes tnw-mh-zoom-in {
    from { opacity: 0; transform: scale(.85); }
    to   { opacity: 1; transform: scale(1); }
}

/* =============================================================
   FLOATING BUTTONS — avoid bottom nav
   ============================================================= */
@media (max-width: 768px) {
    #back2top {
        bottom: calc(76px + env(safe-area-inset-bottom, 0px)) !important;
        right: 12px !important;
        width: 44px !important;
        height: 44px !important;
    }
    [class*="whatsapp"][class*="float"],
    .whatsapp-button,
    .ws-float-button {
        bottom: calc(80px + env(safe-area-inset-bottom, 0px)) !important;
    }
}
