/* =========================================
   Digital Goods Platform - Main Stylesheet
   Based on hstock.org design
   ========================================= */

/* CSS Variables */
:root {
    --primary: #e53935;
    --primary-dark: #c62828;
    --primary-light: #ffcdd2;
    --secondary: #1a1a2e;
    --accent: #4caf50;
    --warning: #ff9800;
    --danger: #f44336;
    --success: #4caf50;
    
    --text-primary: #1a1a2e;
    --text-secondary: #666;
    --text-muted: #999;
    
    --bg-primary: #ffffff;
    --bg-secondary: #f6f7fb;
    --bg-dark: #1a1a2e;
    
    --border-color: #e0e0e0;
    --border-radius: 8px;
    --border-radius-lg: 12px;
    
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
    
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --transition: all 0.2s ease;
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    color: var(--text-primary);
    background: var(--bg-secondary);
    line-height: 1.6;
}

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

img {
    max-width: 100%;
    height: auto;
}

/* Container */
.container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 20px;
}

/* =========================================
   TOP BAR
   ========================================= */
.topbar {
    background: #ffffff;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.85rem;
    position: relative;
    z-index: 200;
}

.topbar-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 40px;
    gap: 16px;
}

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

.topbar-link {
    color: var(--text-muted);
    transition: var(--transition);
}

.topbar-link:hover {
    color: var(--text-primary);
}

/* =========================================
   HEADER
   ========================================= */
.header {
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 24px;
    height: 72px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text-primary);
}

.logo-mark {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--primary);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    line-height: 1;
}

.logo-image {
    height: 68px;
    width: auto;
    max-width: 260px;
    object-fit: contain;
    display: block;
}

.nav-main {
    display: flex;
    gap: 16px;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid transparent;
    font-weight: 600;
    color: var(--text-secondary);
    transition: var(--transition);
}

.nav-link:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-color: var(--border-color);
}

.nav-link.is-active {
    background: rgba(229, 57, 53, 0.12);
    border-color: var(--primary-light);
    color: var(--primary);
}

.btn-catalog {
    background: var(--primary);
    color: #fff;
    border-radius: 10px;
    padding: 10px 16px;
}

.btn-catalog:hover {
    background: var(--primary-dark);
}

.btn-icon-close {
    display: none;
}

.btn-catalog.is-open .btn-icon-open {
    display: none;
}

.btn-catalog.is-open .btn-icon-close {
    display: inline-flex;
}

.btn-icon {
    font-weight: 700;
    opacity: 0.95;
}

.search-form {
    flex: 1;
    max-width: 400px;
    display: flex;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.search-form input {
    flex: 1;
    padding: 10px 16px;
    border: none;
    font-size: 0.9rem;
    outline: none;
}

.search-form button {
    padding: 10px 16px;
    border: none;
    background: var(--bg-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.search-form button:hover {
    background: var(--primary);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-left: auto;
}

.dropdown-trigger.account-trigger {
    padding: 6px 10px;
    border: none;
    border-radius: 999px;
    background: #f2f3f7;
}

.dropdown-trigger.account-trigger:hover {
    border-color: transparent;
    background: #e9ecf3;
}

.account-balance {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-primary);
    min-width: 72px;
}

.avatar--store {
    background: #f59e0b;
}

.icon-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #f2f3f7;
    border-radius: 12px;
    color: var(--text-primary);
    text-decoration: none;
    border: 1px solid transparent;
    transition: var(--transition);
}

.icon-btn--compact {
    width: 36px;
    height: 36px;
    border-radius: 10px;
}

.icon-btn:hover {
    background: #e9ecf3;
    border-color: var(--border-color);
}

.icon-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--primary);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
    box-shadow: var(--shadow-lg);
}

.balance-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: #f2f3f7;
    border-radius: 999px;
    font-weight: 600;
}

.balance-pill-value {
    color: var(--text-primary);
}

/* Dropdown */
.dropdown {
    position: relative;
}

.dropdown-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: white;
    cursor: pointer;
    transition: var(--transition);
}

.dropdown-trigger:hover {
    border-color: var(--primary);
}

.dropdown-trigger--small {
    padding: 6px 10px;
    border-radius: 999px;
    background: #fff;
}

.avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    text-transform: uppercase;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

.dropdown-arrow {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    min-width: 180px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition);
    z-index: 300;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu--right {
    right: 0;
}

.dropdown-item {
    display: block;
    width: 100%;
    padding: 10px 16px;
    text-align: left;
    border: none;
    background: none;
    font: inherit;
    color: inherit;
    cursor: pointer;
    transition: var(--transition);
}

.dropdown-item:hover {
    background: var(--bg-secondary);
    color: var(--primary);
}

.dropdown-item.is-active {
    font-weight: 600;
}

.dropdown-title {
    padding: 10px 16px 6px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.dropdown-divider {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 6px 0;
}

.mobile-menu-btn {
    display: none;
    border: none;
    background: #f2f3f7;
    border-radius: 12px;
    padding: 8px 12px;
    cursor: pointer;
}

.mobile-menu-icon-close {
    display: none;
}

.mobile-menu-btn.is-open .mobile-menu-icon-open {
    display: none;
}

.mobile-menu-btn.is-open .mobile-menu-icon-close {
    display: block;
}

.mobile-search-btn {
    display: none;
    border: none;
    background: #f2f3f7;
    border-radius: 12px;
    padding: 8px 12px;
    cursor: pointer;
}

.mobile-actions {
    display: none;
    align-items: center;
    gap: 10px;
}

body.no-scroll {
    overflow: hidden;
}

/* Catalog overlay (header Catalog button) */
.catalog-overlay {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: 0;
    z-index: 90;
    background: var(--bg-secondary);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.15s ease, visibility 0s linear 0.15s;
    overflow-y: auto;
    padding: 24px 0 48px;
}

.catalog-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity 0.15s ease, visibility 0s;
}

.catalog-overlay.catalog-overlay--panel .catalog-back-btn {
    display: inline-flex;
}

@media (max-width: 768px) {
    .catalog-overlay.catalog-overlay--panel .catalog-shell .sidebar {
        display: none;
    }
}

.catalog-overlay .sidebar,
.catalog-overlay .alpha-rail {
    top: 16px;
}

/* Mobile search + drawer overlays */
.mobile-search,
.mobile-drawer {
    position: fixed;
    inset: 0;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.mobile-search.active,
.mobile-drawer.active {
    opacity: 1;
    pointer-events: auto;
}

.mobile-search-overlay,
.mobile-drawer-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
}

.mobile-search-panel {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--border-color);
    padding: 12px 16px;
    display: flex;
    gap: 10px;
    align-items: center;
    transform: translateY(-100%);
    transition: transform 0.2s ease;
}

.mobile-search.active .mobile-search-panel {
    transform: translateY(0);
}

.mobile-search-form {
    flex: 1;
    display: flex;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.mobile-search-form input {
    flex: 1;
    padding: 10px 14px;
    border: none;
    font-size: 0.95rem;
    outline: none;
}

.mobile-search-form button {
    padding: 10px 14px;
    border: none;
    background: var(--bg-secondary);
    cursor: pointer;
}

.mobile-search-close {
    border: 1px solid var(--border-color);
    background: #fff;
    border-radius: 10px;
    padding: 8px 12px;
    cursor: pointer;
}

.mobile-drawer-panel {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: 340px;
    max-width: 88vw;
    background: #fff;
    transform: translateX(100%);
    transition: transform 0.2s ease;
    display: flex;
    flex-direction: column;
}

.mobile-drawer.active .mobile-drawer-panel {
    transform: translateX(0);
}

.mobile-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
}

.mobile-drawer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    min-width: 0;
}

.mobile-drawer-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mobile-drawer-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.mobile-drawer-brand .logo-text {
    font-size: 1.05rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 190px;
}

.mobile-drawer-close {
    border: none;
    background: #f2f3f7;
    border-radius: 12px;
    padding: 8px 12px;
    cursor: pointer;
}

.mobile-drawer-body {
    padding: 14px 16px 18px;
    overflow: auto;
}

.mobile-drawer-accounts {
    background: #d9ecff;
    border-radius: var(--border-radius-lg);
    padding: 12px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 14px;
}

.mobile-drawer-account {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.8);
    min-width: 0;
    overflow: hidden;
    transition: var(--transition);
}

.mobile-drawer-account:hover {
    background: rgba(255, 255, 255, 0.8);
}

.mobile-drawer-account .avatar {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
}

.mobile-drawer-account-info {
    min-width: 0;
}

.mobile-drawer-account-amount {
    font-weight: 800;
    font-size: 1rem;
    line-height: 1.1;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mobile-drawer-account-label {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.mobile-drawer-preferences {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 12px;
}

.mobile-drawer-preference {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.mobile-drawer-preference-label {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-muted);
}

.mobile-drawer-select {
    width: 100%;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid var(--border-color);
    background: #f2f3f7;
    font-weight: 600;
    cursor: pointer;
}

.mobile-drawer-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(229, 57, 53, 0.15);
}

.mobile-drawer-balance {
    background: #d9ecff;
    border-radius: var(--border-radius-lg);
    padding: 12px 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.mobile-drawer-section {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    margin-bottom: 12px;
}

.mobile-drawer-title {
    padding: 12px 14px;
    font-weight: 700;
    background: var(--bg-secondary);
}

.mobile-drawer-section summary.mobile-drawer-title {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mobile-drawer-section summary.mobile-drawer-title::-webkit-details-marker {
    display: none;
}

.mobile-drawer-summary-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: transform 0.2s ease;
}

.mobile-drawer-catalog[open] .mobile-drawer-summary-icon {
    transform: rotate(180deg);
}

.mobile-drawer-catalog-body {
    border-top: 1px solid var(--border-color);
    padding: 12px 12px 14px;
    background: #fff;
}

.mobile-drawer-catalog-body .card {
    box-shadow: none;
    border: 1px solid var(--border-color);
}

.mobile-drawer-catalog-body .card + .card {
    margin-top: 12px;
}

.mobile-drawer-catalog-body .card-header {
    padding: 12px 14px;
    background: var(--bg-secondary);
}

.mobile-drawer-catalog-body .card-body {
    padding: 0;
}

.mobile-drawer-link {
    display: block;
    width: 100%;
    padding: 12px 14px;
    border: none;
    border-top: 1px solid var(--border-color);
    background: none;
    text-align: left;
    cursor: pointer;
    color: var(--text-primary);
}

.mobile-drawer-section .mobile-drawer-link:first-of-type {
    border-top: none;
}

.mobile-drawer-link:hover {
    background: var(--bg-secondary);
    color: var(--primary);
}

.mobile-drawer-link--danger {
    color: var(--danger);
}

.mobile-drawer-link--danger:hover {
    background: #ffebee;
    color: var(--danger);
}

/* =========================================
   BUTTONS
   ========================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-warning {
    background: var(--warning);
    color: white;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.85rem;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 1.1rem;
}

.btn-block {
    width: 100%;
}

/* =========================================
   SUPPORT RAIL
   ========================================= */
.support-rail {
    position: fixed;
    right: 0;
    top: 45%;
    transform: translateY(-50%);
    z-index: 50;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px 8px;
}

.support-rail-link {
    background: #2d3cff;
    color: #fff;
    border-radius: 10px 0 0 10px;
    padding: 10px 12px;
    font-size: 0.85rem;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    white-space: nowrap;
}

.support-rail-link:hover {
    filter: brightness(0.95);
}

/* =========================================
   CARDS
   ========================================= */
.card {
    background: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
}

.card-body {
    padding: 20px;
}

.card-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

/* Product Card */
.product-card {
    background: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: var(--transition);
}

a.product-card {
    display: block;
    color: inherit;
    text-decoration: none;
}

a.product-card:hover {
    color: inherit;
}

/* Product list rows */
.product-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.product-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    border-radius: 18px;
    border: 1px solid var(--border-color);
    background: #fff;
    box-shadow: var(--shadow-sm);
}

.product-row-thumb {
    width: 64px;
    height: 64px;
    border-radius: 14px;
    overflow: hidden;
    background: var(--bg-secondary);
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: var(--text-muted);
    text-decoration: none;
}

.product-row-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.product-row-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.product-row-title a {
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    display: block;
    line-height: 1.3;
}

.product-row-title a:hover {
    text-decoration: underline;
}

.product-row-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.product-row-store {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
}

.product-row-metrics {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
}

.product-row-metric {
    background: var(--bg-secondary);
    border-radius: 10px;
    padding: 6px 12px;
    min-width: 86px;
    text-align: left;
}

.product-row-metric .metric-label {
    display: none;
    font-size: 0.7rem;
    color: var(--text-muted);
}

.product-row-metric .metric-value {
    font-weight: 700;
    text-align: left;
}

.product-row-metric.metric-price {
    background: rgba(239, 68, 68, 0.08);
    color: var(--primary);
}

.product-row-metric.metric-stock {
    background: rgba(76, 175, 80, 0.12);
    color: var(--success);
}

.product-row-metric.metric-sold {
    background: rgba(26, 26, 46, 0.08);
    color: var(--secondary);
}

.product-row-metric .stock-unit {
    display: none;
}

.product-row-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
}

.product-row-header {
    background: transparent;
    border: none;
    box-shadow: none;
    display: none;
    padding: 0 16px;
    width: 100%;
    align-self: stretch;
    margin: -8px 0 -8px;
}

.product-row-header .product-row-actions {
    visibility: hidden;
    pointer-events: none;
}

.product-row-header-spacer {
    flex: 1 1 auto;
    min-width: 0;
}

.product-row-header .product-row-metric {
    padding: 6px 12px;
    min-width: 86px;
}

.product-row-header .metric-label {
    display: none;
}

.product-row-header .metric-value {
    display: block;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    line-height: 1.1;
}

.product-row-icons {
    display: flex;
    align-items: center;
    gap: 8px;
}

.product-row-inline-meta {
    display: none;
    align-items: center;
    gap: 6px;
}

.product-row-inline-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    background: var(--bg-secondary);
    white-space: nowrap;
}

.product-row-inline-price {
    background: rgba(239, 68, 68, 0.08);
    color: var(--primary);
}

.product-row-inline-stock {
    background: rgba(76, 175, 80, 0.12);
    color: var(--success);
}

.product-row-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f2f3f7;
    color: var(--text-primary);
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
}

.product-row-icon:hover {
    background: #e9ecf3;
    border-color: var(--border-color);
}

.product-row-icon.is-favorited {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.2);
}

.product-row-icon.is-blacklisted {
    color: #111827;
    background: rgba(15, 23, 42, 0.08);
    border-color: rgba(15, 23, 42, 0.15);
}

.product-row-icon svg {
    display: block;
}

.product-row-icon.is-favorited svg {
    fill: currentColor;
}

.product-row-buy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    box-shadow: 0 8px 18px rgba(229, 57, 53, 0.22);
    text-decoration: none;
    white-space: nowrap;
}

.product-row-buy.is-sold-out {
    background: #eef1f5;
    color: var(--text-muted);
    box-shadow: none;
    pointer-events: none;
}

.home-popular-footer {
    margin-top: 10px;
    text-align: right;
}

@media (min-width: 1001px) {
    .product-row-header {
        display: flex;
    }
}

@media (max-width: 1000px) {
    .product-row-header {
        display: none;
    }

    .product-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .product-row-metrics {
        width: 100%;
        flex-wrap: wrap;
        justify-content: flex-start;
    }

    .product-row-actions {
        width: 100%;
        justify-content: space-between;
    }
}

@media (max-width: 720px) {
    .home-section {
        margin-bottom: 28px;
    }

    .home-section-header {
        margin-bottom: 8px;
    }

    .product-list {
        gap: 10px;
    }

    .product-row {
        display: grid;
        grid-template-columns: 48px 1fr;
        grid-template-areas:
            "thumb main"
            "actions actions";
        gap: 8px 10px;
        padding: 10px 12px;
        border-radius: 16px;
    }

    .product-row.product-row-header {
        display: none;
    }

    .product-row-thumb {
        grid-area: thumb;
        width: 44px;
        height: 44px;
        border-radius: 10px;
    }

    .product-row-main {
        grid-area: main;
        gap: 4px;
    }

    .product-row-title a {
        font-size: 0.95rem;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .product-row-badges {
        gap: 4px;
    }

    .product-card-badge {
        font-size: 0.68rem;
        padding: 3px 8px;
    }

    .product-row-store {
        display: none;
    }

    .product-row-metrics {
        display: none;
    }

    .product-row-actions {
        grid-area: actions;
        width: 100%;
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        gap: 6px;
        flex-wrap: nowrap;
    }

    .product-row-icons {
        gap: 6px;
    }

    .product-row-icon {
        width: 28px;
        height: 28px;
        border-radius: 8px;
    }

    .product-row-inline-meta {
        display: flex;
        gap: 6px;
    }

    .product-row-inline-chip {
        padding: 4px 8px;
        font-size: 0.75rem;
    }

    .product-row-inline-chip .stock-unit {
        display: inline;
    }

    .product-row-buy {
        margin-left: auto;
        padding: 6px 12px;
        font-size: 0.82rem;
        box-shadow: 0 6px 12px rgba(229, 57, 53, 0.18);
    }
}

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

.product-card-image {
    height: 160px;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}

.product-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

@media (min-width: 1025px) {
    .product-card-image {
        height: 300px;
    }

    .product-card-image img {
        object-fit: contain;
    }
}

.product-card-body {
    padding: 16px;
}

.product-card-title {
    font-weight: 600;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card-store {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.product-card-store-line {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 10px;
}

.product-card-store-line span:first-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-card-store-insurance {
    margin-top: 2px;
    font-size: 0.78rem;
}

.product-card-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
}

.product-card-stock {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.product-card-stock.in-stock {
    color: var(--success);
}

.product-card-stock.out-of-stock {
    color: var(--danger);
}

.product-title-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
}

.product-title-thumb {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--bg-secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex: 0 0 48px;
    font-weight: 700;
    color: var(--text-muted);
}

.product-title-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.product-title {
    font-size: 1.5rem;
    margin: 0;
    line-height: 1.35;
}

.product-price-row {
    flex-wrap: wrap;
    gap: 8px 12px;
}

.product-price-meta {
    font-size: 0.9rem;
}

.product-price-sep {
    opacity: 0.6;
}

.purchase-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: flex-start;
}

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

.purchase-qty .form-label {
    white-space: nowrap;
}

.qty-stepper {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    box-shadow: var(--shadow-sm);
}

.qty-btn {
    width: 32px;
    height: 36px;
    border: none;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.qty-btn:hover {
    background: #e9ecf3;
}

.qty-input {
    width: 64px;
    height: 36px;
    border: none;
    padding: 6px 8px;
    text-align: center;
    font-weight: 600;
    background: transparent;
}

#quantity_input {
    width: 64px;
    height: 36px;
    border: none;
    padding: 6px 8px;
    text-align: center;
    font-weight: 600;
    background: transparent;
}

.qty-input:focus {
    outline: none;
    box-shadow: inset 0 0 0 2px rgba(229, 57, 53, 0.15);
}

.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.qty-input[type="number"] {
    -moz-appearance: textfield;
}

.purchase-coupon {
    display: inline-flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
}

.purchase-coupon-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.purchase-coupon-toggle {
    list-style: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border: 1px dashed var(--border-color);
    border-radius: 999px;
    background: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    transition: var(--transition);
}

.purchase-coupon-toggle::-webkit-details-marker {
    display: none;
}

.purchase-coupon-toggle::marker {
    display: none;
}

.purchase-coupon-toggle::after {
    content: "+";
    font-weight: 700;
    color: var(--text-muted);
}

.purchase-coupon-toggle:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.purchase-coupon[open] .purchase-coupon-toggle {
    border-style: solid;
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.purchase-coupon[open] .purchase-coupon-toggle::after {
    content: "-";
}

.purchase-coupon-panel {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: #fff;
    box-shadow: var(--shadow-sm);
    min-width: 240px;
}

#coupon_code {
    width: 180px;
}

.purchase-row.mb-3 {
    margin-bottom: 14px;
}

.coupon-summary {
    margin: 12px 0 18px;
    padding: 12px 14px;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    background: var(--bg-secondary);
    max-width: 520px;
}

@media (min-width: 1025px) {
    .purchase-row {
        flex-wrap: nowrap;
        align-items: center;
    }

    .purchase-coupon {
        align-self: center;
    }

    .purchase-coupon-controls {
        flex-wrap: nowrap;
    }

    .purchase-coupon-panel {
        min-width: 280px;
    }
}

.product-page .product-card-meta {
    display: flex;
}

.product-badges,
.product-meta {
    flex-wrap: wrap;
}

.product-card-meta {
    display: none;
    flex-wrap: wrap;
    gap: 8px;
}

.product-card-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-card-actions {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.product-card-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    white-space: nowrap;
}

.product-card-badge.is-delivery.is-auto {
    background: rgba(76, 175, 80, 0.15);
    color: var(--success);
}

.product-card-badge.is-delivery.is-manual {
    background: rgba(255, 152, 0, 0.15);
    color: var(--warning);
}

.product-card-badge.is-stock {
    background: rgba(76, 175, 80, 0.12);
    color: var(--success);
}

.product-card-badge.is-stock.is-out-of-stock {
    background: rgba(244, 67, 54, 0.12);
    color: var(--danger);
}

.product-card-badge.is-sold {
    background: rgba(26, 26, 46, 0.08);
    color: var(--secondary);
}

.product-card-badge.is-bestseller {
    background: rgba(255, 193, 7, 0.18);
    color: var(--warning);
}

.product-card-badge.is-recording {
    background: rgba(255, 152, 0, 0.16);
    color: var(--warning);
}

.product-card-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 16px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    box-shadow: 0 8px 18px rgba(229, 57, 53, 0.22);
}

.product-card-action.is-sold-out {
    background: #eef1f5;
    color: var(--text-muted);
    box-shadow: none;
}

/* Store banner + rich text */
.store-banner {
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
}

.store-banner-inner {
    width: 100%;
    aspect-ratio: 1116 / 300;
    min-height: 120px;
}

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

.store-richtext {
    line-height: 1.7;
    font-size: 0.95rem;
}

.prose {
    line-height: 1.75;
    font-size: 0.98rem;
    color: var(--text-primary);
    overflow-wrap: anywhere;
    word-break: break-word;
}

.prose img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
}

.prose p {
    margin: 0 0 12px;
}

.prose ul,
.prose ol {
    margin: 0 0 12px;
    padding-left: 20px;
}

.prose li + li {
    margin-top: 6px;
}

.prose a {
    color: var(--primary);
    text-decoration: underline;
    text-underline-offset: 2px;
    overflow-wrap: anywhere;
}

.store-richtext img {
    max-width: 100%;
    height: auto;
}

.store-richtext p {
    margin: 0 0 10px;
}

.store-richtext ul,
.store-richtext ol {
    margin: 0 0 10px;
    padding-left: 18px;
}

.store-richtext a {
    color: var(--primary);
}

/* =========================================
   FORMS
   ========================================= */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: var(--text-primary);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.form-control.is-invalid {
    border-color: var(--danger);
}

.form-text {
    margin-top: 4px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.form-text.text-danger {
    color: var(--danger);
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

/* =========================================
   ALERTS
   ========================================= */
.alert {
    padding: 12px 0;
}

.alert-success {
    background: #e8f5e9;
    color: #2e7d32;
}

.alert-error {
    background: #ffebee;
    color: #c62828;
}

.alert-warning {
    background: #fff3e0;
    color: #ef6c00;
}

.alert-info {
    background: #e3f2fd;
    color: #1565c0;
}

/* =========================================
   GRID LAYOUTS
   ========================================= */
.grid {
    display: grid;
    gap: 20px;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-5 { grid-template-columns: repeat(5, 1fr); }

@media (max-width: 1024px) {
    .grid-5 { grid-template-columns: repeat(4, 1fr); }
    .grid-4 { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
    .grid-5, .grid-4, .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
    .grid-5, .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

/* =========================================
   MAIN CONTENT
   ========================================= */
.main-content {
    min-height: calc(100vh - 200px);
    padding: 24px 0;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 48px;
    border-radius: var(--border-radius-lg);
    margin-bottom: 32px;
}

.hero--home {
    background: linear-gradient(135deg, #2b50ff 0%, #18c3ff 100%);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 24px;
    align-items: center;
}

.hero-illustration {
    display: flex;
    justify-content: flex-end;
}

.hero-box {
    width: 260px;
    height: 180px;
    border-radius: 18px;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.2);
    position: relative;
    overflow: hidden;
}

.hero-box-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: rgba(255,255,255,0.9);
    color: #2b50ff;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-box-lines {
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 18px;
    display: grid;
    gap: 10px;
}

.hero-box-line {
    height: 10px;
    border-radius: 999px;
    background: rgba(255,255,255,0.55);
}

.hero-box-line:nth-child(2) { width: 70%; }
.hero-box-line:nth-child(3) { width: 55%; }

.hero-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.hero-text {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 24px;
}

/* =========================================
   HOME (Hstock-like)
   ========================================= */
.home-hero {
    background: linear-gradient(135deg, #2431c9 0%, #355cff 55%, #2aa8ff 100%);
    padding: 44px 46px;
    border-radius: 18px;
    margin-bottom: 18px;
}

.home-hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 28px;
    align-items: center;
}

.home-hero-title {
    font-size: 2.05rem;
    line-height: 1.15;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin-bottom: 14px;
    max-width: 560px;
}

.home-hero-text {
    font-size: 0.98rem;
    line-height: 1.75;
    opacity: 0.92;
    max-width: 620px;
}

.home-hero-art {
    display: flex;
    justify-content: flex-end;
}

.home-hero-device {
    position: relative;
    width: 380px;
    max-width: 100%;
    height: 220px;
}

.home-hero-device-card {
    position: absolute;
    right: 0;
    top: 10px;
    width: 340px;
    height: 210px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.18);
    overflow: hidden;
}

.home-hero-device-logo {
    position: absolute;
    top: 22px;
    left: 22px;
    width: 74px;
    height: 74px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.96);
    color: #2431c9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 2.1rem;
    line-height: 1;
}

.home-hero-device-lines {
    position: absolute;
    left: 22px;
    right: 22px;
    bottom: 22px;
    display: grid;
    gap: 10px;
}

.home-hero-device-line {
    height: 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.55);
}

.home-hero-device-line:nth-child(2) { width: 70%; }
.home-hero-device-line:nth-child(3) { width: 55%; }

.home-hero-bubbles {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.home-hero-bubble {
    position: absolute;
    width: 52px;
    height: 52px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(4px);
}

.home-hero-bubble.b1 { right: 260px; top: 10px; transform: rotate(12deg); }
.home-hero-bubble.b2 { right: 30px; top: 0px; transform: rotate(-10deg); }
.home-hero-bubble.b3 { right: 230px; bottom: 18px; transform: rotate(-8deg); }
.home-hero-bubble.b4 { right: 30px; bottom: 26px; transform: rotate(10deg); }

.home-category-strip {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 10px 12px;
    margin: 0 0 26px;
}

.home-category-strip-inner {
    display: flex;
    gap: 10px;
    overflow: auto;
    scrollbar-width: none;
}

.home-category-strip-inner::-webkit-scrollbar {
    display: none;
}

.home-category-chip {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: #fff;
    font-size: 0.88rem;
    color: #2f3342;
    line-height: 1;
    transition: var(--transition);
}

.home-category-chip:hover {
    border-color: rgba(0, 0, 0, 0.18);
    box-shadow: var(--shadow-sm);
}

.home-section {
    margin-bottom: 42px;
}

.home-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.home-section-title {
    font-size: 1.1rem;
    font-weight: 700;
}

.home-section-link {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

.home-section-link:hover {
    color: var(--primary);
}

.home-popular-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
}

.home-popular-icons {
    display: flex;
    gap: 18px;
    overflow-x: auto;
    padding-bottom: 6px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.home-popular-icons .home-icon-item {
    flex: 0 0 auto;
    width: 96px;
    scroll-snap-align: start;
    text-decoration: none;
}

.home-popular-icons .home-icon-item:hover .home-icon-box {
    border-color: var(--primary);
}

.home-popular-icons .home-icon-label {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-width: 96px;
    line-height: 1.2;
    word-break: break-word;
}

.home-popular-tab {
    border: 1px solid var(--border-color);
    background: #fff;
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #2f3342;
    cursor: pointer;
    transition: var(--transition);
}

.home-popular-tab.is-active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.home-popular-panel {
    display: none;
}

.home-popular-panel.is-active {
    display: block;
}

.home-icon-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    align-items: flex-start;
}

.home-icon-item {
    width: 78px;
    text-align: center;
    color: var(--text-muted);
}

.home-icon-box {
    width: 56px;
    height: 56px;
    margin: 0 auto;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.home-icon-box img {
    width: 30px;
    height: 30px;
    object-fit: contain;
    display: block;
}

.home-icon-letter {
    font-weight: 800;
    color: #2f3342;
    font-size: 1.1rem;
}

.home-icon-label {
    margin-top: 6px;
    font-size: 0.72rem;
    line-height: 1.15;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.home-icon-item:hover .home-icon-box {
    border-color: rgba(0, 0, 0, 0.18);
    box-shadow: var(--shadow-sm);
}

.home-icon-item:hover .home-icon-label {
    color: #2f3342;
}

.home-icon-item--all .home-icon-box {
    background: #f7f8fb;
}

.home-icon-arrow {
    font-size: 1.2rem;
    color: #2f3342;
    font-weight: 700;
}

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

.home-skeleton-card {
    height: 210px;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    position: relative;
    overflow: hidden;
}

.home-skeleton-card::after {
    content: "";
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.04), transparent);
    animation: home-shimmer 1.2s infinite;
}

@keyframes home-shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.home-store-grid {
    gap: 18px;
}

.home-store-card {
    display: block;
    background: #fff;
    border: 1px solid rgba(255, 90, 60, 0.5);
    border-radius: 14px;
    padding: 16px 14px;
    transition: var(--transition);
}

.home-store-card:hover {
    box-shadow: var(--shadow-sm);
    transform: translateY(-2px);
}

.home-store-avatar {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    background: #f2f3f7;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.6rem;
    margin-bottom: 10px;
    color: #2f3342;
}

.home-store-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 18px;
    display: block;
}

.home-store-name {
    font-weight: 700;
    margin-bottom: 10px;
}

.home-store-meta {
    display: flex;
    gap: 6px;
    align-items: baseline;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.home-store-meta-value {
    font-weight: 700;
    color: #2f3342;
}

.home-store-since {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.3;
}

.home-blog-grid {
    gap: 18px;
}

.home-blog-card {
    display: block;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 14px;
    transition: var(--transition);
}

.home-blog-card:hover {
    box-shadow: var(--shadow-sm);
    border-color: rgba(0, 0, 0, 0.14);
}

.home-blog-cover {
    height: 120px;
    border-radius: 12px;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #2b50ff 0%, #18c3ff 100%);
}

.home-blog-cover--purple {
    background: linear-gradient(135deg, #6b4bff 0%, #2b50ff 100%);
}

.home-blog-cover--red {
    background: linear-gradient(135deg, #ff4b6b 0%, #ff7a45 100%);
}

.home-blog-title {
    font-size: 0.98rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 8px;
}

.home-blog-excerpt {
    font-size: 0.86rem;
    line-height: 1.55;
    margin-bottom: 10px;
}

.home-blog-date {
    font-size: 0.78rem;
}

/* Category Tags */
.category-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.category-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 0.9rem;
    transition: var(--transition);
}

.category-tag:hover,
.category-tag.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Products listing + filters */
.products-page {
    overflow-x: hidden;
}

.products-page .layout-sidebar {
    align-items: start;
}

.products-page .main {
    min-width: 0;
}

.products-filters {
    padding: 18px;
}

.filters-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.filters-title {
    font-weight: 700;
    font-size: 1rem;
}

.filters-form {
    display: grid;
    gap: 16px;
}

.filter-section {
    display: grid;
    gap: 10px;
}

.filter-title {
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--text-primary);
}

.filter-options {
    display: grid;
    gap: 8px;
    max-height: 260px;
    overflow: auto;
    padding-right: 4px;
}

.filter-option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.filter-option span {
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.filter-option input {
    accent-color: var(--primary);
}

.filter-range {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 8px;
    align-items: center;
}

.filter-range-sep {
    color: var(--text-muted);
    font-weight: 600;
}

.filter-check {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    color: var(--text-secondary);
}

.products-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
    min-width: 0;
}

.products-active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: 0.8rem;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
    transition: var(--transition);
}

.filter-chip:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: #fff;
}

.filter-chip-x {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: #fff;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Section */
.section {
    margin-bottom: 40px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.catalog-panel-header {
    justify-content: flex-start;
    gap: 12px;
}

.catalog-back-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 12px;
    background: #f2f3f7;
    color: var(--text-primary);
    cursor: pointer;
    flex: 0 0 40px;
}

.catalog-back-btn:hover {
    background: #e9ecf3;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
}

.section-link {
    color: var(--primary);
    font-weight: 500;
}

/* =========================================
   SIDEBAR LAYOUT
   ========================================= */
.layout-sidebar {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 24px;
}

.layout-sidebar .main {
    min-width: 0;
}

.sidebar {
    background: white;
    border-radius: var(--border-radius-lg);
    padding: 20px;
    height: fit-content;
    position: sticky;
    top: 120px;
}

.catalog-shell .sidebar {
    background: transparent;
    padding: 0;
    border-radius: 0;
}

.catalog-shell .main {
    min-width: 0;
}

[data-catalog-panel].is-loading {
    opacity: 0.65;
    pointer-events: none;
}

.sidebar-title {
    font-weight: 600;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--border-radius);
    margin-bottom: 4px;
    transition: var(--transition);
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background: var(--primary-light);
    color: var(--primary);
}

.sidebar-menu a.active {
    font-weight: 500;
}

/* Store Card */
.store-card {
    text-align: center;
    padding: 24px;
    background: white;
    border-radius: var(--border-radius-lg);
}

.store-card--mobile {
    display: none;
}

.store-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    font-size: 2rem;
}

.store-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

.store-name {
    font-weight: 600;
    margin-bottom: 4px;
}

.store-rating {
    color: #ffc107;
    margin-bottom: 12px;
}

.store-stats {
    display: flex;
    justify-content: center;
    gap: 10px 24px;
    flex-wrap: wrap;
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* =========================================
   ORDERS
   ========================================= */
.order-card {
    background: white;
    border-radius: var(--border-radius-lg);
    padding: 20px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.order-icon {
    width: 48px;
    height: 48px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.order-info {
    flex: 1;
}

.order-id {
    font-weight: 600;
    margin-bottom: 4px;
}

.order-product {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.order-product a {
    color: #2563eb;
    text-decoration: none;
}

.order-product a:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

.order-product-link {
    color: #2563eb;
    text-decoration: none;
}

.order-product-link:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

.order-meta {
    text-align: right;
}

.order-amount {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--primary);
}

.order-date {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.order-actions {
    display: flex;
    gap: 8px;
}

/* Status Badges */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-success { background: #e8f5e9; color: #2e7d32; }
.badge-warning { background: #fff3e0; color: #ef6c00; }
.badge-danger { background: #ffebee; color: #c62828; }
.badge-info { background: #e3f2fd; color: #1565c0; }

/* =========================================
   DISPUTE CHAT
   ========================================= */
.chat-container {
    max-height: 500px;
    overflow-y: auto;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
}

.chat-message {
    max-width: 70%;
    margin-bottom: 12px;
}

.chat-message.sent {
    margin-left: auto;
}

.chat-message.received {
    margin-right: auto;
}

.chat-bubble {
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 0.95rem;
}

.chat-message.sent .chat-bubble {
    background: var(--primary);
    color: white;
    border-bottom-right-radius: 4px;
}

.chat-message.received .chat-bubble {
    background: white;
    border-bottom-left-radius: 4px;
}

.chat-message.system .chat-bubble {
    background: var(--warning);
    color: white;
    text-align: center;
    max-width: 100%;
}

.chat-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.chat-input {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.chat-input input {
    flex: 1;
}

/* Dispute / chat actions */
.dispute-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-top: 12px;
}

.dispute-actions form {
    margin: 0;
}

.dispute-actions .dispute-actions-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.dispute-actions .form-control {
    height: 36px;
    padding: 0 12px;
    font-size: 0.92rem;
}

.dispute-actions .btn {
    height: 36px;
    padding: 0 14px;
    white-space: nowrap;
}

.dispute-actions .btn.btn-sm {
    padding: 0 12px;
}

.dispute-actions .refund-input {
    width: 220px;
    max-width: 100%;
}

/* Modal (shared) */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: #fff;
    border-radius: var(--border-radius-lg);
    width: 100%;
    max-width: 520px;
    margin: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header button {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    color: var(--text-muted);
}

.modal-header button:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

/* =========================================
   FOOTER
   ========================================= */
.footer {
    background: #ffffff;
    color: var(--text-primary);
    padding: 48px 0 24px;
    margin-top: 48px;
    border-top: 1px solid var(--border-color);
}

/* Category rows (catalog-like) */
.category-rows {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
}

.category-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.category-row:last-child {
    border-bottom: none;
}

.category-row:hover {
    background: var(--bg-secondary);
}

.category-row-name {
    font-weight: 500;
}

.category-row-arrow {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.category-row.is-active {
    background: var(--primary-light);
}

.category-row.is-active .category-row-name {
    color: var(--primary);
    font-weight: 600;
}

/* Catalog A-Z layout */
.az-toolbar {
    margin: 0 0 14px;
}

.az-search {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.az-search .form-control {
    max-width: 420px;
}

.catalog-alpha {
    display: grid;
    grid-template-columns: 44px 1fr;
    gap: 24px;
}

.alpha-rail {
    position: sticky;
    top: 120px;
    align-self: start;
    display: flex;
    flex-direction: column;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.alpha-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 28px;
    border-radius: 10px;
    transition: var(--transition);
}

.alpha-link:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.alpha-link.is-active {
    background: var(--primary);
    color: #fff;
    font-weight: 800;
}

.alpha-link.is-disabled {
    opacity: 0.35;
    pointer-events: none;
}

.alpha-link--all {
    font-weight: 800;
}

.alpha-group {
    scroll-margin-top: 100px;
}

.alpha-group-title {
    font-weight: 700;
    color: var(--text-muted);
    margin: 4px 0 12px;
}

.alpha-items {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.alpha-items--products {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.alpha-item-product {
    width: 100%;
}

.alpha-item {
    display: flex;
    gap: 12px;
    padding: 12px 14px;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    transition: var(--transition);
}

.alpha-item:hover {
    border-color: rgba(0, 0, 0, 0.15);
    box-shadow: var(--shadow-sm);
}

.alpha-item-stack {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.alpha-subcategories {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0 4px 2px;
}

.alpha-subcategory-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.78rem;
    line-height: 1.4;
    text-decoration: none;
    transition: var(--transition);
}

.alpha-subcategory-link:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}

.alpha-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: var(--bg-secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--text-primary);
    flex: 0 0 auto;
}

.alpha-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 14px;
}

.alpha-name {
    font-weight: 600;
    margin-bottom: 4px;
}

.alpha-tags {
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.az-empty {
    margin-top: 14px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    margin-bottom: 32px;
}

.footer-section h4 {
    font-size: 1rem;
    margin-bottom: 16px;
}

.footer-section a {
    display: block;
    color: var(--text-muted);
    margin-bottom: 8px;
    transition: var(--transition);
}

.footer-section a:hover {
    color: var(--text-primary);
}

.footer-bottom {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.9rem;
}

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

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

/* =========================================
   PAGINATION
   ========================================= */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 32px;
    flex-wrap: wrap;
    align-items: center;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.pagination a:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.pagination .active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

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

.pagination-jump {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.pagination-jump-label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.pagination-jump-input {
    width: 72px;
    height: 40px;
    padding: 0 8px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: #fff;
    text-align: center;
    font-size: 0.95rem;
}

.pagination-jump-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.pagination--store {
    display: block;
}

.pagination-store {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.pagination-store-info {
    color: var(--text-muted);
    font-size: 0.9rem;
    text-align: center;
    line-height: 1.5;
}

.pagination-store-info strong {
    color: var(--text-primary);
    font-weight: 600;
}

.pagination-store-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    padding: 10px 12px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    width: 100%;
}

.pagination--store .pagination-store-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid transparent;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.85rem;
    white-space: nowrap;
    transition: var(--transition);
}

.pagination--store .pagination-store-link:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: white;
}

.pagination--store .pagination-store-link.is-active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    box-shadow: 0 6px 14px rgba(229, 57, 53, 0.22);
}

.pagination--store .pagination-store-link.is-disabled {
    opacity: 0.45;
    pointer-events: none;
}

.pagination--store .pagination-jump-input {
    width: 64px;
    height: 36px;
    padding: 0 6px;
    font-size: 0.9rem;
}

.pagination--store .pagination-jump .btn {
    padding: 6px 10px;
    font-size: 0.8rem;
}

.pagination-store-ellipsis {
    display: inline-flex;
    align-items: center;
    color: var(--text-muted);
    padding: 0 6px;
    min-width: auto;
    height: auto;
    border: none;
    background: transparent;
}

/* =========================================
   UTILITIES
   ========================================= */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }

.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

.p-1 { padding: 8px; }
.p-2 { padding: 16px; }
.p-3 { padding: 24px; }
.p-4 { padding: 32px; }

.d-flex { display: flex; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 1024px) {
    .layout-sidebar {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        position: static;
    }

    .layout-sidebar .main {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .layout-sidebar .main .card-body {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .layout-sidebar .main table {
        max-width: 100%;
    }

    .layout-sidebar .main table th,
    .layout-sidebar .main table td {
        overflow-wrap: break-word;
        word-break: break-word;
    }
}

@media (max-width: 768px) {
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .layout-sidebar .main .section-header,
    .layout-sidebar .main .card-header.d-flex,
    .layout-sidebar .main .card-body.d-flex {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .layout-sidebar .main .section-header .d-flex,
    .layout-sidebar .main .card-header.d-flex .d-flex,
    .layout-sidebar .main .card-body.d-flex .d-flex,
    .layout-sidebar .main .section-header form,
    .layout-sidebar .main .card-header form,
    .layout-sidebar .main .card-body form {
        width: 100%;
        flex-wrap: wrap;
    }

    .layout-sidebar .main .form-control {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }

    .layout-sidebar .main .seller-item-right {
        width: 100%;
        flex-wrap: wrap;
        justify-content: flex-start;
    }

    .layout-sidebar .main .seller-item-actions {
        flex-wrap: wrap;
        width: 100%;
    }

    .layout-sidebar .main .seller-item-price {
        min-width: 0;
        text-align: left;
    }

    .layout-sidebar .main table.responsive-table {
        border-collapse: separate;
        border-spacing: 0 12px;
        width: 100%;
    }

    .layout-sidebar .main table.responsive-table thead {
        display: none;
    }

    .layout-sidebar .main table.responsive-table tbody,
    .layout-sidebar .main table.responsive-table tr,
    .layout-sidebar .main table.responsive-table td {
        display: block;
        width: 100%;
    }

    .layout-sidebar .main table.responsive-table tr {
        background: #fff;
        border: 1px solid var(--border-color);
        border-radius: 14px;
        padding: 12px 14px;
        box-shadow: var(--shadow-sm);
    }

    .layout-sidebar .main table.responsive-table tr + tr {
        margin-top: 12px;
    }

    .layout-sidebar .main table.responsive-table td {
        padding: 6px 0 !important;
        text-align: left !important;
        border: none;
        overflow-wrap: break-word;
        word-break: break-word;
    }

    .layout-sidebar .main table.responsive-table td.text-right {
        white-space: nowrap;
    }

    .layout-sidebar .main table.responsive-table td::before {
        content: attr(data-label);
        font-size: 0.72rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.03em;
        color: var(--text-muted);
        display: block;
        margin-bottom: 2px;
    }

    .layout-sidebar .main table.responsive-table td[data-label=""]::before {
        display: none;
    }

    .topbar-left {
        display: none;
    }

    .topbar-content {
        justify-content: flex-end;
    }

    .catalog-overlay {
        padding: 14px 0 28px;
    }

    .catalog-overlay .sidebar,
    .catalog-overlay .alpha-rail {
        top: 8px;
    }

    .search-form,
    .header-right {
        display: none;
    }

    .nav-main {
        display: none;
    }

    .header {
        border-bottom: 0;
        box-shadow: var(--shadow-sm);
    }

    .btn-catalog {
        display: none;
    }

    .btn-catalog {
        padding: 8px 10px;
        border-radius: 12px;
    }

    .btn-catalog .btn-label {
        display: none;
    }

    .logo {
        flex: 1;
        min-width: 0;
    }

    .logo-image {
        height: 44px;
        max-width: 300px;
    }

    .logo-mark {
        width: 44px;
        height: 44px;
        border-radius: 12px;
    }

    .header-content {
        flex-wrap: nowrap;
        height: 68px;
        padding: 10px 0;
        gap: 12px;
    }

    .logo-text {
        font-size: 1.15rem;
        max-width: 220px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .product-page {
        overflow-x: hidden;
        padding-left: 16px;
        padding-right: 16px;
    }

    .product-page .sidebar {
        display: none;
    }

    .product-page .main {
        min-width: 0;
    }

    .product-page .product-title {
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .product-title-row {
        gap: 10px;
    }

    .product-title-thumb {
        width: 40px;
        height: 40px;
        border-radius: 10px;
        flex-basis: 40px;
    }

    .product-title {
        font-size: 1.25rem;
    }

    .product-page .store-card--mobile {
        display: block;
    }

    .products-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .products-filters {
        padding: 16px;
    }

    .filter-options {
        max-height: 220px;
    }

    .pagination-store {
        gap: 10px;
    }

    .pagination-store-info {
        font-size: 0.85rem;
    }

    .pagination-store-links {
        padding: 8px 10px;
    }

    .product-list {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .product-card {
        display: flex;
        align-items: center;
        gap: 14px;
        padding: 14px;
    }

    .product-card-image {
        width: 64px;
        height: 64px;
        border-radius: 50%;
        overflow: hidden;
        flex: 0 0 auto;
        font-size: 1.6rem;
    }

    .product-card-body {
        padding: 0;
        flex: 1;
        min-width: 0;
    }

    .product-card-title {
        font-size: 1rem;
        margin-bottom: 6px;
    }

    .product-card-store {
        display: block;
        margin-top: 6px;
    }

    .product-card-summary {
        display: none;
    }

    .product-card-meta {
        display: flex;
    }

    .product-card-badge.is-sold {
        display: none;
    }

    .product-card-actions {
        display: flex;
        margin-top: 6px;
    }

    .product-card-price {
        font-size: 1.05rem;
    }

    .purchase-row {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        margin-bottom: 10px;
    }

    .purchase-row.mb-3 {
        margin-bottom: 10px;
    }

    .purchase-qty {
        width: 100%;
    }

    .qty-stepper {
        align-self: flex-start;
        box-shadow: none;
    }

    .qty-input {
        width: 56px;
        height: 34px;
        padding: 4px 6px;
    }

    #quantity_input {
        width: 56px;
        height: 34px;
        padding: 4px 6px;
    }

    .qty-btn {
        width: 30px;
        height: 34px;
    }

    .purchase-coupon {
        width: 100%;
    }

    .purchase-coupon-toggle {
        width: 100%;
        justify-content: space-between;
    }

    .purchase-coupon-panel {
        width: 100%;
        min-width: 0;
    }

    #coupon_code {
        width: auto;
        flex: 1 1 auto;
        min-width: 0;
    }

    .coupon-summary {
        margin: 6px 0 10px;
        max-width: 100%;
    }

    .mobile-actions {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        margin-left: auto;
    }

    .mobile-search-btn,
    .mobile-menu-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        padding: 0;
        margin-left: 0;
    }
    
    .hero {
        padding: 32px 24px;
    }

    .home-hero {
        padding: 26px 18px;
    }

    .home-hero-title {
        font-size: 1.6rem;
        max-width: 100%;
    }

    .home-hero-text {
        font-size: 0.95rem;
        max-width: 100%;
    }

    .home-hero-grid {
        grid-template-columns: 1fr;
    }

    .home-hero-art {
        justify-content: center;
    }

    .home-hero-device {
        height: 170px;
    }

    .home-hero-device-card {
        width: 280px;
        height: 170px;
        left: 50%;
        right: auto;
        transform: translateX(-50%);
    }

    .store-banner-inner {
        min-height: 0;
    }

    .store-banner-inner img {
        object-fit: contain;
        background: var(--bg-secondary);
    }

    .home-icon-grid {
        gap: 12px;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 6px;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x proximity;
    }

    .home-icon-item {
        flex: 0 0 auto;
        scroll-snap-align: start;
    }

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

    .hero-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-title {
        font-size: 1.5rem;
    }

    .support-rail {
        right: 12px;
        top: auto;
        bottom: 12px;
        transform: none;
        padding: 0;
        gap: 10px;
    }

    .support-rail-link {
        border-radius: 12px;
        box-shadow: var(--shadow-md);
    }

    .order-card {
        flex-direction: column;
        align-items: stretch;
    }

    .order-meta {
        text-align: left;
    }

    .order-actions {
        width: 100%;
    }

    .order-actions .btn {
        width: 100%;
        justify-content: center;
    }

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

    .az-search .form-control {
        max-width: 100%;
        flex: 1 1 260px;
    }
}

@media (max-width: 480px) {
    .logo-image {
        height: 48px;
        max-width: 260px;
    }

    .filter-range {
        grid-template-columns: 1fr;
    }

    .filter-range-sep {
        display: none;
    }

    .home-hero {
        padding: 20px 16px;
    }

    .home-hero-title {
        font-size: 1.35rem;
    }

    .home-hero-text {
        font-size: 0.92rem;
    }

    .home-hero-art {
        display: none;
    }

    .logo-text {
        max-width: 170px;
    }

    .mobile-drawer-brand .logo-text {
        display: inline;
    }

    .catalog-alpha {
        grid-template-columns: 36px 1fr;
        gap: 14px;
    }

    .alpha-link {
        width: 30px;
        height: 26px;
        border-radius: 10px;
    }

    .alpha-items {
        grid-template-columns: 1fr;
    }

    .home-category-chip {
        padding: 8px 12px;
        border-radius: 12px;
        font-size: 0.85rem;
    }

    .home-icon-item {
        width: 70px;
    }

    .home-icon-box {
        width: 52px;
        height: 52px;
        border-radius: 16px;
    }

    .home-skeleton-grid {
        grid-template-columns: 1fr;
    }

    .home-popular-icons .home-icon-item {
        width: 80px;
    }

    .home-popular-icons .home-icon-label {
        max-width: 80px;
    }

    .product-card {
        padding: 12px;
        gap: 12px;
    }

    .product-card-image {
        width: 56px;
        height: 56px;
    }

    .product-card-title {
        font-size: 0.95rem;
    }

    .product-card-action {
        padding: 6px 14px;
        font-size: 0.8rem;
    }

    .purchase-coupon-controls {
        flex-wrap: wrap;
    }

    #coupon_code {
        width: 100%;
        flex: 1 1 100%;
    }

    .pagination-store-links {
        justify-content: center;
    }

    .pagination--store .pagination-store-link {
        min-width: 32px;
        height: 32px;
        padding: 0 10px;
        font-size: 0.8rem;
    }
}
