/* ===== 基础重置与变量 ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --blue-900: oklch(0.25 0.04 240);
    --blue-800: oklch(0.32 0.06 240);
    --blue-700: oklch(0.40 0.08 238);
    --blue-600: oklch(0.48 0.12 236);
    --blue-500: oklch(0.55 0.14 234);
    --blue-400: oklch(0.65 0.12 232);
    --blue-100: oklch(0.94 0.02 234);
    --blue-50: oklch(0.97 0.01 234);

    --orange-600: oklch(0.65 0.18 50);
    --orange-500: oklch(0.72 0.16 52);
    --orange-400: oklch(0.78 0.14 54);

    --gray-900: oklch(0.20 0.005 240);
    --gray-800: oklch(0.30 0.005 240);
    --gray-700: oklch(0.40 0.005 240);
    --gray-600: oklch(0.50 0.005 240);
    --gray-500: oklch(0.60 0.005 240);
    --gray-400: oklch(0.70 0.005 240);
    --gray-300: oklch(0.80 0.005 240);
    --gray-200: oklch(0.88 0.005 240);
    --gray-100: oklch(0.94 0.005 240);
    --gray-50: oklch(0.97 0.003 240);

    --white: oklch(0.99 0.003 240);
    --black: oklch(0.12 0.005 240);

    --font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --container-width: 1600px;
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 10px;
    --shadow-sm: 0 1px 3px oklch(0.12 0.005 240 / 0.08);
    --shadow-md: 0 4px 12px oklch(0.12 0.005 240 / 0.1);
    --shadow-lg: 0 8px 24px oklch(0.12 0.005 240 / 0.12);
}

body {
    font-family: var(--font-family);
    font-size: 14px;
    line-height: 1.6;
    color: var(--gray-800);
    background: var(--gray-50);
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--blue-500);
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 16px;
}

/* ===== 顶部工具栏 ===== */
.top-bar {
    background: var(--gray-900);
    color: var(--gray-400);
    font-size: 12px;
    padding: 6px 0;
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar-left a,
.top-bar-right a {
    color: var(--gray-400);
    margin: 0 8px;
}

.top-bar-left a:hover,
.top-bar-right a:hover {
    color: var(--white);
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 4px;
}

.top-bar-right .divider {
    color: var(--gray-700);
    margin: 0 6px;
}

.btn-login {
    color: var(--orange-400) !important;
    font-weight: 500;
}

.btn-register {
    background: var(--orange-500);
    color: var(--white) !important;
    padding: 2px 10px;
    border-radius: var(--radius-sm);
    font-weight: 500;
}

.btn-register:hover {
    background: var(--orange-600);
}

/* ===== 主头部 ===== */
.main-header {
    background: var(--white);
    padding: 20px 0;
    border-bottom: 1px solid var(--gray-200);
}

.main-header .container {
    display: flex;
    align-items: center;
    gap: 40px;
}

.header-logo {
    flex-shrink: 0;
}

.logo {
    font-size: 26px;
    font-weight: 700;
    color: var(--blue-700);
    white-space: nowrap;
}

.logo i {
    color: var(--blue-500);
}

.logo-slogan {
    font-size: 12px;
    color: var(--gray-600);
    margin-top: 2px;
}

.header-search {
    flex: 1;
}

.search-box {
    display: flex;
    border: 2px solid var(--blue-500);
    border-radius: var(--radius-md);
    overflow: hidden;
    height: 42px;
}

.search-category {
    border: none;
    background: var(--gray-100);
    padding: 0 12px;
    font-size: 13px;
    color: var(--gray-700);
    border-right: 1px solid var(--gray-300);
    cursor: pointer;
    outline: none;
}

.search-box input {
    flex: 1;
    border: none;
    padding: 0 16px;
    font-size: 14px;
    outline: none;
}

.search-btn {
    background: var(--blue-500);
    color: var(--white);
    border: none;
    padding: 0 24px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
}

.search-btn:hover {
    background: var(--blue-600);
}

.hot-keywords {
    margin-top: 8px;
    font-size: 12px;
    color: var(--gray-600);
}

.hot-keywords a {
    color: var(--gray-600);
    margin: 0 6px;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
}

.hot-keywords a:hover {
    color: var(--blue-500);
    background: var(--blue-50);
}

.header-contact {
    flex-shrink: 0;
}

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

.contact-item i {
    font-size: 28px;
    color: var(--blue-500);
}

.contact-label {
    font-size: 12px;
    color: var(--gray-600);
}

.contact-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--blue-700);
    letter-spacing: 0.5px;
}

/* ===== 主导航 ===== */
.main-nav {
    background: var(--blue-800);
    position: sticky;
    top: 0;
    z-index: 100;
}

.main-nav .container {
    display: flex;
    align-items: stretch;
}

.nav-category-trigger {
    background: var(--blue-900);
    color: var(--white);
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 200px;
    transition: background 0.2s ease;
}

.nav-category-trigger:hover {
    background: var(--blue-700);
}

.nav-menu {
    display: flex;
    list-style: none;
    align-items: stretch;
}

.nav-menu li a {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 12px 18px;
    color: oklch(0.90 0.01 234);
    font-size: 14px;
    transition: background 0.2s ease, color 0.2s ease;
    height: 100%;
}

.nav-menu li a:hover {
    background: var(--blue-700);
    color: var(--white);
}

.nav-menu li.nav-highlight a {
    color: var(--orange-400);
    font-weight: 500;
}

.nav-menu li.nav-highlight a:hover {
    background: var(--orange-500);
    color: var(--white);
}

/* ===== 主内容区 ===== */
.main-content {
    padding: 24px 0;
}

.home-top {
    display: flex;
    gap: 16px;
    margin-bottom: 32px;
}

/* ===== 左侧分类 ===== */
.category-sidebar {
    width: 220px;
    flex-shrink: 0;
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.category-list {
    list-style: none;
}

.category-item {
    position: relative;
}

.category-item > a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 11px 16px;
    font-size: 14px;
    color: var(--gray-800);
    border-bottom: 1px solid var(--gray-100);
    transition: background 0.15s ease, color 0.15s ease;
}

.category-item > a i {
    font-size: 10px;
    color: var(--gray-500);
    margin-left: auto;
}

.category-item:hover > a {
    background: var(--blue-50);
    color: var(--blue-600);
}

.category-sub {
    display: none;
    position: absolute;
    left: 100%;
    top: 0;
    width: 480px;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    box-shadow: var(--shadow-lg);
    padding: 20px 24px;
    z-index: 50;
    min-height: 100%;
}

.category-item:hover .category-sub {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.sub-group h4 {
    font-size: 13px;
    font-weight: 600;
    color: var(--blue-700);
    margin-bottom: 8px;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--blue-100);
}

.sub-group a {
    display: block;
    font-size: 13px;
    color: var(--gray-700);
    padding: 3px 0;
}

.sub-group a:hover {
    color: var(--blue-500);
}

/* ===== Banner区 ===== */
.banner-area {
    flex: 1;
    min-width: 0;
}

.banner-slider {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    height: 360px;
    background: linear-gradient(135deg, var(--blue-700), var(--blue-500));
}

.banner-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    padding: 48px 56px;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.banner-slide.active {
    opacity: 1;
}

.banner-overlay {
    position: absolute;
    inset: 0;
    background: oklch(0.15 0.03 240 / 0.55);
    z-index: 1;
}

.banner-content {
    position: relative;
    z-index: 2;
}

.banner-content h2 {
    font-size: 32px;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 12px;
    line-height: 1.3;
}

.banner-content p {
    font-size: 16px;
    color: oklch(0.88 0.02 234);
    margin-bottom: 24px;
    max-width: 50ch;
}

.banner-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--orange-500);
    color: var(--white);
    padding: 12px 28px;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 500;
    transition: background 0.2s ease, transform 0.2s ease;
}

.banner-cta:hover {
    background: var(--orange-600);
    color: var(--white);
    transform: translateY(-1px);
}

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

.banner-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: oklch(0.99 0 0 / 0.4);
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.banner-dots span.active {
    background: var(--white);
    transform: scale(1.2);
}

/* 右侧快捷面板 */
.quick-panel {
    width: 200px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.user-box {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 20px 16px;
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.user-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--blue-100);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    font-size: 28px;
    color: var(--blue-500);
}

.user-box p {
    font-size: 13px;
    color: var(--gray-600);
    margin-bottom: 12px;
}

.user-btns {
    display: flex;
    gap: 8px;
}

.user-btns .btn {
    flex: 1;
    padding: 7px 0;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.user-btns .btn:hover {
    opacity: 0.85;
}

.user-btns .btn-primary {
    background: var(--blue-500);
    color: var(--white);
}

.user-btns .btn-outline {
    border: 1px solid var(--blue-500);
    color: var(--blue-500);
}

.quick-links {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    box-shadow: var(--shadow-sm);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.quick-links a {
    font-size: 12px;
    color: var(--gray-700);
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 4px;
    border-radius: var(--radius-sm);
    transition: background 0.2s ease;
}

.quick-links a:hover {
    background: var(--blue-50);
    color: var(--blue-500);
}

.quick-links a i {
    color: var(--blue-500);
    font-size: 13px;
}

/* ===== 产品网格 ===== */
.section-products,
.section-brands,
.section-news {
    margin-bottom: 32px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--blue-500);
}

.section-header h2 {
    font-size: 18px;
    font-weight: 700;
    color: var(--gray-900);
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-header h2 i {
    color: var(--blue-500);
}

.more-link {
    font-size: 13px;
    color: var(--gray-600);
}

.more-link:hover {
    color: var(--blue-500);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 14px;
}

.product-card {
    background: var(--white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.product-img {
    width: 100%;
    aspect-ratio: 1;
    background: var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: var(--gray-400);
    overflow: hidden;
}

.product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-img img {
    transform: scale(1.05);
}

.product-info {
    padding: 12px;
}

.product-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-800);
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

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

.product-brand {
    font-size: 11px;
    color: var(--gray-500);
    background: var(--gray-100);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
}

.product-action {
    font-size: 12px;
    color: var(--blue-500);
    font-weight: 500;
}

/* ===== 品牌区 ===== */
.brand-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
}

.brand-tab {
    padding: 8px 18px;
    font-size: 13px;
    color: var(--gray-700);
    background: var(--gray-100);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.brand-tab:hover,
.brand-tab.active {
    background: var(--blue-500);
    color: var(--white);
}

.brand-products {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.brand-card {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 16px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.brand-card-img {
    width: 100%;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

.brand-card-img img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.brand-card p {
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-700);
}

/* ===== 资讯区 ===== */
.news-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.news-card {
    background: var(--white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

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

.news-card.news-featured {
    grid-column: span 2;
}

.news-img {
    width: 100%;
    height: 160px;
    overflow: hidden;
}

.news-card.news-featured .news-img {
    height: 200px;
}

.news-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.news-card:hover .news-img img {
    transform: scale(1.05);
}

.news-body {
    padding: 16px;
}

.news-body h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-body p {
    font-size: 12px;
    color: var(--gray-600);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 8px;
}

.news-body time {
    font-size: 11px;
    color: var(--gray-500);
}

.news-tag {
    font-size: 11px;
    color: var(--blue-500);
    background: var(--blue-50);
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    display: inline-block;
    margin-bottom: 10px;
}

/* ===== 底部 ===== */
.site-footer {
    background: var(--gray-900);
    color: var(--gray-400);
    padding: 40px 0 0;
    margin-top: 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 32px;
    border-bottom: 1px solid oklch(0.30 0.005 240);
}

.footer-col h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 14px;
}

.footer-col p {
    font-size: 13px;
    line-height: 1.8;
    color: var(--gray-400);
}

.footer-col ul {
    list-style: none;
}

.footer-col li {
    margin-bottom: 8px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-col li i {
    color: var(--blue-400);
    width: 14px;
}

.footer-col a {
    font-size: 13px;
    color: var(--gray-400);
}

.footer-col a:hover {
    color: var(--white);
}

.footer-bottom {
    padding: 16px 0;
    text-align: center;
    font-size: 12px;
    color: var(--gray-600);
}

/* ===== 面包屑 ===== */
.breadcrumb {
    padding: 12px 0;
    font-size: 13px;
    color: var(--gray-500);
}

.breadcrumb a {
    color: var(--gray-600);
}

.breadcrumb a:hover {
    color: var(--blue-500);
}

.breadcrumb i {
    margin: 0 8px;
    font-size: 10px;
}

.breadcrumb span {
    color: var(--gray-800);
}

/* ===== 产品列表页 ===== */
.page-products {
    padding-bottom: 40px;
}

.products-layout {
    display: flex;
    gap: 20px;
}

.filter-sidebar {
    width: 220px;
    flex-shrink: 0;
}

.filter-group {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: var(--shadow-sm);
}

.filter-group h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--gray-200);
}

.filter-list {
    list-style: none;
}

.filter-list li {
    margin-bottom: 4px;
}

.filter-list li a {
    display: block;
    padding: 6px 10px;
    font-size: 13px;
    color: var(--gray-700);
    border-radius: var(--radius-sm);
    transition: background 0.2s ease;
}

.filter-list li a:hover,
.filter-list li.active a {
    background: var(--blue-50);
    color: var(--blue-500);
    font-weight: 500;
}

.filter-checks {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-checks label {
    font-size: 13px;
    color: var(--gray-700);
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.filter-checks input[type="checkbox"] {
    accent-color: var(--blue-500);
}

.products-main {
    flex: 1;
    min-width: 0;
}

.products-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--white);
    padding: 12px 16px;
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
}

.toolbar-left {
    display: flex;
    align-items: center;
    gap: 4px;
}

.sort-btn {
    padding: 6px 14px;
    font-size: 13px;
    color: var(--gray-700);
    background: var(--gray-100);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.sort-btn:hover,
.sort-btn.active {
    background: var(--blue-500);
    color: var(--white);
}

.toolbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.result-count {
    font-size: 13px;
    color: var(--gray-500);
}

.view-toggle {
    display: flex;
    gap: 4px;
}

.view-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-sm);
    background: var(--white);
    color: var(--gray-500);
    cursor: pointer;
    transition: all 0.2s ease;
}

.view-btn.active,
.view-btn:hover {
    border-color: var(--blue-500);
    color: var(--blue-500);
}

/* 产品列表 - 网格视图 */
.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.products-grid .product-card .product-info {
    padding: 12px;
}

.products-grid .product-card .product-info h3 {
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-900);
    margin-bottom: 6px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-spec {
    font-size: 12px;
    color: var(--gray-500);
    margin-bottom: 4px;
}

.product-brand {
    font-size: 11px;
    color: var(--gray-500);
    background: var(--gray-100);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    display: inline-block;
}

.product-tag {
    position: absolute;
    top: 8px;
    left: 8px;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    background: var(--orange-500);
    color: var(--white);
    font-weight: 500;
}

.product-card {
    position: relative;
}

/* 产品列表 - 列表视图 */
.products-list .product-card {
    display: flex;
    margin-bottom: 12px;
    background: var(--white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.products-list .product-card .product-img {
    width: 200px;
    aspect-ratio: 1;
    flex-shrink: 0;
}

.products-list .product-card .product-info {
    flex: 1;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.products-list .product-card .product-info h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 8px;
}

/* 分页 */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-top: 24px;
}

.page-btn {
    min-width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--gray-700);
    background: var(--white);
    cursor: pointer;
    transition: all 0.2s ease;
}

.page-btn:hover,
.page-btn.active {
    border-color: var(--blue-500);
    color: var(--blue-500);
    background: var(--blue-50);
}

.page-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ===== 产品详情页 ===== */
.page-detail {
    padding-bottom: 40px;
}

.detail-overview {
    display: flex;
    gap: 32px;
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
}

.detail-gallery {
    width: 420px;
    flex-shrink: 0;
}

.gallery-main {
    width: 100%;
    aspect-ratio: 1;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--gray-100);
    margin-bottom: 12px;
}

.gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-thumbs {
    display: flex;
    gap: 8px;
}

.thumb {
    width: 72px;
    height: 72px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.thumb.active,
.thumb:hover {
    border-color: var(--blue-500);
}

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

.detail-info {
    flex: 1;
}

.detail-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 8px;
}

.detail-subtitle {
    font-size: 14px;
    color: var(--gray-500);
    margin-bottom: 16px;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 20px;
}

.meta-item {
    font-size: 13px;
    color: var(--gray-600);
    display: flex;
    align-items: center;
    gap: 6px;
}

.meta-item i {
    color: var(--blue-500);
}

.detail-price {
    background: oklch(0.97 0.01 60);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    margin-bottom: 20px;
}

.price-label {
    font-size: 24px;
    font-weight: 700;
    color: var(--orange-500);
}

.price-note {
    font-size: 13px;
    color: var(--gray-500);
    margin-left: 12px;
}

.detail-specs-quick {
    margin-bottom: 20px;
}

.spec-row {
    display: flex;
    padding: 8px 0;
    border-bottom: 1px solid var(--gray-100);
}

.spec-label {
    width: 100px;
    font-size: 13px;
    color: var(--gray-500);
    flex-shrink: 0;
}

.spec-value {
    font-size: 13px;
    color: var(--gray-800);
    font-weight: 500;
}

.detail-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.btn-inquiry {
    padding: 12px 32px;
    background: var(--orange-500);
    color: var(--white);
    border: none;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.btn-inquiry:hover {
    opacity: 0.9;
}

.btn-favorite,
.btn-compare {
    padding: 12px 20px;
    background: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    font-size: 13px;
    color: var(--gray-700);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: border-color 0.2s ease;
}

.btn-favorite:hover,
.btn-compare:hover {
    border-color: var(--blue-500);
    color: var(--blue-500);
}

/* 详情页 Tab */
.detail-tabs {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    margin-bottom: 24px;
}

.tab-nav {
    display: flex;
    border-bottom: 1px solid var(--gray-200);
}

.tab-btn {
    padding: 14px 28px;
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-600);
    background: none;
    border: none;
    cursor: pointer;
    position: relative;
    transition: color 0.2s ease;
}

.tab-btn.active {
    color: var(--blue-500);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--blue-500);
}

.tab-content {
    padding: 24px;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

.specs-table {
    width: 100%;
    border-collapse: collapse;
}

.specs-table th,
.specs-table td {
    padding: 10px 16px;
    font-size: 13px;
    text-align: left;
    border-bottom: 1px solid var(--gray-100);
}

.specs-table th {
    background: var(--gray-50);
    color: var(--gray-600);
    font-weight: 500;
    width: 140px;
}

.specs-table td {
    color: var(--gray-800);
}

.detail-description {
    font-size: 14px;
    line-height: 1.8;
    color: var(--gray-700);
}

.detail-description h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-900);
    margin: 20px 0 10px;
}

.detail-description ul {
    padding-left: 20px;
    margin: 10px 0;
}

.detail-description li {
    margin-bottom: 6px;
}

/* 相关产品 */
.related-products {
    margin-top: 24px;
}

.related-products h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 16px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 14px;
}

/* 供应商信息 */
.supplier-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
}

.supplier-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.supplier-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--blue-100);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--blue-500);
}

.supplier-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--gray-900);
}

.supplier-tags {
    display: flex;
    gap: 6px;
    margin-top: 4px;
}

.supplier-tag {
    font-size: 11px;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    background: var(--blue-50);
    color: var(--blue-500);
}

.supplier-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    text-align: center;
    padding: 12px 0;
    border-top: 1px solid var(--gray-100);
    border-bottom: 1px solid var(--gray-100);
    margin-bottom: 16px;
}

.stat-num {
    font-size: 18px;
    font-weight: 700;
    color: var(--blue-500);
}

.stat-label {
    font-size: 11px;
    color: var(--gray-500);
    margin-top: 2px;
}

.btn-contact-supplier {
    display: block;
    width: 100%;
    padding: 10px;
    text-align: center;
    background: var(--blue-500);
    color: var(--white);
    border: none;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.btn-contact-supplier:hover {
    opacity: 0.9;
}

/* ===== 登录/注册页 ===== */
.page-auth {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: var(--gray-50);
}

.auth-container {
    display: flex;
    gap: 40px;
    max-width: 900px;
    width: 100%;
    align-items: flex-start;
}

.auth-card {
    flex: 1;
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-md);
}

.auth-header {
    text-align: center;
    margin-bottom: 24px;
}

.auth-header h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 6px;
}

.auth-header p {
    font-size: 13px;
    color: var(--gray-500);
}

.auth-form .form-group {
    margin-bottom: 16px;
}

.auth-form label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 6px;
}

.required {
    color: var(--orange-500);
}

.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-icon > i {
    position: absolute;
    left: 12px;
    color: var(--gray-400);
    font-size: 14px;
}

.input-with-icon input,
.input-with-icon select {
    width: 100%;
    padding: 10px 12px 10px 36px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    font-size: 14px;
    color: var(--gray-800);
    transition: border-color 0.2s ease;
}

.input-with-icon input:focus,
.input-with-icon select:focus {
    outline: none;
    border-color: var(--blue-500);
    box-shadow: 0 0 0 3px oklch(0.62 0.15 250 / 0.1);
}

.toggle-password {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
}

.btn-sms {
    position: absolute;
    right: 8px;
    padding: 6px 12px;
    font-size: 12px;
    background: var(--blue-500);
    color: var(--white);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
}

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

.form-row-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.checkbox-label {
    font-size: 13px;
    color: var(--gray-600);
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.forgot-link {
    font-size: 13px;
    color: var(--blue-500);
}

.btn-submit {
    width: 100%;
    padding: 12px;
    background: var(--blue-500);
    color: var(--white);
    border: none;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.btn-submit:hover {
    opacity: 0.9;
}

.auth-divider {
    text-align: center;
    margin: 20px 0;
    position: relative;
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--gray-200);
}

.auth-divider span {
    position: relative;
    background: var(--white);
    padding: 0 12px;
    font-size: 12px;
    color: var(--gray-500);
}

.auth-social {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.social-btn {
    padding: 10px 24px;
    border-radius: var(--radius-md);
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.social-btn.wechat {
    background: #07c160;
    color: var(--white);
}

.auth-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 13px;
    color: var(--gray-500);
}

.auth-footer a {
    color: var(--blue-500);
    font-weight: 500;
}

.auth-benefits {
    width: 280px;
    flex-shrink: 0;
    padding-top: 40px;
}

.auth-benefits h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 20px;
}

.auth-benefits ul {
    list-style: none;
}

.auth-benefits li {
    font-size: 13px;
    color: var(--gray-700);
    padding: 8px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.auth-benefits li i {
    color: #07c160;
}

/* 角色选择 */
.role-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
}

.role-option {
    cursor: pointer;
}

.role-option input {
    display: none;
}

.role-card {
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    padding: 16px;
    text-align: center;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.role-option.active .role-card,
.role-option:hover .role-card {
    border-color: var(--blue-500);
    background: var(--blue-50);
}

.role-card i {
    font-size: 28px;
    color: var(--blue-500);
    margin-bottom: 8px;
}

.role-card h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 4px;
}

.role-card p {
    font-size: 12px;
    color: var(--gray-500);
}

.form-section {
    margin-bottom: 20px;
}

.form-section h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--gray-100);
}

.auth-register .auth-card {
    max-width: 560px;
}

.form-agreement {
    margin: 16px 0;
}

.form-agreement a {
    color: var(--blue-500);
}

/* ===== 搜索结果页 ===== */
.page-search {
    padding: 40px 0;
}

.search-header {
    margin-bottom: 30px;
}

.search-header h1 {
    font-size: 22px;
    color: var(--gray-800);
}

.search-header h1 span {
    color: var(--blue-500);
}

.search-results {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.search-item {
    display: flex;
    gap: 16px;
    padding: 20px;
    background: var(--white);
    border-radius: var(--radius-md);
    border: 1px solid var(--gray-200);
}

.search-item-img {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.search-item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.search-item-body h3 {
    font-size: 16px;
    margin-bottom: 6px;
}

.search-item-body h3 a {
    color: var(--gray-800);
    text-decoration: none;
}

.search-item-body h3 a:hover {
    color: var(--blue-500);
}

.search-item-body p {
    color: var(--gray-600);
    font-size: 13px;
    margin-bottom: 6px;
}

.search-item-type {
    display: inline-block;
    font-size: 11px;
    padding: 2px 8px;
    background: var(--blue-100);
    color: var(--blue-600);
    border-radius: 3px;
    margin-bottom: 6px;
}

.no-results {
    text-align: center;
    padding: 80px 20px;
}

.no-results i {
    font-size: 48px;
    color: var(--gray-300);
    margin-bottom: 16px;
}

.no-results h2 {
    font-size: 20px;
    color: var(--gray-700);
    margin-bottom: 8px;
}

.no-results p {
    color: var(--gray-500);
    margin-bottom: 20px;
}

/* ===== 404页 ===== */
.page-404 {
    padding: 80px 0;
}

.error-content {
    text-align: center;
    max-width: 500px;
    margin: 0 auto;
}

.error-code {
    font-size: 120px;
    font-weight: 700;
    color: var(--blue-100);
    line-height: 1;
    margin-bottom: 16px;
}

.error-content h1 {
    font-size: 24px;
    color: var(--gray-800);
    margin-bottom: 8px;
}

.error-content p {
    color: var(--gray-500);
    margin-bottom: 24px;
}

.error-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 40px;
}

.error-search {
    border-top: 1px solid var(--gray-200);
    padding-top: 24px;
}

.error-search p {
    margin-bottom: 12px;
}

.error-search .search-box {
    display: flex;
    max-width: 360px;
    margin: 0 auto;
}

.error-search .search-box input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
    outline: none;
}

.error-search .search-btn {
    padding: 10px 16px;
    background: var(--blue-500);
    color: white;
    border: none;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    cursor: pointer;
}

/* ===== 品牌专区页 ===== */
.page-brands {
    padding: 40px 0;
}

.page-brands .section-header {
    margin-bottom: 30px;
}

.page-brands .section-header p {
    color: var(--gray-500);
    margin-top: 6px;
}

.brand-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.brand-list-item {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 24px;
    background: var(--white);
    border-radius: var(--radius-md);
    border: 1px solid var(--gray-200);
    transition: box-shadow 0.2s;
}

.brand-list-item:hover {
    box-shadow: var(--shadow-md);
}

.brand-list-logo {
    width: 120px;
    height: 60px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-list-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.brand-list-info {
    flex: 1;
}

.brand-list-info h3 {
    font-size: 18px;
    margin-bottom: 6px;
}

.brand-list-info h3 a {
    color: var(--gray-800);
    text-decoration: none;
}

.brand-list-info h3 a:hover {
    color: var(--blue-500);
}

.brand-list-info p {
    color: var(--gray-600);
    font-size: 13px;
    margin-bottom: 6px;
}

.brand-count {
    font-size: 12px;
    color: var(--gray-500);
}

.brand-list-action .btn {
    white-space: nowrap;
}

/* ===== 品牌详情页 ===== */
.page-brand-detail {
    padding: 40px 0;
}

.brand-detail-header {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 30px;
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
    margin-bottom: 40px;
}

.brand-detail-logo {
    width: 160px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.brand-detail-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.brand-placeholder-lg {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-100);
    border-radius: var(--radius-md);
    font-size: 36px;
    color: var(--gray-400);
}

.brand-detail-info h1 {
    font-size: 24px;
    margin-bottom: 8px;
}

.brand-detail-info p {
    color: var(--gray-600);
    margin-bottom: 8px;
}

.brand-product-count {
    font-size: 13px;
    color: var(--gray-500);
}

/* ===== 通用页面 ===== */
.page-generic {
    padding: 40px 0;
}

.page-content h1 {
    font-size: 24px;
    color: var(--gray-800);
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--gray-200);
}

.entry-content {
    line-height: 1.8;
    color: var(--gray-700);
}

.entry-content h2,
.entry-content h3 {
    margin: 24px 0 12px;
    color: var(--gray-800);
}

.entry-content p {
    margin-bottom: 16px;
}

.entry-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
}

/* ===== 商城密度优化 ===== */
.main-header {
    padding: 14px 0;
}

.main-header .container {
    gap: 28px;
}

.main-content {
    padding: 14px 0 24px;
}

.home-top {
    gap: 12px;
    margin-bottom: 22px;
}

.category-sidebar {
    width: 248px;
    border: 1px solid var(--gray-200);
    box-shadow: none;
}

.category-item > a {
    min-height: 33px;
    padding: 7px 14px;
}

.category-parent-link {
    justify-content: space-between;
    font-weight: 700;
}

.category-item > a.category-parent-link i {
    margin-left: 8px;
}

.category-children {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0 14px 12px;
    border-bottom: 1px solid var(--gray-100);
}

.category-children a {
    font-size: 12px;
    line-height: 1.25;
    color: var(--gray-600);
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    padding: 4px 7px;
}

.category-children a:hover {
    color: var(--blue-600);
    background: var(--blue-50);
    border-color: var(--blue-100);
}

.banner-slider {
    height: 332px;
    border-radius: var(--radius-md);
}

.banner-slide {
    padding: 36px 44px;
    background-size: cover;
    background-position: center;
}

.quick-panel {
    width: 220px;
    gap: 10px;
}

.user-box,
.quick-links,
.filter-group,
.products-toolbar,
.product-card,
.brand-card,
.news-card {
    border: 1px solid var(--gray-200);
    box-shadow: none;
}

.product-card:hover,
.brand-card:hover,
.news-card:hover {
    border-color: var(--blue-400);
    box-shadow: 0 6px 18px oklch(0.12 0.005 240 / 0.08);
}

.section-products,
.section-brands,
.section-news {
    margin-bottom: 24px;
}

.section-header {
    margin-bottom: 12px;
    padding: 10px 12px;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-left: 4px solid var(--blue-500);
    border-radius: var(--radius-md);
}

.product-grid {
    grid-template-columns: repeat(auto-fit, minmax(178px, 1fr));
    gap: 12px;
}

.products-layout {
    gap: 16px;
}

.filter-sidebar {
    width: 248px;
}

.products-grid {
    grid-template-columns: repeat(auto-fill, minmax(188px, 1fr));
    gap: 12px;
}

.product-info,
.products-grid .product-card .product-info {
    padding: 10px 11px 12px;
}

.product-info h3,
.products-grid .product-card .product-info h3 {
    min-height: 38px;
    font-weight: 600;
}

.product-spec {
    line-height: 1.35;
}

.product-brand {
    margin-top: 2px;
}

.brand-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
}

.brand-card {
    padding: 12px;
    border-radius: var(--radius-md);
}

.brand-card-img {
    height: 64px;
}

.news-grid {
    gap: 12px;
}

@media (min-width: 1280px) {
    .products-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (min-width: 1500px) {
    .products-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

/* ===== 响应式 ===== */
@media (max-width: 1024px) {
    .home-top {
        flex-direction: column;
    }

    .category-sidebar {
        width: 100%;
        height: auto;
    }

    .category-sub {
        display: none !important;
    }

    .quick-panel {
        width: 100%;
        flex-direction: row;
    }

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

    .brand-products {
        grid-template-columns: repeat(4, 1fr);
    }

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

    .news-card.news-featured {
        grid-column: span 2;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

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

    .detail-overview {
        flex-direction: column;
    }

    .detail-gallery {
        width: 100%;
        max-width: 500px;
    }

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

    .auth-container {
        flex-direction: column;
    }

    .auth-benefits {
        display: none;
    }
}

@media (max-width: 768px) {
    .main-header .container {
        flex-direction: column;
        gap: 16px;
    }

    .container {
        padding: 0 12px;
    }

    .header-logo,
    .header-search,
    .search-box {
        width: 100%;
    }

    .search-box {
        height: 40px;
    }

    .search-category {
        width: 108px;
        padding: 0 8px;
    }

    .search-box input {
        min-width: 0;
        padding: 0 10px;
    }

    .search-btn {
        width: 48px;
        padding: 0;
        font-size: 0;
    }

    .search-btn i {
        font-size: 15px;
    }

    .header-contact {
        display: none;
    }

    .main-nav .container {
        flex-direction: column;
        padding: 0;
    }

    .nav-category-trigger {
        width: 100%;
        min-width: 0;
        justify-content: center;
    }

    .nav-menu {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .nav-menu li a {
        justify-content: center;
        padding: 10px 8px;
    }

    .category-list {
        display: grid;
        grid-template-columns: 1fr;
    }

    .category-item > a {
        min-height: 38px;
        padding: 8px 10px;
        font-size: 13px;
    }

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

    .brand-products {
        grid-template-columns: repeat(2, 1fr);
    }

    .news-grid {
        grid-template-columns: 1fr;
    }

    .news-card.news-featured {
        grid-column: span 1;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .banner-slider {
        height: 240px;
    }

    .banner-content h2 {
        font-size: 22px;
    }

    .banner-slide {
        padding: 32px;
    }

    .products-layout {
        flex-direction: column;
    }

    .filter-sidebar {
        width: 100%;
    }

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

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

    .detail-tabs {
        flex-wrap: wrap;
    }

    .spec-table th,
    .spec-table td {
        padding: 8px 12px;
        font-size: 12px;
    }

    .form-row-2col {
        flex-direction: column;
    }

    .brand-list-item {
        flex-direction: column;
        text-align: center;
    }

    .brand-list-action {
        width: 100%;
    }

    .brand-list-action .btn {
        width: 100%;
        text-align: center;
    }

    .brand-detail-header {
        flex-direction: column;
        text-align: center;
    }

    .search-item {
        flex-direction: column;
    }

    .error-code {
        font-size: 80px;
    }

    .error-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .top-bar-left {
        display: none;
    }

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

    .brand-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
    }

    .brand-products {
        grid-template-columns: 1fr 1fr;
    }

    .products-grid {
        grid-template-columns: 1fr 1fr;
    }

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

    .gallery-main {
        aspect-ratio: 4/3;
    }
}

.user-menu { position:relative; display:inline-block; }
.user-menu-toggle { padding:0 8px; }
.user-menu-dropdown {
    position:absolute; right:0; top:100%; min-width:180px;
    background:#fff; border:1px solid #e5e7eb; border-radius:6px;
    box-shadow:0 4px 12px rgba(0,0,0,.08);
    list-style:none; margin:0; padding:4px 0; z-index:100;
    display:none;
}
.user-menu:hover .user-menu-dropdown,
.user-menu:focus-within .user-menu-dropdown { display:block; }
.user-menu-dropdown li a { display:block; padding:8px 14px; color:#111827; font-size:13px; }
.user-menu-dropdown li a:hover { background:#f3f4f6; color:#2563eb; }
.user-menu-dropdown li.divider { height:1px; background:#e5e7eb; margin:4px 0; }
.user-menu-dropdown li a i { width:14px; margin-right:6px; color:#6b7280; }
