/* =====================================================================
   hasab Modern Store Theme
   Loaded after the legacy theme (style.css / style-rtl.css).
   Brand color comes from the site settings via --hx-primary (set inline
   in _HeadPartial from site.ColorIn); everything else derives from it.
   ===================================================================== */

:root {
    --hx-primary: var(--color-in, #00a884);
    --hx-primary-dark: color-mix(in srgb, var(--hx-primary) 82%, #000);
    --hx-primary-soft: color-mix(in srgb, var(--hx-primary) 10%, #fff);
    --hx-accent: #ff5a3c;
    --hx-accent-soft: #fff0ec;
    --hx-success: #12a454;
    --hx-danger: #e5383b;
    --hx-warning: #f59f00;

    --hx-bg: #f4f5f9;
    --hx-surface: #ffffff;
    --hx-surface-2: #f8f9fc;
    --hx-border: #e7e9f0;
    --hx-text: #1c2033;
    --hx-text-2: #5b6177;
    --hx-muted: #9298ad;

    --hx-radius-sm: 10px;
    --hx-radius: 16px;
    --hx-radius-lg: 22px;
    --hx-shadow-sm: 0 1px 2px rgba(20, 24, 48, .05), 0 1px 1px rgba(20, 24, 48, .03);
    --hx-shadow: 0 6px 24px -8px rgba(20, 24, 48, .14);
    --hx-shadow-lg: 0 18px 48px -16px rgba(20, 24, 48, .25);

    --hx-header-h: 64px;
    --hx-bottom-nav-h: 64px;
    --hx-container: 1280px;
    --hx-font: iranyekan, "Vazirmatn", Tahoma, sans-serif;
    --hx-ease: cubic-bezier(.2, .7, .2, 1);
}

[data-theme="dark"] {
    --hx-primary-soft: color-mix(in srgb, var(--hx-primary) 18%, #151827);
    --hx-accent-soft: #3a1f1a;
    --hx-bg: #0f1220;
    --hx-surface: #181c2e;
    --hx-surface-2: #1f2438;
    --hx-border: #2a3049;
    --hx-text: #eef0f7;
    --hx-text-2: #b5bad0;
    --hx-muted: #7d849e;
    --hx-shadow: 0 6px 24px -8px rgba(0, 0, 0, .5);
    --hx-shadow-lg: 0 18px 48px -16px rgba(0, 0, 0, .7);
}

/* ---------- Base ---------- */
html, body {
    font-family: var(--hx-font) !important;
    background: var(--hx-bg) !important;
    color: var(--hx-text) !important;
    direction: rtl;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body.hx {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-size: 14px;
    line-height: 1.8;
}

body.hx h1, body.hx h2, body.hx h3, body.hx h4, body.hx h5, body.hx h6 {
    font-family: var(--hx-font) !important;
    color: var(--hx-text);
    font-weight: 700;
    line-height: 1.6;
}

body.hx a { color: inherit; text-decoration: none; transition: color .2s; }
body.hx a:hover { color: var(--hx-primary); }
body.hx img { max-width: 100%; }
body.hx ::selection { background: var(--hx-primary); color: #fff; }

.hx-sr-only {
    position: absolute !important; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; margin: -1px;
}

.hx-skip {
    position: fixed; top: -60px; right: 16px; z-index: 100000;
    background: var(--hx-primary); color: #fff !important; padding: 8px 16px;
    border-radius: var(--hx-radius-sm); transition: top .2s;
}
.hx-skip:focus { top: 12px; }

body.hx :focus-visible { outline: 3px solid color-mix(in srgb, var(--hx-primary) 55%, transparent); outline-offset: 2px; }

.hx-container {
    width: 100%;
    max-width: var(--hx-container);
    margin-inline: auto;
    padding-inline: 16px;
}

.hx-main {
    flex: 1 0 auto;
    padding-bottom: calc(var(--hx-bottom-nav-h) + 24px + env(safe-area-inset-bottom));
}

/* legacy wrapper used by unchanged pages */
body.hx .page-content-wrapper { margin: 0 !important; }
body.hx .container { max-width: var(--hx-container); }

@media (min-width: 992px) {
    .hx-main { padding-bottom: 48px; }
}

/* ---------- Buttons ---------- */
.hx-btn, body.hx .btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    font-family: var(--hx-font) !important;
    font-weight: 700; font-size: 14px; line-height: 1.4;
    border-radius: 12px !important;
    padding: 10px 18px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background .2s, color .2s, box-shadow .2s, transform .15s var(--hx-ease);
    white-space: nowrap;
}
.hx-btn:active, body.hx .btn:active { transform: scale(.97); }
body.hx .btn-sm { padding: 6px 12px; font-size: 12.5px; }

.hx-btn--primary, body.hx .btn-success, body.hx .btn-primary {
    background: var(--hx-primary) !important; border-color: var(--hx-primary) !important; color: #fff !important;
    box-shadow: 0 8px 18px -10px var(--hx-primary);
}
.hx-btn--primary:hover, body.hx .btn-success:hover, body.hx .btn-primary:hover {
    background: var(--hx-primary-dark) !important; color: #fff !important;
}
.hx-btn--accent, body.hx .btn-warning {
    background: var(--hx-accent) !important; border-color: var(--hx-accent) !important; color: #fff !important;
    box-shadow: 0 8px 18px -10px var(--hx-accent);
}
.hx-btn--accent:hover, body.hx .btn-warning:hover { filter: brightness(.94); color: #fff !important; }
body.hx .btn-danger { background: var(--hx-danger) !important; border-color: var(--hx-danger) !important; color: #fff !important; }
.hx-btn--ghost {
    background: var(--hx-surface); color: var(--hx-text) !important; border-color: var(--hx-border);
}
.hx-btn--ghost:hover { border-color: var(--hx-primary); color: var(--hx-primary) !important; }
.hx-btn--soft { background: var(--hx-primary-soft); color: var(--hx-primary) !important; }
.hx-btn--block { width: 100%; }
.hx-btn--lg { padding: 14px 22px; font-size: 15.5px; border-radius: 14px !important; }
.hx-btn[disabled], body.hx .btn[disabled] { opacity: .6; pointer-events: none; }

/* ---------- Forms ---------- */
body.hx .form-control, body.hx select.form-control, body.hx textarea.form-control {
    font-family: var(--hx-font) !important;
    background: var(--hx-surface-2) !important;
    color: var(--hx-text) !important;
    border: 1.5px solid var(--hx-border) !important;
    border-radius: 12px !important;
    min-height: 46px;
    padding: 10px 14px;
    font-size: 14px;
    box-shadow: none !important;
    transition: border-color .2s, background .2s, box-shadow .2s;
}
body.hx textarea.form-control { min-height: 120px; }
body.hx .form-control:focus {
    border-color: var(--hx-primary) !important;
    background: var(--hx-surface) !important;
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--hx-primary) 14%, transparent) !important;
}
body.hx .form-control::placeholder { color: var(--hx-muted); }
.hx-label { display: block; font-size: 13px; font-weight: 700; color: var(--hx-text-2); margin-bottom: 6px; }
.hx-label .req { color: var(--hx-danger); }
.hx-field { margin-bottom: 14px; }
.ltr { direction: ltr; text-align: left; }

/* ---------- Cards / sections ---------- */
.hx-panel {
    background: var(--hx-surface);
    border: 1px solid var(--hx-border);
    border-radius: var(--hx-radius);
    box-shadow: var(--hx-shadow-sm);
    padding: 20px;
}
.hx-panel + .hx-panel { margin-top: 16px; }
.hx-panel__title {
    display: flex; align-items: center; gap: 10px;
    font-size: 16px; font-weight: 800; margin: 0 0 16px;
}
.hx-panel__title .hx-num {
    width: 28px; height: 28px; border-radius: 50%;
    display: inline-grid; place-items: center;
    background: var(--hx-primary); color: #fff; font-size: 13px;
}

body.hx .card {
    background: var(--hx-surface) !important;
    border: 1px solid var(--hx-border) !important;
    border-radius: var(--hx-radius) !important;
    box-shadow: var(--hx-shadow-sm) !important;
}

.hx-section { padding-block: 22px; }
.hx-section__head {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    margin-bottom: 16px;
}
.hx-section__title {
    position: relative; margin: 0; font-size: 18px; font-weight: 800;
    padding-right: 14px;
}
.hx-section__title::before {
    content: ""; position: absolute; right: 0; top: 50%; translate: 0 -50%;
    width: 5px; height: 70%; border-radius: 4px; background: var(--hx-primary);
}
.hx-section__more {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 13px; font-weight: 700; color: var(--hx-primary) !important;
}
.hx-section__more i { font-size: 11px; }

@media (min-width: 768px) {
    .hx-section { padding-block: 32px; }
    .hx-section__title { font-size: 21px; }
}

/* ---------- Topbar ---------- */
.hx-topbar {
    background: linear-gradient(90deg, var(--hx-primary-dark), var(--hx-primary));
    color: #fff; font-size: 12.5px;
}
.hx-topbar .hx-container { display: flex; align-items: center; justify-content: center; gap: 16px; min-height: 34px; }
.hx-topbar a { color: #fff !important; font-weight: 700; }

/* ---------- Header ---------- */
.hx-header {
    position: sticky; top: 0; z-index: 1030;
    background: color-mix(in srgb, var(--hx-surface) 92%, transparent);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid var(--hx-border);
    transition: box-shadow .25s;
}
.hx-header.is-scrolled { box-shadow: var(--hx-shadow); }

.hx-header__row {
    display: flex; align-items: center; gap: 12px;
    min-height: var(--hx-header-h);
}
.hx-iconbtn {
    position: relative;
    width: 42px; height: 42px; flex: none;
    display: inline-grid; place-items: center;
    border-radius: 12px; border: 0;
    background: var(--hx-surface-2); color: var(--hx-text) !important;
    font-size: 20px; cursor: pointer;
    transition: background .2s, color .2s;
}
.hx-iconbtn:hover { background: var(--hx-primary-soft); color: var(--hx-primary) !important; }
.hx-badge {
    position: absolute; top: -4px; left: -4px;
    min-width: 20px; height: 20px; padding: 0 5px;
    border-radius: 10px; background: var(--hx-accent); color: #fff;
    font-size: 11px; font-weight: 800; line-height: 20px; text-align: center;
    border: 2px solid var(--hx-surface);
}
.hx-badge:empty, .hx-badge[data-count="0"] { display: none; }

.hx-logo { display: inline-flex; align-items: center; gap: 10px; flex: none; }
.hx-logo img { height: 40px; width: auto; max-width: 140px; object-fit: contain; }
.hx-logo .logo-dark-img { display: none; }
[data-theme="dark"] .hx-logo .logo-light-img { display: none; }
[data-theme="dark"] .hx-logo .logo-dark-img { display: block; }
.hx-logo__text { font-weight: 900; font-size: 18px; color: var(--hx-text); }

.hx-search { position: relative; flex: 1 1 auto; max-width: 620px; }
.hx-search input {
    width: 100%; height: 46px;
    border: 1.5px solid transparent; border-radius: 14px;
    background: var(--hx-surface-2); color: var(--hx-text);
    padding: 0 46px 0 14px; font-family: var(--hx-font); font-size: 14px;
    transition: border-color .2s, background .2s, box-shadow .2s;
}
.hx-search input:focus {
    outline: none; background: var(--hx-surface);
    border-color: var(--hx-primary);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--hx-primary) 14%, transparent);
}
.hx-search button {
    position: absolute; right: 4px; top: 4px; width: 38px; height: 38px;
    border: 0; border-radius: 10px; background: transparent; color: var(--hx-muted);
    font-size: 16px; cursor: pointer;
}
.hx-search ul.typeahead { width: 100%; border-radius: 12px; border: 1px solid var(--hx-border); box-shadow: var(--hx-shadow); padding: 6px; }

.hx-header__actions { display: flex; align-items: center; gap: 8px; margin-inline-start: auto; }
.hx-account-btn {
    display: inline-flex; align-items: center; gap: 8px;
    height: 42px; padding: 0 14px; border-radius: 12px;
    border: 1.5px solid var(--hx-border); background: var(--hx-surface);
    font-weight: 700; font-size: 13px; color: var(--hx-text) !important; cursor: pointer;
}
.hx-account-btn i { font-size: 18px; }
.hx-account-btn:hover { border-color: var(--hx-primary); color: var(--hx-primary) !important; }

.hx-header__mobile-search { display: none; padding-bottom: 12px; }

.hx-nav { border-top: 1px solid var(--hx-border); }
.hx-nav ul { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; min-height: 46px; }
.hx-nav a {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 12px; border-radius: 10px;
    font-size: 13.5px; font-weight: 700; color: var(--hx-text-2) !important;
}
.hx-nav a:hover, .hx-nav a.is-active { color: var(--hx-primary) !important; background: var(--hx-primary-soft); }
.hx-nav__end { margin-inline-start: auto; }
.hx-nav__end a { color: var(--hx-primary) !important; }

.hx-only-mobile { display: none !important; }

@media (max-width: 991.98px) {
    .hx-nav, .hx-only-desktop { display: none !important; }
    .hx-only-mobile { display: inline-grid !important; }
    .hx-header__row { min-height: 58px; gap: 8px; }
    .hx-header__row > .hx-search { display: none; }
    .hx-header__mobile-search { display: block; }
    .hx-search { max-width: none; }
    .hx-logo img { height: 34px; }
    .hx-header__actions .hx-account-btn span { display: none; }
    .hx-header__actions .hx-account-btn { width: 42px; padding: 0; justify-content: center; }
}

/* ---------- Drawer (side navigation) ---------- */
.hx-overlay {
    position: fixed; inset: 0; z-index: 1040;
    background: rgba(10, 12, 25, .45);
    opacity: 0; visibility: hidden; transition: opacity .25s, visibility .25s;
}
.hx-overlay.active { opacity: 1; visibility: visible; }

.hx-drawer {
    position: fixed; top: 0; bottom: 0; right: 0; z-index: 1050;
    width: min(320px, 86vw);
    background: var(--hx-surface);
    box-shadow: var(--hx-shadow-lg);
    transform: translateX(105%);
    transition: transform .3s var(--hx-ease);
    display: flex; flex-direction: column;
    overflow-y: auto;
}
.hx-drawer.nav-active { transform: translateX(0); }
.hx-drawer__head {
    padding: 20px; color: #fff;
    background: linear-gradient(135deg, var(--hx-primary), var(--hx-primary-dark));
    position: relative;
}
.hx-drawer__head h6, .hx-drawer__head p { color: #fff !important; margin: 0; }
.hx-drawer__close {
    position: absolute; top: 14px; left: 14px;
    width: 36px; height: 36px; border-radius: 10px; border: 0;
    background: rgba(255, 255, 255, .18); color: #fff; font-size: 16px; cursor: pointer;
}
.hx-drawer__user { display: flex; align-items: center; gap: 12px; margin-top: 4px; }
.hx-drawer__avatar {
    width: 52px; height: 52px; border-radius: 50%; flex: none;
    display: grid; place-items: center;
    background: rgba(255, 255, 255, .2); font-size: 24px;
}
.hx-drawer__wallet {
    margin-top: 14px; display: flex; align-items: center; justify-content: space-between;
    background: rgba(255, 255, 255, .14); border-radius: 12px; padding: 10px 12px; font-size: 13px;
}
.hx-drawer__wallet a { color: #fff !important; font-weight: 800; }
.hx-drawer__body { padding: 10px; flex: 1; }
.hx-drawer__label { font-size: 12px; color: var(--hx-muted); font-weight: 700; padding: 12px 12px 6px; }
.hx-drawer ul { list-style: none; margin: 0; padding: 0; }
.hx-drawer li a {
    display: flex; align-items: center; gap: 12px;
    padding: 11px 12px; border-radius: 12px;
    font-weight: 700; font-size: 14px; color: var(--hx-text) !important;
}
.hx-drawer li a i { font-size: 18px; width: 22px; text-align: center; color: var(--hx-text-2); }
.hx-drawer li a:hover { background: var(--hx-primary-soft); color: var(--hx-primary) !important; }
.hx-drawer li a:hover i { color: var(--hx-primary); }
.hx-drawer li a .hx-pill { margin-inline-start: auto; }
.hx-drawer__foot { padding: 14px 20px 24px; border-top: 1px solid var(--hx-border); }

.hx-pill {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 22px; height: 22px; padding: 0 7px; border-radius: 11px;
    background: var(--hx-accent); color: #fff; font-size: 11.5px; font-weight: 800;
}
.hx-pill.hide { display: none; }

/* theme switch */
.hx-switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-weight: 700; }
.hx-switch input { appearance: none; -webkit-appearance: none; width: 46px; height: 26px; border-radius: 13px; background: var(--hx-border); position: relative; cursor: pointer; transition: background .2s; margin: 0; }
.hx-switch input::after { content: ""; position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: right .2s var(--hx-ease); }
.hx-switch input:checked { background: var(--hx-primary); }
.hx-switch input:checked::after { right: 23px; }

/* ---------- Bottom navigation (mobile) ---------- */
.hx-bottom-nav {
    position: fixed; bottom: 0; right: 0; left: 0; z-index: 1020;
    background: color-mix(in srgb, var(--hx-surface) 94%, transparent);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid var(--hx-border);
    padding-bottom: env(safe-area-inset-bottom);
    box-shadow: 0 -6px 24px -12px rgba(20, 24, 48, .18);
}
.hx-bottom-nav ul { display: flex; list-style: none; margin: 0; padding: 0; height: var(--hx-bottom-nav-h); }
.hx-bottom-nav li { flex: 1; }
.hx-bottom-nav a {
    position: relative; height: 100%;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    font-size: 11px; font-weight: 700; color: var(--hx-muted) !important;
}
.hx-bottom-nav a i { font-size: 21px; line-height: 1; transition: transform .2s var(--hx-ease); }
.hx-bottom-nav li.active a { color: var(--hx-primary) !important; }
.hx-bottom-nav li.active a i { transform: translateY(-2px); }
.hx-bottom-nav li.active a::before {
    content: ""; position: absolute; top: 0; width: 28px; height: 3px; border-radius: 0 0 4px 4px; background: var(--hx-primary);
}
.hx-bottom-nav .hx-badge { top: 6px; left: calc(50% - 22px); }

@media (min-width: 992px) {
    .hx-bottom-nav { display: none; }
}

/* ---------- Footer ---------- */
.hx-footer {
    flex: none;
    background: var(--hx-surface);
    border-top: 1px solid var(--hx-border);
    margin-top: 32px;
    padding-bottom: calc(var(--hx-bottom-nav-h) + env(safe-area-inset-bottom));
}
@media (min-width: 992px) { .hx-footer { padding-bottom: 0; } }

.hx-features {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px;
    padding-block: 24px; border-bottom: 1px solid var(--hx-border);
}
.hx-feature { display: flex; align-items: center; gap: 12px; }
.hx-feature__icon {
    width: 46px; height: 46px; flex: none; border-radius: 14px;
    display: grid; place-items: center; font-size: 20px;
    background: var(--hx-primary-soft); color: var(--hx-primary);
}
.hx-feature b { display: block; font-size: 13.5px; }
.hx-feature span { font-size: 12px; color: var(--hx-muted); }
@media (min-width: 768px) { .hx-features { grid-template-columns: repeat(4, 1fr); gap: 20px; } }

.hx-footer__grid {
    display: grid; grid-template-columns: 1fr; gap: 28px; padding-block: 32px;
}
@media (min-width: 768px) { .hx-footer__grid { grid-template-columns: 1.6fr 1fr 1fr 1.3fr; } }
.hx-footer h2 { font-size: 15px; font-weight: 800; margin: 0 0 14px; }
.hx-footer p { color: var(--hx-text-2); font-size: 13px; margin: 0 0 8px; }
.hx-footer ul { list-style: none; padding: 0; margin: 0; }
.hx-footer li { margin-bottom: 8px; }
.hx-footer li a { color: var(--hx-text-2) !important; font-size: 13.5px; }
.hx-footer li a:hover { color: var(--hx-primary) !important; }
.hx-contact-line { display: flex; align-items: flex-start; gap: 10px; color: var(--hx-text-2); font-size: 13.5px; margin-bottom: 10px; }
.hx-contact-line i { color: var(--hx-primary); margin-top: 5px; }
.hx-social { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.hx-social a {
    width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
    background: var(--hx-surface-2); border: 1px solid var(--hx-border);
}
.hx-social img { width: 22px; height: 22px; object-fit: contain; }
.hx-trust { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.hx-trust > * { background: var(--hx-surface-2); border: 1px solid var(--hx-border); border-radius: 12px; padding: 6px; }
.hx-trust img { max-height: 80px; width: auto; }
.hx-copy {
    border-top: 1px solid var(--hx-border);
    padding-block: 16px; text-align: center; font-size: 12.5px; color: var(--hx-muted);
}

/* ---------- Hero slider ---------- */
.hx-hero { padding-top: 16px; }
.hx-hero .hero-slides { border-radius: var(--hx-radius-lg); overflow: hidden; box-shadow: var(--hx-shadow); }
.hx-hero .single-hero-slide {
    position: relative;
    height: clamp(180px, 42vw, 440px);
    background-size: cover; background-position: center;
    background-color: var(--hx-surface-2);
}
.hx-hero .single-hero-slide::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(270deg, rgba(0, 0, 0, .55), rgba(0, 0, 0, 0) 65%);
}
.hx-hero .slide-content { position: relative; z-index: 2; }
.hx-hero .slide-content h2 { color: #fff !important; font-size: clamp(18px, 3.4vw, 38px); font-weight: 900; margin-bottom: 6px; }
.hx-hero .slide-content p { color: rgba(255, 255, 255, .9) !important; max-width: 520px; font-size: clamp(12px, 1.5vw, 16px); }
.hx-hero .owl-dots { position: absolute; bottom: 14px; left: 0; right: 0; display: flex; justify-content: center; gap: 6px; }
.hx-hero .owl-dot, .hx-gallery .owl-dot { border: 0 !important; background: none !important; outline: 0; padding: 0 !important; }
.hx-hero .owl-dot span { display: block; width: 8px; height: 8px; border-radius: 4px; background: rgba(255, 255, 255, .6) !important; transition: width .3s; margin: 0 !important; }
.hx-hero .owl-dot.active span { width: 24px; background: #fff !important; }
.hx-hero .owl-nav button {
    position: absolute; top: 50%; translate: 0 -50%;
    width: 42px; height: 42px; border-radius: 50% !important;
    background: rgba(255, 255, 255, .85) !important; color: #111 !important; font-size: 16px !important;
}
.hx-hero .owl-nav .owl-prev { left: 14px; }
.hx-hero .owl-nav .owl-next { right: 14px; }
@media (max-width: 767.98px) { .hx-hero .owl-nav { display: none; } }

/* ---------- Category chips ---------- */
.hx-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 10px; }
@media (max-width: 575.98px) { .hx-cats { grid-template-columns: repeat(2, 1fr); } }
.hx-cat {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 14px; border-radius: 14px;
    background: var(--hx-surface); border: 1px solid var(--hx-border);
    font-weight: 700; font-size: 13.5px; color: var(--hx-text) !important;
    transition: transform .2s var(--hx-ease), border-color .2s, box-shadow .2s;
}
.hx-cat__icon {
    width: 36px; height: 36px; flex: none; border-radius: 10px;
    display: grid; place-items: center; font-size: 16px;
    background: var(--hx-primary-soft); color: var(--hx-primary);
}
.hx-cat:hover { transform: translateY(-2px); border-color: var(--hx-primary); box-shadow: var(--hx-shadow); color: var(--hx-primary) !important; }

/* ---------- Product grid & card ---------- */
.hx-grid {
    display: grid; gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (min-width: 640px) { .hx-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } }
@media (min-width: 992px) { .hx-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .hx-grid--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.hx-grid > .hx-grid__msg, .hx-grid > #btnNew { grid-column: 1 / -1; }
.hx-grid > #btnNew { display: flex; justify-content: center; }
.hx-grid > #btnNew > * { flex: none; max-width: none; width: auto; }

.hx-card {
    position: relative;
    display: flex; flex-direction: column;
    background: var(--hx-surface);
    border: 1px solid var(--hx-border);
    border-radius: var(--hx-radius);
    overflow: hidden;
    height: 100%;
    transition: transform .25s var(--hx-ease), box-shadow .25s, border-color .25s;
}
.hx-card:hover { transform: translateY(-4px); box-shadow: var(--hx-shadow-lg); border-color: transparent; }

.hx-card__media {
    position: relative; display: block; margin: 0 !important; border-radius: 0 !important;
    aspect-ratio: 1 / 1;
    background: var(--hx-surface-2);
    overflow: hidden;
}
.hx-card__media img {
    width: 100%; height: 100%; object-fit: contain; padding: 10px;
    transition: transform .5s var(--hx-ease);
}
.hx-card:hover .hx-card__media img { transform: scale(1.06); }

.hx-card__badges { position: absolute; top: 10px; right: 10px; z-index: 2; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.hx-tag {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 9px; border-radius: 8px;
    font-size: 11.5px; font-weight: 800; line-height: 1.6;
    background: var(--hx-accent); color: #fff;
}
.hx-tag--new { background: var(--hx-warning); }
.hx-tag--soft { background: var(--hx-primary-soft); color: var(--hx-primary); }
.hx-tag.hide { display: none !important; }

.hx-card .wishlist-btn, .hx-wish {
    position: absolute !important; top: 10px !important; left: 10px !important; bottom: auto !important; right: auto !important; z-index: 3;
    width: 36px; height: 36px; border-radius: 50%;
    display: grid !important; place-items: center;
    background: color-mix(in srgb, var(--hx-surface) 90%, transparent);
    box-shadow: var(--hx-shadow-sm);
    color: var(--hx-danger); font-size: 17px; cursor: pointer;
    border: 0 !important; padding: 0; margin: 0;
    transition: transform .2s var(--hx-ease);
}
.hx-card .wishlist-btn:hover { transform: scale(1.1); }
.hx-card .wishlist-btn i { color: var(--hx-danger) !important; }

.hx-card__body { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px 14px; flex: 1; }
.hx-card__title {
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    font-size: 13.5px; font-weight: 700; line-height: 1.75; min-height: calc(1.75em * 2);
    color: var(--hx-text) !important; margin: 0;
}
.hx-card__meta { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--hx-muted); }
.hx-card__meta i { font-size: 13px; }
.hx-card__meta .hx-stars i { color: #ffb400; }
.hx-card__foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; margin-top: auto; }
.hx-card .sale-price, .hx-price {
    margin: 0 !important; padding: 0 !important;
    font-size: 15px; font-weight: 900; color: var(--hx-text) !important; line-height: 1.5;
}
.hx-card .sale-price.text-danger { color: var(--hx-danger) !important; font-size: 13px; }
.hx-card .sale-price del, .hx-card .sale-price span[style*="line-through"] { display: block; font-size: 12px; font-weight: 400; color: var(--hx-muted); }
.hx-card .sale-price + .sale-price { font-size: 12.5px; color: var(--hx-text-2) !important; font-weight: 700; }
.hx-card__cart {
    width: 40px; height: 40px; flex: none; border-radius: 12px;
    display: grid !important; place-items: center;
    background: var(--hx-primary); color: #fff !important; font-size: 18px;
    box-shadow: 0 8px 16px -8px var(--hx-primary);
    transition: transform .2s var(--hx-ease), background .2s;
}
.hx-card__cart:hover { background: var(--hx-primary-dark); transform: scale(1.06); }
.hx-card__cart.hide { display: none !important; }

/* horizontal card for lists */
.hx-card--row { flex-direction: row; }
.hx-card--row .hx-card__media { width: 38%; flex: none; aspect-ratio: auto; }

/* horizontal scroll rail (replaces owl on cards) */
.hx-rail {
    display: grid; grid-auto-flow: column;
    grid-auto-columns: minmax(170px, 44%);
    gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory;
    padding: 4px 2px 14px; margin-inline: -2px;
    scrollbar-width: thin;
}
.hx-rail > * { scroll-snap-align: start; }
.hx-rail::-webkit-scrollbar { height: 6px; }
.hx-rail::-webkit-scrollbar-thumb { background: var(--hx-border); border-radius: 3px; }
@media (min-width: 640px) { .hx-rail { grid-auto-columns: minmax(200px, 30%); gap: 16px; } }
@media (min-width: 992px) { .hx-rail { grid-auto-columns: calc((100% - 4 * 16px) / 5); } }

.hx-rail-wrap { position: relative; }
.hx-rail-btn {
    position: absolute; top: 40%; z-index: 4;
    width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--hx-border);
    background: var(--hx-surface); color: var(--hx-text); box-shadow: var(--hx-shadow);
    display: none; place-items: center; cursor: pointer;
}
.hx-rail-btn--prev { right: -14px; }
.hx-rail-btn--next { left: -14px; }
@media (min-width: 992px) { .hx-rail-btn { display: grid; } }

/* special band */
.hx-band {
    border-radius: var(--hx-radius-lg);
    padding: 20px;
    background: linear-gradient(135deg, var(--hx-primary), var(--hx-primary-dark));
    color: #fff;
}
.hx-band .hx-section__title { color: #fff; }
.hx-band .hx-section__title::before { background: #fff; }
.hx-band .hx-section__more { color: #fff !important; }

/* brands */
.hx-brands { display: grid; grid-auto-flow: column; grid-auto-columns: 120px; gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.hx-brand {
    height: 84px; border-radius: 14px; display: grid; place-items: center; padding: 12px;
    background: var(--hx-surface); border: 1px solid var(--hx-border);
    filter: grayscale(.6); transition: filter .2s, border-color .2s;
}
.hx-brand:hover { filter: none; border-color: var(--hx-primary); }
.hx-brand img { max-height: 56px; object-fit: contain; }

.hx-banner img { width: 100%; border-radius: var(--hx-radius-lg); box-shadow: var(--hx-shadow-sm); }
.hx-value { text-align: center; }
.hx-value h1, .hx-value h2 { font-size: clamp(18px, 2.6vw, 28px); font-weight: 900; }

/* ---------- Breadcrumb ---------- */
.hx-breadcrumb { padding-block: 14px 4px; font-size: 12.5px; color: var(--hx-muted); }
.hx-breadcrumb ol { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; list-style: none; margin: 0; padding: 0; }
.hx-breadcrumb li + li::before { content: "\f104"; font-family: FontAwesome; margin-left: 6px; font-size: 11px; }
.hx-breadcrumb a { color: var(--hx-text-2) !important; }
.hx-breadcrumb a:hover { color: var(--hx-primary) !important; }

/* ---------- Toolbar (listing filters) ---------- */
.hx-toolbar {
    display: grid; gap: 10px; grid-template-columns: 1fr 1fr;
    background: var(--hx-surface); border: 1px solid var(--hx-border);
    border-radius: var(--hx-radius); padding: 12px; margin-bottom: 16px;
}
.hx-toolbar .hx-toolbar__search { grid-column: 1 / -1; position: relative; }
.hx-toolbar .hx-toolbar__search button { position: absolute; left: 5px; top: 5px; height: 36px; width: 40px; padding: 0; }
.hx-toolbar .hx-switch { grid-column: 1 / -1; font-size: 13px; padding-inline: 4px; }
@media (min-width: 768px) {
    .hx-toolbar { grid-template-columns: 2fr 1fr 1fr auto; align-items: center; }
    .hx-toolbar .hx-toolbar__search { grid-column: auto; }
    .hx-toolbar .hx-switch { grid-column: auto; }
}

.hx-page-head { padding-block: 18px 6px; }
.hx-page-head h1 { font-size: clamp(20px, 2.4vw, 28px); font-weight: 900; margin: 0; }
.hx-page-head p { color: var(--hx-text-2); margin: 4px 0 0; }

.hx-cover {
    border-radius: var(--hx-radius-lg); overflow: hidden; margin-top: 14px;
    height: clamp(120px, 22vw, 260px); background-size: cover; background-position: center;
    background-color: var(--hx-surface-2);
}

/* ---------- Product page ---------- */
.hx-product { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; padding-top: 6px; }
@media (min-width: 992px) {
    .hx-product { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr) 340px; align-items: start; gap: 24px; }
}

.hx-gallery { position: relative; background: var(--hx-surface); border: 1px solid var(--hx-border); border-radius: var(--hx-radius-lg); overflow: hidden; }
.hx-gallery .owl-carousel:not(.owl-loaded) { display: block; }
.hx-gallery .owl-carousel:not(.owl-loaded) .product-slide ~ .product-slide { display: none; }
.hx-gallery .product-slide { aspect-ratio: 1 / 1; height: auto !important; background-size: contain !important; background-repeat: no-repeat; background-position: center; background-color: var(--hx-surface); }
.hx-gallery .owl-dots { position: absolute; bottom: 12px; left: 0; right: 0; display: flex; justify-content: center; gap: 6px; }
.hx-gallery .owl-dot span { display: block; width: 8px; height: 8px; border-radius: 4px; background: var(--hx-border) !important; margin: 0 !important; transition: width .3s; }
.hx-gallery .owl-dot.active span { width: 22px; background: var(--hx-primary) !important; }
.hx-gallery .owl-nav button { position: absolute; top: 50%; translate: 0 -50%; width: 40px; height: 40px; border-radius: 50% !important; background: var(--hx-surface) !important; box-shadow: var(--hx-shadow); }
.hx-gallery .owl-nav .owl-prev { left: 12px; }
.hx-gallery .owl-nav .owl-next { right: 12px; }
.hx-gallery__tools { position: absolute; top: 12px; left: 12px; z-index: 5; display: flex; flex-direction: column; gap: 8px; }
.hx-gallery__tools > * {
    width: 42px; height: 42px; border-radius: 50%; border: 0; cursor: pointer;
    display: grid; place-items: center; font-size: 18px;
    background: var(--hx-surface); box-shadow: var(--hx-shadow); color: var(--hx-text);
}
.hx-gallery__tools .wishlist-btn { color: var(--hx-danger); }

.hx-pinfo h1 { font-size: clamp(18px, 2vw, 24px); font-weight: 900; line-height: 1.7; margin: 0 0 8px; }
.hx-pinfo__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; color: var(--hx-muted); font-size: 12.5px; margin-bottom: 16px; }
.hx-pinfo__meta i { margin-left: 3px; }
.hx-pinfo__meta .hx-stars i { color: #ffb400; margin: 0; }
.hx-sku { background: var(--hx-surface-2); border: 1px solid var(--hx-border); padding: 2px 10px; border-radius: 8px; }

.hx-options { margin-bottom: 18px; }
.hx-options__title { font-weight: 800; font-size: 14px; margin-bottom: 10px; }
.hx-options__list { display: flex; flex-wrap: wrap; gap: 8px; }
.hx-opt { position: relative; }
.hx-opt input { position: absolute; opacity: 0; inset: 0; cursor: pointer; margin: 0 !important; }
.hx-opt label {
    display: inline-flex; align-items: center; gap: 8px;
    min-height: 40px; padding: 6px 14px; border-radius: 12px; cursor: pointer;
    border: 1.5px solid var(--hx-border); background: var(--hx-surface);
    font-size: 13px; font-weight: 700; transition: border-color .2s, box-shadow .2s;
}
.hx-opt .hx-swatch { width: 20px; height: 20px; border-radius: 50%; border: 1px solid rgba(0,0,0,.12); }
.hx-opt input:checked + label { border-color: var(--hx-primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--hx-primary) 18%, transparent); color: var(--hx-primary); }

.hx-highlights { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.hx-highlights li { display: flex; gap: 8px; font-size: 13px; color: var(--hx-text-2); }
.hx-highlights li b { color: var(--hx-text); }

/* buy box */
.hx-buybox { position: relative; }
@media (min-width: 992px) { .hx-buybox { position: sticky; top: calc(var(--hx-header-h) + 60px); } }
.hx-buybox .hx-panel { padding: 18px; }
.hx-buybox__price-label { font-size: 12.5px; color: var(--hx-muted); margin: 0 !important; }
.hx-buybox .s-price { font-size: 22px !important; font-weight: 900; color: var(--hx-text) !important; margin: 4px 0 0 !important; padding: 0 !important; }
.hx-buybox .s-price del, .hx-buybox .s-price span[style*="line-through"] { font-size: 13px; color: var(--hx-muted); font-weight: 400; }
.hx-stock { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--hx-success); margin: 12px 0 !important; }
.hx-stock:empty { display: none; }
.hx-stock::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 18%, transparent); }
.hx-perks { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 10px; border-top: 1px dashed var(--hx-border); padding-top: 14px; }
.hx-perks li { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--hx-text-2); }
.hx-perks i { color: var(--hx-primary); font-size: 16px; width: 18px; text-align: center; }

.hx-qty {
    display: inline-flex; align-items: center;
    border: 1.5px solid var(--hx-border); border-radius: 12px; background: var(--hx-surface);
    height: 44px; overflow: hidden;
}
.hx-qty .quantity-button-handler {
    width: 40px; height: 100%; display: grid; place-items: center; cursor: pointer;
    font-size: 18px; font-weight: 800; color: var(--hx-primary) !important; user-select: none;
    background: transparent !important; border: 0 !important; margin: 0 !important; padding: 0 !important;
}
.hx-qty .quantity-button-handler:hover { background: var(--hx-primary-soft) !important; }
.hx-qty input.cart-quantity-input {
    width: 44px !important; min-height: 0 !important; height: 100% !important; border: 0 !important;
    background: transparent !important; text-align: center; font-weight: 800; padding: 0 !important;
    box-shadow: none !important; border-radius: 0 !important;
}
.hx-qty .fa-trash { font-size: 15px; }

.hx-buy-row { display: flex; gap: 10px; align-items: center; margin-top: 14px; }
.hx-buy-row .add2cart-notify { flex: 1; }

/* mobile sticky buy bar */
@media (max-width: 991.98px) {
    .hx-buybar {
        position: fixed; right: 0; left: 0; bottom: calc(var(--hx-bottom-nav-h) + env(safe-area-inset-bottom)); z-index: 1019;
        background: var(--hx-surface); border-top: 1px solid var(--hx-border);
        box-shadow: 0 -8px 24px -12px rgba(20, 24, 48, .2);
        padding: 10px 16px;
        display: flex; align-items: center; gap: 12px;
    }
    .hx-buybar .hx-buybar__price { flex: none; display: flex; flex-direction: column; }
    .hx-buybar .s-price { font-size: 17px !important; }
    .hx-buybar .add2cart-notify { flex: 1; }
    .hx-has-buybar .hx-main { padding-bottom: calc(var(--hx-bottom-nav-h) + 110px); }
}

.hx-tabs { position: sticky; top: var(--hx-header-h); z-index: 5; display: flex; gap: 4px; overflow-x: auto; background: var(--hx-surface); border: 1px solid var(--hx-border); border-radius: var(--hx-radius); padding: 6px; margin-block: 24px 16px; }
@media (max-width: 991.98px) { .hx-tabs { top: 58px; } }
.hx-tabs a { flex: none; padding: 8px 16px; border-radius: 10px; font-weight: 700; font-size: 13.5px; color: var(--hx-text-2) !important; }
.hx-tabs a:hover, .hx-tabs a.is-active { background: var(--hx-primary-soft); color: var(--hx-primary) !important; }
.hx-anchor { scroll-margin-top: calc(var(--hx-header-h) + 80px); }

.hx-specs { width: 100%; border-collapse: separate; border-spacing: 0; }
.hx-specs caption { caption-side: top; text-align: right; font-weight: 800; color: var(--hx-text); padding: 12px 0 8px; }
.hx-specs th, .hx-specs td { padding: 11px 12px; font-size: 13.5px; border-bottom: 1px solid var(--hx-border); vertical-align: top; text-align: right; }
.hx-specs th { width: 38%; color: var(--hx-muted); font-weight: 700; }
.hx-specs tr:last-child th, .hx-specs tr:last-child td { border-bottom: 0; }

.hx-prose { font-size: 14.5px; line-height: 2.1; color: var(--hx-text-2); }
.hx-prose img { border-radius: var(--hx-radius); height: auto; }
.hx-prose h2, .hx-prose h3 { margin-top: 1.2em; }

/* reviews */
.hx-stars-input { display: inline-flex; flex-direction: row-reverse; gap: 4px; }
.hx-stars-input input { display: none; }
.hx-stars-input label { font-size: 26px; color: var(--hx-border); cursor: pointer; transition: color .15s, transform .15s; }
.hx-stars-input label::before { content: "\f005"; font-family: FontAwesome; }
.hx-stars-input input:checked ~ label, .hx-stars-input label:hover, .hx-stars-input label:hover ~ label { color: #ffb400; }
.hx-review-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
@media (min-width: 992px) { .hx-review-grid { grid-template-columns: 1.4fr 1fr; } }

/* ---------- Checkout steps ---------- */
.hx-steps { display: flex; align-items: center; gap: 6px; margin: 18px 0 18px; padding: 0; list-style: none; counter-reset: s; }
.hx-steps li { flex: 1; display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700; color: var(--hx-muted); }
.hx-steps li::before {
    counter-increment: s; content: counter(s);
    width: 30px; height: 30px; flex: none; border-radius: 50%;
    display: grid; place-items: center;
    background: var(--hx-surface); border: 2px solid var(--hx-border); color: var(--hx-muted);
}
.hx-steps li::after { content: ""; flex: 1; height: 2px; background: var(--hx-border); border-radius: 2px; }
.hx-steps li:last-child { flex: none; }
.hx-steps li:last-child::after { display: none; }
.hx-steps li.done, .hx-steps li.current { color: var(--hx-text); }
.hx-steps li.done::before { content: "\2713"; background: var(--hx-primary); border-color: var(--hx-primary); color: #fff; }
.hx-steps li.done::after { background: var(--hx-primary); }
.hx-steps li.current::before { border-color: var(--hx-primary); color: var(--hx-primary); box-shadow: 0 0 0 4px var(--hx-primary-soft); }
@media (max-width: 575.98px) { .hx-steps li span { display: none; } .hx-steps li.current span { display: inline; } }

.hx-layout-2 { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
@media (min-width: 992px) {
    .hx-layout-2 { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; gap: 24px; }
    .hx-layout-2 > aside { position: sticky; top: calc(var(--hx-header-h) + 60px); }
}

/* option cards (shipping / gateways) */
.hx-choices { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
@media (min-width: 768px) { .hx-choices--2 { grid-template-columns: 1fr 1fr; } }
.hx-choice { position: relative; }
.hx-choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; z-index: 2; }
.hx-choice label {
    display: flex; align-items: flex-start; gap: 12px; height: 100%;
    padding: 14px; border-radius: 14px; cursor: pointer;
    border: 1.5px solid var(--hx-border); background: var(--hx-surface);
    transition: border-color .2s, background .2s, box-shadow .2s;
    margin: 0 !important;
}
.hx-choice label::before {
    content: ""; flex: none; width: 20px; height: 20px; margin-top: 3px; border-radius: 50%;
    border: 2px solid var(--hx-border); background: var(--hx-surface);
    transition: border-color .2s, box-shadow .2s;
}
.hx-choice__icon { width: 40px; height: 40px; flex: none; border-radius: 12px; display: grid; place-items: center; font-size: 18px; background: var(--hx-surface-2); color: var(--hx-text-2); overflow: hidden; }
.hx-choice__icon img { width: 30px; height: 30px; object-fit: contain; }
.hx-choice__text { flex: 1; min-width: 0; }
@media (max-width: 575.98px) { .hx-choice__icon { display: none; } }
.hx-choice__text b { display: block; font-size: 14px; color: var(--hx-text); }
.hx-choice__text small { display: block; font-size: 12px; color: var(--hx-muted); line-height: 1.7; }
.hx-choice__price { margin-inline-start: auto; font-weight: 800; font-size: 12.5px; color: var(--hx-primary); white-space: nowrap; }
.hx-choice input:checked + label { border-color: var(--hx-primary); background: var(--hx-primary-soft); }
.hx-choice input:checked + label::before { border-color: var(--hx-primary); box-shadow: inset 0 0 0 4px var(--hx-surface), inset 0 0 0 10px var(--hx-primary); }
.hx-choice input:checked + label .hx-choice__icon { background: var(--hx-primary); color: #fff; }
.hx-choice input:focus-visible + label { outline: 3px solid color-mix(in srgb, var(--hx-primary) 55%, transparent); outline-offset: 2px; }

.hx-form-grid { display: grid; gap: 0 14px; grid-template-columns: 1fr 1fr; }
.hx-form-grid .full { grid-column: 1 / -1; }
@media (min-width: 768px) { .hx-form-grid--3 { grid-template-columns: repeat(3, 1fr); } }

/* summary */
.hx-summary__row { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; font-size: 13.5px; color: var(--hx-text-2); }
.hx-summary__row b { color: var(--hx-text); }
.hx-summary__row.is-discount b { color: var(--hx-danger); }
.hx-summary__row.is-credit b, .hx-summary__row.is-credit { color: var(--hx-success); }
.hx-summary__total { display: flex; align-items: center; justify-content: space-between; padding: 14px 0 16px; margin-top: 6px; border-top: 1px dashed var(--hx-border); font-weight: 800; }
.hx-summary__total b { font-size: 19px; color: var(--hx-text); }
.hx-summary__note { font-size: 12px; color: var(--hx-muted); margin-top: 12px; display: flex; gap: 8px; }
.hx-secure { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 12px; color: var(--hx-muted); margin-top: 12px; }
.hx-secure i { color: var(--hx-success); }
.hx-error { color: var(--hx-danger); font-size: 13px; font-weight: 700; margin-top: 10px; }
.hx-error:empty { display: none; }

/* cart items */
.hx-cart-item {
    display: grid; grid-template-columns: 88px 1fr; gap: 14px;
    padding: 16px 0; border-bottom: 1px solid var(--hx-border);
}
.hx-cart-item:first-child { padding-top: 0; }
.hx-cart-item:last-child { border-bottom: 0; padding-bottom: 0; }
.hx-cart-item__img { width: 88px; height: 88px; border-radius: 14px; background: var(--hx-surface-2); border: 1px solid var(--hx-border); display: grid; place-items: center; overflow: hidden; color: var(--hx-muted); font-size: 28px; }
.hx-cart-item__img img { width: 100%; height: 100%; object-fit: contain; }
.hx-cart-item__name { font-size: 14px; font-weight: 800; margin: 0 0 4px; line-height: 1.7; }
.hx-cart-item__detail { font-size: 12px; color: var(--hx-muted); margin: 0; }
.hx-cart-item__bottom { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.hx-cart-item__price { text-align: left; }
.hx-cart-item__price del { display: block; font-size: 12px; color: var(--hx-muted); }
.hx-cart-item__price b { font-size: 15px; font-weight: 900; }

.hx-coupon { display: flex; gap: 8px; }
.hx-coupon .form-control { flex: 1; }

.hx-empty { text-align: center; padding: 48px 20px; }
.hx-empty__icon { width: 96px; height: 96px; border-radius: 50%; margin: 0 auto 18px; display: grid; place-items: center; font-size: 42px; background: var(--hx-primary-soft); color: var(--hx-primary); }
.hx-empty h2 { font-size: 18px; font-weight: 900; }
.hx-empty p { color: var(--hx-text-2); }

@media (max-width: 991.98px) {
    .hx-checkout-bar {
        position: fixed; right: 0; left: 0; bottom: calc(var(--hx-bottom-nav-h) + env(safe-area-inset-bottom)); z-index: 1019;
        background: var(--hx-surface); border-top: 1px solid var(--hx-border);
        box-shadow: 0 -8px 24px -12px rgba(20, 24, 48, .2);
        padding: 10px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
    }
    .hx-checkout-bar .hx-btn { flex: 1; max-width: 220px; }
    .hx-checkout-bar small { display: block; font-size: 11.5px; color: var(--hx-muted); }
    .hx-checkout-bar b { font-size: 16px; }
    .hx-has-checkout-bar .hx-main { padding-bottom: calc(var(--hx-bottom-nav-h) + 100px); }
    .hx-layout-2 aside .hx-desktop-cta { display: none; }
}
@media (min-width: 992px) { .hx-checkout-bar { display: none !important; } }

/* ---------- Legacy component polish ---------- */
body.hx .add2cart-notification {
    position: fixed; bottom: calc(var(--hx-bottom-nav-h) + 20px); left: 50%; translate: -50% 0; z-index: 99999;
    padding: 12px 20px; border-radius: 14px; color: #fff; font-weight: 700; box-shadow: var(--hx-shadow-lg);
    background: var(--hx-text);
}
body.hx .swal2-popup { font-family: var(--hx-font) !important; border-radius: var(--hx-radius-lg) !important; }
body.hx .swal2-styled { border-radius: 12px !important; font-family: var(--hx-font) !important; }
body.hx .select2-container--default .select2-selection--single { height: 46px; border-radius: 12px; border: 1.5px solid var(--hx-border); background: var(--hx-surface-2); }
body.hx .select2-container--default .select2-selection--single .select2-selection__rendered { line-height: 44px; }
body.hx .section-heading h6 { font-size: 17px; font-weight: 800; }
body.hx .internet-connection-status { z-index: 99999; }
body.hx .pwa-install-alert { border-radius: var(--hx-radius) !important; bottom: calc(var(--hx-bottom-nav-h) + 16px) !important; }
body.hx #ChatCircle { bottom: calc(var(--hx-bottom-nav-h) + 16px); }
@media (min-width: 992px) { body.hx #ChatCircle { bottom: 24px; } }
body.hx.hx-has-buybar #ChatCircle, body.hx.hx-has-checkout-bar #ChatCircle { bottom: calc(var(--hx-bottom-nav-h) + 96px); }
body.hx .alert { border-radius: 12px; }
body.hx .table { color: var(--hx-text); }

/* skeleton */
.hx-skeleton { border-radius: var(--hx-radius); background: linear-gradient(90deg, var(--hx-surface-2) 25%, var(--hx-border) 37%, var(--hx-surface-2) 63%); background-size: 400% 100%; animation: hx-sk 1.4s ease infinite; }
.hx-skeleton--card { aspect-ratio: 3 / 4.4; }
@keyframes hx-sk { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

.hide { display: none; }

/* ---------- Account area (profile, orders, addresses, wishlist) ---------- */
.hx-account { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; padding-block: 16px 8px; }
@media (min-width: 992px) {
    .hx-account { grid-template-columns: 280px minmax(0, 1fr); gap: 24px; align-items: start; padding-top: 24px; }
    .hx-account__nav { position: sticky; top: calc(var(--hx-header-h) + 60px); }
}
.hx-account__nav { background: var(--hx-surface); border: 1px solid var(--hx-border); border-radius: var(--hx-radius); overflow: hidden; }
.hx-account__user { display: flex; align-items: center; gap: 12px; padding: 18px; background: linear-gradient(135deg, var(--hx-primary), var(--hx-primary-dark)); color: #fff; }
.hx-account__user b { display: block; font-size: 15px; }
.hx-account__user small { opacity: .85; font-size: 12px; }
.hx-avatar { width: 52px; height: 52px; flex: none; border-radius: 50%; display: grid; place-items: center; overflow: hidden; background: rgba(255,255,255,.2); color: #fff; font-size: 22px; font-weight: 900; }
.hx-avatar img { width: 100%; height: 100%; object-fit: cover; }
.hx-avatar--lg { width: 76px; height: 76px; font-size: 30px; background: var(--hx-primary-soft); color: var(--hx-primary); }
.hx-account__menu { list-style: none; margin: 0; padding: 8px; }
.hx-account__menu a { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px; font-weight: 700; font-size: 14px; color: var(--hx-text) !important; }
.hx-account__menu a i { font-size: 18px; width: 22px; text-align: center; color: var(--hx-text-2); }
.hx-account__menu a:hover, .hx-account__menu a.is-active { background: var(--hx-primary-soft); color: var(--hx-primary) !important; }
.hx-account__menu a:hover i, .hx-account__menu a.is-active i { color: var(--hx-primary); }
.hx-account__menu a.is-danger, .hx-account__menu a.is-danger i { color: var(--hx-danger) !important; }
@media (max-width: 991.98px) {
    .hx-account__nav { background: none; border: 0; border-radius: 0; overflow: visible; }
    .hx-account__user { display: none; }
    .hx-account__menu { display: flex; gap: 8px; overflow-x: auto; padding: 0 0 4px; scrollbar-width: none; }
    .hx-account__menu::-webkit-scrollbar { display: none; }
    .hx-account__menu li { flex: none; }
    .hx-account__menu a { background: var(--hx-surface); border: 1px solid var(--hx-border); padding: 8px 14px; font-size: 13px; white-space: nowrap; }
    .hx-account__menu a.is-active { border-color: var(--hx-primary); }
}

.hx-account__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.hx-account__head h1 { font-size: clamp(18px, 2vw, 22px); font-weight: 900; margin: 0; }
.hx-account__head p { margin: 2px 0 0; color: var(--hx-muted); font-size: 13px; }

/* profile */
.hx-profile-card { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.hx-profile-card h2 { font-size: 18px; font-weight: 900; margin: 0 0 2px; }
.hx-profile-card p { margin: 0; color: var(--hx-muted); font-size: 13px; }
.hx-profile-card .hx-btn { margin-inline-start: auto; }
.hx-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }
.hx-stat { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 16px 8px; border-radius: 14px; background: var(--hx-surface-2); border: 1px solid var(--hx-border); text-align: center; font-weight: 700; font-size: 13px; color: var(--hx-text) !important; transition: border-color .2s, transform .2s var(--hx-ease); }
.hx-stat i { font-size: 22px; color: var(--hx-primary); }
.hx-stat:hover { border-color: var(--hx-primary); transform: translateY(-2px); }
.hx-info-list { list-style: none; margin: 0; padding: 0; }
.hx-info-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--hx-border); font-size: 14px; }
.hx-info-list li:last-child { border-bottom: 0; }
.hx-info-list span { display: flex; align-items: center; gap: 10px; color: var(--hx-muted); }
.hx-info-list span i { color: var(--hx-text-2); font-size: 17px; }
.hx-info-list b { font-weight: 700; color: var(--hx-text); text-align: left; word-break: break-word; }
.hx-info-list b.is-empty { color: var(--hx-muted); font-weight: 400; }

/* addresses */
.hx-addr-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
@media (min-width: 768px) { .hx-addr-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.hx-addr { position: relative; display: flex; gap: 14px; padding: 16px; border-radius: var(--hx-radius); background: var(--hx-surface); border: 1px solid var(--hx-border); transition: border-color .2s, box-shadow .2s; }
.hx-addr:hover { border-color: var(--hx-primary); box-shadow: var(--hx-shadow); }
.hx-addr__icon { width: 44px; height: 44px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--hx-primary-soft); color: var(--hx-primary); font-size: 20px; }
.hx-addr__body { flex: 1; min-width: 0; }
.hx-addr__body h3 { font-size: 14.5px; font-weight: 800; margin: 0 0 6px; line-height: 1.8; }
.hx-addr__meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--hx-text-2); }
.hx-addr__meta span { display: inline-flex; align-items: center; gap: 5px; }
.hx-addr__actions { display: flex; flex-direction: column; gap: 6px; }
.hx-iconbtn--sm { width: 34px; height: 34px; font-size: 16px; border-radius: 10px; }
.hx-iconbtn--danger:hover { background: #fdecec; color: var(--hx-danger) !important; }
.hx-addr--add { align-items: center; justify-content: center; flex-direction: column; gap: 8px; min-height: 120px; border-style: dashed; border-width: 2px; color: var(--hx-primary); font-weight: 800; cursor: pointer; background: var(--hx-surface-2); font-family: var(--hx-font); }
.hx-addr--add i { font-size: 26px; }

/* orders */
.hx-filter { display: flex; gap: 8px; overflow-x: auto; margin-bottom: 14px; padding-bottom: 2px; scrollbar-width: none; }
.hx-filter::-webkit-scrollbar { display: none; }
.hx-filter button { flex: none; border: 1px solid var(--hx-border); background: var(--hx-surface); color: var(--hx-text-2); border-radius: 999px; padding: 7px 16px; font-family: var(--hx-font); font-weight: 700; font-size: 13px; cursor: pointer; }
.hx-filter button.is-active { background: var(--hx-primary); border-color: var(--hx-primary); color: #fff; }
.hx-filter button span { opacity: .75; margin-inline-start: 4px; }
.hx-order { background: var(--hx-surface); border: 1px solid var(--hx-border); border-radius: var(--hx-radius); overflow: hidden; }
.hx-order + .hx-order { margin-top: 12px; }
.hx-order__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 14px 16px; border-bottom: 1px solid var(--hx-border); background: var(--hx-surface-2); }
.hx-order__head b { font-size: 14px; }
.hx-order__head small { color: var(--hx-muted); font-size: 12px; margin-inline-start: 8px; }
.hx-status { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 800; }
.hx-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.hx-status--wait { background: #fff4e0; color: #b26b00; }
.hx-status--ok { background: #e3f7ec; color: #0f8a46; }
.hx-status--info { background: #e6f0ff; color: #2563eb; }
.hx-status--bad { background: #fdecec; color: #c62828; }
.hx-status--muted { background: var(--hx-surface-2); color: var(--hx-muted); }
[data-theme="dark"] .hx-status--wait { background: #3a2c12; }
[data-theme="dark"] .hx-status--ok { background: #12301f; }
[data-theme="dark"] .hx-status--info { background: #142544; }
[data-theme="dark"] .hx-status--bad { background: #3a1717; }
.hx-order__body { padding: 14px 16px; }
.hx-order__items { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.hx-order__items li { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; }
.hx-order__items li span { color: var(--hx-text-2); display: flex; align-items: center; gap: 8px; min-width: 0; }
.hx-order__items li span em { font-style: normal; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hx-order__items li small { color: var(--hx-muted); flex: none; }
.hx-order__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding-top: 12px; border-top: 1px dashed var(--hx-border); }
.hx-order__foot b { font-size: 16px; font-weight: 900; }
.hx-track { display: flex; align-items: flex-start; margin: 4px 0 14px; }
.hx-track__step { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; position: relative; font-size: 11px; font-weight: 700; color: var(--hx-muted); text-align: center; }
.hx-track__step::before { content: ""; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--hx-border); background: var(--hx-surface); z-index: 1; box-sizing: border-box; }
.hx-track__step::after { content: ""; position: absolute; top: 12px; right: 50%; width: 100%; height: 2px; background: var(--hx-border); }
.hx-track__step:first-child::after { display: none; }
.hx-track__step.done { color: var(--hx-text); }
.hx-track__step.done::before { background: var(--hx-primary); border-color: var(--hx-primary); box-shadow: inset 0 0 0 5px var(--hx-surface); }
.hx-track__step.done::after { background: var(--hx-primary); }

/* address modal */
body.hx #modal_edit .modal-content { border-radius: var(--hx-radius-lg) !important; border: 0 !important; overflow: hidden; background: var(--hx-surface) !important; }
body.hx #modal_edit .modal-header { background: linear-gradient(135deg, var(--hx-primary), var(--hx-primary-dark)) !important; color: #fff; border: 0; font-weight: 800; padding: 16px 20px; display: flex; align-items: center; gap: 8px; }
body.hx #modal_edit .modal-body { padding: 18px 20px; }
body.hx #modal_edit .modal-footer { border-top: 1px solid var(--hx-border); padding: 12px 20px; display: flex; gap: 10px; justify-content: flex-start; }
body.hx #modal_edit .collapsible { background: var(--hx-surface-2); color: var(--hx-text); border: 1px solid var(--hx-border); border-radius: 12px; font-weight: 700; display: flex; justify-content: space-between; }

/* ---------- Theme toggle (light / dark) ---------- */
.hx-theme-toggle .hx-theme-toggle__light { display: none; }
[data-theme="dark"] .hx-theme-toggle .hx-theme-toggle__dark { display: none; }
[data-theme="dark"] .hx-theme-toggle .hx-theme-toggle__light { display: inline; color: #ffc94d; }
.hx-theme-toggle i { transition: transform .4s var(--hx-ease); }
.hx-theme-toggle:active i { transform: rotate(40deg); }
html { transition: background-color .25s; }

/* dark mode polish for third-party and legacy widgets */
[data-theme="dark"] body.hx .swal2-popup { background: var(--hx-surface) !important; color: var(--hx-text) !important; }
[data-theme="dark"] body.hx .swal2-popup h6, [data-theme="dark"] body.hx .swal2-popup p, [data-theme="dark"] body.hx .swal2-html-container { color: var(--hx-text) !important; }
[data-theme="dark"] body.hx .select2-container--default .select2-selection--single,
[data-theme="dark"] body.hx .select2-dropdown { background: var(--hx-surface-2); color: var(--hx-text); border-color: var(--hx-border); }
[data-theme="dark"] body.hx .modal-content { background: var(--hx-surface) !important; color: var(--hx-text); }
[data-theme="dark"] body.hx .hx-search input { background: var(--hx-surface-2); }
[data-theme="dark"] body.hx .hx-card__media { background: #fff; }
[data-theme="dark"] body.hx .hx-gallery .product-slide { background-color: #fff; }
[data-theme="dark"] body.hx .hx-brand { background: #fff; }
[data-theme="dark"] body.hx .hx-prose { color: var(--hx-text-2); }
[data-theme="dark"] body.hx .alert-success { background: #12301f; color: #9be3b8; border-color: #1d4d33; }
[data-theme="dark"] body.hx .alert-danger { background: #3a1717; color: #f3a6a6; border-color: #5a2323; }
[data-theme="dark"] body.hx .table, [data-theme="dark"] body.hx .table td, [data-theme="dark"] body.hx .table th { color: var(--hx-text); border-color: var(--hx-border); }

/* ---------- Help & policy pages (guide, FAQ, shipping, returns, terms, privacy) ---------- */
.hx-info { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; padding-block: 8px 8px; }
@media (min-width: 992px) {
    .hx-info { grid-template-columns: minmax(0, 1fr) 260px; gap: 24px; align-items: start; }
    .hx-info__nav { position: sticky; top: calc(var(--hx-header-h) + 60px); }
}
.hx-info__nav { background: var(--hx-surface); border: 1px solid var(--hx-border); border-radius: var(--hx-radius); padding: 8px; }
.hx-info__nav h2 { font-size: 13px; color: var(--hx-muted); font-weight: 800; margin: 8px 10px 6px; }
.hx-info__nav ul { list-style: none; margin: 0; padding: 0; }
.hx-info__nav a { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 10px; font-weight: 700; font-size: 13.5px; color: var(--hx-text) !important; }
.hx-info__nav a i { color: var(--hx-text-2); width: 20px; text-align: center; }
.hx-info__nav a:hover, .hx-info__nav a.is-active { background: var(--hx-primary-soft); color: var(--hx-primary) !important; }
.hx-info__nav a.is-active i, .hx-info__nav a:hover i { color: var(--hx-primary); }
.hx-info .hx-prose h2 { font-size: 17px; font-weight: 900; color: var(--hx-text); margin: 1.4em 0 .5em; }
.hx-info .hx-prose h2:first-child { margin-top: 0; }
.hx-info .hx-prose ul { padding-right: 20px; }
.hx-info .hx-prose li { margin-bottom: 6px; }
.hx-lead { font-size: 15px; color: var(--hx-text-2); line-height: 2; margin: 6px 0 0; }
.hx-callout { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 14px; background: var(--hx-primary-soft); color: var(--hx-text); font-size: 13.5px; margin-top: 16px; }
.hx-callout i { color: var(--hx-primary); font-size: 20px; margin-top: 2px; }

.hx-guide { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; counter-reset: g; }
.hx-guide__step { position: relative; display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 14px; padding: 18px; border-radius: var(--hx-radius); background: var(--hx-surface); border: 1px solid var(--hx-border); }
.hx-guide__step::before {
    counter-increment: g; content: counter(g);
    position: absolute; top: 14px; left: 14px; width: 26px; height: 26px; border-radius: 50%;
    display: grid; place-items: center; font-size: 12px; font-weight: 900; background: var(--hx-primary); color: #fff;
}
.hx-guide__icon { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; font-size: 26px; background: var(--hx-primary-soft); color: var(--hx-primary); }
.hx-guide__step h2 { font-size: 16px; font-weight: 900; margin: 2px 0 6px; padding-left: 34px; }
.hx-guide__step p { margin: 0; color: var(--hx-text-2); font-size: 13.5px; line-height: 2; }
.hx-guide__step ul { margin: 8px 0 0; padding-right: 18px; color: var(--hx-text-2); font-size: 13px; line-height: 1.9; }
.hx-guide__step a.hx-section__more { margin-top: 8px; }

.hx-faq { display: grid; gap: 10px; }
.hx-faq details { background: var(--hx-surface); border: 1px solid var(--hx-border); border-radius: 14px; overflow: hidden; transition: border-color .2s; }
.hx-faq details[open] { border-color: var(--hx-primary); }
.hx-faq summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; font-weight: 800; font-size: 14px; }
.hx-faq summary::-webkit-details-marker { display: none; }
.hx-faq summary::after { content: "+"; flex: none; width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--hx-primary-soft); color: var(--hx-primary); font-weight: 900; transition: transform .2s; }
.hx-faq details[open] summary::after { content: "−"; }
.hx-faq details > div { padding: 0 16px 16px; color: var(--hx-text-2); font-size: 13.5px; line-height: 2; }
.hx-faq h2 { font-size: 15px; font-weight: 900; margin: 18px 4px 4px; color: var(--hx-text); }
.hx-faq h2:first-child { margin-top: 0; }
.hx-choices--static .hx-choice label { cursor: default; }
.hx-choices--static .hx-choice label::before { display: none; }
@media (max-width: 575.98px) {
    .hx-guide__step { grid-template-columns: 40px minmax(0, 1fr); gap: 12px; padding: 14px; }
    .hx-guide__icon { width: 40px; height: 40px; font-size: 19px; border-radius: 12px; }
    .hx-guide__step h2 { font-size: 15px; }
}
