/* =========================================================
   BlenderHub Premium Home
   ========================================================= */

:root {
    --bg: #f4f7fb;
    --surface: #ffffff;
    --surface-soft: #eef3f8;
    --text: #102039;
    --muted: #738197;
    --line: #dce5ef;
    --primary: #18b7b1;
    --primary-dark: #0b9995;
    --navy: #0d1b2e;
    --sidebar: 252px;
    --topbar: 74px;
    --shadow-sm: 0 8px 24px rgba(18, 39, 65, .07);
    --shadow: 0 20px 55px rgba(18, 39, 65, .11);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body {
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 85% -5%, rgba(24, 183, 177, .13), transparent 28%),
        linear-gradient(180deg, #fbfdff 0%, var(--bg) 60%, #eef3f8 100%);
}

body.menu-open {
    overflow: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

img {
    max-width: 100%;
}

html[data-theme="dark"] {
    --bg: #09111e;
    --surface: #111c2c;
    --surface-soft: #1b293b;
    --text: #edf5ff;
    --muted: #91a2b8;
    --line: #29394e;
    --shadow-sm: 0 8px 24px rgba(0, 0, 0, .18);
    --shadow: 0 22px 60px rgba(0, 0, 0, .28);
}

html[data-theme="dark"] body {
    background:
        radial-gradient(circle at 85% -5%, rgba(24, 183, 177, .10), transparent 30%),
        linear-gradient(180deg, #0a1422, #0c1726);
}

/* Sidebar */
.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 100;
    width: var(--sidebar);
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, #0a1525 0%, #0d1929 55%, #0b1727 100%);
    color: #eaf2ff;
    box-shadow: 14px 0 40px rgba(8, 22, 39, .12);
}

.sidebar-scroll {
    min-height: 0;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: #40536c transparent;
}

.sidebar-scroll::-webkit-scrollbar {
    width: 7px;
}

.sidebar-scroll::-webkit-scrollbar-thumb {
    background: #40536c;
    border-radius: 10px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 22px 18px 19px;
    border-bottom: 1px solid rgba(255, 255, 255, .06);
}

.brand img {
    width: 43px;
    height: 43px;
    object-fit: cover;
    border-radius: 13px;
    background: #0b9995;
    box-shadow: 0 9px 25px rgba(24, 183, 177, .15);
}

.brand strong {
    display: block;
    font-size: 16px;
    letter-spacing: -.3px;
}

.brand small {
    display: block;
    margin-top: 3px;
    color: #8094ad;
    font-size: 9px;
}

.side-nav {
    padding: 8px 12px 17px;
}

.nav-label {
    display: block;
    margin: 15px 8px 8px;
    color: #6d829d;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 1.5px;
}

.account-label {
    margin-top: 23px;
}

.nav-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 43px;
    margin: 4px 0;
    padding: 0 11px;
    border-radius: 12px;
    color: #b9c9dd;
    font-size: 12px;
    font-weight: 750;
    transition: background .2s, color .2s, transform .2s;
}

.nav-item:hover {
    background: rgba(255, 255, 255, .055);
    color: #fff;
    transform: translateX(2px);
}

.nav-item.active {
    color: #fff;
    background: linear-gradient(90deg, rgba(24, 183, 177, .20), rgba(43, 91, 143, .28));
    box-shadow: inset 3px 0 var(--primary), 0 9px 24px rgba(0, 0, 0, .10);
}

.nav-icon {
    width: 27px;
    height: 27px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: rgba(255, 255, 255, .055);
    font-size: 13px;
}

.nav-item.active .nav-icon {
    color: #67e3de;
    background: rgba(24, 183, 177, .14);
}

.nav-count {
    margin-left: auto;
    min-width: 19px;
    height: 19px;
    display: grid;
    place-items: center;
    padding: 0 5px;
    border-radius: 10px;
    background: #ef5b6d;
    color: #fff;
    font-size: 9px;
}

.sidebar-promo {
    margin: 8px 13px 20px;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, .09);
    border-radius: 17px;
    background: linear-gradient(145deg, rgba(255, 255, 255, .075), rgba(255, 255, 255, .025));
}

.promo-icon {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    margin-bottom: 12px;
    border-radius: 10px;
    background: rgba(24, 183, 177, .15);
    color: #65e3de;
}

.sidebar-promo strong {
    font-size: 12px;
}

.sidebar-promo p {
    margin: 7px 0 12px;
    color: #8297b0;
    font-size: 10px;
    line-height: 1.6;
}

.sidebar-promo a {
    color: #61ddd8;
    font-size: 10px;
    font-weight: 850;
}

.sidebar-footer {
    padding: 11px;
    border-top: 1px solid rgba(255, 255, 255, .07);
    background: rgba(5, 13, 24, .30);
}

.account-mini {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
    padding: 8px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .055);
}

.account-mini > div {
    min-width: 0;
    flex: 1;
}

.account-mini strong,
.account-mini small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account-mini strong {
    font-size: 10px;
}

.account-mini small {
    margin-top: 2px;
    color: #7489a3;
    font-size: 8px;
}

.account-mini > a {
    color: #9db0c7;
    font-size: 16px;
}

.avatar {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: linear-gradient(135deg, #13aee9, #18b7b1);
    color: #fff;
    font-size: 11px;
    font-weight: 900;
}

.login-sidebar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 39px;
    border-radius: 11px;
    background: rgba(255, 255, 255, .075);
    color: #e9f1fb;
    font-size: 10px;
    font-weight: 850;
}

/* Topbar */
.topbar {
    position: fixed;
    top: 0;
    left: var(--sidebar);
    right: 0;
    z-index: 90;
    height: var(--topbar);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 0 30px;
    border-bottom: 1px solid rgba(214, 224, 236, .9);
    background: rgba(255, 255, 255, .90);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: 0 13px 35px rgba(21, 42, 68, .13);
}

html[data-theme="dark"] .topbar {
    border-bottom-color: rgba(255, 255, 255, .07);
    background: rgba(17, 28, 44, .91);
}

.topbar-left,
.topbar-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.back-btn,
.mobile-menu-btn {
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.back-btn {
    display: flex;
    align-items: center;
    gap: 6px;
}

.mobile-menu-btn {
    display: none;
    font-size: 20px;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #93a1b3;
    font-size: 10px;
}

.breadcrumb i {
    font-style: normal;
    font-size: 17px;
}

.breadcrumb strong {
    color: var(--text);
}

.theme-toggle {
    height: 36px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 9px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    color: var(--muted);
    box-shadow: var(--shadow-sm);
}

.toggle-track {
    width: 32px;
    height: 18px;
    display: flex;
    align-items: center;
    padding: 2px;
    border-radius: 20px;
    background: #d8e2ec;
    transition: background .2s;
}

.toggle-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .25);
    transition: transform .2s;
}

html[data-theme="dark"] .toggle-track {
    background: var(--primary);
}

html[data-theme="dark"] .toggle-thumb {
    transform: translateX(14px);
}

.top-cart {
    position: relative;
    font-size: 17px;
}

.top-cart b {
    position: absolute;
    top: -9px;
    right: -10px;
    min-width: 17px;
    height: 17px;
    display: grid;
    place-items: center;
    padding: 0 4px;
    border-radius: 10px;
    background: #ef5b6d;
    color: #fff;
    font-size: 8px;
}

.profile-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
    font-size: 11px;
    font-weight: 800;
}

.login-top {
    padding: 9px 12px;
    border-radius: 10px;
    color: var(--text);
    font-size: 11px;
    font-weight: 800;
}

/* Main */
.main-content {
    width: calc(100% - var(--sidebar));
    min-height: 100vh;
    margin-left: var(--sidebar);
    padding: 112px 34px 55px;
}

.hero-section {
    max-width: 1450px;
    margin: 0 auto;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 30px;
    padding: 20px 5px 32px;
}

.eyebrow,
.category-kicker {
    color: var(--primary-dark);
    font-size: 9px;
    font-weight: 950;
    letter-spacing: 1.8px;
}

.hero-copy h1 {
    max-width: 850px;
    margin: 8px 0 12px;
    font-size: clamp(32px, 4vw, 54px);
    line-height: .99;
    letter-spacing: -2.3px;
}

.hero-copy p {
    max-width: 760px;
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: 9px;
    margin-top: 20px;
}

.hero-primary,
.hero-secondary {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 15px;
    border-radius: 11px;
    font-size: 10px;
    font-weight: 850;
}

.hero-primary {
    background: var(--navy);
    color: #fff;
    box-shadow: 0 9px 22px rgba(13, 27, 46, .16);
}

.hero-secondary {
    border: 1px solid var(--line);
    background: var(--surface);
}

.hero-card {
    min-width: 165px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 19px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.hero-card-icon {
    width: 33px;
    height: 33px;
    display: grid;
    place-items: center;
    margin-bottom: 13px;
    border-radius: 10px;
    background: rgba(24, 183, 177, .12);
    color: var(--primary);
}

.hero-card span,
.hero-card small {
    display: block;
    color: var(--muted);
    font-size: 8px;
    font-weight: 850;
    letter-spacing: 1px;
}

.hero-card strong {
    display: block;
    margin: 3px 0;
    font-size: 29px;
    letter-spacing: -1px;
}

.catalog-toolbar {
    max-width: 1450px;
    margin: 0 auto 35px;
}

.search-box {
    min-height: 66px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 9px 8px 16px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.search-symbol {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    background: var(--surface-soft);
    color: var(--primary);
    font-size: 22px;
}

.search-input-wrap {
    min-width: 0;
    flex: 1;
}

.search-input-wrap label {
    display: block;
    margin-bottom: 2px;
    color: var(--muted);
    font-size: 8px;
    font-weight: 800;
    letter-spacing: .5px;
}

.search-input-wrap input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
    font-size: 12px;
}

.search-input-wrap input::placeholder {
    color: #9aa7b7;
}

.search-box kbd {
    padding: 4px 7px;
    border: 1px solid var(--line);
    border-radius: 6px;
    color: #98a6b6;
    font-size: 9px;
}

.search-box button {
    min-height: 42px;
    border: 0;
    border-radius: 12px;
    padding: 0 17px;
    background: var(--navy);
    color: #fff;
    font-size: 10px;
    font-weight: 850;
}

.category-section {
    max-width: 1450px;
    margin: 0 auto 55px;
}

.category-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin: 0 2px 17px;
}

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

.category-icon {
    width: 41px;
    height: 41px;
    display: grid;
    place-items: center;
    flex: 0 0 41px;
    border-radius: 13px;
    background: rgba(24, 183, 177, .10);
    color: var(--primary);
    font-size: 19px;
}

.category-heading h2 {
    margin: 3px 0 3px;
    font-size: 23px;
    line-height: 1.05;
    letter-spacing: -.7px;
}

.category-heading p {
    max-width: 700px;
    margin: 0;
    color: var(--muted);
    font-size: 10px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 15px;
}

.product-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 17px;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    transition: transform .22s ease, box-shadow .22s ease;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.product-media {
    position: relative;
    aspect-ratio: 1.65 / 1;
    overflow: hidden;
    background: #e9eef4;
    outline: none;
}

html[data-theme="dark"] .product-media {
    background: #182538;
}

.thumb-slide {
    width: 100%;
    height: 100%;
    display: none;
    object-fit: cover;
}

.thumb-slide.is-active {
    display: block;
}

.format-badge {
    position: absolute;
    top: 9px;
    left: 9px;
    padding: 5px 8px;
    border-radius: 7px;
    background: rgba(13, 27, 46, .86);
    color: #fff;
    font-size: 8px;
    font-weight: 900;
}

.image-count {
    position: absolute;
    top: 9px;
    right: 9px;
    padding: 5px 7px;
    border-radius: 7px;
    background: rgba(255, 255, 255, .90);
    color: #29394d;
    font-size: 8px;
    font-weight: 850;
}

.slider-arrow {
    position: absolute;
    top: 50%;
    width: 29px;
    height: 29px;
    display: grid;
    place-items: center;
    transform: translateY(-50%);
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .95);
    color: #21334a;
    box-shadow: 0 6px 17px rgba(0, 0, 0, .16);
    opacity: 0;
    transition: opacity .2s;
}

.product-media:hover .slider-arrow,
.product-media:focus-within .slider-arrow {
    opacity: 1;
}

.slider-arrow.prev {
    left: 9px;
}

.slider-arrow.next {
    right: 9px;
}

.slider-dots {
    position: absolute;
    left: 50%;
    bottom: 8px;
    display: flex;
    gap: 4px;
    transform: translateX(-50%);
}

.slider-dots button {
    width: 5px;
    height: 5px;
    padding: 0;
    border: 0;
    border-radius: 5px;
    background: rgba(255, 255, 255, .70);
}

.slider-dots button.active {
    width: 15px;
    background: #fff;
}

.product-body {
    padding: 12px;
}

.product-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 7px;
}

.product-title-row h3 {
    margin: 0;
    font-size: 13px;
    line-height: 1.25;
}

.product-category {
    display: block;
    margin-top: 3px;
    color: var(--primary-dark);
    font-size: 8px;
    font-weight: 800;
}

.product-id {
    flex: 0 0 auto;
    padding: 4px 5px;
    border-radius: 6px;
    background: var(--surface-soft);
    color: #9aa7b7;
    font-size: 8px;
}

.product-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 9px;
    color: var(--muted);
    font-size: 8px;
}

.price-row {
    padding: 10px 0 9px;
}

.price {
    font-size: 17px;
    font-weight: 950;
    letter-spacing: -.4px;
}

.card-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px;
}

.btn {
    min-height: 33px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    border-radius: 9px;
    font-size: 9px;
    font-weight: 850;
}

.btn-outline {
    border: 1px solid var(--line);
    background: var(--surface);
}

.btn-dark {
    background: var(--navy);
    color: #fff;
}

.pagination {
    display: flex;
    align-items: center;
    gap: 3px;
    padding: 5px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.pagination a,
.page-ellipsis {
    min-width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: var(--muted);
    font-size: 9px;
    font-weight: 900;
}

.pagination a:first-child,
.pagination a:last-child {
    min-width: auto;
    padding: 0 10px;
    border-radius: 999px;
}

.pagination a.current {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 5px 14px rgba(24, 183, 177, .25);
}

.pagination a.disabled {
    opacity: .35;
    pointer-events: none;
}

.mobile-pagination {
    display: none;
    justify-content: center;
    margin-top: 17px;
}

.empty-state {
    max-width: 1450px;
    margin: 0 auto;
    padding: 75px 20px;
    text-align: center;
    border: 1px solid var(--line);
    border-radius: 23px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.empty-state-icon {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    margin: 0 auto 13px;
    border-radius: 18px;
    background: var(--surface-soft);
    color: var(--primary);
    font-size: 27px;
}

.empty-state h2 {
    margin: 0 0 7px;
    font-size: 22px;
}

.empty-state p {
    margin: 0 0 16px;
    color: var(--muted);
    font-size: 11px;
}

.empty-clear {
    display: inline-flex;
    min-height: 35px;
    align-items: center;
    padding: 0 14px;
    border-radius: 10px;
    background: var(--navy);
    color: #fff;
    font-size: 9px;
    font-weight: 850;
}

/* Footer */
.site-footer {
    margin-left: var(--sidebar);
    padding: 48px 34px 21px;
    background: #091625;
    color: #dbe7f5;
}

.footer-main {
    max-width: 1450px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.45fr;
    gap: 38px;
}

.footer-brand-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-brand-title img {
    width: 45px;
    height: 45px;
    object-fit: cover;
    border-radius: 13px;
    background:#0b9995;
}

.footer-brand-title strong,
.footer-brand-title small {
    display: block;
}

.footer-brand-title strong {
    font-size: 16px;
}

.footer-brand-title small {
    margin-top: 3px;
    color: #71869f;
    font-size: 8px;
}

.footer-brand p {
    max-width: 370px;
    margin: 13px 0 0;
    color: #8095ae;
    font-size: 10px;
    line-height: 1.75;
}

.footer-col h4 {
    margin: 3px 0 14px;
    color: #f0f6ff;
    font-size: 9px;
    letter-spacing: 1.2px;
}

.footer-col a {
    display: block;
    margin-bottom: 10px;
    color: #8297b0;
    font-size: 10px;
    transition: color .2s;
}

.footer-col a:hover {
    color: #63ddd8;
}

.footer-bottom {
    max-width: 1450px;
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin: 35px auto 0;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, .08);
    color: #687d96;
    font-size: 8px;
}

/* Desktop polish + reliable scrolling */
.main-content { overflow: visible; }
.site-footer { position: relative; z-index: 1; }
.sidebar-scroll { overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.topbar { isolation: isolate; }
.product-grid { align-items: stretch; }
.product-card { min-width: 0; }
.product-media img { user-select: none; -webkit-user-drag: none; }

/* Overlay */
.sidebar-overlay {
    display: none;
}

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

    .main-content {
        padding-left: 28px;
        padding-right: 28px;
    }

    .hero-card {
        display: none;
    }
}

@media (max-width: 950px) {
    :root {
        --sidebar: 70vw;
    }

    .sidebar {
        transform: translateX(-102%);
        transition: transform .25s ease;
        box-shadow: 25px 0 60px rgba(0, 0, 0, .24);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar-overlay.show {
        position: fixed;
        inset: 0;
        z-index: 95;
        display: block;
        background: rgba(4, 12, 22, .56);
        backdrop-filter: blur(2px);
    }

    .topbar {
        left: 0;
        padding: 0 18px;
    }

    .mobile-menu-btn {
        display: block;
    }

    .breadcrumb,
    .profile-name {
        display: none;
    }

    .main-content {
        width: 100%;
        margin-left: 0;
        padding: 101px 20px 38px;
    }

    .site-footer {
        margin-left: 0;
    }

    .product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .category-heading > .pagination {
        display: none;
    }

    .mobile-pagination {
        display: flex;
    }

    .footer-main {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    :root {
        --topbar: 68px;
    }

    .topbar {
        padding: 0 12px;
    }

    .topbar-left,
    .topbar-actions {
        gap: 10px;
    }

    .back-btn {
        font-size: 10px;
    }

    .theme-toggle {
        height: 34px;
        padding: 0 7px;
    }

    .top-cart {
        font-size: 15px;
    }

    .login-top {
        padding: 7px 6px;
        font-size: 10px;
    }

    .main-content {
        padding: 87px 12px 30px;
    }

    .hero-section {
        display: block;
        padding: 12px 3px 22px;
    }

    .hero-copy h1 {
        margin-top: 7px;
        font-size: 30px;
        letter-spacing: -1.25px;
    }

    .hero-copy p {
        font-size: 10px;
    }

    .hero-actions {
        margin-top: 15px;
    }

    .hero-primary,
    .hero-secondary {
        min-height: 35px;
        padding: 0 12px;
        font-size: 9px;
    }

    .catalog-toolbar {
        margin-bottom: 28px;
    }

    .search-box {
        min-height: 58px;
        gap: 8px;
        padding-left: 10px;
        border-radius: 15px;
    }

    .search-symbol {
        width: 30px;
        height: 30px;
        flex: 0 0 30px;
        font-size: 19px;
    }

    .search-input-wrap label {
        display: none;
    }

    .search-input-wrap input {
        font-size: 10px;
    }

    .search-box kbd {
        display: none;
    }

    .search-box button {
        min-height: 38px;
        padding: 0 11px;
        font-size: 9px;
    }

    .category-section {
        margin-bottom: 39px;
    }

    .category-heading {
        align-items: center;
    }

    .category-title-wrap {
        gap: 9px;
    }

    .category-icon {
        width: 35px;
        height: 35px;
        flex-basis: 35px;
        border-radius: 10px;
    }

    .category-heading h2 {
        font-size: 19px;
    }

    .category-heading p {
        font-size: 8px;
    }

    .product-grid {
        gap: 9px;
    }

    .product-card {
        border-radius: 13px;
    }

    .product-media {
        aspect-ratio: 1.55 / 1;
    }

    .product-body {
        padding: 9px;
    }

    .product-title-row h3 {
        font-size: 11px;
    }

    .product-category,
    .product-meta {
        font-size: 7px;
    }

    .product-id {
        font-size: 7px;
        padding: 3px 4px;
    }

    .price-row {
        padding: 8px 0;
    }

    .price {
        font-size: 14px;
    }

    .card-actions {
        gap: 5px;
    }

    .btn {
        min-height: 29px;
        font-size: 7px;
    }

    .slider-arrow {
        width: 25px;
        height: 25px;
        opacity: 1;
    }

    .image-count,
    .format-badge {
        font-size: 7px;
    }

    .pagination a,
    .page-ellipsis {
        min-width: 28px;
        height: 28px;
        font-size: 8px;
    }

    .pagination a:first-child,
    .pagination a:last-child {
        padding: 0 7px;
    }

    .footer-main {
        grid-template-columns: 1fr 1fr;
        gap: 25px 15px;
    }

    .footer-brand {
        grid-column: 1 / -1;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 7px;
    }

    .site-footer {
        padding: 38px 17px 18px;
    }
}

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

    .product-body {
        padding: 8px;
    }

    .btn {
        font-size: 6.5px;
    }

    .back-btn span {
        display: none;
    }
}


/* V5 small functional/polish overrides — existing V4 design remains intact. */
.cart-badge.hidden, .nav-count.hidden { display:none !important; }
.profile-menu { position:relative; }
.profile-chip { cursor:pointer; border:0; }
.profile-dropdown { position:absolute; top:calc(100% + 10px); right:0; min-width:190px; padding:8px; border:1px solid var(--border, #dbe3ee); border-radius:16px; background:var(--surface, #fff); box-shadow:0 18px 45px rgba(15,23,42,.16); opacity:0; visibility:hidden; transform:translateY(-6px); transition:.18s ease; z-index:100; }
.profile-menu.open .profile-dropdown { opacity:1; visibility:visible; transform:translateY(0); }
.profile-dropdown a { display:flex; align-items:center; min-height:42px; padding:0 12px; border-radius:10px; text-decoration:none; color:inherit; font-weight:700; font-size:13px; }
.profile-dropdown a:hover { background:rgba(20,184,166,.10); }
.profile-dropdown .danger { color:#ef4444; }
.dropdown-divider { height:1px; margin:6px 4px; background:var(--border, #e5e7eb); }
.top-cart { position:relative; }
.top-cart .cart-badge { position:absolute; top:-8px; right:-9px; min-width:17px; height:17px; padding:0 5px; border-radius:999px; display:flex; align-items:center; justify-content:center; background:#ef5b6b; color:#fff; font:700 10px/1 system-ui; border:2px solid var(--topbar, #fff); }
.card-actions .view-3d-btn { flex:1; }
.card-actions .cart-login-btn { width:56px; min-width:56px; padding:0; justify-content:center; }
.add-cart-btn { cursor:pointer; border:0; }
.add-cart-btn:disabled { opacity:.7; cursor:wait; }
.add-cart-btn.is-cart { background:#0d1b2e; }
.product-media { height:clamp(190px, 16vw, 245px); }
.thumb-slide { height:100%; object-fit:cover; }
@media (max-width:900px) {
  .profile-name { display:none; }
  .profile-chip { padding:4px; }
  .profile-dropdown { right:-6px; }
  .product-media { height:200px; }
}
@media (max-width:560px) {
  .product-media { height:185px; }
  .card-actions .cart-login-btn { width:54px; min-width:54px; }
}
html[data-theme="dark"] .profile-dropdown { background:#101b2a; border-color:#24344a; box-shadow:0 18px 45px rgba(0,0,0,.38); }

/* V6 functional polish */
.product-media {
    height: clamp(155px, 13vw, 190px);
    aspect-ratio: auto;
    background: #e9eef5;
}

.product-media::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(7,18,32,.10), transparent 35%, rgba(7,18,32,.05));
}

.thumb-slide { height: 100%; object-fit: cover; }

.search-box {
    min-height: 74px;
    padding: 9px 10px 9px 14px;
    border-radius: 20px;
    box-shadow: 0 14px 40px rgba(18,39,65,.09), 0 2px 7px rgba(18,39,65,.04);
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.search-box:focus-within {
    border-color: rgba(24,183,177,.55);
    box-shadow: 0 18px 45px rgba(24,183,177,.12), 0 0 0 4px rgba(24,183,177,.07);
}
.search-symbol {
    width: 40px;
    height: 40px;
    border-radius: 13px;
    background: linear-gradient(145deg, rgba(24,183,177,.16), rgba(24,183,177,.06));
}
.search-input-wrap label { font-size: 8px; letter-spacing: 1px; }
.search-input-wrap input { font-size: 13px; font-weight: 600; }
.search-status { min-width: 65px; text-align: right; color: var(--primary-dark); font-size: 9px; font-weight: 800; }
.search-box button { min-height: 46px; padding: 0 19px; border-radius: 13px; box-shadow: 0 8px 18px rgba(13,27,46,.16); }
#catalogResults { min-height: 20px; transition: opacity .18s ease; }
#catalogResults.is-searching { opacity: .55; }

.purchased-btn {
    position: relative;
    width: 100%;
    border: 1px solid #b9ead9;
    background: #dcf7ed;
    color: #13966d;
    cursor: not-allowed;
    box-shadow: none;
}
.purchased-btn .purchased-cart { font-size: 14px; opacity: .9; }
.purchased-check {
    position: absolute;
    top: 4px;
    right: 7px;
    width: 15px;
    height: 15px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #17a673;
    color: #fff;
    font-size: 10px;
    font-weight: 900;
}

.footer-bottom {
    font-size: 11px;
    line-height: 1.5;
    padding-top: 21px;
}
.footer-bottom span:first-child { font-size: 13px; font-weight: 800; color: #d9e8f7; }
.footer-bottom span:last-child { font-size: 10px; }

@media (max-width: 900px) {
    .product-media { height: 165px; }
    .search-box { min-height: 64px; border-radius: 17px; }
    .search-box kbd { display: none; }
    .search-status { min-width: auto; }
}
@media (max-width: 560px) {
    .product-media { height: 150px; }
    .search-box { display: grid; grid-template-columns: 36px 1fr auto; gap: 9px; padding: 9px; }
    .search-symbol { width: 36px; height: 36px; }
    .search-input-wrap input { font-size: 11px; }
    .search-box button { grid-column: 1 / -1; width: 100%; min-height: 40px; }
    .search-status { position: absolute; right: 16px; top: 12px; }
    .footer-bottom span:first-child { font-size: 11px; }
}
.price-row{display:flex;align-items:baseline;gap:8px;flex-wrap:wrap}.price-row .original-price{font-size:13px;color:var(--muted);text-decoration:line-through;font-weight:650}.price-row .price{font-size:17px}
