/* =完全复刻Driveby Africa详情页（中文 + Sticky粘性效果） */

:root {
    --primary: #10b981;
    --primary-dark: #059669;
    --primary-100: #d1fae5;
    --bg: #ffffff;
    --bg-alt: #f8fafc;
    --text: #1e293b;
    --text-light: #64748b;
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
    --shadow: 0 1px 2px 0 rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1);
}

.bizbiz-single-product {
    padding: 24px 0 60px;
    background-color: var(--bg-alt);
}

/* 返回链接 */
.bizbiz-breadcrumb {
    margin-bottom: 20px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.2s;
}

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

/* 主布局 */
.product-main-layout {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    gap: 32px;
    align-items: flex-start;
}

/* =左侧区域 */
.product-left-section {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* 图片区域 */
.image-gallery-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.main-image-container {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background-color: var(--bg-alt);
}

.main-display-image {
    width: 100%;
    height: auto;
    display: block;
}

.placeholder-img {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 40px;
}

.placeholder-img img {
    width: 100px;
    height: 100px;
    opacity: 0.3;
}

.origin-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background-color: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    box-shadow: var(--shadow);
}

.origin-flag {
    width: 20px;
    height: 20px;
    border-radius: 4px;
}

.thumbnail-strip {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
}

.thumb-item {
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s;
    aspect-ratio: 1;
}

.thumb-item:hover {
    border-color: var(--border);
}

.thumb-item.active {
    border-color: var(--primary);
}

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

/* 规格和描述区域 */
.specs-description-area {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.specs-card,
.description-card {
    background-color: var(--bg);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow);
}

.section-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 20px 0;
}

.specs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.spec-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.spec-name {
    font-size: 12px;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.spec-detail {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

.description-text {
    font-size: 14px;
    line-height: 1.7;
    color: var(--text);
}

/* =右侧Sticky粘性卡片 */
.product-right-section {
    position: relative;
}

.product-info-sticky {
    position: sticky;
    top: 24px;
}

.product-info-card {
    background-color: var(--bg);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.product-name {
    font-size: 24px;
    font-weight: 700;
    color: var(--text);
    margin: 0;
    line-height: 1.3;
}

.product-sub-info {
    font-size: 14px;
    color: var(--text-light);
    margin: 0;
}

/* 批量采购卡片 */
.batch-purchase-card {
    background-color: #dbeafe;
    border: 1px solid #93c5fd;
    border-radius: var(--radius);
    padding: 16px;
}

.batch-header {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #1d4ed8;
    margin-bottom: 12px;
}

.batch-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.batch-detail {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.batch-detail-label {
    font-size: 12px;
    color: var(--text-light);
}

.batch-detail-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

/* 价格 */
.price-container {
    padding: 20px;
    background-color: var(--bg-alt);
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.price-label-text {
    font-size: 12px;
    color: var(--text-light);
    font-weight: 500;
}

.price-display {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.price-number {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary);
}

.price-currency {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

.price-per-unit {
    font-size: 12px;
    color: var(--text-light);
}

.origin-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-light);
}

.origin-label-text {
    font-size: 14px;
    color: var(--text-light);
}

.origin-value-text {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

/* 数量选择器 */
.quantity-selector {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.quantity-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 0;
    background-color: var(--bg-alt);
    border-radius: var(--radius);
    overflow: hidden;
}

.qty-btn {
    width: 48px;
    height: 48px;
    border: none;
    background: none;
    font-size: 20px;
    font-weight: 600;
    color: var(--text-light);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.qty-btn:hover:not(:disabled) {
    background-color: var(--border-light);
}

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

.quantity-controls input {
    flex: 1;
    height: 48px;
    border: none;
    background: none;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
}

.quantity-limits {
    font-size: 12px;
    color: var(--text-light);
    margin: 0;
}

/* 小计 */
.subtotal-box {
    padding: 16px;
    background-color: #ffedd5;
    border-radius: var(--radius);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.subtotal-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
}

.subtotal-amount {
    font-size: 20px;
    font-weight: 700;
    color: #ea580c;
}

/* 运费估算 */
.shipping-estimate {
    padding: 16px;
    background-color: var(--bg-alt);
    border-radius: var(--radius);
}

.estimate-header {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 12px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.destination-select-btn {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background-color: var(--bg);
    color: var(--text-light);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

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

/* 分享 */
.share-area {
    padding-top: 8px;
    border-top: 1px solid var(--border-light);
}

.share-button {
    width: 100%;
    padding: 12px 16px;
    border: none;
    background: none;
    color: var(--text-light);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: color 0.2s;
}

.share-button:hover {
    color: var(--primary);
}

/* =响应式适配 */
@media (max-width: 1024px) {
    .product-main-layout {
        grid-template-columns: 1fr;
    }
    
    .product-info-sticky {
        position: static;
    }
    
    .specs-description-area {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .bizbiz-single-product {
        padding: 16px 0 40px;
    }
    
    .product-info-card {
        padding: 16px;
    }
    
    .thumbnail-strip {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .specs-grid {
        grid-template-columns: 1fr;
    }
}

/* ======================================
   列表页面样式 - 完全复刻Driveby Africa
   ====================================== */

.archive-page {
    padding: 40px 0 60px;
    background-color: var(--bg-alt);
    min-height: 100vh;
}

.archive-header {
    margin-bottom: 40px;
    text-align: center;
}

.archive-title {
    font-size: 36px;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 12px 0;
    line-height: 1.2;
}

.archive-subtitle {
    font-size: 16px;
    color: var(--text-light);
    margin: 0;
}

/* 筛选区域 */
.filter-section {
    margin-bottom: 32px;
}

.filter-wrapper {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
}

.filter-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background-color: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    cursor: pointer;
    transition: all 0.2s;
}

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

.filter-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.filter-select {
    padding: 12px 16px;
    background-color: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--text);
    cursor: pointer;
    min-width: 140px;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 12 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3 4.5L6 7.5L9 4.5' stroke='%2364748b' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary);
}

/* 可搜索的品牌选择框样式 */
.filter-group .searchable-select-container {
    display: inline-block;
    min-width: 140px;
    width: auto;
    vertical-align: top;
}

.filter-group .searchable-select-header {
    min-width: 140px;
    padding: 12px 36px 12px 16px;
    background-color: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--text);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 12 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3 4.5L6 7.5L9 4.5' stroke='%2364748b' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.filter-group .searchable-select-value {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.filter-group .searchable-select-arrow {
    display: none;
}

.filter-group .searchable-select-dropdown {
    min-width: 200px;
}

/* 产品项卡片 */
.product-item {
    background-color: var(--bg);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
    list-style: none;
    margin: 0;
}

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

.product-link-wrapper {
    display: block;
    text-decoration: none;
    color: inherit;
}

/* 产品图片区域 */
.product-image-area {
    position: relative;
}

.product-image-wrapper {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    background-color: var(--bg-alt);
}

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

.product-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.product-image-placeholder img {
    width: 80px;
    height: 80px;
    opacity: 0.3;
}

/* 产地标签 */
.product-origin-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background-color: var(--primary);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    color: white;
}

.product-origin-badge .origin-flag {
    width: 18px;
    height: 18px;
    border-radius: 4px;
}

/* 收藏按钮 */
.product-favorite-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255,255,255,0.95);
    border-radius: 50%;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-light);
}

.product-favorite-btn:hover {
    background-color: white;
    color: var(--primary);
    transform: scale(1.05);
}

/* 产品信息区域 */
.product-info-area {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* 库存状态 */
.product-stock-status {
    display: inline-flex;
}

.product-stock-status .in-stock {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--primary);
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
}

.product-stock-status .in-stock::before {
    content: '';
    width: 6px;
    height: 6px;
    background-color: var(--primary);
    border-radius: 50%;
}

.product-stock-status .out-stock {
    padding: 4px 10px;
    background-color: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
}

/* 产品标题 */
.product-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    margin: 0;
    line-height: 1.3;
}

/* 规格标签 */
.product-specs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.spec-tag {
    font-size: 13px;
    color: var(--text-light);
}

/* 分隔线 */
.product-divider {
    height: 1px;
    background-color: var(--border-light);
    margin: 4px 0;
}

/* 价格区域 */
.product-price-area {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-price {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.price-value {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary);
}

.price-currency {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

.view-detail-text {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-light);
    transition: color 0.2s;
}

.product-item:hover .view-detail-text {
    color: var(--primary);
}

/* 分页 */
.pagination-wrapper {
    margin-top: 48px;
    display: flex;
    justify-content: center;
}

.pagination-wrapper .page-numbers {
    display: inline-flex;
    gap: 4px;
}

.pagination-wrapper .page-numbers .page-numbers,
.pagination-wrapper .page-numbers .next,
.pagination-wrapper .page-numbers .prev {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    background-color: var(--bg);
    border: 1px solid var(--border);
    text-decoration: none;
    transition: all 0.2s;
}

.pagination-wrapper .page-numbers .page-numbers:hover,
.pagination-wrapper .page-numbers .next:hover,
.pagination-wrapper .page-numbers .prev:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.pagination-wrapper .page-numbers .current {
    background-color: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* 无产品状态 */
.no-products {
    grid-column: 1/-1;
    text-align: center;
    padding: 80px 20px;
}

.no-products-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.no-products h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 8px 0;
}

.no-products p {
    font-size: 14px;
    color: var(--text-light);
    margin: 0;
}

/* WooCommerce 默认样式覆盖 */
.woocommerce ul.products {
    display: none !important;
}

/* 列表页响应式 */
@media (max-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .archive-title {
        font-size: 28px;
    }
}

@media (max-width: 768px) {
    .archive-page {
        padding: 24px 0 40px;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .filter-wrapper {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group {
        flex-direction: column;
    }
    
    .filter-select {
        width: 100%;
    }
    
    .archive-title {
        font-size: 24px;
    }
    
    .archive-subtitle {
        font-size: 14px;
    }
}
