/**
 * ==========================================================================
 * HAPPYPIP MOBILE MENU — v2.0
 * ==========================================================================
 *
 * Full-screen slide-from-left mobile menu for ≤1024px.
 * Follows hp- BEM naming. Uses design tokens from homepage.css.
 *
 * STRUCTURE:
 *   .hp-mob-overlay          → dark backdrop
 *   .hp-mob                  → main panel (full-screen, slides from left)
 *     .hp-mob__header        → close button + logo (sticky)
 *     .hp-mob__quote         → Bob Marley quote (sticky)
 *     .hp-mob__search        → search bar (sticky)
 *     .hp-mob__scroll        → scrollable content area
 *       Flower Tiers (tile grid)
 *       Pre-Rolls (tile grid)
 *       Shop by Vibe (pill list)
 *       Quick Links (icon row)
 *       CTA button
 *     .hp-mob__bg-img        → decorative background image (bottom-left bleed)
 *
 * ==========================================================================
 */


/* ══════════════════════════════════════════════════
   OVERLAY
   ══════════════════════════════════════════════════ */

.hp-mob-overlay {
    position: fixed;
    inset: 0;
    background: rgba(28, 28, 28, 0);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

.hp-mob-overlay.is-active {
    opacity: 1;
    visibility: visible;
}


/* ══════════════════════════════════════════════════
   MAIN PANEL
   ══════════════════════════════════════════════════ */

.hp-mob {
    position: fixed;
    top: 40px;
    left: 0;
    width: 100%;
    height: calc(100% - 40px);
    height: calc(100dvh - 40px);
    background: var(--hp-bg-cream, #FAF7F2);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    transform: translateX(-100%);
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    overflow: hidden;
}

.hp-mob.is-open {
    transform: translateX(0);
}


/* ══════════════════════════════════════════════════
   HEADER (close + logo) — sticky
   ══════════════════════════════════════════════════ */

.hp-mob__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    flex-shrink: 0;
    border-bottom: 1px solid var(--hp-border, #E8E3DC);
    background: var(--hp-bg-white, #fff);
}

.hp-mob__close {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
    border-radius: 50% !important;
    border: 1px solid var(--hp-border, #E8E3DC) !important;
    background: var(--hp-bg-cream, #FAF7F2) !important;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    padding: 0 !important;
    margin: 0 !important;
    outline: none !important;
    box-shadow: none !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}

.hp-mob__close:hover,
.hp-mob__close:focus {
    background: var(--hp-bg-cream, #FAF7F2) !important;
    border-color: var(--hp-charcoal, #1C1C1C) !important;
    outline: none !important;
    box-shadow: none !important;
}

.hp-mob__close:active {
    background: var(--hp-orange, #D4712A) !important;
    border-color: var(--hp-orange, #D4712A) !important;
}

.hp-mob__close:active .hp-mob__close-x::before,
.hp-mob__close:active .hp-mob__close-x::after {
    background: #fff !important;
}

.hp-mob__close-x {
    position: relative;
    display: block;
    width: 14px;
    height: 14px;
}

.hp-mob__close-x::before,
.hp-mob__close-x::after {
    content: '' !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    width: 14px !important;
    height: 2px !important;
    background: var(--hp-charcoal, #1C1C1C) !important;
    border-radius: 1px !important;
}

.hp-mob__close-x::before {
    transform: translate(-50%, -50%) rotate(45deg) !important;
}

.hp-mob__close-x::after {
    transform: translate(-50%, -50%) rotate(-45deg) !important;
}

.hp-mob__logo {
    font-family: var(--hp-font, 'Google Sans', sans-serif);
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 5px;
    text-transform: uppercase;
    color: var(--hp-charcoal, #1C1C1C);
}


/* ══════════════════════════════════════════════════
   BOB MARLEY QUOTE — sticky
   ══════════════════════════════════════════════════ */

.hp-mob__quote {
    position: relative;
    padding: 14px 20px;
    text-align: center;
    border-bottom: 1px solid var(--hp-border, #E8E3DC);
    background: linear-gradient(93deg, rgba(252, 151, 0, 1) 0%, rgba(199, 196, 12, 1) 29%, rgba(180, 213, 16, 1) 47%, rgba(153, 205, 41, 1) 62%, rgba(25, 166, 159, 1) 100%);
    flex-shrink: 0;
}

.hp-mob__quote-text {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 18px;
    font-weight: 500;
    font-style: italic;
    color: var(--hp-charcoal, #1C1C1C);
    line-height: 1.5;
    letter-spacing: 0.2px;
}

.hp-mob__quote-author {
    font-family: var(--hp-font, 'Google Sans', sans-serif);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--hp-orange, #D4712A);
    margin-top: 4px;
    display: block;
}

.hp-mob__quote .hp-mob__close {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 12px;
}

/* ══════════════════════════════════════════════════
   SEARCH BAR — sticky
   ══════════════════════════════════════════════════ */

.hp-mob__search {
    padding: 12px 20px;
    background: var(--hp-bg-cream, #FAF7F2);
    border-bottom: 1px solid #1C1C1C;
    flex-shrink: 0;
    z-index: 5;
}

.hp-mob__search form {
    margin: 0 !important;
    padding: 0 !important;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
}

.hp-mob__search-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--hp-bg-cream, #FAF7F2) !important;
    border: 1px solid var(--hp-charcoal, #1C1C1C) !important;
    border-radius: 50px !important;
    padding: 10px 16px !important;
    transition: border-color 0.2s ease;
    box-shadow: none !important;
}

.hp-mob__search-wrap:focus-within {
    border-color: var(--hp-orange, #D4712A);
}

.hp-mob__search-wrap svg {
    width: 18px;
    height: 18px;
    stroke: var(--hp-charcoal, #1C1C1C);
    stroke-width: 2;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}

.hp-mob__search-input {
    flex: 1;
    border: none !important;
    background: transparent !important;
    font-family: var(--hp-font, 'Google Sans', sans-serif);
    font-size: 14px;
    color: var(--hp-text, #2E2E2E);
    outline: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    min-height: auto !important;
    height: auto !important;
}

.hp-mob__search-input::placeholder {
    color: var(--hp-text-muted, #A0A0A0);
}

/* ── Live search results dropdown ── */
.hp-mob__search-results {
    display: none;
    max-height: 260px;
    overflow-y: auto;
    margin-top: 8px;
    background: var(--hp-bg-white, #fff);
    border: 1px solid var(--hp-border, #E8E3DC);
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.hp-mob__search-results.is-active {
    display: block;
}

.hp-mob__search-results::-webkit-scrollbar { display: none; }
.hp-mob__search-results { scrollbar-width: none; }

.hp-mob__sr-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    text-decoration: none;
    border-bottom: 1px solid var(--hp-border-light, #F0EBE4);
    transition: background 0.15s ease;
}

.hp-mob__sr-item:last-child {
    border-bottom: none;
}

.hp-mob__sr-item:active {
    background: var(--hp-bg-peach, #FDF3EB);
}

.hp-mob__sr-img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
    background: var(--hp-bg-cream, #FAF7F2);
    flex-shrink: 0;
}

.hp-mob__sr-info {
    flex: 1;
    min-width: 0;
}

.hp-mob__sr-name {
    font-family: var(--hp-font, 'Google Sans', sans-serif);
    font-size: 13px;
    font-weight: 600;
    color: var(--hp-charcoal, #1C1C1C);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hp-mob__sr-price {
    font-family: var(--hp-font, 'Google Sans', sans-serif);
    font-size: 12px;
    font-weight: 700;
    color: var(--hp-orange, #D4712A);
}

.hp-mob__sr-none {
    padding: 16px;
    text-align: center;
    font-family: var(--hp-font, 'Google Sans', sans-serif);
    font-size: 13px;
    color: var(--hp-text-muted, #A0A0A0);
}

.hp-mob__sr-loading {
    padding: 16px;
    text-align: center;
    font-family: var(--hp-font, 'Google Sans', sans-serif);
    font-size: 12px;
    color: var(--hp-text-muted, #A0A0A0);
}


/* ══════════════════════════════════════════════════
   SCROLLABLE CONTENT
   ══════════════════════════════════════════════════ */

.hp-mob__scroll {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 16px;
    position: relative;
}

.hp-mob__scroll::-webkit-scrollbar { display: none; }
.hp-mob__scroll { scrollbar-width: none; }


/* ══════════════════════════════════════════════════
   SECTIONS
   ══════════════════════════════════════════════════ */

.hp-mob__section {
    padding: 20px 20px 0;
}

.hp-mob__section:last-child {
    padding-bottom: 20px;
}

/* ── SECTION LABELS — Solid orange strip ── */
.hp-mob__section-label {
    font-family: var(--hp-font, 'Google Sans', sans-serif);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #1C1C1C;
    margin-bottom: 14px;
    display: block;
    padding: 10px 16px;
    border-radius: 10px;
    text-align: center;
    background: linear-gradient(93deg, rgba(252, 151, 0, 1) 0%, rgba(199, 196, 12, 1) 29%, rgba(180, 213, 16, 1) 47%, rgba(153, 205, 41, 1) 62%, rgba(25, 166, 159, 1) 100%);
    border: none;

}


/* ══════════════════════════════════════════════════
   TILE GRID
   ══════════════════════════════════════════════════ */

.hp-mob__tiles {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.hp-mob__tile {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 12px;
    border-radius: 12px;
    background-color: var(--hp-bg-white, #fff);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border: 1px solid var(--hp-orange, #D4712A);
    text-decoration: none;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    transition: border-color 0.2s ease;
}

.hp-mob__tile:active {
    border-color: var(--hp-orange-hover, #C0641F);
}

/* ── Price circle — top LEFT ── */
.hp-mob__tile-price {
    position: absolute;
    top: 10px;
    left: 10px;
    font-family: var(--hp-font, 'Google Sans', sans-serif);
    font-size: 11px;
    font-weight: 700;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--hp-charcoal, #1C1C1C);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 0.2px;
    z-index: 3;
}

/* ── Tile name — full-width glass strip with category color ── */
.hp-mob__tile-name {
    font-family: var(--hp-font, 'Google Sans', sans-serif);
    font-size: 16px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #1c1c1c;
    line-height: 1.2;
    text-align: center;
    padding: 10px 12px;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    border-radius: 0 0 11px 11px;
    background: linear-gradient(
        135deg,
        color-mix(in srgb, var(--tile-color, #1C1C1C) 70%, transparent),
        color-mix(in srgb, var(--tile-color, #1C1C1C) 50%, transparent)
    );
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 2;
    text-shadow: none;
}

/* ── "View All" tile — same size as other tiles ── */
.hp-mob__tile--all {
    background: var(--hp-bg-peach, #FDF3EB) !important;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.hp-mob__tile--all .hp-mob__tile-name {
    font-size: 13px;
    letter-spacing: 1.5px;
    color: var(--hp-orange, #d4712a);
    background: rgba(212, 113, 42, 0.1);
    text-shadow: none;
    position: static;
    border-radius: 8px;
    width: auto;
    padding: 10px 16px;
}


/* ══════════════════════════════════════════════════
   SHOP BY VIBE (wrap pills)
   ══════════════════════════════════════════════════ */

.hp-mob__vibes {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.hp-mob__vibe {
    font-family: var(--hp-font, 'Google Sans', sans-serif);
    font-size: 12px;
    font-weight: 600;
    padding: 9px 18px;
    border-radius: 50px;
    background: var(--hp-bg-white, #fff);
    border: 1px solid var(--hp-border, #E8E3DC);
    color: var(--hp-text, #2E2E2E);
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.hp-mob__vibe:active {
    background: var(--hp-orange, #D4712A);
    border-color: var(--hp-orange, #D4712A);
    color: #fff;
}


/* ══════════════════════════════════════════════════
   DIVIDER
   ══════════════════════════════════════════════════ */

.hp-mob__divider {
    height: 1px;
    background: var(--hp-border, #E8E3DC);
    margin: 16px 20px;
}


/* ══════════════════════════════════════════════════
   ICON LINKS ROW
   ══════════════════════════════════════════════════ */

.hp-mob__icons {
    display: flex;
    justify-content: space-around;
    padding: 4px 0 8px;
}

.hp-mob__icon-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}

.hp-mob__icon-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--hp-bg-white, #fff);
    border: 1px solid var(--hp-border, #E8E3DC);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.hp-mob__icon-circle svg {
    width: 20px;
    height: 20px;
    stroke: var(--hp-orange, #D4712A);
    stroke-width: 1.8;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.hp-mob__icon-label {
    font-family: var(--hp-font, 'Google Sans', sans-serif);
    font-size: 10px;
    font-weight: 600;
    color: var(--hp-text-light, #6F6F6F);
    letter-spacing: 0.3px;
}

.hp-mob__icon-link:active .hp-mob__icon-circle {
    background: rgba(212, 113, 42, 0.1);
    border-color: var(--hp-orange, #D4712A);
}


/* ══════════════════════════════════════════════════
   HELP SAVE HEMP CTA
   ══════════════════════════════════════════════════ */

.hp-mob__cta {
    padding: 0 20px 20px;
}

.hp-mob__cta-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px;
    font-family: var(--hp-font, 'Google Sans', sans-serif);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
    background: var(--hp-black, #1c1c1c);
    color: #fff;
    border: none;
    border-radius: 14px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.hp-mob__cta-btn:active {
    background: var(--hp-orange, #D4712A) !important;
    transform: scale(0.98);
}

.hp-mob__cta-btn svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: #fff;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}


/* ══════════════════════════════════════════════════
   BACKGROUND IMAGE (bottom-left bleed)
   ══════════════════════════════════════════════════ */

.hp-mob__bg-img {
    position: fixed;
    bottom: 0;
    left: -30px;
    width: 280px;
    height: 320px;
    pointer-events: none;
    z-index: 9999;
    opacity: 1;
    /* ── Swap this URL to change image ── */
    background-image: url('https://happypip.com/wp-content/uploads/2026/02/hp-menu-background.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: bottom left;
}

.hp-mob__scroll > * {
    position: relative;
    z-index: 1;
}


/* ══════════════════════════════════════════════════
   BODY SCROLL LOCK
   ══════════════════════════════════════════════════ */

body.hp-mob-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
    top: var(--scroll-y, 0);
}


/* ══════════════════════════════════════════════════
   HAMBURGER BUTTON (replaces Astra's)
   ══════════════════════════════════════════════════ */

.hp-mob__hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none !important;
    border: none !important;
    cursor: pointer;
    padding: 6px !important;
    z-index: 100;
    outline: none !important;
    box-shadow: none !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}

.hp-mob__hamburger:hover,
.hp-mob__hamburger:focus,
.hp-mob__hamburger:active {
    background: none !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

/* Kill Astra HTML widget wrapper styles on hamburger */
.ast-header-html-2 .hp-mob__hamburger,
.ast-custom-html .hp-mob__hamburger,
[class*="ast-header"] .hp-mob__hamburger,
.site-header .hp-mob__hamburger {
    background: none !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    padding: 6px !important;
    margin: 0 !important;
    line-height: 1 !important;
}

/* Also target any button styles Astra applies globally */
.hp-mob__hamburger,
button.hp-mob__hamburger,
.ast-header-html-2 button {
    background-color: transparent !important;
    color: inherit !important;
}

.hp-mob__hamburger span {
    width: 22px;
    height: 2px;
    background: #1c1c1c !important;
    border-radius: 2px;
    transition: all 0.3s ease;
    display: block;
}


/* ══════════════════════════════════════════════════
   HIDE ASTRA MOBILE MENU + SHOW OURS ≤1024px
   ══════════════════════════════════════════════════ */

@media (max-width: 1024px) {
    .ast-mobile-menu-buttons,
    .ast-button-wrap,
    .menu-toggle,
    .ast-mobile-popup-drawer,
    .ast-mobile-header-wrap .ast-button-wrap,
    .main-header-menu-toggle,
    .ast-mobile-menu-wrap {
        display: none !important;
    }

    .hp-mob__hamburger {
        display: flex !important;
    }
}

@media (min-width: 1025px) {
    .hp-mob,
    .hp-mob-overlay,
    .hp-mob__hamburger {
        display: none !important;
    }
}


/* ══════════════════════════════════════════════════
   STAGGER ANIMATION
   ══════════════════════════════════════════════════ */

.hp-mob.is-open .hp-mob__tile,
.hp-mob.is-open .hp-mob__vibe,
.hp-mob.is-open .hp-mob__icon-link {
    animation: hp-mob-fadeUp 0.35s ease both;
}

.hp-mob.is-open .hp-mob__tile:nth-child(1) { animation-delay: 0.05s; }
.hp-mob.is-open .hp-mob__tile:nth-child(2) { animation-delay: 0.08s; }
.hp-mob.is-open .hp-mob__tile:nth-child(3) { animation-delay: 0.11s; }
.hp-mob.is-open .hp-mob__tile:nth-child(4) { animation-delay: 0.14s; }
.hp-mob.is-open .hp-mob__tile:nth-child(5) { animation-delay: 0.17s; }
.hp-mob.is-open .hp-mob__tile:nth-child(6) { animation-delay: 0.20s; }

@keyframes hp-mob-fadeUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.hp-mob a:hover,
.hp-mob button:hover,
.hp-mob a:focus,
.hp-mob button:focus {
    color: inherit !important;
    background-color: inherit !important;
    text-decoration: none !important;
}