:root {
    --bg-top: #0f2a45;
    --bg-top-2: #0b2035;
    --page: #0a0f18;
    --text: #e8eef5;
    --muted: #a8b7c9;
    --accent: #1fb6ff;
    --accent-2: #0ea5e9;
    --hover: #162f4a;
    --menu-bg: #020813;
    --chip: #132b44;
    --badge: #17c964;
    --focus: #94c6ff;
    --shadow: 0 10px 30px rgba(0, 0, 0, .25);
    --row-dark-1: #1a4276;
    --row-dark-2: #1d4a86;
    --row-border: rgba(255, 255, 255, .18);
    --row-hover: #a6c2e6;
    --row-hover-text: #0b1a2a;
    font-synthesis: none;
}

* {
    box-sizing: border-box
}

html,
body {
    height: 100%;
    margin: 0;
    font-family: Inter, system-ui, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
    background: var(--page);
    color: var(--text);
    -webkit-font-smoothing: antialiased
}

.header {
    position: relative;
    isolation: isolate;
    box-shadow: var(--shadow)
}

.topbar {
    background: linear-gradient(180deg, var(--bg-top), var(--bg-top-2));
    padding: 14px 18px
}

.topbar-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    gap: 14px;
    align-items: center;
    grid-template-columns: 1fr auto 420px
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    text-decoration: none;
    color: inherit
}

/* =========================
   Category page / product grid (DataHeardz LIFE)
   Appends to your existing theme using the same tokens.
   ========================= */

.page-toolbar {
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    background: transparent;
    margin-top: 8px;
    padding: 18px 0;
}

.page-toolbar .container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 0 18px;
}

.breadcrumb {
    color: var(--muted);
    font-size: 13px;
}

.breadcrumb ol {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 8px;
    align-items: center;
}

.breadcrumb li+li::before {
    content: "›";
    color: rgba(255, 255, 255, 0.22);
    margin: 0 8px;
}

.category-title-row {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    justify-content: space-between;
}

.category-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: .03em;
}

.category-controls {
    display: flex;
    gap: 12px;
    align-items: center;
}

.category-controls label {
    color: var(--muted);
    font-size: 13px;
    margin-right: 6px;
}

.category-controls select {
    padding: 8px 10px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.02);
    color: var(--text);
    border: 1px solid rgba(255, 255, 255, 0.04);
}

/* Product grid (desktop 4 cols -> responsive) */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 22px;
}

.product-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01));
    border-radius: 10px;
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    min-height: 420px;
}

.product-card img.product-thumb,
.thumb-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* shows entire image with letterboxing */
    object-position: center;
    display: block;
    border-radius: 6px;
}

.product-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    text-align: center;
    margin-top: 8px;
}

.rating-row {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    font-size: 13px;
}

.price-row {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
    margin-top: 8px;
}

.price-old {
    text-decoration: line-through;
    color: rgba(255, 255, 255, 0.45);
    font-size: 13px;
}

.price-now {
    color: var(--accent);
    font-weight: 800;
    font-size: 16px;
}

/* actions */
.card-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    margin-top: auto;
    align-items: center;
}

.btn-primary {
    background: var(--accent);
    color: #03131f;
    border-radius: 8px;
    padding: 10px 12px;
    border: 0;
    cursor: pointer;
    font-weight: 700;
    width: 100%;
    max-width: 180px;
}

.thumb-box {
    width: 100%;
    aspect-ratio: 4 / 3;
    /* choose 1/1 for square */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border-radius: 8px;
    background: linear-gradient(180deg, #0d2237, #071124);
    overflow: hidden;
}

.btn-wait {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--text);
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    width: 100%;
    max-width: 180px;
}

/* small tag under price (e.g., "Now: $...") */
.price-tag {
    font-size: 12px;
    color: var(--muted);
}

/* responsive */
@media (max-width:1000px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width:760px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width:460px) {
    .product-grid {
        grid-template-columns: 1fr;
    }

    .product-card {
        min-height: 360px
    }
}

.avatar {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    background: #1b3552;
    display: grid;
    place-items: center;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .05)
}

.avatar svg {
    width: 34px;
    height: 34px;
    opacity: .85
}

.logo {
    font-weight: 800;
    letter-spacing: .04em;
    font-size: 28px;
    line-height: 1;
    color: #f3f6fb;
    text-transform: uppercase
}

.logo em {
    font-style: normal;
    color: #f9d976
}

.tagline {
    font-size: 12px;
    color: var(--muted);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis
}

.utils {
    display: flex;
    gap: 10px;
    align-items: center
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--chip);
    border: 1px solid rgba(255, 255, 255, .08);
    padding: 10px 12px;
    border-radius: 12px;
    line-height: 1;
    transition: .18s background;
    text-decoration: none;
    color: inherit
}

.chip:hover {
    background: var(--hover)
}

.chip svg {
    width: 18px;
    height: 18px;
    opacity: .9;
    flex: 0 0 auto
}

.cart {
    position: relative
}

.badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: var(--badge);
    color: #00130a;
    font-weight: 800;
    font-size: 11px;
    line-height: 18px;
    min-width: 18px;
    text-align: center;
    border-radius: 999px;
    padding: 0 5px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, .2)
}

.search {
    display: flex;
    align-items: center;
    background: #0d2237;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 12px;
    overflow: hidden
}

.search input {
    flex: 1;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
    padding: 12px 12px 12px 14px;
    font-size: 14px
}

.search button {
    border: 0;
    background: var(--accent);
    color: #03131f;
    padding: 12px 14px;
    border-radius: 10px;
    margin: 4px;
    cursor: pointer;
    transition: transform .06s ease, background .15s ease
}

.search button:hover {
    background: var(--accent-2)
}

.logo-line1,
.logo-line2 {
    display: block;
    line-height: 1.1;
}

.search svg {
    width: 18px;
    height: 18px
}

.search button svg {
    width: 18px;
    height: 18px;
    fill: currentColor !important;
    stroke: none !important;
    mask: none !important;
    -webkit-mask: none !important;
    background: none !important;
}

.chip:focus-visible,
.hamburger:focus-visible,
.search input:focus-visible,
.search button:focus-visible,
.menu-link:focus-visible,
.mega a:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 3px
}

.menubar {
    background: var(--menu-bg);
    border-top: 1px solid rgba(255, 255, 255, .06);
    border-bottom: 1px solid rgba(255, 255, 255, .06)
}

.menubar-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 12px 18px
}

.menu {
    display: flex;
    gap: 28px;
    flex: 1;
    flex-wrap: nowrap
}

.menu-item {
    position: relative
}

.menu-link {
    font-weight: 800;
    letter-spacing: .03em;
    text-transform: uppercase;
    font-size: 15px;
    color: #eef4ff;
    padding: 8px 6px;
    border-radius: 8px;
    display: inline-block;
    text-decoration: none
}

.menu-link:hover {
    background: rgba(255, 255, 255, .06)
}

.mega {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    display: none;
    background: transparent;
    box-shadow: 0 12px 30px rgba(0, 0, 0, .35);
    z-index: 40;
    pointer-events: auto
}

.menu-item:hover .mega,
.menu-item:focus-within .mega {
    display: block
}

.mega-wrap {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 18px
}

.mega-list {
    list-style: none;
    margin: 0;
    padding: 0;
    background: transparent;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .08);
    box-shadow: 0 6px 18px rgba(0, 0, 0, .25)
}

.mega-list li a {
    display: block;
    padding: 16px 20px;
    font-weight: 800;
    font-size: 16px;
    color: #ffffff;
    text-decoration: none;
    background: linear-gradient(180deg, var(--row-dark-1), var(--row-dark-2));
    border-bottom: 1px solid var(--row-border)
}

.mega-list li:first-child a {
    background: linear-gradient(180deg, #163a67, #1b4578)
}

.mega-list li a:hover,
.mega-list li a:focus {
    background: var(--row-hover);
    color: var(--row-hover-text)
}

.mega-banner {
    display: block;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .08)
}

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

.hamburger {
    display: none;
    background: #0f2237;
    border: 1px solid rgba(255, 255, 255, .1);
    color: #eaf2fd;
    padding: 10px 12px;
    border-radius: 10px;
    cursor: pointer
}

.drawer {
    display: none;
    position: absolute;
    inset: 0 auto auto 0;
    top: 100%;
    width: 100%;
    background: #0b1420;
    z-index: 50;
    border-top: 1px solid rgba(255, 255, 255, .08);
    padding: 14px 18px
}

.drawer a {
    display: block;
    padding: 10px 12px;
    color: #e9f1fb
}

.drawer details {
    border-bottom: 1px solid rgba(255, 255, 255, .08)
}

.drawer summary {
    list-style: none;
    cursor: pointer;
    font-weight: 800;
    padding: 12px 4px;
    text-transform: uppercase;
    color: #eef4ff
}

.drawer details[open]>summary {
    background: rgba(255, 255, 255, .06);
    border-radius: 8px
}

@media (max-width:1024px) {
    .topbar-inner {
        grid-template-columns: 1fr auto auto
    }

    .search {
        grid-column: 1/-1
    }

    .mega-wrap {
        grid-template-columns: 320px 1fr
    }
}

@media (max-width:840px) {
    .menu {
        display: none
    }

    .hamburger {
        display: inline-flex;
        align-items: center;
        gap: 8px
    }

    .drawer[aria-hidden="false"] {
        display: block
    }

    .mega {
        display: none !important
    }

    .avatar {
        width: 48px;
        height: 48px
    }

    .logo {
        font-size: 24px
    }
}

/* main content + gallery */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding-bottom: 80px
}

/* ===== Fix main nav rendering (remove bullets + ensure horizontal layout) ===== */

/* Remove browser default bullets and spacing for main nav lists */
.main-nav ul,
.menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Force horizontal layout for nav lists if they accidentally revert to vertical */
.main-nav ul,
.menu {
    display: flex !important;
    flex-wrap: nowrap;
    gap: 18px;
    align-items: center;
}

/* Basic nav link appearance so they match header chips */
.main-nav a,
.menu a {
    display: inline-block;
    padding: 8px 10px;
    color: #eef4ff;
    text-decoration: none;
    font-weight: 800;
    letter-spacing: .03em;
    text-transform: uppercase;
    border-radius: 6px;
}

/* Prevent the huge left margin that lists sometimes show */
.main-nav,
.menu {
    margin: 0;
    padding: 0 18px;
}

/* Small responsive guard: if container becomes vertical on tiny screens, keep it tidy */
@media (max-width: 640px) {

    .main-nav ul,
    .menu {
        flex-direction: column;
        gap: 6px;
        padding-left: 6px;
    }

    .main-nav a,
    .menu a {
        padding-left: 8px;
        padding-right: 8px;
    }
}

/* ===== Ensure breadcrumb/title are aligned center-left and not full width pushed to right ===== */
.page-toolbar .container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

/* If .main-content exists but had no spacing, make sure content sits below toolbar */
.main-content {
    margin-top: 8px;
    padding-top: 8px;
}

/* ---------- Horizontal row gallery (touch + keyboard friendly) ---------- */

/* container that holds the scrolling strip */
.gallery {
    display: block;
    /* keep section as a block wrapper */
    margin-top: 20px;
    padding: 8px 6px;
    /* small padding so items don't stick to edges */
    overflow: hidden;
    /* hide overflow outside the scroller area */
}

/* the scrolling strip */
.gallery-grid {
    display: flex;
    /* row layout */
    gap: 18px;
    align-items: start;
    overflow-x: auto;
    /* horizontal scroll */
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    /* smooth scrolling on iOS */
    scroll-snap-type: x mandatory;
    /* snap to items */
    padding-bottom: 8px;
    /* space for focus outlines/scrollbar */
}

/* each card keeps its visual style but is sized for a horizontal row */
.gallery-item {
    flex: 0 0 320px;
    /* fixed card width; tweak to taste */
    scroll-snap-align: start;
    /* snap anchor */
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01));
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.04);
    box-shadow: 0 6px 18px rgba(0, 0, 0, .4);
    transition: transform .12s ease, box-shadow .12s ease;
    display: flex;
    flex-direction: column;
    min-height: 220px;
    /* ensures consistent height even if captions vary */
}

/* thumbnail inside the card */
.gallery-thumb {
    width: 100%;
    height: 180px;
    object-fit: contain;
    display: block;
    background: linear-gradient(180deg, #0d2237, #071124);
    flex: 0 0 auto;
}

/* caption sits below the thumb, grows if needed */
.gallery-caption {
    padding: 10px 12px;
    font-size: 14px;
    color: var(--muted);
    line-height: 1.3;
    flex: 1 1 auto;
    min-height: 48px;
}

/* keep hover lift (unchanged) */
.gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 40px rgba(0, 0, 0, .45);
}

/* small responsive tweak — narrower cards on small screens */
@media (max-width: 680px) {
    .gallery-grid {
        /* keep the horizontal scrolling behavior */
        overflow-x: auto;
        overflow-y: hidden;

        /* hide in Firefox */
        scrollbar-width: none;

        /* hide in IE 10+ */
        -ms-overflow-style: none;

        /* remove extra padding that exposes the track */
        padding-bottom: 0;
    }

    .gallery-item {
        flex: 0 0 260px;
        min-height: 200px;
    }

    .gallery-thumb {
        height: 140px;
    }
}

/* hide scrollbar visually but keep it usable (WebKit) */
.gallery-grid::-webkit-scrollbar {
    height: 0;
    width: 0;
    display: none;
}

.gallery-grid::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.06);
    border-radius: 999px;
}

.gallery-grid::-webkit-scrollbar-track {
    background: transparent;
}

/* keyboard focus visibility for cards (makes them accessible) */
.gallery-item:focus-within,
.gallery-item:focus {
    outline: 2px solid var(--focus);
    outline-offset: 4px;
    scroll-margin-left: 12px;
    /* when focused ensure a bit of margin from edge */
}

.gallery-external {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 8px;
    border-radius: 6px;
    padding: 6px 8px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, .04);
    text-decoration: none;
    color: var(--text)
}

.actions {
    display: flex;
    gap: 8px;
    padding: 10px;
    border-top: 1px solid rgba(255, 255, 255, .02);
    background: rgba(0, 0, 0, .02)
}

.btn,
button.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
}

.btn:hover {
    background: var(--hover)
}

.hint {
    color: var(--muted);
    font-size: 13px
}

.upload-row {
    display: flex;
    gap: 12px;
    align-items: center;
    margin: 12px 0
}

.upload-row input[type="file"] {
    background: transparent;
    color: var(--text);
    border: 1px dashed rgba(255, 255, 255, .06);
    padding: 8px;
    border-radius: 8px
}

.sample {
    background: rgba(255, 255, 255, 0.02);
    padding: 12px;
    border-radius: 8px;
    overflow: auto;
    color: var(--muted);
    font-size: 13px;
    border: 1px solid rgba(255, 255, 255, 0.03)
}

@media (max-width:600px) {
    .gallery-thumb {
        height: 120px
    }
}