/* ============================================================
   Maranatha – Site Header
   Structure:
     1. Top bar
     2. Main header (logo / search / actions)
     3. Desktop nav bar
     4. Mobile drawer + overlay
   ============================================================ */

:root {
    --mara-red:       #ed1b24;
    --mara-red-dark:  #c0151d;
    --mara-dark:      #1a1a1a;
    --mara-gray:      #4a4a4a;
    --mara-light-bg:  #f5f5f5;
    --mara-border:    #e0e0e0;
    --mara-white:     #ffffff;
    --mara-font:      "Montserrat", "Instrument Sans", Helvetica, sans-serif;
    --header-h:       72px;
    --topbar-h:       36px;
    --navbar-h:       48px;
}

/* ── 1. TOP BAR ─────────────────────────────────────────── */

.mara-topbar {
    display: flex;
    align-items: stretch;
    height: var(--topbar-h);
    font-family: var(--mara-font);
    font-size: 0.8rem;
    z-index: 200;
    background: var(--mara-dark);
    overflow: hidden;
}

/* Red left section */
.mara-topbar__red {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0 1.5rem 0 1.25rem;
    background: var(--mara-red);
    position: relative;
    flex-shrink: 0;
}

/* Diagonal cut on the right edge of the red section */
.mara-topbar__red::after {
    content: '';
    position: absolute;
    right: -14px;
    top: 0;
    width: 0;
    height: 0;
    border-top: var(--topbar-h) solid var(--mara-red);
    border-right: 14px solid transparent;
    z-index: 1;
}

.mara-topbar__red-link {
    color: var(--mara-white);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-weight: 600;
    white-space: nowrap;
    transition: opacity 0.18s;
}

.mara-topbar__red-link:hover { opacity: 0.85; }

.mara-topbar__social {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding-left: 0.65rem;
    border-left: 1px solid rgba(255,255,255,0.3);
}

.mara-topbar__social a {
    color: rgba(255,255,255,0.85);
    font-size: 0.85rem;
    text-decoration: none;
    transition: color 0.18s;
}

.mara-topbar__social a:hover { color: var(--mara-white); }

/* Dark right section */
.mara-topbar__dark {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0 1.5rem 0 2rem;
    background: var(--mara-dark);
}

.mara-topbar__dark-link {
    color: #cccccc;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    white-space: nowrap;
    transition: color 0.18s;
}

.mara-topbar__dark-link:hover { color: var(--mara-white); }

.mara-topbar__dark-link--wa { color: #25d366; }
.mara-topbar__dark-link--wa:hover { color: #1ebe5d; }

.mara-topbar__divider {
    color: rgba(255,255,255,0.2);
}

.mara-topbar__msg {
    color: #b0b0b0;
    display: none;
}

@media (min-width: 700px) {
    .mara-topbar__msg { display: inline; }
}

/* ── 2. MAIN HEADER ─────────────────────────────────────── */

.mara-header {
    background: var(--mara-white);
    height: var(--header-h);
    border-bottom: 1px solid var(--mara-border);
    position: sticky;
    top: 0;
    z-index: 199;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.mara-header__inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* Logo */
.mara-header__logo {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    text-decoration: none;
}

.mara-header__logo img {
    height: 52px;
    width: auto;
    object-fit: contain;
}

/* Search */
.mara-search {
    flex: 1;
    display: flex;
    align-self: center;
    max-width: 560px;
    min-width: 0;
    margin-bottom: 0;
    position: relative;
}

/* ── Live-search dropdown ───────────────────────────────── */
.mara-search__dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: var(--mara-white);
    border: 1px solid var(--mara-border);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
    z-index: 9999;
    overflow: hidden;
}
.mara-search__dropdown.is-open { display: block; }

.mara-search__section { padding: 10px 0 4px; }
.mara-search__section + .mara-search__section { border-top: 1px solid var(--mara-border); }

.mara-search__section-label {
    padding: 0 16px 6px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--mara-gray);
}

.mara-search__cat-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0 16px 10px;
}

.mara-search__see-all {
    display: block;
    padding: 10px 16px;
    border-top: 1px solid var(--mara-border);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--mara-red);
    text-decoration: none;
    transition: background .15s;
}
.mara-search__see-all:hover { background: #fff5f5; }

/* Product rows */
.mara-sdrop__item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 7px 16px;
    text-decoration: none;
    color: var(--mara-dark);
    transition: background .15s;
}
.mara-sdrop__item:hover { background: var(--mara-light-bg); }

.mara-sdrop__img {
    width: 44px;
    height: 44px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
    background: var(--mara-light-bg);
}

.mara-sdrop__info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.mara-sdrop__title {
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mara-sdrop__price {
    font-size: 0.78rem;
    color: var(--mara-gray);
}

/* Category chips */
.mara-sdrop__chip {
    display: inline-block;
    padding: 4px 12px;
    border: 1px solid var(--mara-border);
    border-radius: 20px;
    font-size: 0.78rem;
    color: var(--mara-dark);
    text-decoration: none;
    background: var(--mara-white);
    transition: border-color .15s, background .15s;
}
.mara-sdrop__chip:hover {
    border-color: var(--mara-red);
    background: #fff5f5;
    color: var(--mara-red);
}

.mara-search__input {
    flex: 1;
    padding: 0 1rem;
    height: 42px;
    border: 2px solid var(--mara-border);
    border-right: none;
    border-radius: 6px 0 0 6px;
    font-family: var(--mara-font);
    font-size: 0.9rem;
    color: var(--mara-dark);
    background: var(--mara-light-bg);
    outline: none;
    transition: border-color 0.18s;
}

.mara-search__input:focus {
    border-color: var(--mara-red);
    background: var(--mara-white);
}

.mara-search__btn {
    height: 42px;
    padding: 0 1rem;
    background: var(--mara-red);
    color: var(--mara-white);
    border: none;
    border-radius: 0 6px 6px 0;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.18s;
}

.mara-search__btn:hover { background: var(--mara-red-dark); }

/* Hamburger (mobile only) */
.mara-hamburger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 38px;
    height: 38px;
    padding: 6px;
    background: none;
    border: none;
    cursor: pointer;
    margin-left: auto;
    flex-shrink: 0;
}

.mara-hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--mara-dark);
    border-radius: 2px;
    transition: transform 0.25s, opacity 0.25s;
}

@media (min-width: 769px) {
    .mara-hamburger { display: none; }
    .mara-search { max-width: none; }
}

/* ── 3. DESKTOP NAV BAR ─────────────────────────────────── */

.mara-nav {
    background: var(--mara-red);
    z-index: 198;
    display: none;
    position: sticky;
    top: var(--header-h);
}

@media (min-width: 769px) {
    .mara-nav { display: block; }
}

.mara-nav__inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.mara-nav__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: stretch;
    height: var(--navbar-h);
}

.mara-nav__item {
    position: relative;
}

.mara-nav__link {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    height: 100%;
    padding: 0 1rem;
    color: var(--mara-white);
    text-decoration: none;
    font-family: var(--mara-font);
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
    transition: background 0.18s;
}

.mara-nav__link:hover,
.mara-nav__item--dropdown:hover > .mara-nav__link {
    background: var(--mara-red-dark);
    color: #e0e0e0;
}

.mara-nav__arrow {
    font-size: 0.65rem;
    transition: transform 0.2s;
}

.mara-nav__item--dropdown:hover .mara-nav__arrow {
    transform: rotate(180deg);
}

/* First-level dropdown */
.mara-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--mara-white);
    border: 1px solid var(--mara-border);
    border-radius: 0 0 6px 6px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    z-index: 300;
    min-width: 220px;
    animation: maraFadeIn 0.18s ease;
}

.mara-nav__item--dropdown:hover .mara-dropdown {
    display: block;
}

@keyframes maraFadeIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.mara-dropdown__list {
    list-style: none;
    margin: 0;
    padding: 0.5rem 0;
}

.mara-dropdown__item {
    position: relative;
}

.mara-dropdown__link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 1.2rem;
    color: var(--mara-dark);
    text-decoration: none;
    font-family: var(--mara-font);
    font-size: 0.875rem;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
}

.mara-dropdown__link:hover {
    background: rgba(237,27,36,0.07);
    color: var(--mara-red);
}

.mara-dropdown__sub-arrow {
    font-size: 0.65rem;
    color: var(--mara-gray);
    margin-left: 0.5rem;
    flex-shrink: 0;
}

/* Second-level (sub-dropdown) */
.mara-subdropdown {
    display: none;
    position: absolute;
    top: 0;
    left: 100%;
    background: var(--mara-white);
    border: 1px solid var(--mara-border);
    border-radius: 0 6px 6px 6px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    z-index: 301;
    min-width: 200px;
    list-style: none;
    margin: 0;
    padding: 0.5rem 0;
}

.mara-dropdown__item--has-sub:hover .mara-subdropdown {
    display: block;
}

.mara-subdropdown__link {
    display: block;
    padding: 0.55rem 1.2rem;
    color: var(--mara-dark);
    text-decoration: none;
    font-family: var(--mara-font);
    font-size: 0.85rem;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s;
}

.mara-subdropdown__link:hover {
    background: rgba(237,27,36,0.07);
    color: var(--mara-red);
}

/* ── 4. MOBILE OVERLAY ──────────────────────────────────── */

.mara-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 400;
    opacity: 0;
    transition: opacity 0.28s;
}

.mara-overlay.is-active {
    display: block;
    opacity: 1;
}

/* ── 5. MOBILE DRAWER ───────────────────────────────────── */

.mara-mobile-nav {
    position: fixed;
    top: 0;
    left: -100%;
    width: min(340px, 88vw);
    height: 100vh;
    background: var(--mara-white);
    z-index: 500;
    overflow-y: auto;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 4px 0 24px rgba(0,0,0,0.18);
    font-family: var(--mara-font);
}

.mara-mobile-nav.is-open {
    left: 0;
}

@media (min-width: 769px) {
    .mara-mobile-nav { display: none !important; }
    .mara-overlay    { display: none !important; }
}

.mara-mobile-nav__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--mara-border);
    background: var(--mara-dark);
}

.mara-mobile-nav__logo {
    height: 40px;
    width: auto;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.mara-mobile-nav__close {
    background: none;
    border: none;
    color: var(--mara-white);
    font-size: 1.4rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    opacity: 0.8;
    transition: opacity 0.18s;
}

.mara-mobile-nav__close:hover { opacity: 1; }

/* Mobile search bar */
.mara-mobile-search {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--mara-border);
    background: var(--mara-light-bg);
}

.mara-mobile-search form {
    display: flex;
}

.mara-mobile-search__input {
    flex: 1;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--mara-border);
    border-right: none;
    border-radius: 4px 0 0 4px;
    font-family: var(--mara-font);
    font-size: 0.875rem;
    outline: none;
}

.mara-mobile-search__btn {
    padding: 0.5rem 0.75rem;
    background: var(--mara-red);
    color: var(--mara-white);
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
}

/* Mobile nav list */
.mara-mobile-nav__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mara-mobile-nav__link {
    display: block;
    padding: 0.85rem 1.25rem;
    color: var(--mara-dark);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    border-bottom: 1px solid var(--mara-border);
    transition: background 0.15s;
}

.mara-mobile-nav__link:hover { background: var(--mara-light-bg); }

/* Mobile accordion */
.mara-mobile-accordion {
    border-bottom: 1px solid var(--mara-border);
}

.mara-mobile-accordion__trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1.25rem;
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--mara-font);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--mara-dark);
    text-align: left;
    transition: background 0.15s;
}

.mara-mobile-accordion__trigger--sub {
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.7rem 1.5rem;
    color: var(--mara-gray);
}

.mara-mobile-accordion__trigger:hover { background: var(--mara-light-bg); }

.mara-mobile-accordion__trigger i {
    font-size: 0.75rem;
    transition: transform 0.25s;
    flex-shrink: 0;
}

.mara-mobile-accordion__trigger.is-open i {
    transform: rotate(180deg);
}

.mara-mobile-accordion__panel {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
    background: var(--mara-light-bg);
}

.mara-mobile-accordion__link {
    display: block;
    padding: 0.65rem 1.25rem;
    color: var(--mara-gray);
    text-decoration: none;
    font-size: 0.875rem;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    transition: background 0.15s, color 0.15s;
}

.mara-mobile-accordion__link--sub {
    padding-left: 2rem;
}

.mara-mobile-accordion__link:hover {
    background: rgba(237,27,36,0.06);
    color: var(--mara-red);
}

/* Contact block at bottom of drawer */
.mara-mobile-nav__contact {
    padding: 1rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    border-top: 2px solid var(--mara-red);
    background: var(--mara-light-bg);
}

.mara-mobile-nav__contact a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--mara-dark);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: color 0.15s;
}

.mara-mobile-nav__contact a:hover { color: var(--mara-red); }

.mara-mobile-nav__contact a .fa-whatsapp {
    color: #25d366;
    font-size: 1.1rem;
}
