/* ============================================
   Simple B2B Products - 前端样式
   工业简约风格 (Industrial Minimalist)
   ============================================ */

   :root {
    --sbp-primary: #1a2b4b;
    --sbp-accent: #d9232e;
    --sbp-text: #333333;
    --sbp-text-light: #666666;
    --sbp-bg-light: #f8f9fa;
    --sbp-border: #e0e0e0;
    --sbp-sidebar-width: 280px;
    --sbp-sidebar-bg: #ffffff;
    --sbp-sidebar-header-bg: #5a8a8a;
    --sbp-sidebar-hover: #f5f7fa;
    --sbp-sidebar-active: #eef3f8;
    --sbp-product-image-aspect: 4 / 3;
}

.sbp-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ============================================
   产品列表页 - 左右布局
   ============================================ */

.sbp-products-wrapper.sbp-layout-sidebar {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 20px;
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

/* 移动端筛选按钮 - 桌面端隐藏 */
.sbp-mobile-filter-btn {
    display: none;
}

/* 遮罩层 - 桌面端隐藏 */
.sbp-sidebar-overlay {
    display: none;
}

/* ============================================
   左侧分类导航侧边栏
   ============================================ */

.sbp-sidebar {
    width: var(--sbp-sidebar-width);
    min-width: var(--sbp-sidebar-width);
    flex-shrink: 0;
    background: var(--sbp-sidebar-bg);
    border: 1px solid var(--sbp-border);
    border-radius: 6px;
    overflow: hidden;
    position: sticky;
    top: 100px;
}

.sbp-sidebar-header {
    background: var(--sbp-sidebar-header-bg);
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sbp-sidebar-title {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    letter-spacing: 0.5px;
}

/* 关闭按钮 - 桌面端隐藏 */
.sbp-sidebar-close {
    display: none;
}

.sbp-sidebar-nav {
    padding: 0;
}

.sbp-sidebar-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sbp-sidebar-list ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* 分类项 */
.sbp-sidebar-item {
    border-bottom: 1px solid #f0f0f0;
}

.sbp-sidebar-item:last-child {
    border-bottom: none;
}

.sbp-sidebar-link-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

.sbp-sidebar-link {
    flex: 1;
    display: block;
    padding: 12px 18px;
    color: var(--sbp-text);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.15s ease;
    line-height: 1.4;
}

.sbp-sidebar-link:hover {
    color: var(--sbp-sidebar-header-bg);
    background: var(--sbp-sidebar-hover);
}

/* 当前激活项 */
.sbp-sidebar-item.current > .sbp-sidebar-link-wrap .sbp-sidebar-link {
    color: var(--sbp-sidebar-header-bg);
    font-weight: 600;
    background: var(--sbp-sidebar-active);
}

/* 顶级分类加粗 */
.sbp-sidebar-item.sbp-sidebar-top > .sbp-sidebar-link-wrap .sbp-sidebar-link {
    font-weight: 600;
    font-size: 14px;
}

/* 展开/折叠按钮 */
.sbp-sidebar-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 100%;
    min-height: 42px;
    border: none;
    background: transparent;
    cursor: pointer;
    color: #aaa;
    transition: all 0.2s ease;
    flex-shrink: 0;
    padding: 0;
}

.sbp-sidebar-toggle:hover {
    color: var(--sbp-sidebar-header-bg);
    background: var(--sbp-sidebar-hover);
}

.sbp-sidebar-toggle svg {
    transition: transform 0.25s ease;
}

/* 展开状态箭头旋转 */
.sbp-sidebar-item.open > .sbp-sidebar-link-wrap .sbp-sidebar-toggle svg {
    transform: rotate(90deg);
}

/* 子级分类缩进 */
.sbp-sidebar-children {
    background: #fafbfc;
    overflow: hidden;
}

.sbp-sidebar-children .sbp-sidebar-link {
    padding-left: 36px;
    font-size: 13px;
    font-weight: 400;
    color: var(--sbp-text-light);
}

.sbp-sidebar-children .sbp-sidebar-children .sbp-sidebar-link {
    padding-left: 52px;
    font-size: 12.5px;
}

.sbp-sidebar-children .sbp-sidebar-item {
    border-bottom-color: #eef0f2;
}

/* 全部产品项 */
.sbp-sidebar-all > .sbp-sidebar-link-wrap .sbp-sidebar-link {
    font-weight: 600;
}

/* ============================================
   右侧产品内容区
   ============================================ */

.sbp-main-content {
    flex: 1;
    min-width: 0;
}

/* 产品网格 - 通用 3 列 */
.sbp-products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 60px;
}

/* 列表布局：一行一条，左图右文 */
.sbp-products-grid.sbp-products-grid--list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.sbp-product-card.sbp-product-card--row:not(:first-child) {
    padding-top: 1.25rem;
}

.sbp-product-card.sbp-product-card--row {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 1.5rem;
    border-radius: 0;
    border: none;
    border-bottom: 1px dashed #cbd5e1;
    padding-bottom: 1rem;
    margin-bottom: 0;
    overflow: visible;
}

.sbp-product-card.sbp-product-card--row:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.sbp-product-card.sbp-product-card--row:hover {
    transform: none;
    box-shadow: none;
}

.sbp-products-grid--list .sbp-product-card--row .sbp-product-image {
    flex: 0 1 280px;
    width: 100%;
    max-width: 280px;
    aspect-ratio: var(--sbp-product-image-aspect, 4 / 3);
    padding-top: 0;
    min-height: 0;
    border-bottom: none;
    position: relative;
    overflow: hidden;
}

.sbp-products-grid--list .sbp-product-card--row .sbp-product-image a {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
}

.sbp-products-grid--list .sbp-product-card--row .sbp-product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    border-radius: 4px;
    max-height: none;
}

body.sbp-product-aspect-free .sbp-products-grid--list .sbp-product-card--row .sbp-product-image {
    aspect-ratio: auto;
    align-self: flex-start;
    flex: 0 1 280px;
}

body.sbp-product-aspect-free .sbp-products-grid--list .sbp-product-card--row .sbp-product-image a {
    position: static;
    height: auto;
}

body.sbp-product-aspect-free .sbp-products-grid--list .sbp-product-card--row .sbp-product-image img {
    position: static;
    width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 4px;
}

.sbp-product-card--row .sbp-product-info {
    flex: 1 1 0;
    min-width: 0;
    min-height: 0;
    padding: 0.15rem 0 0;
    background: transparent;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
}

.sbp-product-card--row .sbp-product-title {
    margin-bottom: 0;
    font-size: 1.0625rem !important;
    line-height: 1.35;
    flex-shrink: 0;
}

.sbp-product-card--row .sbp-product-title a {
    display: inline;
}

.sbp-product-card--row .sbp-product-desc {
    display: block;
    -webkit-line-clamp: unset;
    overflow: visible;
    color: var(--sbp-text);
    font-size: 0.9375rem;
    line-height: 1.65;
    margin-top: 1rem;
    margin-bottom: 0;
    flex: 1 1 auto;
    min-height: 0;
}

.sbp-product-card--row .sbp-product-more--btn {
    flex-shrink: 0;
    margin-top: auto;
    padding-top: 0;
    margin-bottom: 0;
}

.sbp-product-card--row .sbp-product-info:not(:has(.sbp-product-desc)) .sbp-product-more--btn {
    margin-top: 1rem;
}

.sbp-product-card--row .sbp-read-more-btn {
    display: inline-block;
    padding: 0.55rem 1.35rem;
    background: var(--sbp-primary);
    color: #fff !important;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0;
    text-decoration: none;
}

.sbp-product-card--row .sbp-read-more-btn:hover {
    transform: none;
    filter: brightness(1.08);
    color: #fff !important;
}

/* ============================================
   产品卡片（保持原有风格）
   ============================================ */

.sbp-product-card {
    transition: all 0.3s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border-radius: 6px;
    border: 1px solid #ddd;
}

.sbp-product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 10px rgba(0,0,0,0.1);
}

.sbp-product-image {
    position: relative;
    aspect-ratio: var(--sbp-product-image-aspect, 4 / 3);
    overflow: hidden;
    border-bottom: 1px solid #ddd;
}

.sbp-product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.1s cubic-bezier(0.215, 0.61, 0.355, 1);
    opacity: 0.9;
}

.sbp-product-card:hover .sbp-product-image img {
    transform: scale(1.05);
    opacity: 1;
}

.sbp-product-image a {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

body.sbp-product-aspect-free .sbp-product-card .sbp-product-image {
    aspect-ratio: auto;
}

body.sbp-product-aspect-free .sbp-product-card .sbp-product-image a {
    position: static;
    height: auto;
}

body.sbp-product-aspect-free .sbp-product-card .sbp-product-image img {
    position: static;
    width: 100%;
    height: auto;
    object-fit: contain;
    vertical-align: middle;
}

body.sbp-product-aspect-free .sbp-product-card:hover .sbp-product-image img {
    transform: none;
}

.sbp-product-info {
    padding: 20px 15px;
    background: #fff;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.sbp-product-title {
    margin: 0 0 10px 0;
    font-size: 18px !important;
    font-weight: 700;
    color: #333;
    text-align: left;
    line-height: 1.3;
    padding: 0;
}

.sbp-product-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s;
    display: block;
}

.sbp-product-title a:hover {
    color: #3498db;
}

.sbp-product-desc {
    font-size: 13px;
    color: #999;
    line-height: 1.6;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-align: left;
}

.sbp-product-more {
    margin-top: auto;
    text-align: left;
}

.sbp-product-more a {
    color: #3498db;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none;
    letter-spacing: 1px;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
}

.sbp-product-more a:hover {
    transform: translateX(5px);
}

/* 分页 */
.sbp-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 60px;
}

.sbp-pagination a,
.sbp-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    background: #fff;
    border: 1px solid #ddd;
    color: var(--sbp-text);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s ease;
}

.sbp-pagination a:hover {
    border-color: var(--sbp-primary);
    color: var(--sbp-primary);
}

.sbp-pagination .current {
    background: var(--sbp-primary);
    color: #fff;
    border-color: var(--sbp-primary);
}

/* 无产品提示 */
.sbp-no-products {
    text-align: center;
    padding: 100px 20px;
    color: var(--sbp-text-light);
    font-size: 16px;
    background: #f9f9f9;
}

/* ============================================
   产品详情页样式（保持不变）
   ============================================ */

.sbp-single-product {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px;
}

.sbp-product-main {
    display: grid;
    grid-template-columns: 55% 40%;
    gap: 5%;
    margin-bottom: 80px;
}

.sbp-product-images {
    position: sticky;
    top: 40px;
}

/* 详情页：缩略图在主图左侧 */
.sbp-product-images.sbp-gallery-thumbs--left {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 12px;
}

.sbp-gallery-thumbs--left .sbp-main-image-wrap {
    flex: 1;
    min-width: 0;
    margin-bottom: 0;
}

.sbp-gallery-thumbs--left .sbp-gallery-thumbnails {
    order: -1;
    flex-direction: column;
    flex-shrink: 0;
    width: 76px;
    max-height: min(70vh, 520px);
    overflow-x: hidden;
    overflow-y: auto;
    padding-bottom: 0;
    gap: 8px;
    scrollbar-width: thin;
    scrollbar-color: #ccc transparent;
}

.sbp-gallery-thumbs--left .sbp-gallery-thumbnails::-webkit-scrollbar {
    width: 4px;
    height: auto;
}

.sbp-gallery-thumbs--left .sbp-gallery-thumbnails::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 2px;
}

.sbp-gallery-thumbs--left .sbp-gallery-thumbnail {
    width: 72px;
    height: 72px;
    min-width: 72px;
    flex-shrink: 0;
}

/* 主图容器 */
.sbp-main-image-wrap {
    position: relative;
    margin-bottom: 15px;
    border-radius: 6px;
    overflow: hidden;
    background: #f9f9f9;
}

.sbp-main-image {
    cursor: zoom-in;
    position: relative;
    aspect-ratio: var(--sbp-product-image-aspect, 4 / 3);
    overflow: hidden;
}

.sbp-main-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: opacity 0.3s ease;
}

body.sbp-product-aspect-free .sbp-main-image {
    aspect-ratio: auto;
}

body.sbp-product-aspect-free .sbp-main-image img {
    position: static;
    width: 100%;
    height: auto;
    object-fit: contain;
}

/* 左右箭头 */
.sbp-gallery-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(255, 255, 255, 0.85);
    color: #333;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.25s ease;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    padding: 0;
}

.sbp-main-image-wrap:hover .sbp-gallery-arrow {
    opacity: 1;
}

.sbp-gallery-arrow:hover {
    background: #fff;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

.sbp-arrow-prev { left: 12px; }
.sbp-arrow-next { right: 12px; }

/* 图片计数器 */
.sbp-gallery-counter {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 12px;
    padding: 3px 10px;
    border-radius: 12px;
    z-index: 2;
    pointer-events: none;
}

/* 缩略图条 */
.sbp-gallery-thumbnails {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
    scrollbar-color: #ccc transparent;
}

.sbp-gallery-thumbnails::-webkit-scrollbar {
    height: 4px;
}

.sbp-gallery-thumbnails::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 2px;
}

.sbp-gallery-thumbnail {
    width: 72px;
    height: 72px;
    min-width: 72px;
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 4px;
    overflow: hidden;
    transition: all 0.2s ease;
    background: #f9f9f9;
}

.sbp-gallery-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.sbp-gallery-thumbnail:hover img,
.sbp-gallery-thumbnail.active img {
    opacity: 1;
}

.sbp-gallery-thumbnail.active {
    border-color: var(--sbp-primary);
}

/* ============================================
   Lightbox 全屏查看
   ============================================ */

.sbp-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    align-items: center;
    justify-content: center;
}

.sbp-lightbox.active {
    display: flex;
}

.sbp-lightbox-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
}

.sbp-lightbox-close {
    position: absolute;
    top: 20px;
    right: 24px;
    background: none;
    border: none;
    color: #fff;
    font-size: 36px;
    cursor: pointer;
    z-index: 3;
    line-height: 1;
    opacity: 0.7;
    transition: opacity 0.2s;
    padding: 0;
}

.sbp-lightbox-close:hover {
    opacity: 1;
}

.sbp-lightbox-content {
    position: relative;
    z-index: 2;
    max-width: 90vw;
    max-height: 85vh;
}

.sbp-lightbox-content img {
    max-width: 90vw;
    max-height: 85vh;
    display: block;
    object-fit: contain;
    border-radius: 4px;
}

.sbp-lightbox-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border: none;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    opacity: 0.7;
    transition: all 0.2s;
    padding: 0;
}

.sbp-lightbox-arrow:hover {
    background: rgba(255, 255, 255, 0.3);
    opacity: 1;
}

.sbp-lightbox-prev { left: 20px; }
.sbp-lightbox-next { right: 20px; }

.sbp-lightbox-counter {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    z-index: 3;
}

.sbp-product-details {
    padding-top: 10px;
}

.sbp-breadcrumb {
    margin: 0 0 1rem;
    max-width: 100%;
    font-size: 0.875rem;
    line-height: 1.55;
    color: var(--sbp-text-light);
    overflow-wrap: anywhere;
    word-wrap: break-word;
}

.sbp-breadcrumb a {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    vertical-align: baseline;
    color: inherit;
    text-decoration: none;
}

.sbp-breadcrumb a svg {
    flex-shrink: 0;
    display: inline-block;
    vertical-align: -0.12em;
}

.sbp-breadcrumb a:hover,
.sbp-breadcrumb a:focus-visible {
    color: var(--sbp-primary);
    text-decoration: underline;
    outline: none;
}

.sbp-breadcrumb > span[aria-hidden="true"] {
    opacity: 0.75;
    user-select: none;
}

.sbp-breadcrumb > span:not([aria-hidden="true"]) {
    color: var(--sbp-text);
    font-weight: 600;
    white-space: normal;
}

.sbp-product-details h1 {
    margin: 0 0 30px 0;
    font-size: 32px;
    font-weight: 700;
    color: var(--sbp-text);
    line-height: 1.2;
}

.sbp-product-meta {
    margin-bottom: 30px;
    border-top: 1px solid var(--sbp-border);
    border-bottom: 1px solid var(--sbp-border);
    padding: 20px 0;
}

.sbp-product-meta-item {
    margin-bottom: 15px;
    font-size: 16px;
    color: var(--sbp-text-light);
    display: flex;
}

.sbp-product-meta-item strong {
    color: var(--sbp-text);
    font-weight: 600;
    width: 80px;
    flex-shrink: 0;
}

.sbp-product-short-desc {
    font-size: 16px;
    color: var(--sbp-text-light);
    line-height: 1.8;
    margin-bottom: 30px;
    margin-top: 20px;
}

.sbp-product-categories {
    margin-top: 20px;
    display: flex;
    gap: 10px;
}

.sbp-product-categories a {
    display: inline-block;
    padding: 6px 12px;
    background: #f0f4f8;
    color: var(--sbp-primary);
    text-decoration: none;
    font-size: 13px;
    transition: all 0.2s ease;
    border-radius: 4px;
}

.sbp-product-categories a:hover {
    background: var(--sbp-primary);
    color: #fff;
}

.sbp-contact-section {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-left: 4px solid var(--sbp-primary);
}

.sbp-contact-title {
    font-size: 14px;
    color: var(--sbp-text-light);
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sbp-contact-phone {
    font-size: 24px;
    font-weight: 700;
    color: var(--sbp-primary);
    line-height: 1.2;
}

.sbp-contact-link {
    display: inline-block;
    margin-top: 10px;
    color: var(--sbp-accent);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
}

.sbp-contact-link:hover {
    text-decoration: underline;
}

.sbp-product-content {
    margin-top: 60px;
}

.sbp-product-content-title {
    font-size: 22px;
    font-weight: 600;
    color: var(--sbp-text);
    margin-bottom: 30px;
    position: relative;
    padding-bottom: 15px;
    border-bottom: 1px solid #e0e0e0;
}

.sbp-product-content-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--sbp-primary);
}

.sbp-product-content-body {
    font-size: 16px;
    line-height: 1.8;
    color: var(--sbp-text);
    max-width: 900px;
}

.sbp-product-content-body p {
    margin-bottom: 20px;
}

.sbp-product-content-body img {
    max-width: 100%;
    height: auto;
    margin: 30px 0;
    display: block;
}

.sbp-product-content-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 30px 0;
    font-size: 15px;
}

.sbp-product-content-body th,
.sbp-product-content-body td {
    padding: 12px 20px;
    border: 1px solid #e0e0e0;
    text-align: left;
}

.sbp-product-content-body th {
    background: #f8f9fa;
    color: var(--sbp-primary);
    font-weight: 600;
    width: 25%;
}

.sbp-related-products {
    margin-top: 80px;
    padding-top: 60px;
    border-top: 1px solid var(--sbp-border);
}

.sbp-related-products h2 {
    margin: 20px 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--sbp-text);
    text-align: center;
}
.sbp-related-products > h2 {
    font-size: 24px;
}

/* 相关产品 PC 端 4 列 */
.sbp-related-grid {
    grid-template-columns: repeat(4, 1fr);
}

/* ============================================
   响应式设计
   ============================================ */

/* 平板竖屏 */
@media (max-width: 1024px) {
    .sbp-products-grid:not(.sbp-products-grid--list) {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .sbp-product-main {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .sbp-product-images {
        position: static;
        max-width: 600px;
        margin: 0 auto;
		width: 100%;
    }

    .sbp-product-images.sbp-gallery-thumbs--left {
        flex-direction: column;
        align-items: stretch;
        max-width: 600px;
    }

    .sbp-gallery-thumbs--left .sbp-gallery-thumbnails {
        order: 0;
        flex-direction: row;
        width: 100%;
        max-height: none;
        overflow-x: auto;
        overflow-y: visible;
        padding-bottom: 4px;
        gap: 10px;
    }

    .sbp-gallery-thumbs--left .sbp-gallery-thumbnails::-webkit-scrollbar {
        width: auto;
        height: 4px;
    }

    .sbp-gallery-thumbs--left .sbp-main-image-wrap {
        margin-bottom: 15px;
    }
}

/* 手机端：侧边栏变为抽屉 */
@media (max-width: 768px) {
    .sbp-product-card.sbp-product-card--row {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    /* 列表模式窄屏：与桌面「左图右文」分离，自上而下 图 → 标题 → 摘要 → 按钮 */
    .sbp-products-grid--list .sbp-product-card--row .sbp-product-info {
        flex: 0 1 auto;
        width: 100%;
        min-width: 0;
        min-height: 0;
    }
    .sbp-products-grid--list .sbp-product-card--row .sbp-product-title {
        margin-bottom: 0;
    }
    .sbp-products-grid--list .sbp-product-card--row .sbp-product-desc {
        flex: 0 1 auto;
        min-height: 0;
        margin-top: 0.75rem;
        display: block;
        -webkit-line-clamp: unset;
        overflow: visible;
    }
    .sbp-products-grid--list .sbp-product-card--row .sbp-product-more--btn {
        margin-top: 1rem;
        align-self: flex-start;
    }
    .sbp-products-grid--list .sbp-product-card--row .sbp-product-title a {
        display: block;
    }

    .sbp-products-grid--list .sbp-product-card--row .sbp-product-image {
        flex: none;
        width: 100%;
        max-width: none;
    }

    body.sbp-product-aspect-free .sbp-products-grid--list .sbp-product-card--row .sbp-product-image img {
        max-height: min(70vh, 360px);
    }
    .sbp-products-wrapper.sbp-layout-sidebar {
        flex-direction: column;
        padding: 20px 15px;
        gap: 0;
    }

    /* 移动端筛选按钮 */
    .sbp-mobile-filter-btn {
        display: flex;
        align-items: center;
        gap: 8px;
        width: 100%;
        padding: 12px 16px;
        margin-bottom: 20px;
        background: #fff;
        border: 1px solid var(--sbp-border);
        border-radius: 6px;
        font-size: 14px;
        font-weight: 600;
        color: var(--sbp-text);
        cursor: pointer;
        transition: all 0.2s;
    }

    .sbp-mobile-filter-btn:hover {
        border-color: var(--sbp-sidebar-header-bg);
        color: var(--sbp-sidebar-header-bg);
    }

    /* 遮罩层 */
    .sbp-sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 9998;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .sbp-sidebar-overlay.active {
        display: block;
        opacity: 1;
    }

    /* 侧边栏抽屉模式 */
    .sbp-sidebar {
        position: fixed;
        top: 0;
        left: -320px;
        width: 300px;
        min-width: 300px;
        height: 100vh;
        z-index: 9999;
        border-radius: 0;
        border: none;
        overflow-y: auto;
        transition: left 0.3s ease;
        box-shadow: none;
    }

    .sbp-sidebar.active {
        left: 0;
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
    }

    /* 关闭按钮 - 移动端显示 */
    .sbp-sidebar-close {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 32px;
        height: 32px;
        border: none;
        background: rgba(255, 255, 255, 0.2);
        border-radius: 4px;
        cursor: pointer;
        color: #fff;
        padding: 0;
        transition: background 0.2s;
    }

    .sbp-sidebar-close:hover {
        background: rgba(255, 255, 255, 0.3);
    }

    .sbp-main-content {
        width: 100%;
    }

    .sbp-products-grid:not(.sbp-products-grid--list) {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .sbp-product-title {
        font-size: 14px;
    }

    .sbp-products-grid--list .sbp-product-card--row .sbp-product-title {
        font-size: 1.0625rem !important;
        line-height: 1.35;
    }

    .sbp-single-product {
        padding: 30px 20px;
    }

    .sbp-product-details h1 {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .sbp-products-grid:not(.sbp-products-grid--list) {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .sbp-product-title {
        font-size: 16px;
    }
}

/* ── Inquiry Buttons ─────────────────────────── */
.sbp-product-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    margin-top: 1.5rem;
}

.sbp-inquiry-btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .7rem 1.75rem;
    background-color: #e85c0d;
    color: #fff;
    font-size: .9375rem;
    font-weight: 600;
    border-radius: 4px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: filter .2s, transform .15s;
    white-space: nowrap;
}
.sbp-inquiry-btn:hover {
    filter: brightness(.88);
    transform: translateY(-1px);
    color: #fff;
    text-decoration: none;
}
.sbp-inquiry-btn:active {
    transform: translateY(0);
}
