:root {
    --bg: #f0f4ff;
    --bg2: #ffffff;
    --bg3: #e8eefc;
    --bg4: #dbe5fb;
    --card: #ffffff;
    --border: #dbe4f5;
    --text: #0f172a;
    --text2: #334155;
    --text3: #475569;
    --accent: #4f46e5;
    --accent2: #047857;
    --nav: rgba(255, 255, 255, 0.95);
    --page-bg: #e2e8f0;
    --star: #b45309;
    --danger: #dc2626;
    --shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
    --frame-w: 430px;
}

html[data-theme="light"] { color-scheme: light; }

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--page-bg);
    color: var(--text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    margin: -1px; padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap; border: 0;
}
/* Reserve icon box before webfont loads (prevents layout shift) */
i.fas:empty, i.far:empty, i.fab:empty, i.fal:empty {
    display: inline-block;
    width: 1em;
    height: 1em;
    line-height: 1;
    vertical-align: -0.125em;
}

/* ---------- frame ---------- */
.mobile-wrap { min-height: 100vh; }

.app-frame {
    max-width: var(--frame-w);
    margin: 0 auto;
    min-height: 100vh;
    background: var(--bg);
    position: relative;
    padding-bottom: 78px;
}

@media (min-width: 480px) {
    .app-frame {
        border-radius: 24px;
        overflow: visible;
        box-shadow: 0 0 0 1px var(--border), 0 24px 70px rgba(0, 0, 0, 0.5);
        margin-top: 0;
    }
}

/* ---------- navbar ---------- */
.navbar {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 12px;
    background: var(--nav);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    border-radius: 24px 24px 0 0;
}

.nav-logo { display: flex; align-items: center; }
.nav-logo img { max-height: 72px; width: auto; height: auto; object-fit: contain; display: block; }

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}
.nav-logo-text {
    font-size: 20px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.nav-actions { display: flex; align-items: center; gap: 2px; }

.navbar-search { display: none; }
.desktop-nav { display: none; }

.icon-btn {
    width: 36px; height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--text);
    font-size: 15px;
    cursor: pointer;
    transition: background 0.2s;
}
.icon-btn:hover { background: var(--bg3); }

/* ---------- search ---------- */
.nav-search {
    display: none;
    gap: 8px;
    padding: 10px 14px 12px;
    background: var(--nav);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}
.nav-search.open { display: flex; }
.nav-search input {
    flex: 1;
    height: 38px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--card);
    color: var(--text);
    padding: 0 12px;
    font-size: 13px;
    outline: none;
}
.nav-search input:focus { border-color: var(--accent); }
.nav-search button {
    width: 38px; height: 38px;
    border: 0;
    border-radius: 10px;
    background: var(--accent);
    color: #fff;
    cursor: pointer;
}

/* ---------- drawer menu ---------- */
.mobile-menu-overlay {
    position: fixed;
    top: 0; bottom: 0;
    left: calc(50vw - min(var(--frame-w) / 2, 50vw));
    right: calc(50vw - min(var(--frame-w) / 2, 50vw));
    background: rgba(0, 0, 0, 0.55);
    opacity: 0;
    visibility: hidden;
    transition: 0.25s;
    z-index: 55;
}
.mobile-menu-overlay.open { opacity: 1; visibility: visible; }

.mobile-menu {
    position: fixed;
    top: 0; bottom: 0;
    right: calc(50vw - min(var(--frame-w) / 2, 50vw));
    width: min(82%, 340px);
    background: var(--bg2);
    border-left: 1px solid var(--border);
    transform: translateX(105%);
    visibility: hidden;
    transition: transform 0.3s ease, visibility 0s linear 0.3s;
    z-index: 60;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}
.mobile-menu.open {
    transform: translateX(0);
    visibility: visible;
    transition: transform 0.3s ease, visibility 0s;
}

.menu-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
}
.menu-title { font-size: 16px; font-weight: 700; }

.menu-links { flex: 1; padding: 8px 0; }

.menu-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    transition: background 0.15s;
}
.menu-link i { width: 18px; text-align: center; color: var(--accent); font-size: 13px; }
.menu-link:hover { background: var(--bg3); }

.menu-link-sub {
    font-size: 13px;
    font-weight: 500;
    padding-left: 32px;
    color: var(--text2);
}
.menu-link-sub i { font-size: 9px; color: var(--text3); }

.menu-section-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text3);
    padding: 12px 18px 4px;
}

.menu-divider { height: 1px; background: var(--border); margin: 8px 14px; }

.menu-footer {
    border-top: 1px solid var(--border);
    padding: 14px 18px 20px;
}
.menu-footer-row { font-size: 12px; color: var(--text3); margin-bottom: 6px; }
.menu-footer-row i { width: 16px; color: var(--accent); }
.menu-social { display: flex; gap: 8px; margin-top: 10px; }
.menu-social a {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: var(--bg3);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: var(--text2);
}
.menu-social a:hover { background: var(--accent); color: #fff; }

/* ---------- hero ---------- */
.hero-section { padding: 14px 14px 0; }

.hero-section .swiper {
    border-radius: 18px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.hero-slide {
    display: block;
    position: relative;
    height: 175px;
    background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460);
    overflow: hidden;
}
.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    inset: 0;
}

.hero-section .swiper-pagination { bottom: 8px !important; }
.hero-section .swiper-pagination-bullet {
    background: #fff;
    opacity: 0.5;
    width: 6px; height: 6px;
    transition: 0.3s;
}
.hero-section .swiper-pagination-bullet-active {
    opacity: 1;
    width: 18px;
    border-radius: 3px;
}

/* ---------- section header ---------- */
.sec-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 16px 12px;
}
.sec-title { font-size: 18px; font-weight: 700; }
.sec-more {
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.sec-more:hover { text-decoration: underline; }

/* ---------- categories ---------- */
.cats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    padding: 0 16px;
    margin-bottom: 8px;
}

.cat-card {
    border: 2px solid var(--border);
    border-radius: 12px;
    text-align: center;
    background: var(--card);
    overflow: hidden;
    transition: 0.25s;
}
.cat-card:hover {
    border-color: var(--accent);
    transform: translateY(-3px);
}
.cat-card-image {
    aspect-ratio: 1 / 1;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cat-card-image img { width: 100%; height: 100%; object-fit: cover; }
.cat-card-image i { font-size: 30px; color: var(--text3); }
.cat-card-name {
    padding: 10px 8px;
    font-size: 13px;
    font-weight: 600;
    border-top: 1px solid var(--border);
    word-break: break-word;
}

/* ---------- hot deals ---------- */
.hot-deals-scroll {
    display: flex;
    gap: 12px;
    padding: 4px 16px 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.hot-deals-scroll::-webkit-scrollbar { display: none; }

.hot-deal-card {
    flex-shrink: 0;
    width: 160px;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 10px;
    background: var(--card);
    scroll-snap-align: start;
    position: relative;
    transition: 0.2s;
}
.hot-deal-card:hover { border-color: var(--accent); }

.hot-rank-badge {
    position: absolute;
    top: 8px; left: 8px;
    background: linear-gradient(135deg, #ef4444, #f97316);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    padding: 3px 7px;
    border-radius: 6px;
    z-index: 2;
}

.hot-deal-image {
    aspect-ratio: 1 / 1;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hot-deal-image img { width: 100%; height: 100%; object-fit: contain; }
.hot-deal-image i { color: #cbd5e1; font-size: 24px; }

.hot-deal-info { margin-top: 8px; }

.hot-deal-name {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 35px;
}

.hot-deal-cat {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--accent);
    margin-top: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hot-deal-price {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-top: 5px;
}
.hot-price-old {
    font-size: 12px;
    color: var(--text3);
    text-decoration: line-through;
}
.hot-price-new {
    font-size: 15px;
    font-weight: 800;
    color: var(--accent2);
}

.hot-deal-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 6px;
    font-size: 11px;
    font-weight: 600;
}
.hot-views { color: var(--danger); }
.hot-rating { color: var(--star); }

/* ---------- featured ---------- */
.featured-scroll {
    display: flex;
    gap: 12px;
    padding: 0 16px 12px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.featured-scroll::-webkit-scrollbar { display: none; }

.feat-card {
    flex-shrink: 0;
    width: 200px;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 12px;
    background: var(--card);
    display: block;
    transition: 0.2s;
}
.feat-card:hover { border-color: var(--accent); }

.feat-top { display: flex; gap: 10px; align-items: flex-start; }

.feat-icon {
    width: 65px; height: 65px;
    flex-shrink: 0;
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.feat-icon img { width: 100%; height: 100%; object-fit: contain; }
.feat-icon i { color: #cbd5e1; }

.feat-name {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.feat-cat {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text3);
    margin-top: 4px;
}

.feat-reward {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-top: 10px;
}
.feat-label {
    font-size: 10px;
    color: var(--text3);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 2px;
}
.feat-payout {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed var(--border);
}
.feat-payout-label { font-size: 11px; color: var(--text3); }
.feat-payout-val { font-size: 12px; font-weight: 700; color: var(--accent2); }
.feat-payout-val i { color: var(--star); font-size: 10px; }

/* ---------- products grid ---------- */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
    padding: 0 16px;
}

.product-card {
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 13px;
    background: var(--card);
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: 0.2s;
    color: inherit;
}
.product-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.product-card-top { display: flex; flex-direction: column; gap: 10px; }

.product-icon {
    aspect-ratio: 1 / 1;
    background: #fff;
    border-radius: 13px;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}
.product-icon img { width: 100%; height: 100%; object-fit: contain; }
.product-icon > i { color: #cbd5e1; font-size: 28px; }

.discount-badge {
    position: absolute;
    top: 8px; left: 8px;
    background: linear-gradient(135deg, #ef4444, #f97316);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    padding: 3px 6px;
    border-radius: 6px;
    z-index: 2;
}

/* Merchant / store pill on product thumbnails */
.merchant-pill {
    position: absolute;
    top: 8px; right: 8px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    max-width: calc(100% - 16px);
    background: #fff;
    color: #0f172a;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    padding: 4px 7px;
    border-radius: 999px;
    border-bottom: 2px solid var(--m-color, #64748b);
    box-shadow: 0 1px 4px rgba(15, 23, 42, .18);
    white-space: nowrap;
    overflow: hidden;
}
.merchant-pill i { color: var(--m-color, #64748b); font-size: 11px; }
.merchant-pill--flat {
    position: static;
    align-self: flex-start;
    background: rgba(100, 116, 139, .12);
    border-bottom: none;
    border-left: 3px solid var(--m-color, #64748b);
    box-shadow: none;
    padding: 2px 7px;
    margin-top: 4px;
}

.product-name {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 36px;
}
.product-category {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--accent);
    margin-top: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-footer {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}

.price-badge { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.price-old {
    font-size: 11px;
    color: var(--text3);
    text-decoration: line-through;
    white-space: nowrap;
}
.price-new {
    font-size: 14px;
    font-weight: 700;
    color: var(--accent2);
    white-space: nowrap;
}

.rating-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text2);
    flex-shrink: 0;
}
.rating-badge i { color: var(--star); font-size: 11px; }

/* ---------- pagination ---------- */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 24px 16px 32px;
    flex-wrap: wrap;
}
.page-btn {
    min-width: 38px;
    height: 38px;
    padding: 0 8px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--text);
    font-size: 13px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.page-btn:hover { border-color: var(--accent); }
.page-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}
.page-btn.disabled { opacity: 0.4; pointer-events: none; }
.page-dots {
    min-width: 30px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text3);
    font-size: 13px;
}

/* ---------- empty state ---------- */
.empty-state {
    text-align: center;
    padding: 48px 16px;
    color: var(--text3);
}
.empty-state i { font-size: 36px; display: block; margin-bottom: 10px; }

/* ---------- footer (inner pages) ---------- */
.site-footer {
    margin: 24px 16px 8px;
    padding: 20px 18px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
}
.footer-brand { font-size: 16px; font-weight: 800; }
.footer-tagline { font-size: 12px; color: var(--text3); margin-top: 2px; }
.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}
.footer-links a {
    font-size: 12px;
    font-weight: 600;
    color: var(--text2);
    background: var(--bg3);
    padding: 6px 10px;
    border-radius: 8px;
}
.footer-links a:hover { background: var(--accent); color: #fff; }
.footer-copy {
    font-size: 11px;
    color: var(--text3);
    text-align: center;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

/* ---------- bottom nav ---------- */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: var(--frame-w);
    height: 68px;
    display: flex;
    align-items: stretch;
    z-index: 50;
    background: var(--nav);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border);
}
@media (min-width: 480px) {
    .bottom-nav { border-radius: 0 0 24px 24px; }
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 10px;
    font-weight: 600;
    color: var(--text3);
    position: relative;
    transition: color 0.2s;
}
.nav-item i { font-size: 20px; }
.nav-item.active { color: var(--accent); }
.nav-item.active::before {
    content: "";
    position: absolute;
    top: 0;
    width: 22px;
    height: 3px;
    border-radius: 0 0 4px 4px;
    background: var(--accent);
}

/* ---------- misc ---------- */
::selection { background: var(--accent); color: #fff; }

@media (max-width: 480px) {
    .cats-grid { gap: 12px; }
    .products-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
}

/* ================================================================
   INNER PAGES (products / category / detail / blog / pages / contact)
   ================================================================ */

/* ---------- breadcrumb ---------- */
.crumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text3);
    flex-wrap: wrap;
}
.crumb a { color: var(--text3); text-decoration: none; transition: 0.2s; }
.crumb a:hover { color: var(--accent); }
.crumb i { font-size: 10px; }
.crumb span:last-child { color: var(--text); font-weight: 600; }

/* ---------- search box (inner pages) ---------- */
.search-wrap { position: relative; }
.search-wrap .search-icon {
    position: absolute; left: 14px; top: 50%;
    transform: translateY(-50%);
    color: var(--text3); font-size: 13px;
}
.search-input {
    width: 100%; height: 38px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 11px;
    padding: 0 38px;
    font-size: 13px;
    color: var(--text);
    outline: none;
}
.search-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1); }

/* ---------- category pills ---------- */
.cats-scroll {
    display: flex;
    gap: 8px;
    padding: 0 14px 14px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.cats-scroll::-webkit-scrollbar { display: none; }
.cat-pill {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px 6px 6px;
    border-radius: 30px;
    background: var(--bg3);
    border: 1px solid var(--border);
    font-size: 13px;
    font-weight: 600;
    color: var(--text2);
    white-space: nowrap;
    cursor: pointer;
    transition: 0.2s;
}
.cat-pill .cat-pill-img {
    width: 26px; height: 26px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--bg4);
    border: 1px solid var(--border);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 11px;
    color: var(--text3);
}
.cat-pill .cat-pill-img img { width: 100%; height: 100%; object-fit: cover; }
.cat-pill.active, .cat-pill:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.cat-pill.active .cat-pill-img, .cat-pill:hover .cat-pill-img { border-color: rgba(255,255,255,.4); }

.results-info {
    padding: 0 14px 14px;
    font-size: 13px;
    color: var(--text2);
}

/* ---------- upper-case micro label ---------- */
.section-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.section-label i { color: var(--accent); }

/* ---------- category hero card ---------- */
.cat-hero {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 16px;
}
.cat-hero .cat-hero-bg {
    position: absolute; right: -20px; top: -20px;
    font-size: 120px; opacity: 0.05; color: var(--accent);
}
.cat-hero .cat-hero-icon {
    width: 64px; height: 64px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}
.cat-hero .cat-hero-icon img { width: 100%; height: 100%; object-fit: cover; }
.cat-hero .cat-hero-icon i { color: #fff; font-size: 28px; }
.cat-hero h1 { font-size: 22px; font-weight: 800; color: var(--text); margin: 0; }
.cat-hero .cat-hero-count { font-size: 13px; color: var(--text2); margin-top: 4px; }
.cat-hero .cat-hero-count i { color: var(--accent); }
.cat-hero p { font-size: 13px; color: var(--text2); margin-top: 8px; line-height: 1.6; }

/* ---------- detail page ---------- */
.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 8px 16px;
    color: var(--text2);
    font-size: 13px;
    transition: 0.2s;
}
.back-btn:hover { color: var(--text); border-color: var(--accent); }

.detail-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 16px;
}

.pad { padding: 14px; }

.detail-head { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.detail-thumb {
    width: 72px; height: 72px;
    border-radius: 18px;
    background: #fff;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden; flex-shrink: 0;
}
.detail-thumb img { width: 100%; height: 100%; object-fit: contain; }
.detail-title { font-size: 20px; font-weight: 800; color: var(--text); line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.detail-cat { font-size: 13px; color: var(--text3); margin-top: 2px; }
.badge-verified {
    display: inline-flex; align-items: center; gap: 5px;
    background: rgba(16, 185, 129, 0.12);
    color: var(--accent2);
    font-size: 12px; font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    margin-top: 6px;
}
.detail-rating { margin-top: 8px; display: flex; align-items: center; gap: 6px; }
.detail-rating .stars { color: var(--star); font-size: 14px; }
.detail-rating .val { font-size: 15px; font-weight: 700; color: var(--text); }
.detail-rating .meta { font-size: 12px; color: var(--text3); }

.stat-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-bottom: 16px; }
.stat-cell {
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.stat-cell .stat-val { font-size: 16px; font-weight: 800; }
.stat-cell .stat-val.stat-price { color: var(--accent2); }
.stat-cell .stat-val.stat-mrp { color: var(--text3); text-decoration: line-through; margin-top: 4px; font-size: 14px; }
.stat-cell .stat-val.stat-rate { color: var(--accent); }
.stat-cell .stat-label {
    font-size: 10px; color: var(--text3); margin-top: 3px;
    text-transform: uppercase; letter-spacing: 0.3px;
}
.off-ribbon {
    position: absolute; top: -20px; right: -20px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff; font-size: 11px; font-weight: 700;
    padding: 20px 28px 6px 28px;
    transform: rotate(45deg);
}

.detail-main-img {
    margin-bottom: 16px;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    padding: 10px;
}
.detail-main-img img { width: 100%; height: auto; max-height: 520px; object-fit: contain; }

/* product page refine (v27): constrain width so it doesn't stretch full-screen */
.content.product-page { max-width: 1080px; }
@media (min-width: 900px) {
    .product-page .detail-main-img { max-width: 640px; margin: 0 auto 18px; }
}

.btn-gradient {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex: 1;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    color: #fff;
    border: none;
    padding: 14px;
    border-radius: 13px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s;
}
.btn-gradient:hover { filter: brightness(1.1); }
.btn-ghost {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: var(--bg3);
    border: 1px solid var(--border);
    color: var(--text2);
    padding: 13px;
    border-radius: 13px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}
.btn-ghost:hover { color: var(--text); border-color: var(--accent); }
.action-row { display: flex; gap: 10px; }
.buy-note { display: flex; align-items: flex-start; gap: 8px; margin: 12px 0 0; font-size: 12px; color: var(--text3); line-height: 1.5; }
.buy-note i { color: var(--accent); margin-top: 2px; }
.badge-merchant { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; padding: 4px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; color: #fff; background: var(--merchant, #64748b); }

.description-content { font-size: 14px; color: var(--text2); line-height: 1.8; word-break: break-word; }
.description-content h2, .description-content h3, .description-content h4 { color: var(--text); margin: 16px 0 8px; }
.description-content h2 { font-size: 18px; }
.description-content h3 { font-size: 16px; }
.description-content p { margin: 0 0 12px; }
.description-content ul, .description-content ol { margin: 0 0 12px; padding-left: 20px; }
.description-content li { margin-bottom: 4px; }
.description-content a { color: var(--accent); text-decoration: underline; }
.description-content table { width: 100%; border-collapse: collapse; margin: 10px 0; }
.description-content th, .description-content td {
    border: 1px solid var(--border);
    padding: 8px 10px;
    font-size: 13px;
    text-align: left;
}
.description-content th { background: var(--bg3); color: var(--text); }
.description-content blockquote {
    border-left: 3px solid var(--accent);
    padding: 4px 12px;
    margin: 10px 0;
    color: var(--text3);
}

/* ---------- similar products ---------- */
.similar-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.similar-product {
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: 0.2s;
}
.similar-product:hover {
    background: var(--bg4);
    border-color: var(--accent);
    transform: translateX(4px);
}
.similar-product-icon {
    width: 46px; height: 46px;
    border-radius: 8px;
    background: #fff;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden; flex-shrink: 0;
}
.similar-product-icon img { width: 100%; height: 100%; object-fit: contain; }
.similar-product-name { font-size: 12px; font-weight: 600; color: var(--text); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.similar-product-price { font-size: 11px; color: var(--text3); margin-top: 2px; }
.similar-product-price b { color: var(--accent2); }

/* ---------- blog ---------- */
.blog-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 0 14px; }
.blog-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    display: block;
    transition: 0.3s;
    color: inherit;
}
.blog-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(59,130,246,.12); border-color: var(--accent); }
.blog-card-img { aspect-ratio: 16 / 10; overflow: hidden; background: var(--bg3); position: relative; }
.blog-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.blog-card:hover .blog-card-img img { transform: scale(1.05); }
.blog-card-cat {
    position: absolute; left: 10px; top: 10px;
    background: rgba(10,15,30,.75);
    color: #fff;
    font-size: 10px; font-weight: 700;
    padding: 4px 8px;
    border-radius: 6px;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}
.blog-card-body { padding: 12px; }
.blog-card-title { font-size: 14px; font-weight: 700; color: var(--text); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.blog-card-excerpt { font-size: 12px; color: var(--text2); line-height: 1.5; margin-top: 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.blog-card-meta { display: flex; align-items: center; gap: 10px; margin-top: 10px; font-size: 11px; color: var(--text3); }
.blog-card-meta i { color: var(--accent); }

/* ---------- article (blog detail / cms page) ---------- */
.article-hero { width: 100%; max-height: 300px; overflow: hidden; background: var(--bg3); }
.article-hero img { width: 100%; max-height: 300px; object-fit: cover; }
.article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 18px; padding-bottom: 16px; border-bottom: 1px solid var(--border); font-size: 12px; color: var(--text3); }
.article-meta i { color: var(--accent); }
.article-content { font-size: 14px; color: var(--text2); line-height: 1.85; word-break: break-word; }
.article-content h2, .article-content h3, .article-content h4 { color: var(--text); margin: 20px 0 10px; }
.article-content h2 { font-size: 19px; }
.article-content h3 { font-size: 17px; }
.article-content p { margin: 0 0 14px; }
.article-content ul, .article-content ol { margin: 0 0 14px; padding-left: 22px; }
.article-content li { margin-bottom: 6px; }
.article-content a { color: var(--accent); text-decoration: underline; }
.article-content img { border-radius: 10px; margin: 10px 0; }
.article-title { font-size: 22px; font-weight: 800; color: var(--text); line-height: 1.35; margin: 0 0 14px; }
.article-content h4 { font-size: 15px; }
.article-content table { width: 100%; border-collapse: collapse; margin: 0 0 16px; font-size: 13px; }
.article-content th, .article-content td { border: 1px solid var(--border); padding: 9px 11px; text-align: left; vertical-align: top; }
.article-content th { background: var(--bg3); color: var(--text); font-weight: 700; }
.article-content code { background: var(--bg3); padding: 2px 6px; border-radius: 6px; font-size: 12.5px; }

/* Table of contents */
.toc { background: var(--bg3); border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; margin: 0 0 18px; }
.toc-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text3); margin-bottom: 8px; }
.toc-title i { color: var(--accent); margin-right: 4px; }
.toc-list { margin: 0; padding-left: 20px; columns: 2; column-gap: 22px; }
.toc-list li { font-size: 13px; margin-bottom: 6px; break-inside: avoid; }
.toc-list a { color: var(--text2); text-decoration: none; }
.toc-list a:hover { color: var(--accent); text-decoration: underline; }
@media (max-width: 480px) { .toc-list { columns: 1; } }

/* FAQ */
.faq-list { display: flex; flex-direction: column; gap: 10px; }
.faq-item { background: var(--bg3); border: 1px solid var(--border); border-radius: 12px; padding: 4px 14px; }
.faq-item summary { cursor: pointer; font-weight: 600; font-size: 13.5px; color: var(--text); padding: 10px 0; list-style: none; display: flex; justify-content: space-between; gap: 10px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '\f078'; font-family: 'Font Awesome 6 Free'; font-weight: 900; font-size: 11px; color: var(--accent); transition: transform .2s; }
.faq-item[open] summary::after { transform: rotate(180deg); }
.faq-answer { font-size: 13px; color: var(--text2); line-height: 1.75; padding: 0 0 12px; }
.article-content blockquote {
    border-left: 3px solid var(--accent);
    background: var(--bg3);
    padding: 10px 14px;
    margin: 14px 0;
    border-radius: 0 10px 10px 0;
    color: var(--text3);
}

.share-row { display: flex; gap: 8px; flex-wrap: wrap; }
.share-btn { border: none; padding: 8px 14px; border-radius: 8px; color: #fff; font-size: 12px; font-weight: 600; cursor: pointer; transition: 0.2s; }
.share-btn:hover { filter: brightness(1.1); }

/* ---------- page cards (other pages) ---------- */
.page-card-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.page-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px;
    display: block;
    transition: 0.3s;
    color: inherit;
}
.page-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(59,130,246,.12); border-color: var(--accent); }
.page-card-icon {
    width: 36px; height: 36px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.page-card-icon i { color: #fff; font-size: 14px; }
.page-card-title { font-size: 14px; font-weight: 700; color: var(--text); margin: 0; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.page-card-desc { font-size: 12px; color: var(--text2); margin: 8px 0 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.5; }
.page-card-more { margin-top: 10px; font-size: 11px; color: var(--accent); font-weight: 600; }

/* ---------- contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.contact-cell {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px;
    text-align: center;
}
.contact-cell i { font-size: 22px; color: var(--accent); display: block; margin-bottom: 8px; }
.contact-cell .contact-cell-label { font-size: 10px; color: var(--text3); text-transform: uppercase; letter-spacing: 0.3px; }
.contact-cell .contact-cell-val { font-size: 13px; font-weight: 600; color: var(--text); margin-top: 3px; word-break: break-word; }

.form-field { margin-bottom: 12px; }
.form-field label { display: block; font-size: 12px; font-weight: 600; color: var(--text2); margin-bottom: 6px; }
.form-field input, .form-field textarea, .form-field select {
    width: 100%;
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 11px;
    padding: 11px 12px;
    font-size: 13px;
    color: var(--text);
    outline: none;
    font-family: inherit;
    resize: vertical;
}
.form-field input:focus, .form-field textarea:focus, .form-field select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(59,130,246,.1); }

.not-found { text-align: center; padding: 60px 24px; color: var(--text3); }
.not-found i { font-size: 44px; display: block; margin-bottom: 14px; }
.not-found h2 { color: var(--text); font-size: 20px; margin: 0 0 8px; }
.not-found p { font-size: 13px; margin: 0 0 18px; }

.cat-card-count { font-size: 11px; color: var(--text3); margin-top: 2px; }
.page-card-top { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }

/* ================================================================
   DESKTOP (>= 900px)
   ================================================================ */
@media (min-width: 900px) {
    .app-frame {
        max-width: none;
        border-radius: 0;
        box-shadow: none;
        padding-bottom: 28px;
    }

    .navbar {
        border-radius: 0;
        padding: 14px 24px;
        gap: 0;
        justify-content: space-between;
    }
    .nav-logo img { max-height: 60px; }
    .nav-logo-text { font-size: 24px; }
    .nav-actions { display: none; }

    .nav-inner {
        max-width: 1280px;
        width: 100%;
        margin: 0 auto;
        justify-content: space-between;
    }

    .navbar-search {
        flex: 0 1 auto;
        width: clamp(260px, 45%, 560px);
        max-width: 560px;
        margin: 0 auto;
        display: flex;
        align-items: center;
        gap: 12px;
        height: 48px;
        padding: 0 18px;
        background: var(--card);
        border: 1px solid var(--border);
        border-radius: 14px;
        color: var(--accent);
        font-size: 14px;
        transition: 0.2s;
        box-shadow: 0 2px 6px rgba(15, 23, 42, 0.05);
    }
    .navbar-search:focus-within {
        border-color: var(--accent);
        box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.12);
    }
    .navbar-search input {
        flex: 1;
        min-width: 0;
        border: 0;
        outline: none;
        background: transparent;
        color: var(--text);
        font-size: 15px;
    }

    .desktop-nav { display: flex; align-items: center; gap: 2px; }
    .d-link {
        font-size: 14px;
        font-weight: 600;
        color: var(--text2);
        padding: 9px 13px;
        border-radius: 10px;
        white-space: nowrap;
        transition: 0.2s;
    }
    .d-link:hover { background: var(--bg3); color: var(--text); }
    .d-link.active { color: var(--accent); background: var(--bg3); }

    .nav-search { display: none !important; }

    .content {
        width: 100%;
        max-width: 1280px;
        margin: 0 auto;
    }

    .content > .crumb { margin: 0; }
    .content > div[style*="padding:14px"] { padding: 26px 24px 0 !important; }

    .content > div[style*="height:14px"],
    .content > div[style*="height:20px"] { height: 0 !important; }

    .content > section { margin-top: 40px; }
    .content > section.hero-section { margin-top: 28px; }

    .hero-section {
        padding: 0 24px;
    }
    .hero-section .swiper { border-radius: 20px; box-shadow: var(--shadow); }
    .hero-slide { height: 480px; }

    .sec-header { padding: 0 24px 16px; }
    .sec-title { font-size: 22px; }

    .cats-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 22px;
        padding: 0 24px;
    }

    .hot-deals-scroll {
        flex-wrap: wrap;
        overflow-x: visible;
        gap: 16px;
        padding: 6px 24px 0;
    }
    .hot-deal-card { width: 220px; }

    .featured-scroll {
        flex-wrap: wrap;
        overflow-x: visible;
        gap: 16px;
        padding: 6px 24px 0;
    }
    .feat-card { width: 280px; }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(232px, 1fr));
        gap: 20px;
        padding: 6px 24px 0;
    }

    .pagination { padding: 34px 24px 44px; }

    .site-footer {
        width: calc(100% - 48px);
        max-width: 1280px;
        margin: 44px auto 30px;
        border-radius: 20px;
        padding: 28px 24px;
    }

    .bottom-nav { display: none; }

    .search-wrap { margin: 26px 24px 18px !important; }
    .cats-scroll { padding: 0 24px 20px; }
    .results-info { padding: 0 24px 20px; }

    .pad { padding: 24px; }
    .blog-grid {
        grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
        gap: 22px;
        padding: 6px 24px 0;
    }
    .contact-grid { grid-template-columns: repeat(4, 1fr); gap: 18px; }
    .similar-grid { grid-template-columns: repeat(4, 1fr); gap: 14px; }

    .cat-hero { padding: 30px; border-radius: 20px; }
    .detail-card { border-radius: 18px; padding: 28px; }
}

/* ===== Live Search Suggestions ===== */
.navbar-search,
.nav-search { position: relative; z-index: 45; }

.search-suggest-list {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.14);
    overflow: hidden;
    z-index: 60;
    animation: suggestIn 0.18s ease;
}
@keyframes suggestIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}
.search-suggest-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    text-decoration: none;
    color: var(--text);
    transition: background 0.15s;
}
.search-suggest-item + .search-suggest-item { border-top: 1px solid var(--border); }
.search-suggest-item:hover { background: var(--bg); }
.search-suggest-item.active { background: var(--bg3); }
.search-suggest-item img {
    width: 44px;
    height: 44px;
    object-fit: cover;
    border-radius: 10px;
    background: var(--bg);
    flex-shrink: 0;
}
.search-suggest-item .ss-meta { flex: 1; min-width: 0; }
.search-suggest-item .ss-name {
    font-size: 13.5px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.search-suggest-item .ss-price { font-size: 13.5px; font-weight: 700; color: var(--accent); }
.search-suggest-item .ss-price em {
    font-style: normal;
    font-weight: 500;
    font-size: 12px;
    color: var(--text3);
    text-decoration: line-through;
    margin-left: 6px;
}
.search-suggest-empty {
    padding: 14px;
    text-align: center;
    font-size: 13.5px;
    color: var(--text3);
}
.search-suggest-loading {
    padding: 14px;
    text-align: center;
    font-size: 13px;
    color: var(--text3);
}

/* ================================================================
   CATALOGUE PAGE (all products): header, toolbar, chips, filter sheet
   ================================================================ */
.pl-head {
    padding: 16px 14px 12px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.pl-title {
    margin: 0;
    font-size: 21px;
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text);
}
.pl-sub { margin: 0; font-size: 12.5px; color: var(--text3); }
.pl-sub b { color: var(--text2); font-weight: 700; }

.pl-search { margin: 0 14px 12px; }
.pl-search form { position: relative; }
.pl-search .search-input { padding-right: 40px; }
.search-clear {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px; height: 24px;
    border-radius: 50%;
    background: var(--bg3);
    color: var(--text3);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
}
.search-clear:hover { background: var(--accent); color: #fff; }

.toolbar {
    position: sticky;
    top: 84px;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 14px;
    margin-bottom: 12px;
    background: var(--nav);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}
.toolbar-info { font-size: 12.5px; color: var(--text3); white-space: nowrap; }
.toolbar-info b { color: var(--text); font-size: 14px; font-weight: 800; }
.toolbar-actions { display: flex; align-items: center; gap: 8px; min-width: 0; }
.tool-sort { margin: 0; }
.tool-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 34px;
    padding: 0 12px;
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--text2);
    border-radius: 10px;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}
.tool-btn:hover { border-color: var(--accent); color: var(--accent); }
.tool-count {
    min-width: 18px; height: 18px; padding: 0 5px;
    border-radius: 9px;
    background: var(--accent);
    color: #fff;
    font-size: 10.5px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.tool-select { position: relative; padding-right: 26px; }
.tool-select select {
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
    border: 0;
    outline: none;
    font: inherit;
    font-size: 12.5px;
    font-weight: 600;
    color: inherit;
    cursor: pointer;
    max-width: 132px;
    text-overflow: ellipsis;
}
.tool-caret {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    color: var(--text3);
    pointer-events: none;
}

/* active filter chips */
.chip-row { display: flex; flex-wrap: wrap; gap: 7px; padding: 0 14px 14px; }
.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    padding: 5px 9px 5px 11px;
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text2);
    transition: 0.2s;
}
.chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 190px; }
.chip i { font-size: 10px; color: var(--text3); }
.chip:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.chip:hover i { color: #fff; }
.chip-clear { border-style: dashed; color: var(--accent); padding-right: 11px; }

/* category pill counter */
.pill-count {
    font-size: 10px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 999px;
    background: var(--bg4);
    color: var(--text3);
}
.cat-pill.active .pill-count,
.cat-pill:hover .pill-count { background: rgba(255, 255, 255, 0.22); color: #fff; }

/* card extras */
.price-col { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.price-save {
    font-size: 10px;
    font-weight: 700;
    color: var(--accent2);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.soldout-badge {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    background: rgba(15, 23, 42, 0.78);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    text-align: center;
    padding: 4px 0;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    z-index: 3;
}
.card-cta {
    position: absolute;
    left: 50%;
    bottom: 8px;
    transform: translate(-50%, 8px);
    opacity: 0;
    transition: 0.2s;
    background: var(--accent);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    pointer-events: none;
    white-space: nowrap;
    z-index: 3;
}
.product-card:hover .card-cta { opacity: 1; transform: translate(-50%, 0); }
.product-card.is-out .product-icon img { filter: grayscale(1); opacity: 0.55; }
.product-card.is-out .rating-badge,
.product-card.is-out .price-save { opacity: 0.5; }
@media (hover: none) { .card-cta { display: none; } }

/* empty state extras */
.empty-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 18px; }
.empty-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    justify-content: center;
    font-size: 12px;
    color: var(--text3);
}
.empty-cats span {
    width: 100%;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 11px;
    margin-bottom: 3px;
}
.empty-cats a {
    padding: 5px 11px;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--text2);
    background: var(--card);
}
.empty-cats a:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- filter sheet ---------- */
.sheet-backdrop { position: fixed; inset: 0; background: rgba(15, 23, 42, 0.55); z-index: 60; }
.sheet-backdrop[hidden],
.filter-sheet[hidden] { display: none !important; }
.filter-sheet {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 61;
    max-height: 86vh;
    background: var(--card);
    border-radius: 22px 22px 0 0;
    box-shadow: 0 -18px 50px rgba(15, 23, 42, 0.28);
    overflow: hidden;
}
.filter-sheet form {
    display: flex;
    flex-direction: column;
    min-height: 0;
    max-height: 86vh;
}
.fsheet-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 16px 10px;
    font-size: 15px;
    color: var(--text);
}
.fsheet-head strong { display: inline-flex; align-items: center; gap: 8px; }
.fsheet-body {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 4px 16px 10px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.fgroup-title {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text3);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.fgroup-note { font-size: 11px; font-weight: 600; text-transform: none; letter-spacing: 0; color: var(--accent); }

.sort-list { display: flex; flex-direction: column; gap: 7px; }
.sort-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 11px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text2);
    cursor: pointer;
    transition: 0.2s;
}
.sort-item input { position: absolute; opacity: 0; pointer-events: none; }
.sort-item i { margin-left: auto; opacity: 0; color: var(--accent); font-size: 12px; }
.sort-item:hover { border-color: var(--accent); }
.sort-item.active { border-color: var(--accent); background: rgba(79, 70, 229, 0.07); color: var(--accent); }
.sort-item.active i { opacity: 1; }

.preset-row { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 10px; }
.preset-chip {
    padding: 7px 12px;
    border: 1px solid var(--border);
    background: var(--bg3);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text2);
    cursor: pointer;
    transition: 0.2s;
}
.preset-chip:hover { border-color: var(--accent); color: var(--accent); }
.preset-chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }

.price-inputs { display: flex; align-items: flex-end; gap: 8px; }
.price-field {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: 11px;
    font-weight: 700;
    color: var(--text3);
}
.price-field input {
    width: 100%;
    height: 38px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg2);
    color: var(--text);
    font-size: 13.5px;
    padding: 0 10px;
    outline: none;
}
.price-field input:focus { border-color: var(--accent); }
.price-dash { padding-bottom: 10px; color: var(--text3); }

.check-row { display: flex; align-items: center; gap: 10px; font-size: 13.5px; font-weight: 600; color: var(--text2); cursor: pointer; }
.check-row input { position: absolute; opacity: 0; pointer-events: none; }
.check-box {
    width: 20px; height: 20px;
    border: 1.5px solid var(--border);
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: transparent;
    font-size: 10px;
    background: var(--bg2);
    flex-shrink: 0;
    transition: 0.15s;
}
.check-row input:checked + .check-box { background: var(--accent); border-color: var(--accent); color: #fff; }

.fsheet-foot {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px calc(14px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--border);
    background: var(--card);
}
.fsheet-reset { font-size: 13px; font-weight: 700; color: var(--text3); padding: 10px 6px; }
.fsheet-reset:hover { color: var(--accent); }
.fsheet-apply {
    flex: 1;
    height: 44px;
    border: 0;
    border-radius: 12px;
    background: var(--accent);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s;
}
.fsheet-apply:hover { filter: brightness(1.08); }

@media (min-width: 480px) and (max-width: 899px) {
    .filter-sheet { left: 50%; right: auto; transform: translateX(-50%); width: min(var(--frame-w), 100%); }
}

@media (min-width: 900px) {
    .pl-head { padding: 26px 24px 14px; }
    .pl-title { font-size: 30px; }
    .pl-sub { font-size: 13.5px; }
    .pl-search { margin: 0 24px 16px; max-width: 720px; }
    .cats-scroll { padding: 0 24px 16px; }
    .toolbar { top: 88px; padding: 10px 24px; margin-bottom: 16px; }
    .chip-row { padding: 0 24px 16px; }
    .filter-sheet {
        left: 50%; right: auto; bottom: auto; top: 50%;
        transform: translate(-50%, -50%);
        width: 420px;
        max-height: 82vh;
        border-radius: 20px;
        box-shadow: var(--shadow);
    }
    .filter-sheet form { max-height: 82vh; }
}

/* ================================================================
   PRODUCT DETAIL: stock chip, spec table, share, sticky buy bar
   ================================================================ */
.stock-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    background: rgba(16, 185, 129, 0.12);
    color: var(--accent2);
    border: 1px solid rgba(16, 185, 129, 0.3);
}
.stock-chip.out {
    background: rgba(225, 29, 72, 0.1);
    color: #e11d48;
    border-color: rgba(225, 29, 72, 0.3);
}
.stock-chip i { font-size: 9px; }

.buy-note.out { color: #e11d48; }
.buy-note.out i { color: #e11d48; }

.spec-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.spec-table td { padding: 10px 0; border-bottom: 1px dashed var(--border); vertical-align: top; }
.spec-table tr:last-child td { border-bottom: 0; }
.spec-table td:first-child { color: var(--text3); font-weight: 600; width: 42%; }
.spec-table td:last-child { color: var(--text); font-weight: 600; text-align: right; }
.spec-table .spec-price { color: var(--accent2); font-size: 15px; font-weight: 800; }
.spec-table s { color: var(--text3); font-weight: 500; margin-left: 6px; }
.spec-table em { font-style: normal; color: var(--accent); font-weight: 700; margin-left: 6px; }
.spec-table td.ok { color: var(--accent2); }
.spec-table td.no { color: #e11d48; }
.spec-table .spec-link { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }

.share-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}
.share-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text3);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-right: 2px;
}
.share-label i { color: var(--accent); }
.share-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg3);
    color: var(--text2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: pointer;
    transition: 0.2s;
    padding: 0;
}
.share-btn:hover {
    background: var(--s-color, var(--accent));
    border-color: var(--s-color, var(--accent));
    color: #fff;
    transform: translateY(-2px);
}

.related-grid { padding: 0; gap: 10px; }
.related-grid .product-card { font-size: 13px; }

/* sticky mobile buy bar */
.buybar {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: 68px;
    width: 100%;
    max-width: var(--frame-w);
    z-index: 45;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 14px;
    background: var(--nav);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--border);
    box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.12);
    transition: transform 0.25s ease, opacity 0.2s ease;
}
.buybar.hide { transform: translate(-50%, 130%); opacity: 0; pointer-events: none; }
.buybar-price { display: flex; align-items: baseline; gap: 7px; min-width: 0; }
.bp-new { font-size: 18px; font-weight: 800; color: var(--text); white-space: nowrap; }
.bp-old { font-size: 13px; color: var(--text3); text-decoration: line-through; white-space: nowrap; }
.buybar-cta {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 42px;
    padding: 0 18px;
    border-radius: 12px;
    background: var(--accent);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.28);
}
.buybar-cta:hover { filter: brightness(1.1); }
.buybar-cta i { font-size: 12px; }

.site-toast {
    position: fixed;
    left: 50%;
    bottom: 150px;
    transform: translate(-50%, 12px);
    z-index: 70;
    background: var(--text);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    padding: 9px 16px;
    border-radius: 999px;
    opacity: 0;
    pointer-events: none;
    transition: 0.25s;
    box-shadow: var(--shadow);
}
.site-toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (min-width: 900px) {
    .buybar { display: none; }
    .related-grid { grid-template-columns: repeat(4, 1fr); gap: 14px; }
    .spec-table td:first-child { width: 30%; }
}

/* ---------- category banner (catalogue) ---------- */
.cat-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 14px 14px;
    padding: 12px 14px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
}
.cat-banner-img {
    width: 58px;
    height: 58px;
    flex-shrink: 0;
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg3);
    display: flex;
    align-items: center;
    justify-content: center;
}
.cat-banner-img img { width: 100%; height: 100%; object-fit: cover; }
.cat-banner p { margin: 0; font-size: 13px; line-height: 1.55; color: var(--text2); }
@media (min-width: 900px) {
    .cat-banner { margin: 0 24px 18px; padding: 14px 18px; }
    .cat-banner p { font-size: 13.5px; }
}

/* ============ home: latest blog teaser ============ */
.home-blog {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 74%;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 4px 16px 8px;
}
.home-blog::-webkit-scrollbar { display: none; }
.home-blog .blog-card { scroll-snap-align: start; }
@media (min-width: 600px) {
    .home-blog {
        grid-auto-flow: row;
        grid-template-columns: repeat(3, 1fr);
        grid-auto-columns: auto;
        overflow: visible;
        padding: 0 14px;
    }
}
@media (min-width: 900px) {
    .home-blog { padding: 0 24px; }
}

/* ============ blog reading progress + refinement ============ */
.reading-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 120; pointer-events: none; }
.reading-progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--accent-darker, var(--accent))); transition: width 90ms linear; border-radius: 0 2px 2px 0; }
.article-hero { border-radius: 14px; }
.article-content { font-size: 15px; }
.article-content h2, .article-content h3 { scroll-margin-top: 100px; }
.toc { box-shadow: var(--shadow-sm, none); }
