﻿/* ============================================
   PC PROTECTION LAYER (769px+)
   모바일 스타일이 PC에 침투하지 않도록 보호
   ============================================ */
@media screen and (min-width: 769px) {

    /* PC-Only 요소 표시 */
    .pc-only {
        display: block !important;
    }

    /* Mobile-Only 요소 숨김 */
    .mobile-only,
    .mobile-hamburger,
    .mobile-hamburger-overlay,
    .mobile-sticky-summary,
    .mobile-bottom-bar,
    .mobile-instruction,
    .initial-instruction-overlay {
        display: none !important;
    }

    /* 상단 헤더: 검정 배경 + 검정 테두리 */
    .main-header {
        background: #000000 !important;
        border-bottom-color: #000000 !important;
    }

    /* 로고 박스: 검정 배경 + 검정 테두리 */
    .header-logo {
        background: #000000 !important;
        border-color: #000000 !important;
    }

    /* 제어 패널: 검정 배경 + 검정 테두리 */
    .controls-section {
        background: #000000 !important;
        border-left-color: #000000 !important;
    }

    /* 도면 영역 배경: 검정 */
    .visualizer-section {
        background: #000000 !important;
    }

    /* body 배경: 검정 */
    body {
        background: #000000 !important;
    }
}

:root {
    --bg-dark: #0f1115;
    --panel-bg: rgba(26, 29, 36, 0.85);
    --primary: #c0392b;
    --primary-glow: rgba(192, 57, 43, 0.4);
    --text-main: #e2e8f0;
    --text-dim: #94a3b8;
    --border: rgba(255, 255, 255, 0.1);
    --accent: #3b82f6;
    --glass: rgba(255, 255, 255, 0.03);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

.print-view-specs {
    display: none;
}

.print-qr {
    display: none;
}

/* Hide product card descriptions */
.card-desc {
    display: none !important;
}

body {
    background: var(--bg-dark);
    color: var(--text-main);
    overflow: hidden;
    height: 100vh;
}

.app-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100vh;
}

.main-header {
    display: grid;
    grid-template-columns: 0.8fr auto 1.2fr;
    align-items: center;
    padding: 12px 30px;
    background: var(--panel-bg);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(20px);
    z-index: 10;
}

.header-left {
    display: flex;
    justify-content: flex-start;
}

.header-center {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.header-right {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 20px;
}

.header-logo {
    display: flex;
    align-items: center;
    text-align: left;
    width: 280px;
    min-width: 280px;
    max-width: 280px;
    padding: 8px 12px;
    background: var(--panel-bg);
    border: 1px solid var(--panel-bg);
    border-radius: 8px;
}

.header-logo h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 20px;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 2px;
    white-space: nowrap;
}

.header-titles {
    display: flex;
    flex-direction: column;
}

.title-sub {
    color: var(--text-dim);
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 0.2px;
    opacity: 0.7;
    display: block;
    white-space: nowrap;
}

.logo-image {
    width: 40px;
    height: 40px;
    margin-right: 12px;
    object-fit: contain;
}

.header-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

/* Menu Dropdown Styling */
.menu-container {
    position: relative;
    z-index: 100;
}

.menu-trigger {
    background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: auto;
    min-width: 200px;
    flex-shrink: 0;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.menu-trigger .btn-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
    background: white;
    border-radius: 4px;
    padding: 2px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.menu-trigger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.5);
    filter: brightness(1.1);
}

.menu-trigger .text {
    white-space: nowrap;
}

.menu-trigger .arrow {
    width: 8px;
    height: 8px;
    border-right: 2px solid white;
    border-bottom: 2px solid white;
    transform: translateY(-1px) rotate(45deg);
    transition: transform 0.3s ease;
}

.menu-trigger.active .arrow {
    transform: translateY(2px) rotate(-135deg);
}

.dropdown-overlay {
    position: absolute;
    top: calc(100% + 15px);
    left: 0;
    transform: translateY(-20px);
    visibility: hidden;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dropdown-overlay.show {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

.dropdown-content {
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(30px);
    min-width: 600px;
}

.dimension-controls {
    display: flex;
    gap: 24px;
    align-items: center;
    position: relative;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.03);
    padding: 8px 20px;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.dimension-controls.disabled {
    opacity: 0.3;
    pointer-events: none;
    user-select: none;
    filter: grayscale(1);
}

.dim-hint {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    z-index: 100;
    pointer-events: auto;
    display: none;
    border: 1px solid var(--border);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.dimension-controls.disabled .dim-hint {
    display: block;
}

.dim-group {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto auto;
    align-items: center;
    gap: 2px 25px;
    width: auto;
}

.dim-group label {
    grid-column: 1;
    grid-row: 1 / span 3;
    font-size: 28px;
    font-weight: 500;
    color: var(--text);
    white-space: nowrap;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.compact-control {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    align-items: center;
    gap: 4px;
}

.step-btn.small {
    width: 28px;
    height: 28px;
    font-size: 14px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.num-input.small {
    height: 28px;
    padding: 0;
    font-size: 13px;
    width: 200px;
}

.dim-group input[type="range"] {
    grid-column: 2;
    grid-row: 2;
    width: 220px;
    cursor: pointer;
    accent-color: var(--accent);
}

.pc-slider-range-labels {
    grid-column: 2;
    grid-row: 3;
    display: flex;
    justify-content: space-between;
    width: 220px;
    margin-top: -2px;
    font-size: 10px;
    font-weight: 500;
    color: #94a3b8;
}

.header-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    background: transparent;
    border: none;
    backdrop-filter: none;
    padding: 0;
}

.nav-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 0 8px;
}

.group-label {
    font-size: 20px;
    font-weight: 800;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    white-space: nowrap;
    opacity: 0.9;
    margin-bottom: 12px;
    background: rgba(59, 130, 246, 0.2);
    border: 1px solid rgba(59, 130, 246, 0.3);
    padding: 6px 24px;
    border-radius: 30px;
}

.sub-group-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: 100%;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 15px;
}

.nav-group>.sub-group-container:first-of-type {
    border-top: none;
    padding-top: 0;
}

.sub-group-label {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-dim);
    letter-spacing: 0.5px;
    opacity: 0.9;
}

.nav-items {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.sub-row {
    width: 100%;
}

/* Card Styling */
.nav-card {
    background: #ffffff;
    border: 2px solid transparent;
    border-radius: 12px;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 280px;
    min-height: 72px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.nav-card img {
    width: 44px;
    height: 44px;
    object-fit: contain;
    flex-shrink: 0;
    filter: drop-shadow(0 4px 4px rgba(0, 0, 0, 0.1));
}

.card-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
}

.card-title {
    color: #1e293b;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-desc {
    color: #64748b;
    font-size: 11px;
    font-weight: 400;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

.nav-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.nav-card.active {
    background: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 0 0 1px var(--primary), 0 8px 20px var(--primary-glow);
}

.nav-card.active .card-title {
    color: var(--primary);
}

.nav-divider {
    display: none;
}

.main-content {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* Visualizer Section */
.visualizer-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 24px 30px;
    background: radial-gradient(circle at center, #1a1d24 0%, #0f1115 100%);
    position: relative;
    overflow: hidden;
}

.drawing-area {
    flex: 1;
    background: #ffffff;
    margin: 24px 0;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

/* Removed .product-badge::before */

.product-badge {
    position: absolute;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    pointer-events: none;
    transition: all 0.3s ease;
    text-align: center;
}

.badge-single-line {
    display: flex;
    align-items: center;
    /* V121: Changed from baseline to center for better visual balance */
    gap: 15px;
    white-space: nowrap;
}

.badge-title {
    color: #1e293b;
    font-family: 'Outfit', sans-serif;
    font-size: 26px;
    /* Adjusted to match dimension font size */
    font-weight: 400;
    letter-spacing: -0.5px;
    line-height: 1;
}

.badge-selection {
    color: #000000;
    font-family: 'Outfit', sans-serif;
    font-size: 26px;
    font-weight: 400;
    letter-spacing: -0.5px;
    line-height: 1;
    margin-left: -5px;
    margin-right: 5px;
}

.badge-spec.primary {
    color: var(--primary);
    font-family: 'Outfit', sans-serif;
    /* Standardized font family */
    font-size: 26px;
    /* Slightly decreased to offset color visual weight */
    font-weight: 400;
    letter-spacing: -0.5px;
    line-height: 1;
}

.badge-divider {
    width: 1px;
    height: 18px;
    background: var(--border);
    margin: 0 5px;
    align-self: center;
    opacity: 0.5;
}

.badge-spec.secondary {
    color: #64748b;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0;
    opacity: 0.9;
}

.badge-placeholder {
    color: #475569;
    font-size: 32px;
    font-weight: 500;
    font-style: italic;
}


.view-grid {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding-top: 60px;
    /* Space for badge */
}

.view-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.top-row {
    flex: 3;
    display: flex;
    gap: 20px;
    min-height: 0;
}

.main-view {
    flex: 2.5;
    min-height: 0;
    overflow: visible !important;
}

.summary-view {
    flex: 1;
    min-height: 0;
}

.summary-container {
    flex-direction: column !important;
    justify-content: flex-start !important;
    align-items: flex-start !important;
    padding: 15px 5px 15px 15px !important;
    font-family: 'Inter', sans-serif;
    overflow-y: hidden;
    /* Ensure no scroll as requested */
}

.summary-item {
    display: flex;
    flex-direction: column;
    margin-bottom: 10px;
    width: 100%;
}

.summary-item .label {
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.summary-item .value {
    font-size: 15px;
    font-weight: 600;
    color: #000000;
}

.summary-placeholder {
    color: #94a3b8;
    font-size: 14px;
    font-style: italic;
    text-align: center;
    width: 100%;
    margin-top: 40px;
}

.view-section.main-view .view-container {
    height: 100%;
}

.sub-views {
    flex: 0.8;
    display: flex;
    gap: 20px;
    min-height: 0;
}

.sub-views .view-section {
    flex: 1;
}

.view-tag {
    font-size: 18px;
    font-weight: 900;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding-left: 10px;
    border-left: 4px solid #3b82f6;
    margin-bottom: 2px;
}

/* Product Badge Header */
.product-badge {
    position: absolute;
    top: -55px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.9);
    padding: 10px 24px;
    border-radius: 40px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(192, 57, 43, 0.2);
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 400px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.brand-prefix {
    color: var(--primary);
    font-weight: 800;
}

/* .badge-title moved/merged above */

.badge-specs {
    display: flex;
    gap: 15px;
    margin-top: 2px;
}

.badge-spec {
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 4px;
}

.badge-spec::before {
    content: '';
    width: 3px;
    height: 3px;
    background: #cbd5e1;
    border-radius: 50%;
}

.badge-placeholder {
    font-size: 14px;
    font-weight: 600;
    color: #94a3b8;
    letter-spacing: -0.2px;
}

.view-container {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    height: 100%;
    position: relative;
}

/* Override for tighter footer spacing and vertical stacking */
.summary-container {
    padding-right: 15px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
}

.summary-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #94a3b8;
    font-size: 13px;
    text-align: center;
    padding: 20px;
    opacity: 0.8;
}

/* Data Tables */
.summary-table-container {
    width: 100%;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    margin-bottom: 8px;
}

.summary-table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
}

.summary-table th {
    background: #f8fafc;
    border-bottom: 2px solid #e2e8f0;
    padding: 6px 10px;
    text-align: center;
    font-weight: 700;
    color: #475569;
    border-right: 1px solid #e2e8f0;
}

.summary-table th:last-child {
    border-right: none;
}

.summary-table td {
    padding: 6px 10px;
    text-align: center;
    color: #1e293b;
    font-weight: 700;
    border-right: 1px solid #f1f5f9;
    border-bottom: 1px solid #f1f5f9;
}

.summary-table td:last-child {
    border-right: none;
}

.summary-table tr:last-child td {
    border-bottom: none;
}

.summary-table .highlight-cell {
    background: rgba(59, 130, 246, 0.03);
    font-weight: 800;
}

.print-qr {
    display: none;
    position: absolute;
    top: 15px;
    right: 15px;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: #fff;
    padding: 6px;
    border: 1px solid #eee;
    border-radius: 4px;
}

.print-qr img {
    width: 60px;
    height: 60px;
}

.print-qr span {
    font-size: 8px;
    font-weight: 700;
    color: #64748b;
}

.placeholder-logo {
    max-width: 60%;
    max-height: 60%;
    opacity: 0.4;
    object-fit: contain;
    filter: grayscale(100%) brightness(0.5) contrast(1);
    transition: all 0.5s ease;
}

#svgContainer {
    display: none;
}

/* Control Placeholder (Initial State) */
.control-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    padding: 40px;
    color: var(--text-dim);
}

/* Removed icon styles as logo is deleted */

.control-placeholder p {
    font-size: 24px;
    font-weight: 400;
    color: var(--text-main);
    margin-bottom: 32px;
    line-height: 3.2;
    font-style: italic;
    /* V121: Added italic */
}

.control-placeholder span {
    font-size: 18px;
    line-height: 4.4;
    opacity: 0.6;
    font-style: italic;
    /* V121: Added italic */
}

/* Controls Section */
.controls-section {
    width: 380px;
    background: var(--panel-bg);
    border-left: 1px solid var(--border);
    backdrop-filter: blur(20px);
    overflow-y: auto;
    padding: 24px;
}

.control-panel {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.primary-setup-group {
    display: flex;
    flex-direction: column;
    gap: 16px;
    /* Aligns with global control-panel gap rhythm */
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 16px;
    /* Gap between title card and content cards */
    transition: all 0.3s ease;
}

#caster-group {
    margin-top: 40px;
    /* Separate accordion stack from quantity section above */
}

.group-title {
    font-size: 15px;
    font-weight: 800;
    color: var(--accent);
    background: rgba(255, 255, 255, 0.05);
    /* Same as panel-section */
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    border-left: 6px solid var(--accent);
    /* Thicker indicator */
    line-height: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
}

.group-title:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.group-title::after {
    content: '';
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 22px solid currentColor;
    margin-left: auto;
    transition: transform 0.3s ease;
    opacity: 0.8;
}

.control-group.collapsed .group-title::after {
    transform: rotate(-90deg);
}

.group-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow: hidden;
    max-height: 3000px;
    transition: max-height 0.5s cubic-bezier(0, 1, 0, 1), opacity 0.3s ease;
    margin-top: 0;
    padding-bottom: 16px;
    /* Extra space when expanded */
    opacity: 1;
}

.control-group.collapsed .group-content {
    max-height: 0;
    margin-top: 0;
    padding-bottom: 0;
    opacity: 0;
    pointer-events: none;
}

#extra-group {
    margin-bottom: 0;
}

/* V139: Individual boxes for each section as requested */
.panel-section {
    background: rgba(255, 255, 255, 0.05);
    /* Slightly more visible glass effect */
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
}

.panel-section:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Ensure recommendation section styling doesn't double-padding */
.recommendation-section {
    background: #f8fafc !important;
    /* Keep specific light background for recommendations */
    border: 1px solid #e2e8f0;
    padding: 15px;
    margin-bottom: 40px;
}

/* 추천 ?�션?� ?�버 ?�과 ?�음 */
.recommendation-section:hover {
    background: #f8fafc !important;
    border-color: #e2e8f0 !important;
}

.recommendation-header {
    color: #3b82f6;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    text-transform: none;
    letter-spacing: normal;
    flex-wrap: wrap;
}

.recommendation-subtitle {
    font-size: 13px;
    color: #4b5563;
    /* Gray 600 - 짙은 회색 */
    font-weight: 500;
}

/* "자동선택" 빨간색 강조 */
.highlight-red {
    color: #ef4444 !important;
    font-weight: 700 !important;
}

.recommendation-status {
    background: #3b82f6;
    color: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 800;
}

/* 추천 ?�작 조합 카드 */
.recommendation-section .recommend-card,
#recommendationList>div {
    padding: 14px !important;
    border-radius: 12px !important;
    border: 1px solid #e2e8f0 !important;
    background-color: #ffffff !important;
    color: inherit !important;
    cursor: pointer !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05) !important;
    position: relative !important;
    overflow: visible !important;
    margin-bottom: 10px !important;
}

/* ?�버 ?�태 - ?��? ?�과�?(?�상 변???�음) */
.recommendation-section .recommend-card:hover,
#recommendationList>div:hover {
    transform: scale(1.03) !important;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12) !important;
    background-color: #ffffff !important;
    border-color: #3b82f6 !important;
}

/* ?�버 ???�스???�상 명확???��? */
.recommendation-section .recommend-card:hover .recommend-title,
#recommendationList>div:hover .recommend-title {
    color: #1e293b !important;
}

.recommendation-section .recommend-card:hover .recommend-desc,
#recommendationList>div:hover .recommend-desc {
    color: #64748b !important;
}

.recommendation-section .recommend-card:hover .recommend-applied,
#recommendationList>div:hover .recommend-applied {
    color: #10b981 !important;
}

/* ?�성 ?�태 */
.recommendation-section .recommend-card.active,
#recommendationList>div.active {
    border: 2px solid #3b82f6 !important;
    background-color: #f0f7ff !important;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2) !important;
}

/* ?�성 ?�태 ?�디케?�터 */
/* .recommendation-section .recommend-card.active::after,
#recommendationList>div.active::after {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 4px !important;
    height: 100% !important;
    background: #3b82f6 !important;
} */

/* 불일치 상태 - 도면과 맞지 않으면 텍스트 블러 */
.recommendation-section .recommend-card.mismatched .recommend-title,
.recommendation-section .recommend-card.mismatched .recommend-desc,
.recommendation-section .recommend-card.mismatched .social-proof-text,
#recommendationList>div.mismatched .recommend-title,
#recommendationList>div.mismatched .recommend-desc,
#recommendationList>div.mismatched .social-proof-text {
    filter: blur(4px) !important;
    user-select: none !important;
    pointer-events: none !important;
}

.recommend-title {
    font-weight: 800;
    font-size: 16px;
    color: #3b82f6;
}

.recommend-applied {
    font-size: 11px;
    background: #3b82f6;
    color: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 700;
}

.recommend-desc {
    font-size: 13px;
    color: #64748b;
    line-height: 1.4;
    margin-top: 6px;
}

.social-proof-text {
    font-size: 11px;
    color: #475569;
    margin-top: 14px;
    padding: 10px 14px;
    background: #f1f5f9;
    border-radius: 8px;
    border-left: 3px solid #3b82f6;
    line-height: 1.8;
    font-weight: 500;
    font-style: italic;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    word-break: keep-all;
}

.social-proof-text::before {
    content: "💡";
    margin-right: 8px;
    font-size: 14px;
    font-style: normal;
}

.recommendation-info-box {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.recommendation-notice {
    font-size: 13px;
    color: #1e293b;
    line-height: 1.5;
    font-weight: 600;
    word-break: keep-all;
    /* Line break at spaces */
}

/* 강조 ?�어 ?��???*/
.highlight-term {
    color: #3b82f6;
    font-weight: 700;
}

.realtime-notice {
    font-size: 12px;
    color: #ef4444;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(239, 68, 68, 0.05);
    padding: 6px 12px;
    border-radius: 6px;
    border-left: 3px solid #ef4444;
}

.realtime-notice::before {
    content: "⚡";
    font-size: 14px;
}

h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-dim);
    margin-bottom: 12px;
}

/* Presets & Selectors */
.selector {
    width: 100%;
    background: var(--glass);
    border: 1px solid var(--border);
    color: var(--text-main);
    padding: 12px;
    border-radius: 8px;
    outline: none;
    font-size: 14px;
    margin-bottom: 10px;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
}

.selector optgroup {
    background: var(--bg-dark);
}

.preset-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 24px;
}

.preset-btn {
    background: var(--glass);
    border: 1px solid var(--border);
    color: var(--text-main);
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
}

.preset-btn:hover {
    background: rgba(255, 255, 255, 0.08);
}

.preset-btn.active {
    border-color: var(--primary);
    background: var(--primary-glow);
}

/* Inputs */
.input-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
}

.input-header label {
    font-size: 14px;
    font-weight: 500;
}

.value-tag {
    font-size: 14px;
    font-weight: 800;
    color: var(--accent);
    background: rgba(59, 130, 246, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
    margin-top: 2px;
}

input[type="range"] {
    width: 100%;
    appearance: none;
    background: var(--border);
    height: 4px;
    border-radius: 2px;
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 16px;
    height: 16px;
    background: #ffffff;
    border: 2px solid var(--primary);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 10px var(--primary-glow);
}

.range-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 11px;
    color: var(--text-dim);
}

.numeric-control {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
}

.num-input-wrapper {
    position: relative;
    flex: 1;
}

.num-input {
    width: 100%;
    background: var(--glass);
    border: 1px solid var(--border);
    color: var(--text-main);
    padding: 10px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    outline: none;
}

.num-input:focus {
    border-color: var(--primary);
}

.step-btn {
    width: 42px;
    height: 42px;
    background: var(--glass);
    border: 1px solid var(--border);
    color: var(--text-main);
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.step-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.step-btn svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
}

/* Options */
.option-row {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.option-btn {
    background: var(--glass);
    border: 1px solid var(--border);
    color: var(--text-main);
    padding: 10px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    text-align: left;
    transition: all 0.2s;
}

.option-btn.active {
    border-color: var(--primary);
    background: var(--primary-glow);
}

.option-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

/* Pricing Box */
.price-container {
    padding: 20px;
    background: rgba(192, 57, 43, 0.1);
    border: 1px dashed var(--primary);
    border-radius: 12px;
    margin-bottom: 32px;
}

.price-container h3 {
    margin-bottom: 12px;
    color: var(--primary);
}

.price-box {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

#basePrice {
    font-family: 'Outfit', sans-serif;
    font-size: 32px;
    font-weight: 700;
    color: var(--text-main);
}

.currency {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-dim);
}

/* Specs */
.spec-list {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    padding: 20px;
}

.spec-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 13px;
    border-bottom: 1px solid var(--border);
}

.spec-item:last-child {
    border: none;
}

.spec-item span {
    color: var(--text-dim);
}

/* Buttons */
.action-btn {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 24px;
    border-radius: 50px;
    /* Fully rounded for a more modern look */
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    min-width: 140px;
    /* Balanced width */
    white-space: nowrap;
}

.action-btn.download {
    background: #ffffff;
    color: var(--bg-dark);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
}

.action-btn.download:hover {
    background: #f1f5f9;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 255, 255, 0.2);
}

.action-btn.white {
    background: #ffffff;
    color: var(--bg-dark);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
}

.action-btn.white:hover {
    background: #f1f5f9;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 255, 255, 0.2);
    border-color: rgba(0, 0, 0, 0.1);
}

.action-btn.orange {
    background: linear-gradient(135deg, #ff9500 0%, #e68600 100%);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(255, 149, 0, 0.3);
}

.action-btn.orange:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 149, 0, 0.5);
    filter: brightness(1.1);
}


.action-btn.secondary {
    font-size: 13px;
    color: var(--text-dim) !important;
    background: transparent;
    padding: 0;
}

.action-btn.secondary:hover {
    color: var(--accent) !important;
    text-decoration: underline;
}

/* Order Qty Footer Styling */
.cart-qty-footer {
    margin-top: 40px;
    padding-top: 32px;
    border-top: 2px solid var(--border);
    background: rgba(255, 255, 255, 0.02);
    margin-left: -24px;
    margin-right: -24px;
    padding-left: 24px;
    padding-right: 24px;
    padding-bottom: 24px;
}

.cart-qty-footer h3 {
    color: var(--accent);
    font-weight: 800;
    font-size: 16px;
    margin-bottom: 15px;
}

.qty-inline-container {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 12px;
    width: 100% !important;
    box-sizing: border-box !important;
    margin-top: 40px;
}

/* Ensure the wrapper is pushed to the right-most side of the space-between container */
.qty-control-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    /* Slightly tighter gap for right alignment feel */
    background: rgba(15, 23, 42, 0.4);
    padding: 6px 12px;
    border-radius: 12px;
    border: 1px solid var(--border);
    margin-left: auto;
    /* Push to right just in case */
}

.qty-control-wrapper .num-input {
    background: rgba(255, 255, 255, 0.05);
    /* Slight background to indicate input field */
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    font-size: 18px;
    font-weight: 800;
    color: white;
    text-align: center;
    width: 60px;
    /* Slightly wider for direct typing comfort */
    appearance: textfield;
    /* Remove spinner arrows */
}

.qty-control-wrapper .num-input::-webkit-inner-spin-button,
.qty-control-wrapper .num-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.qty-control-wrapper .step-btn {
    width: 34px;
    height: 34px;
    font-size: 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: white;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.qty-control-wrapper .step-btn:hover {
    background: var(--primary);
    transform: scale(1.05);
    border-color: var(--primary);
    box-shadow: 0 0 15px var(--primary-glow);
}

#pdf-watermark {
    display: none;
}

/* Print Styles for PDF Download - Optimized single-page layout */
@media print {
    @page {
        size: A4 portrait;
        margin: 10mm;
        /* Equal top/bottom margins */
    }

    body {
        background: #ffffff !important;
        color: #000000 !important;
        overflow: hidden !important;
        /* Force hidden for single page */
        height: 100vh !important;
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }

    .brand-prefix {
        display: inline !important;
    }

    .app-container {
        height: auto !important;
        display: block !important;
        background: #ffffff !important;
        position: relative !important;
        zoom: 1 !important;
        width: 100% !important;
    }


    /* Hide UI elements */
    .main-header,
    .controls-section,
    .visualizer-footer,
    .action-btn,
    .download,
    .dimension-controls,
    .header-controls,
    .header-right,
    .badge-placeholder {
        display: none !important;
    }

    .main-content {
        display: block !important;
        height: auto !important;
        overflow: visible !important;
    }

    .visualizer-section {
        padding: 0 !important;
        background: #ffffff !important;
        height: auto !important;
    }

    .drawing-area {
        margin: 0 !important;
        box-shadow: none !important;
        border: none !important;
        background: #ffffff !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }

    /* Header Badge Styling */
    .product-badge {
        position: static !important;
        transform: none !important;
        display: block !important;
        margin-bottom: 10px !important;
        text-align: left !important;
        width: 100% !important;
        border-bottom: 1px solid #000 !important;
        padding-bottom: 5px !important;
    }

    .badge-single-line {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 4px 12px !important;
        align-items: center !important;
        width: 100% !important;
    }

    .badge-title {
        font-size: 15px !important;
        font-weight: 800 !important;
        color: #000 !important;
        margin-right: 0 !important;
    }

    .badge-selection {
        font-size: 15px !important;
        font-weight: 700 !important;
        color: #000 !important;
        margin-right: 0 !important;
        margin-left: 0 !important;
    }

    .badge-spec {
        font-size: 11px !important;
        font-weight: 400 !important;
        color: #000 !important;
        white-space: nowrap !important;
    }

    .product-badge .badge-spec.secondary {
        display: none !important;
    }

    .view-tag {
        display: flex !important;
        align-items: center !important;
        position: static !important;
        background: transparent !important;
        font-size: 10px !important;
        color: #64748b !important;
        margin-bottom: 1px !important;
        margin-top: 1px !important;
        border-left: 3px solid #3b82f6 !important;
        padding-left: 6px !important;
        width: 100% !important;
    }

    .print-view-specs {
        display: inline-flex !important;
        gap: 12px !important;
        margin-left: 20px !important;
        /* Positioned next to the title with a gap */
        align-items: center !important;
    }

    .print-view-specs .badge-spec {
        font-size: 10.5px !important;
        /* Increased for visibility */
        color: #000 !important;
        /* Darker for print clarity */
        font-weight: 700 !important;
        border: none !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .badge-divider {
        display: none !important;
    }

    #front-view-tag span,
    #side-view-tag span {
        display: none !important;
    }

    /* Reordering Layout: Top -> Front/Side -> Tables */
    .view-grid {
        display: flex !important;
        flex-direction: column !important;
        padding-top: 0 !important;
        gap: 8px !important;
        min-height: 275mm !important;
        /* Matches A4 printable area (297mm - 20mm margins - 2mm safety) */
    }

    .top-row {
        display: contents !important;
    }

    /* Target with high specificity */
    .view-grid div.view-section.main-view {
        order: 1 !important;
        height: 370px !important;
        min-height: 370px !important;
        max-height: 370px !important;
        flex: none !important;
        margin-bottom: 1px !important;
        overflow: hidden !important;
        display: flex !important;
        flex-direction: column !important;
    }

    #topView {
        height: 100% !important;
        flex: 1 !important;
        padding: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        border: 1px solid #000 !important;
        position: relative !important;
    }

    #topView .print-qr {
        display: none !important;
        /* Cleanup old selector if any */
    }

    .print-qr {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        top: 40px;
        /* Offset to stay under or next to the 'TOP VIEW' tag */
    }

    .qr-text {
        text-align: center !important;
        line-height: 1.2 !important;
        margin-top: 5px !important;
        font-size: 10px !important;
        font-weight: 600 !important;
        color: #000 !important;
    }

    #topView svg {
        height: 320px !important;
        width: auto !important;
    }

    .view-grid .sub-views {
        display: flex !important;
        height: 160px !important;
        gap: 10px !important;
        margin-bottom: 8px !important;
        order: 2 !important;
        flex: none !important;
        width: 100% !important;
        align-items: stretch !important;
        /* Ensure children take full height */
    }

    .sub-views .view-section {
        flex: 1;
        /* Removed !important to allow JS dynamic flex values */
        min-width: 0 !important;
        height: 100% !important;
        display: flex !important;
        flex-direction: column !important;
    }

    .sub-views .view-container {
        flex: 1 !important;
        height: 100% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        overflow: visible !important;
        /* Prevent clipping */
    }

    .view-container svg {
        max-width: 100% !important;
        max-height: 100% !important;
        width: auto !important;
        height: auto !important;
    }

    .summary-view {
        display: flex !important;
        flex-direction: column !important;
        order: 3 !important;
        padding: 0 !important;
        width: 100% !important;
        margin-top: 5px !important;
        flex: 1 !important;
        /* Fill remaining space */
    }

    .summary-view .view-tag:nth-of-type(2) {
        order: 1 !important;
        margin-top: 5px !important;
        /* Fixed distance from sub-views above */
    }

    #reinforceDetails {
        order: 2 !important;
        height: auto !important;
        flex: none !important;
        margin-bottom: 1px !important;
    }

    /* Design Summary title should be pushed to the bottom */
    .summary-view .view-tag:nth-of-type(1) {
        order: 3 !important;
        margin-top: auto !important;
        /* This pushes the whole design summary group to the bottom */
        padding-top: 0 !important;
    }

    #designSummary {
        order: 4 !important;
        flex: none !important;
        position: relative !important;
        height: auto !important;
        margin-bottom: 1px !important;
        overflow: visible !important;
    }

    .summary-note {
        position: absolute !important;
        top: -16px !important;
        right: 15px !important;
        margin: 0 !important;
        padding: 0 !important;
        font-size: 10px !important;
        color: #3b82f6 !important;
        font-weight: 700 !important;
        line-height: 1 !important;
        z-index: 99 !important;
        white-space: nowrap !important;
    }

    .summary-footer {
        order: 5 !important;
        padding-top: 2px !important;
        /* Reduced padding */
        padding-right: 15px !important;
        text-align: right !important;
        width: 100% !important;
    }

    .marketing-slogan {
        align-items: flex-end !important;
        text-align: right !important;
    }

    .slogan-sub {
        flex-direction: row !important;
        gap: 0 !important;
        justify-content: flex-end !important;
    }

    .print-sep {
        display: inline !important;
    }

    /* Common View Components */
    .view-container {
        border: 1px solid #e2e8f0 !important;
        padding: 5px !important;
        height: auto !important;
        /* Changed from 100% to allow bottom alignment */
        background: #fff !important;
    }


    /* Tables */
    .summary-table-container {
        margin-bottom: 1px !important;
        border: 1px solid #000 !important;
    }

    #designSummary .summary-table-container:first-of-type {
        display: none !important;
    }

    .summary-table th br {
        display: none !important;
    }

    .summary-table th,
    .summary-table td {
        white-space: nowrap !important;
    }

    .reinforce-footer-msg {
        display: flex !important;
        justify-content: space-between !important;
        align-items: flex-end !important;
        width: 100% !important;
        margin-top: 5px !important;
    }

    .reinforce-footer-msg>div {
        margin-top: 0 !important;
        border-top: none !important;
        padding-top: 0 !important;
    }

    .gap-warning-footnote {
        font-size: 11px !important;
        color: #e11d48 !important;
        margin-left: auto !important;
        text-align: right !important;
    }

    table {
        width: 100% !important;
        border-collapse: collapse !important;
    }

    th,
    td {
        border: 1px solid #000 !important;
        padding: 4px 8px !important;
        /* Improved vertical breathing room */
        font-size: 11px !important;
        color: #000 !important;
        line-height: 1.3 !important;
        /* Better line height for readability */
    }

    thead th {
        background: #f8fafc !important;
    }


    .total-price-row span {
        color: #000 !important;
        font-size: 14px !important;
    }

    .total-price-row strong {
        font-size: 14px !important;
        color: #000 !important;
    }

    .marketing-slogan {
        display: block !important;
        text-align: right !important;
        width: 100% !important;
    }

    .marketing-slogan p {
        color: #1e293b !important;
        font-size: 9px !important;
        margin: 0 !important;
        line-height: 1.2 !important;
        display: inline !important;
    }

    .marketing-slogan p:nth-of-type(2) {
        margin-left: 15px !important;
    }

    .marketing-slogan p:nth-of-type(3) {
        display: block !important;
        margin-top: 2px !important;
    }

    #pdf-watermark {
        display: block !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
        z-index: 9999 !important;
        pointer-events: none !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    #pdf-watermark img {
        width: 600px !important;
        height: auto !important;
        opacity: 0.08 !important;
        filter: grayscale(100%) !important;
        /* Made watermark grayscale as requested */
        transform: rotate(-15deg) !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
}

/* Animation: Shake */
@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    10%,
    30%,
    50%,
    70%,
    90% {
        transform: translateX(-5px);
    }

    20%,
    40%,
    60%,
    80% {
        transform: translateX(5px);
    }
}

.shake {
    animation: shake 0.5s cubic-bezier(.36, .07, .19, .97) both;
    border-color: var(--primary) !important;
    box-shadow: 0 0 15px var(--primary-glow) !important;
}

/* Print styles */
@media print {
    .screen-only {
        display: none !important;
    }

    /* 모바일 전용 요소 인쇄 시 숨김 */
    .mobile-only,
    .mobile-hamburger,
    .mobile-hamburger-overlay,
    .mobile-sticky-summary,
    .mobile-bottom-bar,
    .initial-instruction-overlay,
    .mobile-floating-notice,
    #mobile-inline-controls,
    #recommendationControl {
        display: none !important;
    }

    .slogan-main strong {
        font-weight: inherit;
    }
}

/* Responsive layout for tablets and smaller desktops (768px ~ 2559px) */
@media (min-width: 768px) and (max-width: 2559px) {

    /* Move product badge 50px to the right */
    .product-badge {
        left: calc(50% + 250px) !important;
    }
}

/* Enable horizontal scrolling for 768px ~ 1535px - Same layout as FHD */
@media (min-width: 768px) and (max-width: 1535px) {
    body {
        overflow-x: auto !important;
        overflow-y: auto !important;
        min-width: 1920px !important;
    }

    .app-container {
        min-width: 1920px !important;
    }

    /* Header Grid Layout */
    .main-header {
        display: grid;
        grid-template-columns: minmax(280px, auto) auto minmax(280px, auto);
        grid-template-rows: auto auto;
        align-items: start;
        gap: 10px 0;
        padding: 12px 30px;
        width: 100%;
        max-width: 100vw;
        box-sizing: border-box;
        overflow: visible !important;
    }

    .header-left {
        grid-column: 1;
        grid-row: 1;
        justify-self: start;
    }

    .header-center {
        grid-column: 2;
        grid-row: 1;
        justify-self: center;
        z-index: 999 !important;
    }

    .header-right {
        grid-column: 3;
        grid-row: 1;
        justify-self: end;
        z-index: 999 !important;
        position: relative !important;
    }

    .header-center .dimension-controls {
        grid-column: 1 / -1;
        grid-row: 2;
        width: 100%;
        justify-content: center;
        z-index: 10 !important;
        position: relative !important;
    }

    /* Match FHD layout */
    .top-row {
        flex: 0 0 900px !important;
        height: 900px !important;
        min-height: 900px !important;
        max-height: 900px !important;
        margin-top: 60px !important;
    }

    .sub-views {
        flex: 0 0 260px !important;
        height: 260px !important;
        min-height: 260px !important;
        max-height: 260px !important;
    }

    .main-view {
        flex: 1 !important;
        height: 900px !important;
    }

    .summary-view {
        flex: 0 0 580px !important;
        width: 580px !important;
        min-width: 580px !important;
        max-width: 580px !important;
        height: 900px !important;
    }

    #reinforceDetails {
        height: 320px !important;
    }

    .app-container,
    .main-content,
    .visualizer-section,
    .drawing-area,
    .summary-container {
        overflow: visible !important;
        height: auto !important;
        max-height: none !important;
    }

    .view-grid {
        height: auto !important;
        min-height: 0 !important;
        margin-top: 0 !important;
        padding-top: 0 !important;
    }

    .drawing-area {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }

    .menu-container {
        z-index: 1000 !important;
        position: relative !important;
    }

    .dropdown-overlay {
        z-index: 1001 !important;
    }

    .dropdown-content {
        z-index: 1002 !important;
    }

    .custom-order-notice {
        font-size: 11px !important;
        white-space: nowrap !important;
    }

    .reinforce-footer-msg {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        gap: 15px !important;
    }

    .handle-footnote {
        font-size: 9px !important;
        margin-top: 0 !important;
    }
}

/* Responsive layout for FHD to QHD (1536px ~ 2559px) */
@media (min-width: 1536px) and (max-width: 2559px) {

    /* Enable vertical scrolling */
    body {
        overflow-y: auto !important;
        overflow-x: hidden !important;
    }

    /* Header Grid Layout */
    .main-header {
        display: grid;
        grid-template-columns: minmax(280px, auto) auto minmax(280px, auto);
        grid-template-rows: auto auto;
        align-items: start;
        gap: 10px 0;
        padding: 12px 30px;
        width: 100%;
        max-width: 100vw;
        box-sizing: border-box;
        overflow: visible !important;
    }

    .header-left {
        grid-column: 1;
        grid-row: 1;
        justify-self: start;
    }

    .header-center {
        grid-column: 2;
        grid-row: 1;
        justify-self: center;
        z-index: 999 !important;
    }

    .header-right {
        grid-column: 3;
        grid-row: 1;
        justify-self: end;
        z-index: 999 !important;
        position: relative !important;
    }

    .header-center .dimension-controls {
        grid-column: 1 / -1;
        grid-row: 2;
        width: 100%;
        justify-content: center;
        z-index: 10 !important;
        position: relative !important;
    }

    /* Match QHD layout for FHD */
    .top-row {
        flex: 0 0 900px !important;
        height: 900px !important;
        min-height: 900px !important;
        max-height: 900px !important;
        margin-top: 60px !important;
    }

    .sub-views {
        flex: 0 0 260px !important;
        height: 260px !important;
        min-height: 260px !important;
        max-height: 260px !important;
    }

    /* Adjust TOP VIEW width - 20% narrower */
    .main-view {
        flex: 1 !important;
        height: 900px !important;
    }

    .summary-view {
        flex: 0 0 580px !important;
        width: 580px !important;
        min-width: 580px !important;
        max-width: 580px !important;
        height: 900px !important;
    }

    /* Set manufacturing info box height to 320px */
    #reinforceDetails {
        height: 320px !important;
    }

    /* Enable scrolling */
    .app-container,
    .main-content,
    .visualizer-section,
    .drawing-area,
    .summary-container {
        overflow: visible !important;
        height: auto !important;
        max-height: none !important;
    }

    .view-grid {
        height: auto !important;
        min-height: 0 !important;
        margin-top: 0 !important;
        padding-top: 0 !important;
    }

    .drawing-area {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }

    /* Dropdown z-index */
    .menu-container {
        z-index: 1000 !important;
        position: relative !important;
    }

    .dropdown-overlay {
        z-index: 1001 !important;
    }

    .dropdown-content {
        z-index: 1002 !important;
    }

    /* Adjust font size for notice text to fit in one line */
    .custom-order-notice {
        font-size: 11px !important;
        white-space: nowrap !important;
    }

    /* Arrange manufacturing footer in single line */
    .reinforce-footer-msg {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        gap: 15px !important;
    }

    .handle-footnote {
        font-size: 9px !important;
        margin-top: 0 !important;
    }

    .gap-warning-footnote {
        font-size: 11px !important;
        text-align: right !important;
        margin-top: 0 !important;
        border-top: none !important;
        padding-top: 0 !important;
        margin-left: auto !important;
    }


    /* Adjust warning message font size in FHD */
    .gap-warning-inline {
        font-size: 9px !important;
    }

    .handle-spec {
        font-size: 11px !important;
    }
}

/* ============================================
   PC Share Button
   ============================================ */
.pc-share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 20px 16px;
    background: linear-gradient(135deg, #FF8C00 0%, #FF6F00 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.3);
    transition: all 0.2s ease;
}

.pc-share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 111, 0, 0.4);
}

.pc-share-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(255, 111, 0, 0.3);
}

.pc-share-btn svg {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
}

/* V221: Price Loading Overlay */
#price-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    pointer-events: none;
}

#price-loading-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.price-loading-content {
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(15, 17, 21, 0.92);
    padding: 18px 32px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

.price-loading-content span {
    color: #e2e8f0;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.2px;
    white-space: nowrap;
}

.price-loading-spinner {
    width: 22px;
    height: 22px;
    border: 3px solid rgba(255, 255, 255, 0.15);
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: price-spin 0.7s linear infinite;
}

@keyframes price-spin {
    to {
        transform: rotate(360deg);
    }
}