/* ============================================
   Mega Header Widget — PAS
   3-row: promo bar + search bar + navigation
   Polished, pixel-perfect, fully responsive
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* === RESET === */
.pas-mega-header {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.4;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    width: 100%;
}

.pas-mega-header *,
.pas-mega-header *::before,
.pas-mega-header *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.pas-mega-header a { text-decoration: none; }
.pas-mega-header button { font-family: inherit; }
.pas-mega-header img { display: block; max-width: 100%; height: auto; }

.pas-mh-container {
    max-width: 1360px;
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
}

/* ─────────────────────────────────────────────
   ROW 1 — PROMO BAR
   ───────────────────────────────────────────── */
.pas-mh-promo {
    text-align: center;
    padding: 9px 16px;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.01em;
    line-height: 1.5;
}

.pas-mh-promo strong {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    padding: 1px 10px;
    border-radius: 4px;
    font-weight: 700;
    letter-spacing: 0.06em;
    font-size: 12px;
    vertical-align: middle;
}

/* ─────────────────────────────────────────────
   ROW 2 — SEARCH BAR (logo + search + actions)
   ───────────────────────────────────────────── */
.pas-mh-searchbar {
    padding: 12px 0;
}

.pas-mh-searchbar-inner {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Logo */
.pas-mh-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    color: #fff;
}

.pas-mh-logo:hover { color: #fff; opacity: 0.9; }

.pas-mh-logo img {
    height: 38px;
    width: auto;
    object-fit: contain;
}

.pas-mh-logo-icon {
    width: 38px;
    height: 38px;
    background: #fff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 800;
    color: #E53935;
    flex-shrink: 0;
}

.pas-mh-logo-text {
    font-size: 20px;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.03em;
    white-space: nowrap;
}

/* Search form */
.pas-mh-search {
    flex: 1;
    display: flex;
    align-items: stretch;
    height: 44px;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    border: 2px solid transparent;
    transition: border-color 0.2s, box-shadow 0.2s;
    min-width: 0;
}

.pas-mh-search:focus-within {
    border-color: rgba(255,255,255,0.5);
    box-shadow: 0 0 0 4px rgba(255,255,255,0.1);
}

.pas-mh-search-cat {
    padding: 0 14px;
    padding-right: 28px;
    border: none;
    border-right: 1px solid #e5e7eb;
    background: #f8f9fa;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    font-family: inherit;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='3' xmlns='http://www.w3.org/2000/svg'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    white-space: nowrap;
    min-width: 90px;
}

.pas-mh-search-cat:focus { outline: none; }

.pas-mh-search-input {
    flex: 1;
    border: none;
    padding: 0 16px;
    font-size: 14px;
    color: #1f2937;
    outline: none;
    font-family: inherit;
    min-width: 0;
    background: #fff;
}

.pas-mh-search-input::placeholder { color: #9ca3af; }

.pas-mh-search-btn {
    width: 52px;
    border: none;
    background: #2E7D32;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s;
}

.pas-mh-search-btn:hover { background: #1B5E20; }

/* Right actions */
.pas-mh-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.pas-mh-action {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    transition: opacity 0.2s;
    opacity: 0.9;
}

.pas-mh-action:hover { opacity: 1; color: #fff; }
.pas-mh-action svg { flex-shrink: 0; }

.pas-mh-action--wishlist {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    justify-content: center;
    opacity: 1;
    transition: background 0.2s;
}

.pas-mh-action--wishlist:hover { background: rgba(255,255,255,0.2); }

.pas-mh-cart-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 20px;
    background: #2E7D32;
    color: #fff;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    transition: background 0.2s, box-shadow 0.2s;
    border: 1px solid rgba(255,255,255,0.15);
}

.pas-mh-cart-btn:hover {
    background: #1B5E20;
    color: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.pas-mh-cart-btn svg { flex-shrink: 0; }

/* Hamburger */
.pas-mh-hamburger {
    display: none;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    border: none;
    background: rgba(255,255,255,0.12);
    color: #fff;
    border-radius: 8px;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s;
}

.pas-mh-hamburger:hover { background: rgba(255,255,255,0.2); }

/* ─────────────────────────────────────────────
   ROW 3 — NAVIGATION BAR
   ───────────────────────────────────────────── */
.pas-mh-navbar {
    border-bottom: 1px solid #e5e7eb;
    position: relative;
    background: #fff;
}

.pas-mh-navbar-inner {
    display: flex;
    align-items: stretch;
    height: 46px;
    gap: 0;
}

/* Categories button */
.pas-mh-cat-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 22px;
    background: #E53935;
    color: #fff;
    border: none;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    font-family: inherit;
    flex-shrink: 0;
    transition: background 0.2s;
    white-space: nowrap;
}

.pas-mh-cat-btn:hover { background: #C62828; }
.pas-mh-cat-btn svg { flex-shrink: 0; }

/* Nav links */
.pas-mh-nav-links {
    display: flex;
    align-items: stretch;
    flex: 1;
    overflow-x: auto;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.pas-mh-nav-links::-webkit-scrollbar { display: none; }

.pas-mh-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0 16px;
    font-size: 14px;
    font-weight: 500;
    color: #4b5563;
    white-space: nowrap;
    transition: color 0.2s, border-color 0.2s;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}

.pas-mh-nav-link:hover {
    color: #E53935;
    border-bottom-color: #E53935;
}

.pas-mh-nav-link--highlight {
    color: #2E7D32;
    font-weight: 600;
}

.pas-mh-nav-link--highlight:hover {
    color: #1B5E20;
    border-bottom-color: #2E7D32;
}

.pas-mh-nav-icon { font-size: 13px; }

/* CTA button in nav */
.pas-mh-nav-link--cta {
    background: #2E7D32;
    color: #fff !important;
    border-radius: 6px;
    padding: 7px 18px;
    margin: auto 0 auto 8px;
    height: auto;
    font-weight: 600;
    font-size: 13px;
    border-bottom: none !important;
    align-self: center;
    transition: background 0.2s;
}

.pas-mh-nav-link--cta:hover {
    background: #1B5E20;
    color: #fff !important;
}

/* ─────────────────────────────────────────────
   MOBILE NAV OVERLAY
   ───────────────────────────────────────────── */
.pas-mh-mobile-nav {
    position: fixed;
    top: 0;
    left: -320px;
    width: 300px;
    height: 100vh;
    height: 100dvh;
    background: #fff;
    z-index: 99999;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    box-shadow: 4px 0 24px rgba(0,0,0,0.2);
}

.pas-mh-mobile-nav.open { left: 0; }

.pas-mh-mobile-nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #e5e7eb;
    flex-shrink: 0;
}

.pas-mh-mobile-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: #f3f4f6;
    border-radius: 8px;
    cursor: pointer;
    color: #374151;
    transition: background 0.15s;
}

.pas-mh-mobile-close:hover { background: #e5e7eb; }

.pas-mh-mobile-nav-links {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
}

.pas-mh-mobile-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    font-size: 15px;
    font-weight: 500;
    color: #374151;
    border-bottom: 1px solid #f3f4f6;
    transition: background 0.15s;
}

.pas-mh-mobile-link:hover {
    background: #f9fafb;
    color: #1f2937;
}

.pas-mh-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 99998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.pas-mh-overlay.open {
    opacity: 1;
    visibility: visible;
}

/* ─────────────────────────────────────────────
   RESPONSIVE
   ───────────────────────────────────────────── */

/* Large tablets / small laptops */
@media (max-width: 1200px) {
    .pas-mh-nav-link { padding: 0 12px; font-size: 13px; }
    .pas-mh-cat-btn { padding: 0 16px; font-size: 11px; }
    .pas-mh-cart-btn { padding: 9px 14px; font-size: 13px; }
}

/* Tablet */
@media (max-width: 1024px) {
    .pas-mh-container { padding: 0 16px; }

    .pas-mh-searchbar-inner {
        flex-wrap: nowrap;
        gap: 12px;
    }

    /* Hide labels, keep icons */
    .pas-mh-action span { display: none; }
    .pas-mh-action { gap: 0; }

    .pas-mh-search-cat { display: none; }

    .pas-mh-actions { gap: 8px; }
}

/* Mobile */
@media (max-width: 768px) {
    .pas-mh-promo {
        font-size: 11px;
        padding: 6px 12px;
    }

    .pas-mh-promo strong { font-size: 10px; padding: 1px 6px; }

    .pas-mh-searchbar { padding: 10px 0; }

    .pas-mh-searchbar-inner {
        gap: 10px;
    }

    .pas-mh-logo-text { font-size: 17px; }
    .pas-mh-logo-icon { width: 34px; height: 34px; font-size: 16px; }
    .pas-mh-logo img { height: 32px; }

    /* Search goes full width below */
    .pas-mh-search {
        order: 10;
        flex: none;
        width: 100%;
        height: 42px;
    }

    .pas-mh-searchbar-inner {
        flex-wrap: wrap;
    }

    /* Show hamburger, hide navbar */
    .pas-mh-hamburger { display: flex; }
    .pas-mh-navbar { display: none; }

    /* Cart: icon only */
    .pas-mh-cart-btn span { display: none; }
    .pas-mh-cart-btn { padding: 9px 12px; border-radius: 8px; }

    /* Push search to new line, others stay in row */
    .pas-mh-logo { order: 1; }
    .pas-mh-actions { order: 2; margin-left: auto; }
    .pas-mh-hamburger { order: 3; }
}

/* Small mobile */
@media (max-width: 480px) {
    .pas-mh-container { padding: 0 12px; }
    .pas-mh-logo-text { font-size: 15px; }
    .pas-mh-action--wishlist { display: none; }
    .pas-mh-promo { font-size: 10px; }
    .pas-mh-search { height: 40px; }
    .pas-mh-search-input { font-size: 13px; padding: 0 12px; }
}
