/* ════════════════════════════════════════════════════════════════════
   HBE — Navigation Info Tabs (in-place tab switcher overlay)
   Powers nav-tabs.js: Shipping Rates / FAQ / Feedback / Brands.
   Scoped under .hnt-* — mobile-first, RTL, navy + gold.
   ════════════════════════════════════════════════════════════════════ */
:root {
    --hnt-navy: #0A192F;
    --hnt-navy-2: #112240;
    --hnt-navy-3: #0d1b35;
    --hnt-gold: #D4AF37;
    --hnt-gold-2: #F2D06B;
    --hnt-line: rgba(212, 175, 55, 0.18);
    --hnt-line-soft: rgba(255, 255, 255, 0.08);
    --hnt-text: #e6edf6;
    --hnt-muted: #93a4bd;
    --hnt-radius: 16px;
    --hnt-font: 'rabar_021', 'Rabar_021', 'Cairo', sans-serif;
}

/* ── Injected menu link styling (desktop dropdown + mobile items) ── */
.hnt-nav-link { cursor: pointer; }
.hnt-mobile-item .nav-link i:first-child {
    color: var(--hnt-gold);
    margin-inline-end: 10px;
    width: 18px;
    text-align: center;
}

/* ── Overlay & panel ──────────────────────────────────────────── */
.hnt-overlay {
    position: fixed;
    inset: 0;
    z-index: 4000;
    display: flex;
    align-items: stretch;
    justify-content: center;
    background: rgba(4, 9, 20, 0.6);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .26s ease, visibility .26s ease;
    font-family: var(--hnt-font);
}
.hnt-overlay.open { opacity: 1; visibility: visible; }

.hnt-panel {
    position: relative;
    width: 100%;
    height: 100%;
    background: linear-gradient(165deg, var(--hnt-navy) 0%, var(--hnt-navy-3) 60%, #081226 100%);
    color: var(--hnt-text);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(18px) scale(.99);
    transition: transform .3s cubic-bezier(.22, 1, .36, 1);
    will-change: transform;
}
.hnt-overlay.open .hnt-panel { transform: translateY(0) scale(1); }

@media (min-width: 768px) {
    .hnt-overlay { padding: 4vh 16px; align-items: center; }
    .hnt-panel {
        max-width: 980px;
        height: auto;
        max-height: 92vh;
        border-radius: var(--hnt-radius);
        border: 1px solid var(--hnt-line);
        box-shadow: 0 30px 80px rgba(0, 0, 0, .5);
    }
}

/* ── Header ───────────────────────────────────────────────────── */
.hnt-head {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    padding-top: calc(14px + env(safe-area-inset-top, 0px));
    border-bottom: 1px solid var(--hnt-line-soft);
    background: rgba(8, 16, 33, 0.6);
}
@media (min-width: 768px) {
    .hnt-head { padding-top: 16px; }
}
.hnt-head-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
    flex: 1;
    min-width: 0;
}
.hnt-close {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 12px;
    border: 1px solid var(--hnt-line-soft);
    background: rgba(255, 255, 255, 0.04);
    color: var(--hnt-text);
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .2s ease, color .2s ease, transform .2s ease;
}
.hnt-close:hover { background: rgba(212, 175, 55, .14); color: var(--hnt-gold); transform: rotate(90deg); }

/* ── Tab bar ──────────────────────────────────────────────────── */
.hnt-tabs {
    flex-shrink: 0;
    display: flex;
    gap: 6px;
    padding: 10px 12px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    border-bottom: 1px solid var(--hnt-line-soft);
    background: rgba(8, 16, 33, 0.35);
}
.hnt-tabs::-webkit-scrollbar { display: none; }

.hnt-tab {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    border-radius: 999px;
    border: 1px solid var(--hnt-line-soft);
    background: rgba(255, 255, 255, 0.03);
    color: var(--hnt-muted);
    font-family: var(--hnt-font);
    font-size: .88rem;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: color .2s ease, background .2s ease, border-color .2s ease;
}
.hnt-tab i { font-size: .9rem; }
.hnt-tab:hover { color: var(--hnt-text); border-color: var(--hnt-line); }
.hnt-tab.active {
    color: var(--hnt-navy);
    background: linear-gradient(135deg, var(--hnt-gold), var(--hnt-gold-2));
    border-color: transparent;
    box-shadow: 0 6px 16px rgba(212, 175, 55, .28);
}
@media (min-width: 768px) {
    .hnt-tabs { justify-content: center; gap: 10px; padding: 14px; }
    .hnt-tab { padding: 10px 20px; font-size: .92rem; }
}

/* ── Body / panes ─────────────────────────────────────────────── */
.hnt-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 16px;
    padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
}
.hnt-pane { display: none; }
.hnt-pane.active {
    display: block;
    animation: hntPaneIn .28s cubic-bezier(.22, 1, .36, 1);
}
@keyframes hntPaneIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.hnt-pane-head { margin-bottom: 14px; }
.hnt-pane-title { font-size: 1.05rem; font-weight: 700; color: #fff; margin: 0 0 4px; }
.hnt-pane-sub { font-size: .82rem; color: var(--hnt-muted); margin: 0; }

/* ── Shipping cards ───────────────────────────────────────────── */
.hnt-ship-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}
@media (min-width: 560px) { .hnt-ship-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .hnt-ship-grid { grid-template-columns: repeat(3, 1fr); } }

.hnt-ship-card {
    background: linear-gradient(160deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .02));
    border: 1px solid var(--hnt-line-soft);
    border-radius: 14px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: border-color .2s ease, transform .2s ease;
}
.hnt-ship-card:hover { border-color: var(--hnt-line); transform: translateY(-2px); }
.hnt-ship-top { display: flex; align-items: center; gap: 10px; }
.hnt-ship-icon {
    width: 38px; height: 38px; flex-shrink: 0;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(212, 175, 55, .14);
    color: var(--hnt-gold);
    font-size: 1rem;
}
.hnt-ship-city { font-weight: 700; font-size: 1rem; color: #fff; line-height: 1.2; }
.hnt-ship-region { font-size: .76rem; color: var(--hnt-muted); }
.hnt-ship-rows { display: flex; flex-direction: column; gap: 7px; }
.hnt-ship-row {
    display: flex; align-items: center; justify-content: space-between;
    font-size: .85rem;
    padding-top: 7px;
    border-top: 1px dashed var(--hnt-line-soft);
}
.hnt-ship-row:first-child { border-top: 0; padding-top: 0; }
.hnt-ship-row .lbl { color: var(--hnt-muted); display: inline-flex; align-items: center; gap: 6px; }
.hnt-ship-row .val { font-weight: 700; color: var(--hnt-text); font-variant-numeric: tabular-nums; }
.hnt-ship-row .val.fee { color: var(--hnt-gold); }
.hnt-ship-free {
    margin-top: 2px;
    font-size: .76rem;
    color: #34d399;
    display: inline-flex; align-items: center; gap: 6px;
}

/* ── FAQ accordion ────────────────────────────────────────────── */
.hnt-faq-search {
    position: relative;
    margin-bottom: 14px;
}
.hnt-faq-search i {
    position: absolute;
    inset-inline-start: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--hnt-muted);
    font-size: .9rem;
}
.hnt-input, .hnt-textarea, .hnt-select {
    width: 100%;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 12px;
    color: var(--hnt-text);
    caret-color: var(--hnt-gold);
    font-family: var(--hnt-font);
    font-size: .92rem;
    padding: 12px 14px;
    transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}
.hnt-faq-search .hnt-input { padding-inline-start: 40px; }
.hnt-input:focus, .hnt-textarea:focus, .hnt-select:focus {
    outline: none;
    border-color: var(--hnt-gold);
    background: rgba(255, 255, 255, .12);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, .15);
}
.hnt-input::placeholder, .hnt-textarea::placeholder { color: rgba(147, 164, 189, .85); }

.hnt-faq-list { display: flex; flex-direction: column; gap: 10px; }
.hnt-faq-item {
    border: 1px solid var(--hnt-line-soft);
    border-radius: 12px;
    background: rgba(255, 255, 255, .03);
    overflow: hidden;
    transition: border-color .2s ease;
}
.hnt-faq-item.open { border-color: var(--hnt-line); }
.hnt-faq-q {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 14px 16px;
    cursor: pointer;
    font-weight: 600;
    font-size: .92rem;
    color: #fff;
    user-select: none;
}
.hnt-faq-q .chev {
    flex-shrink: 0;
    color: var(--hnt-gold);
    transition: transform .3s cubic-bezier(.22, 1, .36, 1);
}
.hnt-faq-item.open .hnt-faq-q .chev { transform: rotate(180deg); }
.hnt-faq-a {
    max-height: 0;
    overflow: hidden;
    transition: max-height .34s cubic-bezier(.22, 1, .36, 1);
}
.hnt-faq-a-inner {
    padding: 0 16px 16px;
    color: var(--hnt-muted);
    font-size: .88rem;
    line-height: 1.8;
}

/* ── Feedback form ────────────────────────────────────────────── */
.hnt-form { display: flex; flex-direction: column; gap: 14px; max-width: 560px; margin: 0 auto; }
.hnt-field { display: flex; flex-direction: column; gap: 6px; }
.hnt-field label { font-size: .85rem; font-weight: 600; color: var(--hnt-text); }
.hnt-field label .req { color: #f87171; }
.hnt-textarea { resize: vertical; min-height: 120px; line-height: 1.7; }
.hnt-field-err { font-size: .78rem; color: #f87171; display: none; }
.hnt-field.invalid .hnt-input,
.hnt-field.invalid .hnt-textarea,
.hnt-field.invalid .hnt-select { border-color: #f87171; }
.hnt-field.invalid .hnt-field-err { display: block; }

.hnt-type-toggle { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hnt-type-opt {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid var(--hnt-line-soft);
    background: rgba(255, 255, 255, .03);
    color: var(--hnt-muted);
    font-weight: 600;
    font-size: .9rem;
    cursor: pointer;
    transition: all .2s ease;
}
.hnt-type-opt i { font-size: 1rem; }
.hnt-type-opt.active {
    color: var(--hnt-navy);
    background: linear-gradient(135deg, var(--hnt-gold), var(--hnt-gold-2));
    border-color: transparent;
}
.hnt-submit {
    margin-top: 4px;
    padding: 14px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--hnt-gold), var(--hnt-gold-2));
    color: var(--hnt-navy);
    font-family: var(--hnt-font);
    font-weight: 700;
    font-size: .98rem;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease;
}
.hnt-submit:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(212, 175, 55, .3); }
.hnt-submit:disabled { opacity: .6; cursor: not-allowed; transform: none; box-shadow: none; }

/* ── Brands grid ──────────────────────────────────────────────── */
.hnt-brand-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}
@media (min-width: 560px) { .hnt-brand-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 768px) { .hnt-brand-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1024px) { .hnt-brand-grid { grid-template-columns: repeat(5, 1fr); } }

.hnt-brand-card {
    aspect-ratio: 1 / 1;
    border: 1px solid var(--hnt-line-soft);
    border-radius: 14px;
    background: rgba(255, 255, 255, .04);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    cursor: pointer;
    text-align: center;
    transition: transform .2s ease, border-color .2s ease, background .2s ease;
}
.hnt-brand-card:hover { transform: translateY(-3px); border-color: var(--hnt-gold); background: rgba(212, 175, 55, .06); }
.hnt-brand-card img {
    max-width: 78%;
    max-height: 60%;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .3));
}
.hnt-brand-logo-fallback {
    width: 54px; height: 54px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--hnt-gold), var(--hnt-gold-2));
    color: var(--hnt-navy);
    font-weight: 800;
    font-size: 1.4rem;
}
.hnt-brand-name { font-size: .8rem; font-weight: 600; color: var(--hnt-text); line-height: 1.2; }

/* Brands → product results view */
.hnt-brand-back {
    display: inline-flex; align-items: center; gap: 8px;
    background: rgba(255, 255, 255, .04);
    border: 1px solid var(--hnt-line-soft);
    color: var(--hnt-text);
    border-radius: 10px;
    padding: 8px 14px;
    font-family: var(--hnt-font);
    font-size: .85rem;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 14px;
    transition: border-color .2s ease, color .2s ease;
}
.hnt-brand-back:hover { border-color: var(--hnt-gold); color: var(--hnt-gold); }

.hnt-prod-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}
@media (min-width: 640px) { .hnt-prod-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px) { .hnt-prod-grid { grid-template-columns: repeat(4, 1fr); } }

.hnt-prod-card {
    border: 1px solid var(--hnt-line-soft);
    border-radius: 14px;
    overflow: hidden;
    background: rgba(255, 255, 255, .03);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    transition: transform .2s ease, border-color .2s ease;
}
.hnt-prod-card:hover { transform: translateY(-3px); border-color: var(--hnt-line); }
.hnt-prod-img {
    width: 100%;
    aspect-ratio: 1 / 1;
    background-size: cover;
    background-position: center;
    background-color: var(--hnt-navy-2);
}
.hnt-prod-info { padding: 10px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.hnt-prod-name {
    font-size: .85rem; font-weight: 600; color: #fff; line-height: 1.3;
    display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.hnt-prod-price { font-size: .9rem; font-weight: 700; color: var(--hnt-gold); font-variant-numeric: tabular-nums; margin-top: auto; }
.hnt-prod-cart {
    margin-top: 4px;
    border: 0;
    border-radius: 9px;
    padding: 8px;
    background: rgba(212, 175, 55, .14);
    color: var(--hnt-gold);
    font-family: var(--hnt-font);
    font-weight: 600;
    font-size: .82rem;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 6px;
    transition: background .2s ease, color .2s ease;
}
.hnt-prod-cart:hover { background: var(--hnt-gold); color: var(--hnt-navy); }

/* ── Skeletons ────────────────────────────────────────────────── */
.hnt-skel {
    background: linear-gradient(100deg, rgba(255, 255, 255, .04) 30%, rgba(255, 255, 255, .1) 50%, rgba(255, 255, 255, .04) 70%);
    background-size: 200% 100%;
    animation: hntShimmer 1.3s infinite linear;
    border-radius: 10px;
}
@keyframes hntShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
.hnt-skel-card { height: 130px; border-radius: 14px; }
.hnt-skel-line { height: 14px; margin-bottom: 8px; }
.hnt-skel-faq { height: 50px; border-radius: 12px; margin-bottom: 10px; }
.hnt-skel-brand { aspect-ratio: 1/1; border-radius: 14px; }

/* ── Empty / error states ─────────────────────────────────────── */
.hnt-empty {
    text-align: center;
    padding: 40px 16px;
    color: var(--hnt-muted);
}
.hnt-empty i { font-size: 2.4rem; color: var(--hnt-line); margin-bottom: 12px; display: block; }
.hnt-empty p { margin: 0; font-size: .92rem; }
.hnt-retry {
    margin-top: 14px;
    background: rgba(212, 175, 55, .14);
    border: 1px solid var(--hnt-line);
    color: var(--hnt-gold);
    border-radius: 10px;
    padding: 9px 18px;
    font-family: var(--hnt-font);
    font-weight: 600;
    cursor: pointer;
}

/* ── Toast ────────────────────────────────────────────────────── */
.hnt-toast-wrap {
    position: fixed;
    bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    inset-inline: 0;
    z-index: 5000;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    pointer-events: none;
    padding: 0 16px;
}
.hnt-toast {
    pointer-events: auto;
    max-width: 420px;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 12px;
    background: var(--hnt-navy-2);
    border: 1px solid var(--hnt-line);
    color: var(--hnt-text);
    font-family: var(--hnt-font);
    font-size: .9rem;
    box-shadow: 0 12px 30px rgba(0, 0, 0, .4);
    transform: translateY(20px);
    opacity: 0;
    transition: transform .3s cubic-bezier(.22, 1, .36, 1), opacity .3s ease;
}
.hnt-toast.show { transform: translateY(0); opacity: 1; }
.hnt-toast .ic { width: 26px; height: 26px; flex-shrink: 0; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: .8rem; }
.hnt-toast.success .ic { background: rgba(52, 211, 153, .18); color: #34d399; }
.hnt-toast.error .ic { background: rgba(248, 113, 113, .18); color: #f87171; }

/* Lock body scroll while overlay is open */
html.hnt-lock, body.hnt-lock { overflow: hidden !important; }
