/* ════════════════════════════════════════════════════
   AHQONE — Header
   Layout: Logo Left | Nav Center | Icons Right
   Ref: Goldsmith jewelry theme
════════════════════════════════════════════════════ */

/* Suppress Blocksy's built-in header */
.ct-header, .site-header, #masthead { display: none !important; }

/* ── Base — Ivory Luxe 白底页头（全站固定，滚动不隐藏）── */
.ahq-header {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1100;
    height: var(--ahq-header-height, 68px);
    background: var(--ahq-bg-primary);
    box-shadow: 0 1px 0 var(--ahq-border);
    transition: background 0.4s ease, box-shadow 0.4s ease, height 0.25s ease;
    transform: none !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

/* Blocksy .hidden 或旧脚本不得隐藏顶栏 */
.ahq-header.hidden {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    transform: none !important;
}

/* 首页 Hero 全屏：顶栏仍固定悬浮，不随页面滚动 */
body.home .ahq-header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 1100 !important;
    background: var(--ahq-bg-primary) !important;
    box-shadow: 0 1px 0 var(--ahq-border);
}

/* 登录后台时：页头下移到 Admin Bar 下方 */
.admin-bar .ahq-header {
    top: var(--ahq-admin-bar-height, 32px);
}

@media (max-width: 782px) {
    :root {
        --ahq-admin-bar-height: 46px;
    }
}

/* Scrolled state — added by JS */
.ahq-header.is-scrolled {
    background: var(--ahq-bg-primary);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: 0 1px 0 var(--ahq-border);
}

/* ── Inner layout: Logo 左 | Nav 居中 | Icons 右（同一 flex 基线）── */
.ahq-header-inner {
    position: relative;
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 clamp(1rem, 3vw, 2.5rem);
    height: 100%;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1rem;
}

/* ── Logo（左）── */
.ahq-header-logo {
    grid-column: 1;
    justify-self: start;
    flex: 0 0 auto;
    z-index: 2;
    min-width: 0;
}

.ahq-header-logo a {
    text-decoration: none;
    display: flex;
    align-items: center;
    height: 100%;
}

.ahq-logo-wordmark {
    display: inline-block;
    text-align: center;
    line-height: 1;
}

.ahq-logo-name {
    display: block;
    font-family: var(--ahq-font-display);
    font-size: clamp(1.05rem, 1.25vw, 1.24rem);
    font-weight: 400;
    letter-spacing: 0.17em;
    /* text-indent = letter-spacing：抵消尾部字距，使居中真正对齐 */
    text-indent: 0.17em;
    text-transform: uppercase;
    color: #14110b;
    line-height: 1;
    white-space: nowrap;
}

.ahq-logo-tagline {
    display: block;
    position: relative;
    margin-top: 6px;
    padding-top: 7px;
    font-family: var(--ahq-font-badge);
    font-size: clamp(0.46rem, 0.52vw, 0.52rem);
    font-weight: 500;
    letter-spacing: 0.33em;
    text-indent: 0.33em;
    text-transform: uppercase;
    color: #8A6508;
    line-height: 1;
    white-space: nowrap;
}

.ahq-logo-tagline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: 52px;
    height: 1px;
    background: linear-gradient(90deg, transparent, #A8813A 18%, #A8813A 82%, transparent);
    transform: translateX(-50%);
}

.ahq-logo-img {
    height: clamp(34px, 4.2vw, 40px);
    width: auto;
}

/* ── Navigation（与 Logo / 图标同一水平中线）── */
.ahq-nav {
    position: static;
    left: auto;
    top: auto;
    transform: none;
    grid-column: 2;
    justify-self: center;
    z-index: 1;
    max-width: min(520px, 52vw);
    align-self: center;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    margin: 0;
    padding: 0;
}

.ahq-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;
    gap: clamp(1.1rem, 2vw, 2rem);
    height: 100%;
}

.ahq-nav-list > li {
    position: relative;
    display: flex;
    align-items: center;
    height: 100%;
    margin: 0;
    padding: 0;
}

.ahq-nav-list > li > a {
    font-family: var(--font-body, 'DM Sans', sans-serif);
    font-size: clamp(0.625rem, 0.75vw, 0.6875rem);
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    height: 100%;
    padding: 0;
    margin: 0;
    position: relative;
    transition: color 0.2s, border-color 0.2s;
    white-space: nowrap;
    vertical-align: middle;
    border-bottom: 1px solid transparent;
    box-sizing: border-box;
}

/* 当前页 / 悬停：仅改色与底边，不改变文字高度 */
.ahq-nav-list > li > a::after {
    display: none;
}

.ahq-nav-list > li > a:hover,
.ahq-nav-list > li.current-menu-item > a,
.ahq-nav-list > li.current-menu-ancestor > a {
    color: var(--color-gold, #d4af37);
    border-bottom-color: var(--color-gold, #d4af37);
}

/* Dropdown */
.ahq-nav-list .sub-menu {
    list-style: none;
    margin: 0; padding: 0.5rem 0;
    position: absolute;
    top: calc(100% + 1.25rem);
    left: 50%;
    transform: translateX(-50%) translateY(-6px);
    min-width: 190px;
    background: rgba(14, 11, 6, 0.98);
    backdrop-filter: blur(24px);
    border: 1px solid rgba(212, 175, 55, 0.12);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.22s, transform 0.22s;
    z-index: 10;
}

.ahq-mode-light .ahq-nav-list .sub-menu {
    background: rgba(252, 250, 247, 0.98);
    border-color: rgba(180, 145, 40, 0.18);
}

.ahq-nav-list li:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.ahq-nav-list .sub-menu li a {
    display: block;
    padding: 0.55rem 1.25rem;
    font-family: var(--font-body, 'DM Sans', sans-serif);
    font-size: 0.775rem;
    letter-spacing: 0.06em;
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
    transition: color 0.18s, padding-left 0.18s;
    white-space: nowrap;
}

.ahq-mode-light .ahq-nav-list .sub-menu li a {
    color: rgba(20, 14, 4, 0.65);
}

.ahq-nav-list .sub-menu li a:hover {
    color: var(--color-gold, #d4af37);
    padding-left: 1.5rem;
}

/* ── Action Icons（右）── */
.ahq-header-actions {
    grid-column: 3;
    justify-self: end;
    flex: 0 0 auto;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0;
    min-width: 0;
    align-self: center;
}

.ahq-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: transparent;
    border: none;
    color: var(--ahq-text-secondary);
    cursor: pointer;
    text-decoration: none;
    transition: color 0.2s, background 0.2s;
    position: relative;
    flex-shrink: 0;
}

.ahq-icon-btn:hover {
    color: var(--color-gold, #d4af37);
    background: rgba(212, 175, 55, 0.06);
}

/* Cart count bubble */
.ahq-cart-count {
    position: absolute;
    top: 3px; right: 3px;
    min-width: 16px; height: 16px;
    padding: 0 3px;
    background: var(--color-gold, #d4af37);
    color: #0a0805;
    font-size: 0.6rem;
    font-weight: 700;
    font-family: var(--font-body, 'DM Sans', sans-serif);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    pointer-events: none;
}

/* 全站固定白底，隐藏深浅色切换 */
.ahq-theme-toggle { display: none !important; }

/* Hamburger */
.ahq-hamburger-btn { display: none; }

.ahq-hamburger {
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 20px;
}

.ahq-hamburger span {
    display: block;
    width: 100%; height: 1.5px;
    background: currentColor;
    transition: transform 0.3s, opacity 0.3s;
}

/* ── Body Offset ── */
body {
    padding-top: var(--ahq-header-height, 68px);
}

body.home {
    padding-top: 0;
}

body.admin-bar:not(.home) {
    padding-top: calc(var(--ahq-admin-bar-height, 32px) + var(--ahq-header-height, 68px));
}

/* ── Hero 全屏强制（破除 Blocksy 父容器限制）── */
/* WP admin bar: 宽屏 32px，窄屏(<783px) 46px */
.admin-bar .ahq-hero {
    --ahq-hero-h: calc(100vh - var(--ahq-admin-bar-height, 32px));
    --ahq-hero-h: calc(100svh - var(--ahq-admin-bar-height, 32px));
    --ahq-hero-h: calc(100dvh - var(--ahq-admin-bar-height, 32px));
    height: var(--ahq-hero-h) !important;
    min-height: var(--ahq-hero-h) !important;
}

/* 确保首页 main 元素不受 Blocksy 约束 */
.home .site-main,
.home .ct-main-content-container {
    overflow: visible !important;
    max-width: none !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/* ════════════════════════════════════════
   SEARCH POPUP
════════════════════════════════════════ */
.ahq-search-popup {
    position: fixed;
    inset: 0;
    z-index: 1200;
    background: var(--ahq-bg-overlay);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.ahq-mode-light .ahq-search-popup {
    background: rgba(252, 250, 247, 0.985);
}

/* 移动端：搜索遮罩必须完全不透明，避免页面内容（hero 文字等）透出重叠 */
@media (max-width: 768px) {
    .ahq-search-popup {
        background: var(--ahq-bg-primary, #0d0a06);
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
    }

    .ahq-mode-light .ahq-search-popup {
        background: #fcfaf7;
    }
}

.ahq-search-popup.is-open {
    opacity: 1;
    visibility: visible;
}

.ahq-search-popup-inner {
    width: min(620px, 90vw);
    position: relative;
    text-align: center;
}

.ahq-search-label {
    font-family: var(--font-display, 'Bodoni Moda', serif);
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    font-weight: 400;
    color: var(--ahq-text-primary);
    margin: 0 0 2rem;
    letter-spacing: 0.02em;
}

.ahq-mode-light .ahq-search-label {
    color: rgba(20, 14, 4, 0.85);
}

.ahq-search-popup .search-form {
    display: flex;
    border-bottom: 1px solid rgba(212, 175, 55, 0.35);
    gap: 0;
}

.ahq-search-popup .search-field {
    flex: 1;
    padding: 0.875rem 0;
    background: transparent;
    border: none;
    outline: none;
    color: var(--ahq-text-primary);
    font-family: var(--font-body, 'DM Sans', sans-serif);
    font-size: 1rem;
    letter-spacing: 0.04em;
}

.ahq-mode-light .ahq-search-popup .search-field { color: #1e140a; }
.ahq-search-popup .search-field::placeholder { color: var(--ahq-text-muted); }
.ahq-mode-light .ahq-search-popup .search-field::placeholder { color: rgba(20,14,4,0.3); }

.ahq-search-popup .search-submit {
    padding: 0.875rem 0 0.875rem 1rem;
    background: transparent;
    border: none;
    color: var(--color-gold, #d4af37);
    cursor: pointer;
    font-size: 0.75rem;
    font-family: var(--font-body, 'DM Sans', sans-serif);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    transition: opacity 0.2s;
}

.ahq-search-popup .search-submit:hover { opacity: 0.7; }

.ahq-popup-close {
    position: absolute;
    top: -3.5rem; right: 0;
    background: transparent;
    border: none;
    color: var(--ahq-text-muted);
    cursor: pointer;
    padding: 0.5rem;
    transition: color 0.2s;
}

.ahq-mode-light .ahq-popup-close { color: rgba(20,14,4,0.45); }
.ahq-popup-close:hover { color: var(--color-gold, #d4af37); }

/* ════════════════════════════════════════
   RIGHT SIDE PANEL
════════════════════════════════════════ */
.ahq-side-panel {
    position: fixed;
    top: 0; right: 0; bottom: 0;
    width: min(420px, 92vw);
    z-index: 1100;
    background: var(--ahq-bg-primary);
    transform: translateX(100%);
    transition: transform 0.38s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    border-left: 1px solid rgba(212, 175, 55, 0.08);
    overflow: hidden;
}

.ahq-mode-light .ahq-side-panel {
    background: #faf8f5;
    border-left-color: rgba(180, 145, 40, 0.1);
}

.ahq-side-panel.is-open { transform: translateX(0); }

.ahq-panel-section {
    display: none;
    flex-direction: column;
    height: 100%;
}

.ahq-panel-section.is-active { display: flex; }

.ahq-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 1.75rem;
    border-bottom: 1px solid rgba(212, 175, 55, 0.1);
    flex-shrink: 0;
}

.ahq-panel-title {
    font-family: var(--font-display, 'Bodoni Moda', serif);
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ahq-text-primary);
}

.ahq-mode-light .ahq-panel-title { color: rgba(20, 14, 4, 0.85); }

.ahq-panel-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px; height: 36px;
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: color 0.2s;
}

.ahq-mode-light .ahq-panel-close { color: rgba(20,14,4,0.45); }
.ahq-panel-close:hover { color: var(--color-gold, #d4af37); }

.ahq-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem 1.75rem;
}

/* Account menu inside panel */
.ahq-panel-greeting {
    font-family: var(--font-body, 'DM Sans', sans-serif);
    font-size: 0.9rem;
    color: rgba(255,255,255,0.65);
    margin: 0 0 1.25rem;
}

.ahq-mode-light .ahq-panel-greeting { color: rgba(20,14,4,0.6); }

.ahq-account-menu {
    list-style: none;
    margin: 0; padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.ahq-account-menu li a {
    display: block;
    padding: 0.8rem 0;
    font-family: var(--font-body, 'DM Sans', sans-serif);
    font-size: 0.8125rem;
    letter-spacing: 0.06em;
    color: rgba(255,255,255,0.65);
    text-decoration: none;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    transition: color 0.2s, padding-left 0.2s;
}

.ahq-mode-light .ahq-account-menu li a { color: rgba(20,14,4,0.6); border-color: rgba(0,0,0,0.06); }
.ahq-account-menu li a:hover { color: var(--color-gold, #d4af37); padding-left: 0.5rem; }

/* Overlay */
.ahq-panel-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0,0,0,0.55);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.ahq-panel-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

/* ════════════════════════════════════════
   MOBILE DRAWER
════════════════════════════════════════ */
.ahq-mobile-drawer {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: min(320px, 88vw);
    z-index: 1100;
    background: #0a0805;
    transform: translateX(-100%);
    transition: transform 0.38s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}

.ahq-mode-light .ahq-mobile-drawer { background: #faf8f5; }

.ahq-mobile-drawer.is-open { transform: translateX(0); }

.ahq-mobile-drawer-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.375rem 1.5rem;
    border-bottom: 1px solid rgba(212, 175, 55, 0.1);
    flex-shrink: 0;
}

.ahq-mobile-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 0;
}

.ahq-mobile-nav {
    list-style: none;
    margin: 0; padding: 0;
}

.ahq-mobile-nav li a {
    display: block;
    padding: 0.875rem 1.5rem;
    font-family: var(--font-body, 'DM Sans', sans-serif);
    font-size: 0.875rem;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    transition: color 0.2s;
}

.ahq-mode-light .ahq-mobile-nav li a { color: rgba(20,14,4,0.7); }
.ahq-mobile-nav li a:hover { color: var(--color-gold, #d4af37); }

.ahq-mobile-nav .sub-menu {
    list-style: none;
    padding: 0;
    background: rgba(255,255,255,0.02);
}

.ahq-mobile-nav .sub-menu li a {
    padding-left: 2.25rem;
    font-size: 0.8125rem;
    text-transform: none;
    letter-spacing: 0.04em;
}

.ahq-mobile-drawer-actions {
    display: flex;
    gap: 0.75rem;
    padding: 1.5rem;
    margin-top: auto;
}

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

.ahq-mobile-overlay.is-open { opacity: 1; visibility: visible; }

/* ── Buttons (shared) ── */
.ahq-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.7rem 1.25rem;
    font-family: var(--font-body, 'DM Sans', sans-serif);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none;
    transition: opacity 0.2s, background 0.2s;
    flex: 1;
}

.ahq-btn-gold {
    background: var(--color-gold, #d4af37);
    color: #0a0805;
    border: 1px solid var(--color-gold, #d4af37);
}

.ahq-btn-gold:hover { opacity: 0.88; }

.ahq-btn-outline {
    background: transparent;
    color: rgba(255,255,255,0.7);
    border: 1px solid rgba(255,255,255,0.2);
}

.ahq-mode-light .ahq-btn-outline { color: rgba(20,14,4,0.65); border-color: rgba(0,0,0,0.15); }
.ahq-btn-outline:hover { border-color: var(--color-gold, #d4af37); color: var(--color-gold, #d4af37); }

/* ════════════════════════════════════════
   MEGA MENU
════════════════════════════════════════ */
.ahq-has-mega { position: static !important; }

/* 透明桥：从 SHOP 链接向下延伸到 mega 面板，避免鼠标移动时 hover 断开 */
.ahq-has-mega::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 100%;
    width: max(100%, 120px);
    height: 18px;
    background: transparent;
    pointer-events: none;
    z-index: 1099;
}

.ahq-has-mega:hover::after,
.ahq-has-mega.is-mega-open::after {
    pointer-events: auto;
}

.ahq-mega-menu {
    position: fixed;
    top: var(--ahq-header-height, 68px);
    left: 0;
    right: 0;
    z-index: 1098;
    background: var(--ahq-bg-primary);
    border-top: 1px solid rgba(212, 175, 55, 0.12);
    border-bottom: 1px solid rgba(212, 175, 55, 0.08);
    box-shadow: 0 12px 40px rgba(0,0,0,0.18);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
    pointer-events: none;
}

/* 面板顶部向上延伸的透明命中区，衔接页头与下拉 */
.ahq-mega-menu::before {
    content: '';
    position: absolute;
    top: -18px;
    left: 0;
    right: 0;
    height: 18px;
    background: transparent;
}

.ahq-mode-light .ahq-mega-menu {
    background: #faf8f5;
    border-top-color: rgba(180, 145, 40, 0.15);
    box-shadow: 0 12px 40px rgba(0,0,0,0.08);
}

.admin-bar .ahq-mega-menu {
    top: calc(var(--ahq-admin-bar-height, 32px) + var(--ahq-header-height, 68px));
}

.ahq-has-mega:hover .ahq-mega-menu,
.ahq-has-mega:focus-within .ahq-mega-menu,
.ahq-has-mega.is-mega-open .ahq-mega-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
    z-index: 1101;
}

.ahq-mega-inner {
    max-width: 1320px;
    margin: 0 auto;
    padding: 2.25rem clamp(1rem, 3vw, 2.5rem);
    display: grid;
    grid-template-columns: repeat(3, 1fr) 240px;
    gap: 2rem 3rem;
}

/* Column heading */
.ahq-mega-heading {
    font-family: var(--font-body, 'DM Sans', sans-serif);
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--color-gold, #d4af37);
    margin: 0 0 1rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid rgba(212, 175, 55, 0.15);
}

/* Link list */
.ahq-mega-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.ahq-mega-list li a {
    display: block;
    padding: 0.45rem 0;
    font-family: var(--font-body, 'DM Sans', sans-serif);
    font-size: 0.8125rem;
    font-weight: 400;
    letter-spacing: 0.04em;
    color: var(--ahq-text-secondary);
    text-decoration: none;
    transition: color 0.18s, padding-left 0.18s;
    border-bottom: 1px solid rgba(255,255,255,0.03);
}

.ahq-mode-light .ahq-mega-list li a {
    color: rgba(20, 14, 4, 0.65);
    border-bottom-color: rgba(0,0,0,0.04);
}

.ahq-mega-list li a:hover {
    color: var(--color-gold, #d4af37);
    padding-left: 0.5rem;
}

/* CTA column */
.ahq-mega-col--cta {
    border-left: 1px solid rgba(212, 175, 55, 0.1);
    padding-left: 2rem;
}

.ahq-mega-promo {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 0.75rem 0.875rem;
    margin-bottom: 0.5rem;
    background: rgba(212, 175, 55, 0.04);
    border: 1px solid rgba(212, 175, 55, 0.1);
    text-decoration: none;
    transition: background 0.2s, border-color 0.2s;
}

.ahq-mode-light .ahq-mega-promo {
    background: rgba(212, 175, 55, 0.06);
}

.ahq-mega-promo:hover {
    background: rgba(212, 175, 55, 0.1);
    border-color: rgba(212, 175, 55, 0.25);
}

.ahq-mega-promo-label {
    font-family: var(--font-display, 'Bodoni Moda', serif);
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--ahq-text-primary);
    letter-spacing: 0.04em;
}

.ahq-mode-light .ahq-mega-promo-label { color: rgba(20, 14, 4, 0.85); }

.ahq-mega-promo-sub {
    font-family: var(--font-body, 'DM Sans', sans-serif);
    font-size: 0.7rem;
    letter-spacing: 0.06em;
    color: var(--ahq-text-muted);
}

.ahq-mega-promo--visual {
    padding: 0;
    overflow: hidden;
}

.ahq-mega-promo-media {
    display: block;
    aspect-ratio: 3 / 1;
    overflow: hidden;
    background: rgba(212, 175, 55, 0.08);
}

.ahq-mega-promo-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ahq-mega-promo--visual .ahq-mega-promo-label,
.ahq-mega-promo--visual .ahq-mega-promo-sub {
    padding-left: 0.875rem;
    padding-right: 0.875rem;
}

.ahq-mega-promo--visual .ahq-mega-promo-label {
    padding-top: 0.55rem;
}

.ahq-mega-promo--visual .ahq-mega-promo-sub {
    padding-bottom: 0.7rem;
}

.ahq-mega-all {
    display: inline-block;
    margin-top: 1rem;
    font-family: var(--font-body, 'DM Sans', sans-serif);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-gold, #d4af37);
    text-decoration: none;
    transition: opacity 0.2s;
}

.ahq-mega-all:hover { opacity: 0.75; }

/* ── Responsive ── */
@media (max-width: 1200px) {
    .ahq-nav-list {
        gap: clamp(0.85rem, 1.5vw, 1.35rem);
    }

    /* 窄屏隐藏主题切换，给图标区腾空间 */
    .ahq-theme-toggle {
        display: none;
    }
}

@media (max-width: 1024px) {
    .ahq-nav {
        display: none;
    }

    .ahq-hamburger-btn {
        display: inline-flex;
    }

    .ahq-mega-menu {
        display: none;
    }
}

.admin-bar .ahq-side-panel,
.admin-bar .ahq-mobile-drawer {
    top: var(--ahq-admin-bar-height, 32px);
}

@media (max-width: 782px) {
    .admin-bar .ahq-side-panel,
    .admin-bar .ahq-mobile-drawer {
        top: var(--ahq-admin-bar-height, 46px);
    }
}

@media (max-width: 768px) {
    .ahq-header-actions {
        gap: 0.15rem;
    }

    /* 平板/手机隐藏 wishlist，保留核心操作 */
    .ahq-header-actions > a[aria-label="Wishlist"] {
        display: none;
    }
}

@media (max-width: 640px) {
    .ahq-header {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 1100 !important;
        height: var(--ahq-header-height-mobile, 56px);
        transform: none !important;
        visibility: visible !important;
        opacity: 1 !important;
        background: var(--ahq-bg-primary, #fff) !important;
        box-shadow: 0 1px 0 rgba(26, 21, 9, 0.08);
    }

    body:not(.home) {
        padding-top: var(--ahq-header-height-mobile, 56px);
    }

    body.admin-bar .ahq-header {
        top: var(--ahq-admin-bar-height, 46px) !important;
    }

    body.admin-bar:not(.home) {
        padding-top: calc(var(--ahq-admin-bar-height, 46px) + var(--ahq-header-height-mobile, 56px));
    }

    .ahq-header-inner {
        padding: 0 0.875rem;
        padding-left: max(0.875rem, env(safe-area-inset-left, 0px));
        padding-right: max(0.875rem, env(safe-area-inset-right, 0px));
    }

    .ahq-icon-btn {
        width: 44px;
        height: 44px;
    }

    .ahq-logo-name {
        font-size: 0.72rem;
        letter-spacing: 0.22em;
    }

    .ahq-logo-tagline {
        font-size: 0.4rem;
    }
}

/* 移动端抽屉 — 商品分类快捷入口 */
.ahq-mobile-shop-nav {
    margin: 0.5rem 0 0;
    padding: 0.75rem 0 0;
    border-top: 1px solid rgba(212, 175, 55, 0.12);
}

.ahq-mobile-shop-label {
    margin: 0 0 0.5rem;
    padding: 0 1.5rem;
    font-family: var(--font-body, 'DM Sans', sans-serif);
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--color-gold, #d4af37);
    opacity: 0.85;
}

.ahq-mobile-shop-list {
    list-style: none !important;
    margin: 0;
    padding: 0;
}

.ahq-mobile-shop-list li {
    list-style: none !important;
    margin: 0;
    padding: 0;
}

.ahq-mobile-shop-list li a {
    display: block;
    padding: 0.7rem 1.5rem;
    font-family: var(--font-body, 'DM Sans', sans-serif);
    font-size: 0.8125rem;
    letter-spacing: 0.04em;
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    transition: color 0.2s;
}

.ahq-mode-light .ahq-mobile-shop-list li a {
    color: rgba(20, 14, 4, 0.62);
    border-bottom-color: rgba(0, 0, 0, 0.05);
}

.ahq-mobile-shop-list li a:hover {
    color: var(--color-gold, #d4af37);
}

.ahq-mobile-shop-all a {
    font-weight: 600;
    color: var(--color-gold, #d4af37) !important;
}

/* ════════════════════════════════════════
   MOBILE BOTTOM NAVIGATION BAR
   Only visible ≤ 640px
════════════════════════════════════════ */
.ahq-mobile-bar {
    display: none;
}

@media (max-width: 640px) {
    .ahq-mobile-bar {
        display: flex;
        align-items: stretch;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 980;
        height: 60px;
        background: var(--ahq-bg-primary, #faf8f5);
        border-top: 1px solid rgba(201, 169, 110, 0.18);
        box-shadow: 0 -2px 16px rgba(0,0,0,0.07);
        padding-bottom: env(safe-area-inset-bottom, 0px);
        padding-left: env(safe-area-inset-left, 0px);
        padding-right: env(safe-area-inset-right, 0px);
    }

    .ahq-mode-dark .ahq-mobile-bar {
        background: #0e0b08;
        border-top-color: rgba(212, 175, 55, 0.12);
        box-shadow: 0 -2px 16px rgba(0,0,0,0.28);
    }

    /* Push page content above the bar */
    body:not(.home) {
        padding-bottom: calc(60px + env(safe-area-inset-bottom, 0px));
    }

    .ahq-mobile-bar-item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        background: transparent;
        border: none;
        padding: 0 4px;
        cursor: pointer;
        text-decoration: none;
        color: #5c534c;
        transition: color 0.2s;
        -webkit-tap-highlight-color: transparent;
        min-width: 0;
    }

    .ahq-mode-dark .ahq-mobile-bar-item {
        color: rgba(255,255,255,0.45);
    }

    .ahq-mobile-bar-item svg {
        flex-shrink: 0;
        width: 21px;
        height: 21px;
        transition: stroke 0.2s;
    }

    .ahq-mobile-bar-item span {
        font-family: var(--font-body, 'DM Sans', sans-serif);
        font-size: 0.585rem;
        font-weight: 500;
        letter-spacing: 0.06em;
        text-transform: uppercase;
        line-height: 1;
        white-space: nowrap;
    }

    /* Active / current page */
    .ahq-mobile-bar-item.is-active,
    .ahq-mobile-bar-item:active {
        color: var(--ahq-gold, #c9a96e);
    }

    .ahq-mode-dark .ahq-mobile-bar-item.is-active {
        color: var(--color-gold, #d4af37);
    }

    .ahq-mobile-bar-item:hover {
        color: var(--ahq-gold, #c9a96e);
    }

    /* Gold dot indicator for active item */
    .ahq-mobile-bar-item.is-active::before {
        content: '';
        position: absolute;
        top: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 20px;
        height: 2px;
        background: var(--ahq-gold, #c9a96e);
        border-radius: 0 0 2px 2px;
    }

    .ahq-mobile-bar-item {
        position: relative;
    }

    /* Cart badge inside bar */
    .ahq-mobile-bar-item .ahq-cart-count {
        top: -2px;
        right: -4px;
    }
}
