/* CSS Variables */
:root {
    --font-family: 'ABCFavoritVariable', Roboto, Arial, sans-serif;
    --primary-color: #0b38d5;
    --primary-blue: #3B61FF;
    --text-color: #00061a;
    --text-secondary: #555;
    --text-muted: #86868b;
    --border-color: #e7e7e7;
    --border-color-dark: #cfcfcf;
    --background-light: #f8f8f8;
    --background-white: #fff;
}

/* Reset and base styles */
* {
    box-sizing: border-box;
}

/* Typography classes */
.typography-header-15-500 {
    font-size: 0.9375rem;
    font-weight: 500;
    line-height: 1.16;
    letter-spacing: -0.02em;
    font-family: var(--font-family);
    font-feature-settings: "clig" 0, "liga" 0;
    font-style: normal;
}

.typography-body-15-350 {
    font-size: 0.9375rem;
    font-weight: 350;
    line-height: 1.32;
    letter-spacing: -0.02em;
    font-family: var(--font-family);
    font-feature-settings: "clig" 0, "liga" 0;
    font-style: normal;
}

.typography-body-13-350 {
    font-size: 0.8125rem;
    font-weight: 350;
    line-height: 1.32;
    letter-spacing: -0.02em;
    font-family: var(--font-family);
    font-feature-settings: "clig" 0, "liga" 0;
    font-style: normal;
}

/* 多层级规格前端显示样式 */
.multilevel-specs-frontend {
    margin: 20px 0;
}

.multilevel-specs-frontend h4 {
    margin: 0 0 15px 0;
    color: var(--text-color);
    font-size: 0.9375rem;
    font-weight: 500;
    line-height: 1.16;
    letter-spacing: -0.02em;
    font-family: var(--font-family);
    border-bottom: 2px solid var(--primary-blue);
    padding-bottom: 8px;
}

/* 规格选择区域 */
.specs-selection {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
 
}

.spec-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* 规格组标题容器 */
.spec-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

/* Learn more链接样式 */
.learn-more-link {
    color: #007cba;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.learn-more-link:hover {
    background: #f0f8ff;
    color: #005a8b;
    text-decoration: none;
}

.spec-group label {
    font-size: 0.9375rem;
    font-weight: 500;
    line-height: 1.16;
    letter-spacing: -0.02em;
    font-family: var(--font-family);
    color: var(--text-color);
    cursor: pointer;
    margin-bottom: 8px;
}

/* 数量选择器 - 参考dropdown-component样式 */
.quantity-picker {
    width: 100%;
    position: relative;
}

/* Picker Value Container */
.picker-value-container {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    width: 100%;
    height: 48px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: var(--background-white);
    transition: 0.25s ease-in-out;
    cursor: pointer;
}

.picker-value-container:hover,
.picker-value-container:active,
.picker-value-container:focus {
    border-color: var(--primary-color);
}

.picker-value-container.active {
    border-color: var(--primary-color);
    box-shadow: 0 0 4px var(--primary-color);
}

.picker-value-wrapper {
    display: flex;
    flex: 1;
    padding-left: 16px;
}

/* Picker Value */
.picker-value {
    display: flex;
    align-items: center;
    width: 100%;
}

.selected-quantity {
    font-family: var(--font-family);
    font-size: 0.9375rem;
    font-weight: 350;
    line-height: 1.32;
    letter-spacing: -0.02em;
    color: var(--text-color);
    flex: 1;
}

/* Basic Label */
.basic-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.piece-price {
    font-family: var(--font-family);
    font-size: 0.8125rem;
    font-weight: 350;
    line-height: 1.32;
    letter-spacing: -0.02em;
    color: var(--text-muted);
}

.total-price {
    font-family: var(--font-family);
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1.16;
    letter-spacing: -0.02em;
    color: var(--text-color);
    width: 70px;
    text-align: right;
}

.zjny-qty-inline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 12px 0;
}

.zjny-qty-inline .qty {
    width: 64px;
    height: 40px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    text-align: center;
}

.zjny-qty-inline .qty-plus,
.zjny-qty-inline .qty-minus {
    width: 36px;
    height: 40px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--background-white);
    cursor: pointer;
}

/* Toggle Button */
.picker-toggle-button {
    background: none;
    border: none;
    width: 47px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.picker-toggle-button:focus {
    outline: none;
}

.toggle-icon {
    width: 14px;
    height: 14px;
    transition: 0.25s ease-in-out;
    fill: var(--text-color);
}

.picker-value-container.active .toggle-icon {
    transform: rotate(180deg);
    fill: var(--primary-color);
}

/* Dropdown Styles */
.quantity-options-dropdown {
    position: absolute;
    top: 48px;
    left: 0;
    width: 100%;
    margin-top: 8px;
    border: 1px solid var(--border-color-dark);
    border-radius: 2px;
    box-shadow: 0 5px 5px rgba(47, 47, 47, 0.2);
    box-sizing: border-box;
    background-color: var(--background-white);
    z-index: 1000;
}

/* Search Field */
.quantity-search {
    padding: 8px;
    border-bottom: 1px solid var(--border-color-dark);
}

.quantity-search-input {
    box-sizing: border-box;
    width: 100%;
    height: 32px;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: var(--background-white);
    font-family: var(--font-family);
    font-size: 14px;
    transition: border-color 0.25s ease-in-out;
}

.quantity-search-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Options List */
.quantity-options-list {
    max-height: 240px;
    overflow-y: auto;
}

.options-list {
    width: 100%;
    list-style: none;
    padding: 8px 0;
    margin: 0;
}

/* Option Items */
.quantity-option {
    padding: 0 8px;
    height: 40px;
    display: flex;
    align-items: center;
    transition: background-color 0.25s;
    border-radius: 4px;
    margin: 0 8px 4px;
    cursor: pointer;
    position: relative;
}

.quantity-option:focus {
    outline: none;
    background-color: var(--background-light);
}

.quantity-option:hover {
    background-color: var(--background-light);
}

.quantity-option.selected {
    background-color: rgba(59, 97, 255, 0.1);
}

.quantity-option .option-quantity {
    font-family: var(--font-family);
    font-size: 0.9375rem;
    font-weight: 350;
    line-height: 1.32;
    letter-spacing: -0.02em;
    color: var(--text-color);
    flex: 1;
}

.quantity-option .option-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-right: 32px; /* 为右侧图标预留固定空间 */
}

.quantity-option .option-piece-price {
    font-family: var(--font-family);
    font-size: 0.8125rem;
    font-weight: 350;
    line-height: 1.32;
    letter-spacing: -0.02em;
    color: var(--text-muted);
}

.quantity-option .option-total-price {
    font-family: var(--font-family);
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1.16;
    letter-spacing: -0.02em;
    color: var(--text-color);
    width: 70px;
    text-align: right;
}

/* Option Indicator - 使用绝对定位避免影响布局 */
.quantity-option.selected::after {
    content: '';
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    background-image: url('data:image/svg+xml;utf8,<svg width="24" height="24" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M12 21.6a9.6 9.6 0 0 0 9.6-9.6 9.6 9.6 0 1 0-9.6 9.6Zm-1.016-7.09 5.87-5.87.906.905-6.776 6.775-4.744-4.744.905-.905 3.84 3.84Z" fill="%233B61FF"/></svg>');
    background-repeat: no-repeat;
    background-position: center;
    background-size: 24px 24px;
}

/* No options message */
.no-options {
    padding: 0 8px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-family);
    font-size: 0.8125rem;
    color: var(--text-muted);
    font-style: italic;
}

/* 尺寸选择按钮 - 参考dropdown-component样式 */
.size-selector-button {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    width: 100%;
    height: 48px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: var(--background-white);
    transition: 0.25s ease-in-out;
    cursor: pointer;
}

.size-selector-button:hover,
.size-selector-button:active,
.size-selector-button:focus {
    border-color: var(--primary-color);
    outline: none;
}

.size-selector-button.active {
    border-color: var(--primary-color);
    box-shadow: 0 0 4px var(--primary-color);
}

.size-selector-button .selected-size-text {
    display: flex;
    flex: 1;
    padding-left: 16px;
    font-family: var(--font-family);
    font-size: 0.9375rem;
    font-weight: 350;
    line-height: 1.32;
    letter-spacing: -0.02em;
    color: var(--text-color);
    align-items: center;
}

.size-selector-button .dropdown-arrow {
    background: none;
    border: none;
    width: 47px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.size-selector-button .dropdown-arrow svg {
    width: 14px;
    height: 14px;
    font-size: 14px;
    transition: 0.25s ease-in-out;
    fill: var(--text-color);
}

.size-selector-button.active .dropdown-arrow svg {
    transform: rotate(180deg);
    fill: var(--primary-color);
}

/* 尺寸选择弹窗 - 参考dropdown-component样式 */
.size-selection-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--background-white);
    border-radius: 12px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.3);
    max-width: 1000px; /* 从800px增加到1000px */
    width: 95%; /* 从90%增加到95% */
    max-height: 85vh; /* 从80vh增加到85vh */
    min-height: 600px; /* 设置最小高度 */
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 16px 24px;
    flex-shrink: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.modal-close:hover {
    background: var(--background-light);
}

.modal-body {
    display: flex;
    gap: 40px;
    padding: 20px 24px;
    flex: 1;
    min-height: 400px;
    overflow: hidden;
}

.size-preview {
    flex: 2;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.size-image {
    background: var(--background-light);
    border-radius: 8px;
    padding: 24px;
    text-align: center;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.size-image img {
    max-width: 100%;
    max-height: 250px;
    object-fit: contain;
    border-radius: 8px;
    margin-bottom: 16px;
}

/* 左侧图片列表 */
.size-image-list {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 12px;
    background: var(--background-white);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.size-image-list::-webkit-scrollbar {
    height: 6px;
}

.size-image-list::-webkit-scrollbar-track {
    background: var(--background-light);
    border-radius: 3px;
}

.size-image-list::-webkit-scrollbar-thumb {
    background: var(--border-color-dark);
    border-radius: 3px;
}

.size-image-list::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

.size-image-item {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.2s ease;
}

.size-image-item:hover {
    border-color: var(--primary-color);
}

.size-image-item.active {
    border-color: var(--primary-blue);
}

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

.size-dimensions {
    color: var(--text-secondary);
    font-family: var(--font-family);
    font-size: 0.875rem;
}

.dimension-label {
    margin-bottom: 4px;
}

.size-options {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Size标题样式 */
.size-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-color);
    font-family: var(--font-family);
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.size-options-list {
    flex: 1;
    overflow-y: auto;
    max-height: 400px;
}

/* 尺寸选项 - 参考dropdown-component样式 */
.size-option {
    padding: 0 8px;
    min-height: 40px;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background-color 0.25s, height 0.3s ease;
    border-radius: 4px;
    margin: 0 8px 10px;
    cursor: pointer;
    position: relative;
}

.size-option:focus {
    outline: none;
    background-color: var(--background-light);
}

.size-option:hover {
    background-color: var(--background-light);
}

.size-option.selected {
    background-color: rgba(59, 97, 255, 0.1);
}

/* 计算单价选项标识样式 */
.size-option.unit-price-option {
    position: relative;
    flex-direction: column;
    align-items: stretch;
    padding: 8px;
}

/* 计算单价选项的主要内容区域 */
.size-option.unit-price-option .size-option-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 24px;
}

/* 自定义尺寸输入框容器 */
.custom-dimensions {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.dimension-inputs {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.dimension-input-group {
    flex: 1;
    min-width: 80px;
    display: flex;
    flex-direction: column;
}

.dimension-input-group label {
    font-family: var(--font-family);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-color);
    margin-bottom: 4px;
    text-align: center;
}

.dimension-input {
    width: 100%;
    height: 32px;
    padding: 6px 8px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: var(--font-family);
    font-size: 0.875rem;
    text-align: center;
    background: var(--background-color);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.dimension-input:focus {
    outline: none;
    border-color: #3b61ff;
    box-shadow: 0 0 0 2px rgba(59, 97, 255, 0.1);
}

 

 
/* 响应式设计 */
@media (max-width: 768px) {
    .dimension-inputs {
        flex-direction: column;
        gap: 8px;
    }
    
    .dimension-input-group {
        min-width: auto;
    }
}

.size-name {
    font-family: var(--font-family);
    font-size: 0.9375rem;
    font-weight: 350;
    line-height: 1.32;
    letter-spacing: -0.02em;
    color: var(--text-color);
    flex: 1;
}

.size-price {
    font-family: var(--font-family);
    font-size: 0.8125rem;
    font-weight: 350;
    line-height: 1.32;
    letter-spacing: -0.02em;
    color: var(--text-muted);
    width: 90px;
    text-align: right;
}

/* 选项指示器 */
.size-option::after {
    content: '';
    width: 32px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

/* 移除勾选图标，只保留背景色变化 */

.modal-footer {
    padding: 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
    background: var(--background-white);
}

/* 选中规格摘要 */
.selected-spec-summary {
    display: flex;
    align-items: center;
    gap: 24px;
    flex: 1;
}

.spec-details {
    flex: 1;
}

.selected-spec-text {
    font-family: var(--font-family);
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-color);
}

.price-info {
    text-align: left;
}

.vat-note {
    font-family: var(--font-family);
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--text-secondary);
    display: block;
    margin-bottom: 4px;
}

/* 移除重复的total-price定义，使用上面的定义 */

.save-close-button {
    background: var(--primary-blue);
    color: var(--background-white);
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-family: var(--font-family);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.save-close-button:hover {
    background: var(--primary-color);
}

/* 防止页面滚动 */
body.modal-open {
    overflow: hidden;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .multilevel-specs-frontend {
        padding: 15px;
        margin: 15px 0;
    }
    
    .spec-select,
    .size-selector-button {
        padding-left: 12px;
        font-size: 16px; /* 防止iOS缩放 */
    }
    
    .modal-content {
        width: 95%;
        max-height: 90vh;
    }
    
    .modal-body {
        flex-direction: column;
        height: auto;
        max-height: 70vh;
    }
    
    .size-preview {
        flex: none;
        padding: 16px;
    }
    
    .size-image img {
        max-width: 200px;
        max-height: 200px;
    }
    
    .size-options-list {
        padding: 16px;
        max-height: 300px;
    }
    
    .modal-footer {
        padding: 16px;
        flex-direction: column;
        gap: 12px;
    }
    
    .price-info {
        text-align: center;
    }
    
    .save-close-button {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .multilevel-specs-frontend h4 {
        font-size: 0.875rem;
    }
    
    .spec-group label {
        font-size: 0.8125rem;
    }
    
    .modal-header h3 {
        font-size: 1.25rem;
    }
    
    .size-image img {
        max-width: 150px;
        max-height: 150px;
    }
    
    .total-price {
        font-size: 1.25rem;
    }
}

/* 加载状态 */
.specs-loading {
    opacity: 0.6;
    pointer-events: none;
}

.specs-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--primary-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 错误状态 */
.spec-select.error,
.size-selector-button.error {
    border-color: #dc3232;
    box-shadow: 0 0 0 3px rgba(220, 50, 50, 0.1);
}

/* 成功状态 */
.spec-select.success,
.size-selector-button.success {
    border-color: #46b450;
    box-shadow: 0 0 0 3px rgba(70, 180, 80, 0.1);
}

/* 动画效果 */
.size-selection-modal {
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -60%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

/* 高对比度模式支持 */
@media (prefers-contrast: high) {
    .spec-select,
    .size-selector-button {
        border-width: 2px;
    }
    
    .modal-content {
        border: 2px solid var(--text-color);
    }
}

/* 减少动画模式支持 */
@media (prefers-reduced-motion: reduce) {
    .spec-select,
    .size-selector-button,
    .size-option,
    .save-close-button {
        transition: none;
    }
    
    .size-selection-modal,
    .modal-content {
        animation: none;
    }
    
    .specs-loading::after {
        animation: none;
    }
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
    :root {
        --text-color: #e0e0e0;
        --text-secondary: #ccc;
        --text-muted: #999;
        --border-color: #444;
        --border-color-dark: #555;
        --background-light: #2a2a2a;
        --background-white: #333;
    }
}

/* 打印样式 */
@media print {
    .multilevel-specs-frontend {
        background: none;
        border: 1px solid #000;
        box-shadow: none;
    }
    
    .size-selection-modal {
        display: none;
    }
}

/* 图片按钮容器 */
.image-buttons-container,
.text-buttons-container {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* 图片按钮 */
.image-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
    flex: 0 0 calc(20% - 10px); /* 一排显示5个 */
    position: relative;
    height: 75px;
}

.image-button:hover {
    border-color: #2757ff;
    box-shadow: 0 2px 8px rgba(0, 124, 186, 0.1);
}

.image-button.selected {
    border-color: #2757ff;
    background: #f0f8ff;
}

.image-button img {
    max-width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.image-button .button-text {
    font-size: 13px;
    font-weight: 500;
    text-align: center;
    line-height: 1.3;
    display: none; /* 默认隐藏标题 */
}

/* 图片按钮悬停时显示标题 */
.image-button:hover .button-text {
    display: block;
    position: absolute;
    top: -35px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 6px 12px;
    border-radius: 4px;
    white-space: nowrap;
    z-index: 1000;
    font-size: 12px;
}

/* 悬停标题的小箭头 */
.image-button:hover .button-text::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.8);
}

/* 文字按钮 */
.text-button {
    padding: 12px 20px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 500;
    min-width: 100px;
    text-align: center;
}

.text-button:hover {
    border-color: #2757ff;
}

.text-button.selected {
    border-color: #2757ff;
}

/* Learn more链接 */
.learn-more-link {
    margin-left: 10px;
    color: #000000;
    text-decoration: none;
    font-size: 13px;
    font-weight: 400;
}

.learn-more-link:hover {
    text-decoration: underline;
}

/* Learn more弹窗 */
.learn-more-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    backdrop-filter: blur(2px);
}

.learn-more-modal .modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    cursor: pointer;
}

.learn-more-modal .modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border-radius: 12px;
    max-width: 1200px;
    width: 95%;
    max-height: 85vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease;
}

.learn-more-modal .modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.learn-more-modal .modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.learn-more-modal .modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.learn-more-modal .modal-close:hover {
    background: #f0f0f0;
}

.learn-more-modal .modal-body {
    padding: 30px;
    max-height: 70vh;
    overflow-y: auto;
}

/* Learn more选项网格布局 */
.learn-more-options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.learn-more-modal .level-info-item {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 300px;
}

.learn-more-modal .level-info-item:hover {
    border-color: #2756fa;
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.1);
    transform: translateY(-2px);
}

.learn-more-modal .level-info-image {
    width: 100%;
    height: 150px;
    margin-bottom: 15px;
    overflow: hidden;
    border-radius: 6px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.learn-more-modal .level-info-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
}

.learn-more-modal .level-info-title {
    font-weight: 600;
    margin-bottom: 12px;
    color: #333;
    font-size: 18px;
    line-height: 1.4;
}

.learn-more-modal .level-info-subtitle {
    font-weight: 500;
    margin-bottom: 8px;
    color: #555;
    font-size: 14px;
}

.learn-more-modal .level-info-description {
    color: #666;
    line-height: 1.6;
    font-size: 14px;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* 选择按钮 */
.learn-more-modal .level-info-button {
    margin-top: auto;
    width: 100%;
    padding: 12px 20px;
    background: #2757ff;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.learn-more-modal .level-info-button:hover {
    background: #0430d1;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.3);
}

.learn-more-modal .level-info-button.selected {
    background: #28a745;
    color: #fff;
}

.learn-more-modal .level-info-button.selected:hover {
    background: #218838;
}

/* 价格显示 */
.learn-more-modal .level-info-price {
    margin-top: 15px;
    margin-bottom: 15px;
    text-align: center;
}

.learn-more-modal .level-info-price-label {
    font-size: 12px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.learn-more-modal .level-info-price-value {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    line-height: 1.3;
}

/* 新增样式的响应式设计 */
@media (max-width: 768px) {
    .image-button,
    .text-button {
        flex: 0 0 calc(50% - 6px); /* 小屏幕一排2个 */
        max-width: calc(50% - 6px);
    }
    
    .image-button img {
        max-width: 100%;
        height: auto;
    }
    
    .bundle-product-item {
        flex: 0 0 calc(50% - 7.5px); /* 小屏幕产品捆绑一排2个 */
    }
    
    .learn-more-modal .modal-content {
        width: 95%;
        margin: 20px;
        max-width: 95vw;
    }
    
    .learn-more-modal .modal-header,
    .learn-more-modal .modal-body {
        padding: 16px;
    }
    
    .learn-more-options-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .learn-more-modal .level-info-item {
        min-height: 250px;
        padding: 15px;
    }
    
    .learn-more-modal .level-info-image {
        height: 120px;
    }
}

@media (max-width: 480px) {
    .image-button,
    .text-button {
        flex: 0 0 100%; /* 超小屏幕一排1个 */
        max-width: 100%;
    }
    
    .bundle-product-item {
        flex: 0 0 100%; /* 超小屏幕产品捆绑一排1个 */
    }
    
    .learn-more-options-grid {
        grid-template-columns: 1fr; /* 超小屏幕一列显示 */
        gap: 12px;
    }
    
    .learn-more-modal .level-info-item {
        min-height: 200px;
        padding: 12px;
    }
    
    .learn-more-modal .level-info-image {
        height: 100px;
    }
    
    .learn-more-modal .modal-content {
        width: 98%;
        margin: 10px;
    }
}

/* 无效选项隐藏 */
.text-button.disabled,
.image-button.disabled {
    display: none !important;
}

/* ===== 货运时间样式（左右分离结构） ===== */
/* 基础重置 */
.delivery-container * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 容器样式（居中、紧凑） */
.delivery-container {
    max-width: 500px;
    margin: 30px auto;
    font-family: 'ABCFavoritVariable', 'Arial', sans-serif;
    line-height: 1.6;
}

/* 配送目标信息（标题样式） */
.delivery-target {
    font-size: 0.935em;
    color: #000000;
    font-weight: 500;
    padding-bottom: 15px;
}

/* 左右布局容器 */
.delivery-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

/* 左侧：选项列表（保留bullet点） */
.delivery-list {
    list-style-type: disc;
    padding-left: 25px;
    margin: 0;
    flex: 1;
}

/* 左侧：单个选项 */
.delivery-item {
    margin-bottom: 1px;
    color: #444;
    font-size: 0.8em;
}

/* 高亮选项样式 */
.delivery-item.item-highlight {
    font-weight: 500;
    color: #000;
}

/* 右侧：价格信息容器（靠底部显示） */
.delivery-price-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
    min-width: 120px;
    margin-left: 20px;
    align-self: flex-end;
}

/* 货运时间的数量信息 */
.shipping-quantity-info {
    font-size: 0.85em;
    color: #666;
    margin-bottom: 4px;
    line-height: 1.2;
}

/* 货运时间价格样式 */
.shipping-total-price {
    font-size: 1.7em;
    font-weight: bold;
    color: #000;
    line-height: 1.2;
    font-family: 'ABCFavoritVariable', Arial, sans-serif;
    letter-spacing: 0.5px;
    transition: transform 0.3s ease, opacity 0.2s ease;
}

/* 价格变动动画效果 */
.shipping-total-price.price-changing {
    animation: priceChange 0.6s ease-in-out;
}

@keyframes priceChange {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    30% {
        transform: scale(1.15);
        opacity: 0.8;
    }
    60% {
        transform: scale(1.05);
        opacity: 0.9;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

 

/* 确保货运时间容器在正确位置 */
.delivery-container {
    order: 10;
}

/* 确保加入购物车按钮在最后 */
.single_add_to_cart_button {
    order: 20;
    margin-top: 20px !important;
}

/* 移除所有置顶相关的CSS，不改变原有布局 */

/* 底部固定栏 */
.bottom-cart-bar {
    position: fixed;
    bottom: 0;
    right: 0;
    background: white;
    border-top: 1px solid #e0e0e0;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    padding: 15px 20px;
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
}

/* 底部导航栏 - 匹配右侧产品信息区域宽度 */
.bottom-cart-bar {
    width: calc(25% - 10px); /* 与.product-summary-section保持一致 */
    right: 80px; /* 右边距80px */
    left: auto;
    border-radius: 8px 8px 0 0; /* 左上角和右上角圆角 */
}

.bottom-cart-bar .delivery-info {
    display: flex;
    flex-direction: column;
    font-size: 14px;
    color: #666;
}

.bottom-cart-bar .delivery-label {
    font-size: 12px;
    color: #888;
    line-height: 1.2;
}

.bottom-cart-bar .delivery-date {
    font-weight: 600;
    color: #333;
    font-size: 14px;
    line-height: 1.2;
}

.bottom-cart-bar .price-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    margin-right: 15px;
}

.bottom-cart-bar .quantity-info {
    font-size: 12px;
    color: #888;
    margin-bottom: 4px;
    text-align: right;
}

.bottom-cart-bar .total-price {
    font-size: 16px; /* 缩小价格字体 */
    font-weight: 700;
    color: #333;
}

.bottom-cart-bar .add-to-cart-btn {
    background: #2757ff;
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.bottom-cart-bar .add-to-cart-btn:hover {
    background: #0431d4;
    transform: translateY(-1px);
}

.bottom-cart-bar .add-to-cart-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

 

/* 移动端适配 */
@media (max-width: 768px) {
    .bottom-cart-bar {
        width: 100%;
        left: 0;
        right: 0;
    }
}
