/* ==========================================================================
   CSE Single Product Detail Page Stylesheet
   Strict Blocksy Child Theme Integration - 100% Zero-Misalignment Architecture
   ========================================================================== */

:root {
    --cse-font: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --cse-brand-blue: #1652f0;
    --cse-brand-blue-hover: #0f42c2;
    --cse-dark: #0f172a;
    --cse-slate: #334155;
    --cse-muted: #64748b;
    --cse-border: #e2e8f0;
    --cse-green: #22c55e;
}

/* Ensure Inter font everywhere on single product page */
.single-product div.product,
.single-product .entry-summary {
    font-family: var(--cse-font) !important;
}

/* -------------------------------------------------------------
   1. Title & Price (Harmonious scale aligned with WooCommerce / Blocksy)
   ------------------------------------------------------------- */
.entry-summary h1.product_title,
.entry-summary .cse-detail-title {
    font-family: var(--cse-font) !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    line-height: 1.35 !important;
    color: var(--cse-dark) !important;
    margin: 0 0 8px 0 !important;
    padding: 0 !important;
    letter-spacing: -0.01em !important;
}

.entry-summary .cse-detail-price-row {
    font-family: var(--cse-font) !important;
    font-size: 19px !important;
    font-weight: 600 !important;
    color: var(--cse-dark) !important;
    margin-bottom: 12px !important;
    line-height: 1.2 !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    flex-wrap: wrap !important;
}

.cse-pricing-details-link {
    font-family: var(--cse-font) !important;
    font-size: 13.5px !important;
    font-weight: 500 !important;
    color: var(--cse-brand-blue) !important;
    text-decoration: underline !important;
    cursor: pointer !important;
    margin-left: 4px !important;
    transition: opacity 0.15s ease !important;
    display: inline-block !important;
}

.cse-pricing-details-link:hover {
    opacity: 0.8 !important;
    color: var(--cse-brand-blue-hover) !important;
}

/* Retail In Stock Badge */
.cse-retail-instock-tag {
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    font-size: 11.5px !important;
    font-weight: 500 !important;
    color: #166534 !important;
    background-color: #f0fdf4 !important;
    border: 1px solid #dcfce7 !important;
    padding: 2px 7px !important;
    border-radius: 4px !important;
    line-height: 1 !important;
}

.cse-retail-dot {
    width: 6px !important;
    height: 6px !important;
    border-radius: 50% !important;
    background-color: var(--cse-green) !important;
}

/* -------------------------------------------------------------
   2. Short Description: Fabric & Selling Points
   ------------------------------------------------------------- */
.entry-summary .cse-detail-fabric-desc {
    font-family: var(--cse-font) !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    line-height: 1.55 !important;
    color: #111111 !important;
    margin-bottom: 16px !important;
    padding-bottom: 12px !important;
    border-bottom: 1px solid var(--cse-border) !important;
}

.entry-summary .cse-detail-fabric-desc p {
    font-size: 15px !important;
    font-weight: 500 !important;
    color: #111111 !important;
    margin: 0 0 5px 0 !important;
    line-height: 1.55 !important;
}

/* -------------------------------------------------------------
   3. Specifications Matrix: Harmonious Corporate Styling
   ------------------------------------------------------------- */
.cse-specs-matrix {
    display: flex !important;
    flex-direction: column !important;
    gap: 9px !important;
    margin-bottom: 18px !important;
}

.cse-spec-row {
    display: flex !important;
    align-items: flex-start !important;
    font-size: 13px !important;
    line-height: 1.45 !important;
    font-family: var(--cse-font) !important;
}

.cse-spec-label {
    width: 160px !important;
    min-width: 160px !important;
    flex-shrink: 0 !important;
    color: var(--cse-muted) !important;
    font-weight: 400 !important;
}

.cse-spec-value {
    color: var(--cse-dark) !important;
    font-weight: 400 !important;
    flex-grow: 1 !important;
}

/* Inline notes like (No setup fees) and (Excludes shipping time) */
.cse-spec-inline-note {
    font-size: 13px !important;
    font-weight: 400 !important;
    color: #94a3b8 !important;
    margin-left: 4px !important;
}

/* Available Colors: Swatches on top, English text names underneath */
.cse-spec-colors-row {
    align-items: flex-start !important;
}

.cse-color-combo-area {
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
}

.cse-detail-swatch-list {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 6px !important;
}

.cse-detail-swatch-circle {
    display: inline-block !important;
    width: 16px !important;
    height: 16px !important;
    border-radius: 50% !important;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.06) !important;
    cursor: default !important;
    transition: transform 0.15s ease !important;
}

.cse-detail-swatch-circle:hover {
    transform: scale(1.15) !important;
}

.cse-detail-swatch-circle.border-white-swatch {
    border: 1px solid #cbd5e1 !important;
}

/* Color names text: Light gray with font-weight strictly matching other small text (400) */
.cse-detail-color-text-list {
    font-size: 13px !important;
    font-weight: 400 !important;
    color: #94a3b8 !important;
    line-height: 1.4 !important;
}

/* Recommended Applications */
.cse-spec-apps-row {
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
    margin-top: 4px !important;
    padding-top: 8px !important;
    border-top: 1px dashed var(--cse-border) !important;
}

.cse-apps-label {
    font-size: 13px !important;
    font-weight: 400 !important;
    color: var(--cse-muted) !important;
}

.cse-apps-content {
    font-size: 13px !important;
    font-weight: 400 !important;
    color: var(--cse-slate) !important;
    line-height: 1.5 !important;
}

/* -------------------------------------------------------------
   4. Action Area: Customize Now Button + Microcopy
   ------------------------------------------------------------- */
.cse-custom-action-area {
    margin: 16px 0 18px 0 !important;
    width: 100% !important;
}

.cse-action-row-wrap {
    width: 100% !important;
}

/* Hide Quantity Selector on Custom Product safely without breaking HTML5 form validation */
.cse-is-custom-product .quantity,
.cse-is-custom-product form.cart .quantity,
.cse-is-custom-product .summary .quantity,
.cse-custom-action-area .quantity {
    position: absolute !important;
    opacity: 0 !important;
    pointer-events: none !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    z-index: -999 !important;
}

/* Customize Now / LUMISE Button - Elegant, restrained, non-oversized */
.cse-is-custom-product button.single_add_to_cart_button,
.cse-is-custom-product a.lumise-button,
.cse-is-custom-product button.lumise-button,
.cse-custom-action-area button.single_add_to_cart_button,
.cse-custom-action-area a.lumise-button,
.cse-customize-now-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    min-width: 200px !important;
    max-width: 250px !important;
    height: 42px !important;
    padding: 0 28px !important;
    background-color: var(--cse-brand-blue) !important;
    color: #ffffff !important;
    font-family: var(--cse-font) !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    border: none !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    box-shadow: 0 1px 3px rgba(22, 82, 240, 0.25) !important;
    transition: background-color 0.15s ease, transform 0.1s ease !important;
    text-decoration: none !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}

.cse-is-custom-product button.single_add_to_cart_button:hover,
.cse-is-custom-product a.lumise-button:hover,
.cse-custom-action-area button.single_add_to_cart_button:hover,
.cse-customize-now-btn:hover {
    background-color: var(--cse-brand-blue-hover) !important;
    transform: translateY(-1px) !important;
    color: #ffffff !important;
}

/* Mandatory Microcopy directly beneath button: 13px light gray */
.cse-next-step-hint {
    font-family: var(--cse-font) !important;
    font-size: 13px !important;
    font-weight: 400 !important;
    color: #94a3b8 !important;
    margin: 8px 0 0 0 !important;
    line-height: 1.4 !important;
    display: block !important;
    width: 100% !important;
}

/* -------------------------------------------------------------
   5. LUMISE QUANTITY DISCOUNTS: 3-Column Corporate Layout
   (Quantity | Price Per Item | Savings - No Zebra Stripes, No Duplicate)
   ------------------------------------------------------------- */
.cse-quantity-discounts-wrapper {
    margin-top: 18px !important;
    margin-bottom: 12px !important;
    width: 100% !important;
    max-width: 100% !important;
}

.cse-qd-header {
    margin-bottom: 6px !important;
}

.cse-qd-title {
    font-family: var(--cse-font) !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    text-transform: none !important;
    color: var(--cse-dark) !important;
    margin: 0 0 2px 0 !important;
    padding: 0 !important;
}

.cse-qd-subtitle {
    font-family: var(--cse-font) !important;
    font-size: 13px !important;
    font-weight: 400 !important;
    color: #94a3b8 !important;
    margin: 0 !important;
    line-height: 1.4 !important;
}

.cse-qd-table-responsive {
    width: 100% !important;
    border: 1px solid var(--cse-border) !important;
    border-radius: 6px !important;
    overflow: hidden !important;
    background-color: transparent !important;
    margin-top: 6px !important;
}

/* Hide Lumise native duplicate table completely */
#lumise_price_table_show {
    display: none !important;
}

.cse-lumise-adopted-table {
    width: 100% !important;
    border-collapse: collapse !important;
    border: none !important;
    font-family: var(--cse-font) !important;
    font-size: 13px !important;
    margin: 0 !important;
    background-color: transparent !important;
    table-layout: fixed !important;
}

.cse-lumise-adopted-table thead th {
    background-color: transparent !important;
    padding: 8px 16px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    color: var(--cse-muted) !important;
    text-transform: capitalize !important;
    border: none !important;
    border-bottom: 1px solid var(--cse-border) !important;
}

/* 3 Columns Alignment */
.cse-lumise-adopted-table th.cse-col-qty,
.cse-lumise-adopted-table td.cse-col-qty {
    width: 38% !important;
    text-align: left !important;
    padding: 8px 16px !important;
    font-weight: 500 !important;
    color: #1e293b !important;
}

.cse-lumise-adopted-table th.cse-col-price,
.cse-lumise-adopted-table td.cse-col-price {
    width: 34% !important;
    text-align: center !important;
    padding: 8px 16px !important;
    font-weight: 500 !important;
    color: var(--cse-dark) !important;
}

.cse-lumise-adopted-table th.cse-col-save,
.cse-lumise-adopted-table td.cse-col-save {
    width: 28% !important;
    text-align: right !important;
    padding: 8px 16px !important;
}

.cse-lumise-adopted-table td {
    padding: 8px 16px !important;
    border: none !important;
    border-bottom: 1px solid #f1f5f9 !important;
    font-size: 13px !important;
}

.cse-lumise-adopted-table tr:last-child td {
    border-bottom: none !important;
}

/* STRICT: NO zebra stripes. Clean white background */
.cse-lumise-adopted-table tbody tr,
.cse-lumise-adopted-table tbody tr:nth-child(even),
.cse-lumise-adopted-table tbody tr:nth-child(odd) {
    background-color: #ffffff !important;
}

.cse-lumise-adopted-table tbody tr:hover td {
    background-color: #f8fafc !important;
}

/* 0% Tier Dash */
.cse-save-dash {
    color: #94a3b8 !important;
    font-weight: 400 !important;
}

/* Savings Percent */
.cse-save-percent {
    color: var(--cse-green) !important;
    font-weight: 600 !important;
}

/* -------------------------------------------------------------
   6. Product Data Tabs (Description, Specifications, Reviews)
   ------------------------------------------------------------- */
.woocommerce-tabs,
.woocommerce-tabs.wc-tabs-wrapper,
.related.products,
.upsells.products {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    clear: both !important;
    margin-top: 36px !important;
}

/* -------------------------------------------------------------
   7. Retail Product Modern Swatches Architecture
   (Clean Swatches, Miniature Color Image vs Solid Fill, Unified Blue)
   ------------------------------------------------------------- */
.cse-is-retail-product .summary.entry-summary {
    display: flex !important;
    flex-direction: column !important;
}

.cse-retail-summary-area {
    margin-top: 6px !important;
    width: 100% !important;
}

.cse-retail-swatches-box {
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
    margin-bottom: 20px !important;
}

.cse-retail-swatch-group {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
}

.cse-retail-swatch-label {
    font-family: var(--cse-font) !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    color: #1e293b !important;
}

.cse-retail-selected-val {
    font-weight: 400 !important;
    color: #64748b !important;
    margin-left: 4px !important;
}

.cse-retail-swatch-row {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 10px !important;
}

/* Color Circle Swatches: Mini image when uploaded, solid color when not */
.cse-retail-color-swatch {
    width: 32px !important;
    height: 32px !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    position: relative !important;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    border: 1px solid rgba(0, 0, 0, 0.12) !important;
    transition: transform 0.15s ease, box-shadow 0.15s ease, outline 0.15s ease !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

.cse-retail-color-swatch:hover {
    transform: scale(1.08) !important;
}

/* Double-ring active border (高亮蓝色光环) */
.cse-retail-color-swatch.active {
    outline: 2px solid var(--cse-brand-blue) !important;
    outline-offset: 2px !important;
    box-shadow: 0 0 0 1px #ffffff, 0 0 0 3px var(--cse-brand-blue) !important;
    transform: scale(1.05) !important;
}

/* Size Swatch Buttons: Rounded pills (Blue active, light border inactive) */
.cse-retail-size-row {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 8px !important;
}

.cse-retail-size-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 46px !important;
    height: 36px !important;
    padding: 0 14px !important;
    border-radius: 6px !important;
    font-family: var(--cse-font) !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    border: 1px solid var(--cse-border) !important;
    background-color: #ffffff !important;
    color: var(--cse-dark) !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
}

.cse-retail-size-btn:hover {
    border-color: #94a3b8 !important;
}

.cse-retail-size-btn.active {
    background-color: var(--cse-brand-blue) !important;
    border-color: var(--cse-brand-blue) !important;
    color: #ffffff !important;
    box-shadow: 0 1px 3px rgba(22, 82, 240, 0.25) !important;
}

/* Action Area: Quantity Stepper [- 1 +] and Add to Cart */
.cse-retail-action-wrap {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    margin-top: 14px !important;
    margin-bottom: 18px !important;
}

.cse-retail-qty-stepper {
    display: inline-flex !important;
    align-items: center !important;
    border: 1px solid var(--cse-border) !important;
    border-radius: 6px !important;
    background-color: #ffffff !important;
    height: 42px !important;
    overflow: hidden !important;
}

.cse-retail-qty-btn {
    width: 36px !important;
    height: 100% !important;
    border: none !important;
    background: transparent !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    color: var(--cse-slate) !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: background-color 0.1s ease !important;
}

.cse-retail-qty-btn:hover {
    background-color: #f1f5f9 !important;
    color: var(--cse-dark) !important;
}

.cse-retail-qty-input {
    width: 44px !important;
    height: 100% !important;
    border: none !important;
    background: transparent !important;
    text-align: center !important;
    font-family: var(--cse-font) !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: var(--cse-dark) !important;
    outline: none !important;
    padding: 0 !important;
    -moz-appearance: textfield !important;
}

.cse-retail-qty-input::-webkit-outer-spin-button,
.cse-retail-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none !important;
    margin: 0 !important;
}

.cse-retail-add-to-cart-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    height: 42px !important;
    min-width: 180px !important;
    padding: 0 28px !important;
    background-color: var(--cse-brand-blue) !important;
    color: #ffffff !important;
    font-family: var(--cse-font) !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    border: none !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    box-shadow: 0 1px 3px rgba(22, 82, 240, 0.25) !important;
    transition: background-color 0.15s ease, transform 0.1s ease !important;
}

.cse-retail-add-to-cart-btn:hover {
    background-color: var(--cse-brand-blue-hover) !important;
    transform: translateY(-1px) !important;
    color: #ffffff !important;
}

.cse-retail-native-form-container .variations {
    display: none !important;
}
.cse-retail-native-form-container .single_add_to_cart_button,
.cse-retail-native-form-container .quantity {
    display: none !important;
}






/* ==========================================================================
   Pricing Details 窄屏自适应与防防挤压补丁（直接追加在CSS末尾）
   ========================================================================== */

/* 1. 第二行价格与 Pricing Details 布局优化：支持自动换行与弹性间距 */
.cse-price-line-2 {
    flex-wrap: wrap !important;
    white-space: normal !important;
    row-gap: 2px !important;
}

/* 2. 保护 Pricing Details 不被挤压折字 */
.cse-pricing-details-container {
    flex-shrink: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
}

/* 3. 悬浮弹窗居中自适应，防止拉窄浏览器时偏出卡片边缘 */
.cse-pricing-popover {
    left: 50% !important;
    transform: translateX(-50%) translateY(-4px) scale(0.98) !important;
    max-width: calc(100vw - 32px) !important;
}

.cse-pricing-details-container:hover .cse-pricing-popover {
    transform: translateX(-50%) translateY(0) scale(1) !important;
}