/** * Bongoto – Header CSS (CLEAN) * - Desktop: horizontal primary menu (no wrapping) * - Mobile : compact CTA; account hidden in header (moved to drawer) * - Mobile search below header (Shop/archive handled in PHP to avoid duplicates) * - Drawer styles + a11y polish */ /* -------------------- Variables -------------------- */ :root{ --bt-head-h: 40px; --bt-r: 10px; --bt-b: #e5e7eb; --bt-bg:#fff; --bt-fg:#0f172a; --bt-soft:#f3f4f6; --bt-accent:#2563eb; --bt-accent-d:#1d4ed8; } /* -------------------- Header Base -------------------- */ .bt-header{background:#fff;border-bottom:1px solid var(--bt-b);overflow:visible} .bt-header--sticky{position:sticky;top:0;z-index:900} .bt-header-scrolled{box-shadow:0 6px 20px rgba(0,0,0,.06)} .bt-header-inner{ display:flex;align-items:center;gap:12px;padding:.75rem 0;overflow:visible } /* Desktop layout hardening */ @media (min-width:769px){ .bt-header-inner{flex-wrap:nowrap} .bt-header-left{flex:0 0 auto} .bt-primary-menu{display:block;flex:1 1 auto} .bt-header-right{flex:0 0 auto} } /* Keep left/right groups on one row */ .bt-header-left,.bt-header-right{display:flex;align-items:center;gap:.5rem;flex-wrap:nowrap} .bt-header-left>*, .bt-header-right>*{flex:0 0 auto} /* Logo */ .bt-logo__img{max-height:48px} @media (max-width:768px){ .bt-logo__img{max-height:40px} } /* -------------------- Primary Menu -------------------- */ .bt-primary-menu{position:relative;overflow:visible} .bt-primary-menu .bt-menu-list{ list-style:none;margin:0;padding:0;display:flex;flex-direction:row;flex-wrap:nowrap;align-items:center;gap:20px } .bt-primary-menu .bt-menu-list>li{display:inline-flex;position:relative;overflow:visible} .bt-primary-menu a{ display:inline-flex;align-items:center;gap:6px;padding:10px 8px;border-radius:8px;text-decoration:none; font-weight:500;color:var(--bt-fg);transition:color .15s,background .15s } .bt-primary-menu a:hover{color:var(--bt-accent)} .bt-primary-menu .menu-item-has-children>a::after{content:"▾";font-size:.8rem;opacity:.7;transform:translateY(-1px)} /* Level-1 dropdown */ .bt-primary-menu .sub-menu{ position:absolute;top:calc(100% + 2px);left:0;min-width:220px;background:#fff;border:1px solid var(--bt-b);border-radius:10px; padding:8px;margin:0;list-style:none;display:none;box-shadow:0 12px 30px rgba(0,0,0,.08);z-index:1200 } .bt-primary-menu .sub-menu li{position:relative} .bt-primary-menu .sub-menu a{display:block;padding:9px 10px;border-radius:8px;color:#0f172a} .bt-primary-menu .sub-menu a:hover{background:#f3f4f6;color:#111827} /* Level-2/3 flyout */ .bt-primary-menu .sub-menu .sub-menu{top:-8px;left:100%;margin-left:8px} /* Keep open on hover/focus */ .bt-primary-menu li:hover>.sub-menu, .bt-primary-menu li:focus-within>.sub-menu{display:block} /* -------------------- Actions & CTA -------------------- */ .bt-icon-btn{ width:var(--bt-head-h);height:var(--bt-head-h);border-radius:var(--bt-r);background:var(--bt-soft); display:inline-grid;place-items:center;color:var(--bt-fg);text-decoration:none } .bt-icon-btn:hover{background:#e5e7eb} /* CTA + legacy hooks (single source of truth) */ .bt-cta-btn, .start-selling-btn, .upload-btn{ display:inline-flex;align-items:center;justify-content:center; background:var(--bt-accent);color:#fff;font-weight:600; padding:4px 10px;font-size:13px;border-radius:6px;text-decoration:none; transition:all .2s ease;width:auto!important;line-height:1.3 } .bt-cta-btn:hover, .start-selling-btn:hover, .upload-btn:hover{background:var(--bt-accent-d);transform:translateY(-1px)} .bt-cta-btn:active, .start-selling-btn:active, .upload-btn:active{transform:scale(.97)} @media (max-width:768px){ .bt-cta-btn,.start-selling-btn,.upload-btn{padding:4px 9px;font-size:12.5px} } /* Hide desktop-only account in header on mobile */ @media (max-width:768px){ .bt-account-link{display:none!important} } /* -------------------- Desktop Search (optional host) -------------------- */ .bt-header-search{display:flex;align-items:center;gap:.4rem;position:relative} .bt-header-search input[type="search"]{ height:var(--bt-head-h);padding:0 .75rem;border:1px solid var(--bt-b);border-radius:var(--bt-r) } .bt-search-submit{ width:var(--bt-head-h);height:var(--bt-head-h);border:1px solid var(--bt-b); border-radius:var(--bt-r);display:inline-grid;place-items:center;background:#fff;cursor:pointer } .bt-search-submit:hover{background:var(--bt-soft)} .bt-search-dropdown[hidden]{display:none!important} .bt-search-dropdown{ position:absolute;top:calc(100% + 6px);right:0;width:min(520px,90vw); background:#fff;border:1px solid var(--bt-b);border-radius:12px;padding:.75rem; box-shadow:0 10px 30px rgba(0,0,0,.08);z-index:1100 } /* -------------------- Mobile Layout -------------------- */ .bt-menu-toggle{ display:none;width:36px;height:36px;border:0;background:transparent;border-radius:8px; align-items:center;justify-content:center;cursor:pointer } .bt-menu-toggle:hover{background:var(--bt-soft)} @media (max-width:768px){ .bt-menu-toggle{display:flex} .bt-primary-menu{display:none!important} .bt-header-right .bt-header-search{display:none!important} } /* -------------------- Drawer -------------------- */ .bt-drawer{ display:none;position:fixed;inset:0 auto 0 0;width:82vw;max-width:320px;background:#fff; box-shadow:8px 0 24px rgba(0,0,0,.12);transform:translateX(-100%);transition:transform .25s ease;z-index:1000 } .bt-drawer.is-open{transform:translateX(0)} .bt-drawer-inner{height:100%;padding:12px 16px;display:flex;flex-direction:column;overflow:auto} .bt-drawer-title{margin:.25rem 0 1rem} .bt-drawer-menu{list-style:none;margin:0;padding:0} .bt-drawer-menu a{display:block;padding:10px 0;text-decoration:none;color:var(--bt-fg)} .bt-drawer-menu li{position:relative} .bt-drawer-menu .sub-menu{display:none;padding-left:12px;border-left:1px solid #eef2f7;margin:6px 0 0} .bt-drawer-menu li.expanded>.sub-menu{display:block} .bt-drawer-menu li.account-mobile-only a{font-weight:600;color:var(--bt-accent)} .bt-drawer-footer{margin-top:auto;padding-top:12px;border-top:1px solid var(--bt-b)} @media (max-width:768px){ .bt-drawer{display:block} } @media (min-width:769px){ .bt-drawer{display:none!important} } /* -------------------- Mobile Search (under header) -------------------- */ .bt-header-search--mobile{ display:none;padding:.6rem 1rem;border-top:1px solid var(--bt-b);background:#fff } .bt-header-search--mobile .search-form{display:flex;justify-content:center;gap:8px;width:100%} .bt-header-search--mobile .search-field{ height:36px;border-radius:8px;border:1px solid var(--bt-b);width:90%;max-width:350px;padding:0 .75rem } .bt-header-search--mobile .search-submit{ width:36px;height:36px;border-radius:8px;display:grid;place-items:center; background:var(--bt-accent);color:#fff;border:none;cursor:pointer;transition:background .2s ease } .bt-header-search--mobile .search-submit:hover{background:var(--bt-accent-d)} @media (max-width:768px){ .bt-header-search--mobile{display:block} } @media (min-width:769px){ .bt-header-search--mobile{display:none!important} } /* -------------------- Shop Page Product Search block -------------------- */ .shop-mobile-search{padding:10px;border-top:1px solid var(--bt-b);background:#fff} .shop-mobile-search form{display:flex;justify-content:center;gap:8px} .shop-mobile-search input[type="search"]{ height:36px;border-radius:8px;border:1px solid var(--bt-b);width:90%;max-width:350px } /* submit as icon (centered) */ .shop-mobile-search button[type="submit"]{ width:36px;height:36px;border-radius:8px;border:none;background:var(--bt-accent);color:#fff; position:relative;font-size:0;line-height:0;cursor:pointer;transition:background .2s ease } .shop-mobile-search button[type="submit"]::before{ content:"\f179";font-family:"dashicons";font-size:18px;line-height:1; position:absolute;top:50%;left:50%;transform:translate(-50%,-50%) } .shop-mobile-search button[type="submit"]:hover{background:var(--bt-accent-d)} @media (min-width:769px){ .shop-mobile-search{display:none!important} } /* --- Cart icon positioning (always after CTA) --- */ .bt-header-right{display:flex;align-items:center;gap:.4rem;margin-left:auto;flex-wrap:nowrap} .bt-header-right .bt-header-cta{order:1} .bt-header-right .bt-header-cart{order:2} /* ensure icon buttons align nicely */ .bt-header-right .bt-icon-btn{ width:34px;height:34px;border-radius:8px;display:inline-grid;place-items:center;background:var(--bt-soft); transition:background .2s ease } .bt-header-right .bt-icon-btn:hover{background:#e5e7eb} /* --- Drawer Close Button --- */ .bt-drawer-close{ position:absolute;top:10px;right:10px;background:transparent;border:none;font-size:26px;line-height:1;cursor:pointer; color:var(--bt-fg);z-index:1100;padding:4px 8px;border-radius:8px;transition:background .2s ease,transform .15s ease } .bt-drawer-close:hover{background:var(--bt-soft);transform:rotate(90deg)} /* ====== Header side spacing adjustment ====== */ @media (min-width:1980px){ .bt-header-inner.container{padding-left:5px;padding-right:5px} } @media (max-width:768px){ .bt-header-inner.container{padding-right:10px} } /* ===== Mobile logo nudge ===== */ @media (max-width:768px){ .bt-header .custom-logo-link,.bt-header .site-logo{display:flex;align-items:center;margin-left:-8px} .bt-header .custom-logo-link img,.bt-header .site-logo img,.bt-logo__img{max-height:38px;height:auto;margin-left:0} }