/* ========================================
   PRODUCT DETAIL PAGE - PREMIUM REDESIGN
   Overrides base style.css for productDetail
   ======================================== */

/* ── Page Header (Breadcrumb) ── */
.product-detail .page-header,
section.page-header {
    background: linear-gradient(135deg, #f8f6f3 0%, #ede8e0 100%);
    border-bottom: 1px solid var(--border-light);
}

.breadcrumb a {
    color: var(--primary-light);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.breadcrumb a:hover {
    color: var(--primary);
}

/* ── Main Layout ── */
.product-detail {
    padding: 40px 0 64px;
    background: var(--bg-page);
}

.detail-layout {
    display: grid;
    grid-template-columns: 55% 45%;
    gap: 40px;
    align-items: start;
}

/* ── LEFT: Product Images ── */
.detail-images {
    position: sticky;
    top: 20px;
    height: fit-content;
}

.main-image {
    position: relative;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 16px;
    box-shadow: 0 2px 16px rgba(30, 58, 95, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.main-image img {
    width: 100%;
    height: 480px;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.main-image:hover img {
    transform: scale(1.03);
}

.main-image .image-badges {
    position: absolute;
    top: 16px;
    left: 16px;
    display: flex;
    gap: 8px;
    z-index: 2;
}

.main-image .image-badges .badge {
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 700;
    border-radius: 6px;
    letter-spacing: 0.5px;
    backdrop-filter: blur(8px);
}

.main-image .image-badges .badge.best {
    background: rgba(30, 58, 95, 0.9);
    color: #fff;
}

.main-image .image-badges .badge.stock {
    background: rgba(47, 133, 90, 0.9);
    color: #fff;
}

.thumb-images {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 12px;
}

.thumb {
    width: 100%;
    height: 80px;
    border: 2px solid transparent;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.25s ease;
    padding: 0;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumb:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(196, 149, 106, 0.2);
}

.thumb.active {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.15);
}

/* ── RIGHT: Product Info Panel ── */
.detail-info {
    padding: 0;
}

.detail-info .info-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.product-code {
    font-size: 13px;
    color: var(--primary);
    font-weight: 700;
    background: rgba(30, 58, 95, 0.06);
    padding: 4px 12px;
    border-radius: 20px;
    letter-spacing: 0.3px;
}

.product-vendor {
    font-size: 12px;
    color: var(--accent-dark);
    background: linear-gradient(135deg, var(--wood-light), var(--wood-cream));
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 600;
}

.product-title {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-black);
    margin-bottom: 8px;
    line-height: 1.3;
    letter-spacing: -0.5px;
}

.product-subtitle {
    font-size: 15px;
    color: var(--text-medium);
    margin-bottom: 24px;
    line-height: 1.6;
}

/* ── Spec Table ── */
.spec-table {
    background: #fff;
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 20px;
    border: 1px solid var(--border-light);
}

.spec-row {
    display: flex;
    align-items: center;
    padding: 11px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.spec-row:last-child {
    border-bottom: none;
}

.spec-label {
    width: 90px;
    font-size: 13px;
    color: var(--text-light);
    flex-shrink: 0;
    font-weight: 500;
}

.spec-value {
    font-size: 14px;
    color: var(--text-dark);
    font-weight: 600;
}

.spec-value.stock-available {
    color: var(--success);
    font-weight: 700;
}

/* ── Length Selector ── */
.length-selector {
    background: #fff;
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 20px;
    border: 1px solid var(--border-light);
}

.length-selector-title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 14px;
    color: var(--text-dark);
}

.length-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.length-option {
    flex: 1;
    min-width: 120px;
    padding: 14px 16px;
    border: 2px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    background: #fafafa;
}

.length-option:hover {
    border-color: var(--primary-light);
    background: #fff;
}

.length-option.active {
    border-color: var(--primary);
    background: rgba(30, 58, 95, 0.03);
    box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.08);
}

.length-option .opt-length {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.length-option .opt-price {
    display: block;
    font-size: 15px;
    font-weight: 800;
    color: var(--primary);
}

/* ── Dimension Warning ── */
.dimension-warning {
    display: flex;
    gap: 14px;
    padding: 16px 20px;
    background: linear-gradient(135deg, #fffbf0 0%, #fff8e8 100%);
    border: 1px solid #f0e6c8;
    border-radius: 12px;
    margin-bottom: 20px;
    align-items: flex-start;
}

.dimension-warning .warning-icon {
    font-size: 20px;
    flex-shrink: 0;
    padding-top: 2px;
}

.dimension-warning .warning-content strong {
    font-size: 14px;
    color: var(--text-dark);
    display: block;
    margin-bottom: 6px;
}

.dimension-warning .warning-content p {
    font-size: 13px;
    color: var(--text-medium);
    line-height: 1.7;
    margin: 0;
}

.dimension-warning .actual-dim {
    color: var(--danger);
    font-weight: 700;
}

.dimension-warning .warning-tag {
    display: inline-block;
    margin-top: 8px;
    padding: 4px 10px;
    background: rgba(214, 158, 46, 0.12);
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #b8860b;
}

/* ── Price Section ── */
.price-section {
    margin-bottom: 20px;
    padding: 20px 24px;
    background: linear-gradient(135deg, var(--primary) 0%, #2D5A8E 100%);
    border-radius: 12px;
    border-bottom: none;
}

.price-main {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.price-value {
    font-size: 34px;
    font-weight: 800;
    color: #fff;
}

.price-unit {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.7);
}

.price-note {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 6px;
}

/* ── Unit Price Comparison ── */
.unit-price-comparison {
    background: #fff;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 16px;
    border: 1px solid var(--border-light);
}

.upc-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.upc-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.upc-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 12px 8px;
    background: linear-gradient(135deg, #f8f9fc 0%, #f0f2f8 100%);
    border-radius: 10px;
    border: 1px solid rgba(30, 58, 95, 0.05);
}

.upc-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-light);
    letter-spacing: 0.5px;
}

.upc-value {
    font-size: 16px;
    font-weight: 800;
    color: var(--primary);
}

/* ── Calculator & 3D Module ── */
.wood-calculator,
.sim3d-module,
.cutting-module {
    background: #fff;
    border-radius: 12px;
    border: 1px solid var(--border-light);
    margin-bottom: 16px;
    overflow: hidden;
}

.calc-header,
.sim3d-header,
.cutting-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 20px;
    background: linear-gradient(135deg, var(--wood-cream) 0%, var(--wood-light) 100%);
    border-bottom: 1px solid var(--border-light);
}

.calc-header h4,
.sim3d-header h4,
.cutting-header h4 {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-dark);
    flex: 1;
    margin: 0;
}

.calc-toggle,
.sim3d-toggle {
    padding: 6px 14px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.calc-toggle:hover,
.sim3d-toggle:hover {
    background: var(--primary-dark);
}

.calc-body,
.sim3d-body,
.cutting-body {
    padding: 20px;
}

.calc-desc,
.sim3d-desc {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 16px;
    line-height: 1.6;
}

.calc-inputs,
.sim3d-controls {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.calc-field,
.sim3d-field {
    flex: 1;
    min-width: 80px;
}

.calc-field label,
.sim3d-field label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 6px;
}

.calc-field input,
.sim3d-field input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    transition: border-color 0.2s;
}

.calc-field input:focus,
.sim3d-field input:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.08);
}

.calc-x,
.calc-eq,
.sim3d-x {
    font-size: 18px;
    color: var(--text-light);
    font-weight: 700;
    padding-bottom: 10px;
}

.calc-field.result {
    background: rgba(30, 58, 95, 0.04);
    padding: 10px 14px;
    border-radius: 8px;
}

.calc-area {
    font-size: 20px;
    font-weight: 800;
    color: var(--primary);
}

.calc-options {
    margin-bottom: 16px;
}

.calc-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--text-medium);
}

.calc-option select {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
}

.calc-result {
    background: linear-gradient(135deg, #f8f9fc 0%, #f0f2f8 100%);
    border-radius: 10px;
    padding: 16px 20px;
    border: 1px solid rgba(30, 58, 95, 0.08);
}

.result-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: 13px;
    color: var(--text-medium);
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.result-row:last-child {
    border-bottom: none;
}

.result-row strong {
    color: var(--text-dark);
    font-weight: 700;
}

.result-row strong.highlight {
    color: var(--primary);
    font-size: 16px;
}

.result-row.total {
    padding-top: 12px;
    margin-top: 4px;
    border-top: 2px solid var(--primary);
    border-bottom: none;
}

.result-row.total strong {
    font-size: 18px;
    color: var(--primary);
}

.calc-apply-btn {
    width: 100%;
    margin-top: 14px;
    padding: 12px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.calc-apply-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

/* ── 3D Simulator Canvas ── */
.sim3d-canvas-wrap {
    background: #f0f2f5;
    border-radius: 10px;
    min-height: 400px;
    margin-bottom: 16px;
    overflow: hidden;
}

.sim3d-canvas-wrap canvas {
    border-radius: 10px;
}

.sim3d-direction {
    min-width: 140px;
}

.sim3d-dir-btns {
    display: flex;
    gap: 6px;
}

.dir-btn {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    background: #fff;
    transition: all 0.2s;
}

.dir-btn.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.sim3d-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.sim3d-stat {
    text-align: center;
    padding: 14px 8px;
    background: var(--bg-page);
    border-radius: 10px;
}

.sim3d-stat .stat-label {
    display: block;
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 6px;
}

.sim3d-stat .stat-value {
    display: block;
    font-size: 16px;
    font-weight: 800;
    color: var(--text-dark);
}

.sim3d-stat .stat-value.warn {
    color: var(--warning);
}

.sim3d-stat.total {
    background: rgba(30, 58, 95, 0.06);
}

.sim3d-stat.total .stat-value {
    color: var(--primary);
    font-size: 18px;
}

/* ── Quantity ── */
.quantity-section {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    padding: 20px 24px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid var(--border-light);
    flex-wrap: wrap;
}

.quantity-section label {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-dark);
}

.quantity-control {
    display: flex;
    align-items: center;
    gap: 0;
    background: var(--bg-page);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.qty-btn {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 0;
    background: transparent;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    color: var(--text-medium);
}

.qty-btn:hover {
    background: var(--primary);
    color: #fff;
}

.quantity-control input {
    width: 64px;
    height: 40px;
    text-align: center;
    border: none;
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
    border-radius: 0;
    font-size: 15px;
    font-weight: 700;
    background: #fff;
}

.qty-divider {
    width: 1px;
    height: 20px;
    background: var(--border);
    margin: 0 4px;
}

.qty-unit {
    font-size: 14px;
    color: var(--text-medium);
    padding: 0 12px 0 8px;
    line-height: 40px;
}

.total-price {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

.total-price span {
    font-size: 13px;
    color: var(--text-light);
}

.total-price strong {
    font-size: 26px;
    font-weight: 800;
    color: var(--primary);
}

/* ── Action Buttons ── */
.action-buttons {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.btn-cart,
.btn-quote {
    flex: 1;
    padding: 16px 24px;
    font-size: 15px;
    font-weight: 700;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.25s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
}

.btn-cart {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: #fff;
    box-shadow: 0 4px 16px rgba(30, 58, 95, 0.25);
}

.btn-cart:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(30, 58, 95, 0.35);
}

.btn-quote {
    background: #fff;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-quote:hover {
    background: rgba(30, 58, 95, 0.04);
    transform: translateY(-2px);
}

/* ── Cutting Module ── */
.cutting-switch {
    position: relative;
    width: 44px;
    height: 24px;
    display: inline-block;
}

.cutting-switch input {
    display: none;
}

.switch-slider {
    position: absolute;
    inset: 0;
    background: var(--border);
    border-radius: 24px;
    cursor: pointer;
    transition: background 0.3s;
}

.switch-slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    top: 3px;
    left: 3px;
    transition: transform 0.3s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.cutting-switch input:checked+.switch-slider {
    background: var(--primary);
}

.cutting-switch input:checked+.switch-slider::before {
    transform: translateX(20px);
}

.cutting-row {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    margin-bottom: 12px;
    padding: 12px;
    background: var(--bg-page);
    border-radius: 10px;
}

.cut-field {
    flex: 1;
}

.cut-field.qty {
    max-width: 80px;
}

.cut-field label {
    display: block;
    font-size: 11px;
    color: var(--text-light);
    margin-bottom: 4px;
    font-weight: 600;
}

.cut-field input {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
}

.cut-x {
    font-size: 16px;
    color: var(--text-light);
    padding-bottom: 10px;
}

.cut-remove {
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(197, 48, 48, 0.08);
    color: var(--danger);
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
    flex-shrink: 0;
}

.cut-remove:hover {
    background: var(--danger);
    color: #fff;
}

.cut-add-btn {
    width: 100%;
    padding: 10px;
    border: 2px dashed var(--border);
    background: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 16px;
}

.cut-add-btn:hover {
    border-color: var(--primary);
    background: rgba(30, 58, 95, 0.03);
}

.cutting-options {
    margin-bottom: 16px;
}

.cutting-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.cutting-radio {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 8px;
}

.cutting-radio:hover {
    border-color: var(--primary-light);
}

.cutting-radio input:checked~.radio-mark {
    background: var(--primary);
    border-color: var(--primary);
}

.radio-mark {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border);
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 2px;
    transition: all 0.2s;
}

.radio-content strong {
    display: block;
    font-size: 14px;
    color: var(--text-dark);
}

.radio-content small {
    font-size: 12px;
    color: var(--text-light);
}

.cutting-summary {
    background: var(--bg-page);
    border-radius: 10px;
    padding: 16px 20px;
}

.cut-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 13px;
    color: var(--text-medium);
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.cut-summary-row:last-child {
    border-bottom: none;
}

.cut-summary-row.total {
    border-top: 2px solid var(--primary);
    padding-top: 12px;
}

.cut-summary-row.total strong {
    color: var(--primary);
    font-size: 16px;
}

/* ── Sample Request ── */
.sample-request-section {
    margin-bottom: 16px;
}

.btn-sample {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 24px;
    background: linear-gradient(135deg, var(--wood-cream) 0%, var(--wood-light) 100%);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.25s;
}

.btn-sample:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(196, 149, 106, 0.2);
    border-color: var(--accent);
}

.sample-icon {
    font-size: 28px;
}

.sample-info {
    flex: 1;
    text-align: left;
}

.sample-info strong {
    display: block;
    font-size: 15px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 2px;
}

.sample-info span {
    font-size: 13px;
    color: var(--text-medium);
}

.sample-arrow {
    font-size: 20px;
    color: var(--accent);
    font-weight: 700;
}

.sample-note {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 8px;
    padding-left: 4px;
}

/* ── Payment Section ── */
.payment-section {
    background: #fff;
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 16px;
    border: 1px solid var(--border-light);
}

.payment-section h4 {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 14px;
}

.payment-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.pay-btn {
    padding: 14px 12px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.25s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-direction: column;
}

.pay-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.pay-label {
    font-size: 12px;
    font-weight: 600;
}

/* ── Contact Section ── */
.contact-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    transition: all 0.2s;
}

.contact-item:hover {
    border-color: var(--primary-light);
    box-shadow: 0 2px 12px rgba(30, 58, 95, 0.08);
}

.contact-icon {
    font-size: 22px;
}

.contact-info strong {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-dark, #1a1a1a);
    margin-bottom: 2px;
}

.contact-info span {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-medium, #555);
}

/* ── Detail Tabs ── */
.detail-tabs {
    margin-top: 56px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 16px rgba(30, 58, 95, 0.06);
    overflow: hidden;
}

.tabs-header {
    display: flex;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border-bottom: none;
    overflow-x: auto;
}

.tab-btn {
    padding: 18px 28px;
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    background: none;
    border: none;
    cursor: pointer;
    position: relative;
    transition: all 0.25s;
    white-space: nowrap;
}

.tab-btn:hover {
    color: #fff;
}

.tab-btn.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 16px;
    right: 16px;
    height: 3px;
    background: #fff;
    border-radius: 3px 3px 0 0;
}

.tab-btn .count {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
}

.tabs-content {
    padding: 36px 32px;
}

/* ── Store Detail (Description Tab) ── */
.store-detail-wrapper {
    max-width: 100%;
}

.detail-hero-banner {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 32px;
    height: 320px;
}

.detail-hero-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(30, 58, 95, 0.85) 0%, rgba(45, 90, 142, 0.7) 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px 48px;
}

.hero-badge {
    display: inline-block;
    padding: 6px 18px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(4px);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 2px;
    margin-bottom: 16px;
    width: fit-content;
}

.detail-hero-overlay h2 {
    font-size: 32px;
    font-weight: 800;
    color: #fff;
    line-height: 1.3;
    margin-bottom: 12px;
}

.detail-hero-overlay p {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
}

.detail-key-points {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 36px;
}

.key-point {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px;
    background: var(--bg-page);
    border-radius: 12px;
    border: 1px solid var(--border-light);
    transition: all 0.25s;
}

.key-point:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(30, 58, 95, 0.08);
}

.key-icon {
    font-size: 28px;
}

.key-text strong {
    display: block;
    font-size: 15px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 2px;
}

.key-text span {
    font-size: 13px;
    color: var(--text-medium);
}

/* Info Cards */
.detail-info-section {
    margin-bottom: 36px;
}

.detail-info-section .info-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
}

.info-num {
    font-size: 14px;
    font-weight: 800;
    color: #fff;
    background: var(--primary);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.detail-info-section .info-header h3 {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-black);
    margin: 0;
}

.info-card-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.info-card {
    padding: 24px;
    background: var(--bg-page);
    border-radius: 12px;
    border: 1px solid var(--border-light);
    transition: all 0.25s;
}

.info-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(30, 58, 95, 0.08);
}

.card-icon {
    font-size: 28px;
    margin-bottom: 12px;
}

.info-card h4 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.info-card p {
    font-size: 14px;
    color: var(--text-medium);
    line-height: 1.7;
    margin: 0;
}

/* Comparison Table */
.compare-table-wrapper {
    overflow-x: auto;
}

.compare-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-light);
}

.compare-table th,
.compare-table td {
    padding: 16px 20px;
    font-size: 14px;
    text-align: center;
}

.compare-table thead th {
    background: var(--primary);
    color: #fff;
    font-weight: 700;
}

.compare-table thead th.premium-col {
    background: var(--accent-dark);
}

.compare-table tbody td {
    border-bottom: 1px solid var(--border-light);
    background: #fff;
}

.compare-table tbody td.premium-col {
    background: rgba(196, 149, 106, 0.06);
}

.compare-table tbody tr:last-child td {
    border-bottom: none;
}

/* Gallery Strip */
.detail-gallery-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 36px;
}

.gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    height: 200px;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}

.gallery-item:hover img {
    transform: scale(1.08);
}

.gallery-item span {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px 16px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.6));
    color: #fff;
    font-size: 13px;
    font-weight: 600;
}

/* Image Banner */
.detail-image-banner {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    height: 250px;
    margin-bottom: 36px;
}

.detail-image-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-banner-text {
    position: absolute;
    bottom: 24px;
    left: 28px;
}

.image-banner-text span {
    display: block;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 4px;
}

.image-banner-text strong {
    font-size: 22px;
    color: #fff;
    font-weight: 800;
}

/* Certification */
.detail-cert-section {
    background: linear-gradient(135deg, var(--wood-cream) 0%, var(--wood-light) 100%);
    border-radius: 14px;
    padding: 32px;
    margin-bottom: 36px;
    text-align: center;
}

.detail-cert-section h3 {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.detail-cert-section>p {
    font-size: 14px;
    color: var(--text-medium);
    margin-bottom: 24px;
}

.cert-badges {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.cert-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.badge-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 800;
    color: var(--primary);
    box-shadow: 0 2px 10px rgba(30, 58, 95, 0.1);
}

.badge-text {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-medium);
}

/* FAQ */
.faq-list {
    margin-top: 8px;
}

.faq-item {
    border: 1px solid var(--border-light);
    border-radius: 10px;
    margin-bottom: 10px;
    overflow: hidden;
}

.faq-q {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-dark);
    background: var(--bg-page);
}

.faq-q span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: var(--primary);
    color: #fff;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 800;
    flex-shrink: 0;
}

.faq-a {
    padding: 16px 20px 16px 60px;
    font-size: 14px;
    color: var(--text-medium);
    line-height: 1.7;
}

/* Bottom CTA */
.detail-bottom-cta {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: 14px;
    padding: 32px;
    text-align: center;
}

.detail-bottom-cta p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    margin-bottom: 20px;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 14px;
}

.cta-btn {
    padding: 14px 32px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s;
}

.cta-btn.sample {
    background: #fff;
    color: var(--primary);
}

.cta-btn.quote {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.4);
}

.cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

/* ── Document Tab ── */
.documents-section {
    max-width: 100%;
}

.doc-header h3 {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 6px;
}

.doc-header p {
    font-size: 14px;
    color: var(--text-medium);
    margin-bottom: 28px;
}

.doc-category {
    margin-bottom: 28px;
}

.doc-cat-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.doc-cat-icon {
    font-size: 20px;
}

.doc-cat-header h4 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
}

.doc-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.doc-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    background: var(--bg-page);
    border-radius: 10px;
    transition: all 0.2s;
}

.doc-item:hover {
    background: var(--wood-cream);
}

.doc-info {
    display: flex;
    align-items: center;
    gap: 14px;
}

.doc-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 8px;
    font-size: 18px;
    border: 1px solid var(--border-light);
}

.doc-icon.cad {
    background: var(--primary);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    border: none;
}

.doc-icon.pdf {
    background: #c53030;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    border: none;
}

.doc-details strong {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 2px;
}

.doc-details span {
    font-size: 12px;
    color: var(--text-light);
}

.doc-download {
    padding: 8px 16px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.doc-download:hover {
    background: var(--primary-dark);
}

.doc-footer {
    text-align: center;
    margin-top: 28px;
}

.btn-download-all {
    padding: 14px 32px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-download-all:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.doc-notice {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 12px;
}

/* ── Review Tab ── */
.review-summary {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 28px;
    background: linear-gradient(135deg, var(--wood-cream) 0%, var(--wood-light) 100%);
    border-radius: 14px;
    margin-bottom: 28px;
}

.review-score .score {
    font-size: 52px;
    font-weight: 800;
    color: var(--primary);
}

.review-item {
    padding: 20px 0;
    border-bottom: 1px solid var(--border-light);
}

.review-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.review-text {
    font-size: 14px;
    color: var(--text-medium);
    line-height: 1.7;
    padding-left: 2px;
}

/* ── Related Products ── */
.related-products {
    padding: 56px 0;
    background: linear-gradient(180deg, var(--bg-page) 0%, #fff 100%);
}

.related-products .section-title {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-black);
    margin-bottom: 28px;
    text-align: center;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
    .detail-layout {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .detail-images {
        position: static;
    }

    .main-image img {
        height: 360px;
    }

    .detail-key-points {
        grid-template-columns: 1fr;
    }

    .info-card-list {
        grid-template-columns: 1fr;
    }

    .detail-gallery-strip {
        grid-template-columns: repeat(2, 1fr);
    }

    .sim3d-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .payment-buttons {
        grid-template-columns: 1fr;
    }

    .tabs-header {
        overflow-x: auto;
    }

    .tab-btn {
        padding: 16px 20px;
        font-size: 13px;
    }
}

@media (max-width: 640px) {
    .product-title {
        font-size: 22px;
    }

    .price-value {
        font-size: 28px;
    }

    .detail-hero-banner {
        height: 220px;
    }

    .detail-hero-overlay {
        padding: 24px;
    }

    .detail-hero-overlay h2 {
        font-size: 22px;
    }

    .tabs-content {
        padding: 24px 16px;
    }

    .contact-section {
        grid-template-columns: 1fr;
    }

    .cta-buttons {
        flex-direction: column;
    }

    .action-buttons {
        flex-direction: column;
    }
}

/* ── Direct Advantage Bar (Concept 1: The Transparent Flow) ── */
.direct-advantage-bar {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    /* "Blueprint" Pattern Background */
    background-color: #f8fafc;
    background-image:
        linear-gradient(#e2e8f0 1px, transparent 1px),
        linear-gradient(90deg, #e2e8f0 1px, transparent 1px);
    background-size: 40px 40px;
    border: 1px solid #cbd5e1;
    border-radius: 16px;
    padding: 20px 24px;
    /* Reduced padding */
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

/* Contrast Border Removed */
.direct-advantage-bar::before {
    display: none;
}

.advantage-message {
    font-size: 16px;
    /* Reduced */
    color: #334155;
    margin-bottom: 16px;
    /* Reduced */
    text-align: center;
    font-weight: 700;
    letter-spacing: -0.02em;
    background: rgba(255, 255, 255, 0.8);
    padding: 4px 14px;
    /* Reduced */
    border-radius: 20px;
    border: 1px solid #e2e8f0;
}

.advantage-message strong {
    color: #1e3a5f;
    position: relative;
}

.advantage-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
    gap: 16px;
    position: relative;
    max-width: 900px;
}

.advantage-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 2;
    flex: 1;
    text-align: center;
    position: relative;
}

/* Icon Circle Styling (Modern Iconography) */
.advantage-icon-circle {
    width: 64px;
    /* Restored size for better image visibility */
    height: 64px;
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    /* Clear shadow */
    border: 2px solid #fff;
    /* White border for clean look */
    transition: transform 0.3s ease;
}

.advantage-icon-circle svg {
    width: 32px;
    height: 32px;
    stroke-width: 2;
    stroke: currentColor;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* 1. DIRECT IMPORT - Navy Blue */
.advantage-item:nth-child(1) .advantage-icon-circle {
    background: #1e3a5f;
    color: #fff;
    border-color: #1e3a5f;
}

/* 2. FACTORY PROCESS - Steel Gray */
.advantage-item:nth-child(3) .advantage-icon-circle {
    background: #64748b;
    color: #fff;
    border-color: #64748b;
}

/* 3. ZERO MARGIN - Gold/Orange (Glow Effect) */
.advantage-item:nth-child(5) .advantage-icon-circle {
    background: #ffffff;
    color: #d97706;
    border-color: #f59e0b;
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.3);
    animation: iconPulse 2s infinite ease-in-out;
}

@keyframes iconPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4);
        transform: scale(1);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(245, 158, 11, 0);
        transform: scale(1.03);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0);
        transform: scale(1);
    }
}

.advantage-item strong {
    font-size: 13px;
    font-weight: 800;
    color: #64748b;
    letter-spacing: 0.05em;
    margin-bottom: 2px;
    /* Reduced */
    text-transform: uppercase;
}

.advantage-item span {
    font-size: 14px;
    /* Reduced */
    color: #1e293b;
    font-weight: 700;
    letter-spacing: -0.5px;
}

/* Highlight Text for Zero Margin */
.advantage-item:nth-child(5) span {
    color: #d97706;
    /* Match icon */
}

/* Connecting Arrow (Chevron) */
.advantage-divider {
    color: #cbd5e1;
    margin-top: 18px;
    /* Adjusted */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Custom visual arrow instead of text */
.advantage-arrow-shape {
    display: flex;
    align-items: center;
}

.advantage-arrow-line {
    width: 60px;
    height: 2px;
    background: #cbd5e1;
}

.advantage-arrow-head {
    width: 8px;
    height: 8px;
    border-right: 2px solid #cbd5e1;
    border-top: 2px solid #cbd5e1;
    transform: rotate(45deg);
    margin-left: -2px;
}

/* ── Distribution Infographic (Visual Trust) ── */
.distribution-chart {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 32px;
    margin: 40px 0;
}

.chart-header {
    text-align: center;
    margin-bottom: 24px;
}

.chart-header h4 {
    font-size: 18px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 8px;
}

.chart-row {
    display: flex;
    align-items: center;
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 12px;
    position: relative;
}

.chart-row.asis {
    background: #f1f5f9;
    /* border: 1px dashed #cbd5e1; */
}

.chart-row.tobe {
    background: #eff6ff;
    border: 2px solid #2563eb;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1);
}

.row-label {
    width: 80px;
    font-size: 12px;
    font-weight: 700;
    color: #64748b;
    margin-right: 16px;
    text-align: center;
}

.chart-row.tobe .row-label {
    color: #2563eb;
}

.flow-steps {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #475569;
    flex-wrap: wrap;
    /* On mobile */
}

.flow-step {
    background: #fff;
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    font-weight: 500;
    white-space: nowrap;
}

.flow-arrow {
    color: #94a3b8;
    font-size: 10px;
}

.chart-row.tobe .flow-step {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}

.chart-row.tobe .flow-arrow {
    color: #2563eb;
    font-weight: 700;
}

.margin-highlight {
    margin-left: auto;
    background: #ef4444;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    padding: 4px 8px;
    border-radius: 4px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.05);
        opacity: 0.9;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* ── Price Badge & Trust Seal ── */
.price-badge {
    display: inline-flex;
    align-items: center;
    background: #ef4444;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    margin-left: 10px;
    vertical-align: middle;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.3);
}

.trust-seal {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid #e2e8f0;
    color: #64748b;
    font-size: 13px;
    font-family: serif;
    font-style: italic;
}

.trust-seal img {
    height: 48px;
    opacity: 0.8;
}

/* Responsive adjustment for infographic */
@media (max-width: 768px) {
    .chart-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .margin-highlight {
        margin-left: 0;
        margin-top: 8px;
    }

    .flow-steps {
        width: 100%;
        overflow-x: auto;
        padding-bottom: 4px;
    }

    .direct-advantage-bar {
        flex-direction: column;
        gap: 20px;
        align-items: stretch;
    }

    .advantage-divider {
        transform: rotate(90deg);
        align-self: center;
        margin: -10px 0;
    }
}