/* calculator.css - 새로운 태온 T&S 디자인 시스템 기반 계산기 전용 스타일 */

/* 계산기 이너 래퍼 (main-content 내에 들어감) */
.calculator-inner-wrap {
    width: 100%;
}

/* 상단 타이틀 및 탭 */
.page-title-section {
    margin-bottom: 30px;
}

.page-title-section h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.tabs {
    display: flex;
    border-bottom: 1px solid #E0E0E0;
    gap: 30px;
}

.tab-item {
    padding: 10px 0;
    text-decoration: none;
    color: #888;
    font-weight: 500;
    font-size: 1.05rem;
    position: relative;
    transition: color 0.2s;
}

.tab-item:hover {
    color: var(--primary-color);
}

.tab-item.active {
    color: var(--primary-color);
    font-weight: 600;
}

.tab-item.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--primary-color);
}

/* 본문 영역 (2단 레이아웃) */
.calc-body {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

/* 좌측 섹션 */
.left-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 제품 이미지 & 사양 블록 */
.product-info-block {
    display: flex;
    flex-direction: column;
    gap: 20px;
    background-color: #FFFFFF;
    border: 1px solid #EAEAEA;
    border-radius: var(--border-radius);
    padding: 25px;
}

.info-col {
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* 페이드 인 애니메이션 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.4s ease-out forwards;
}

.info-col h3 {
    font-size: 1.05rem;
    color: #444;
    margin-bottom: 15px;
}

.image-box {
    background-color: #FFFFFF;
    border-radius: 8px;
    height: 200px;
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 10px;
    border: 1px solid #F0F0F0;
}

.image-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.image-box .placeholder {
    text-align: center;
    color: #999;
    font-size: 0.9rem;
}

.image-box .placeholder svg {
    margin-bottom: 10px;
}

.spec-table {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.spec-row {
    display: flex;
    justify-content: space-between;
    padding-bottom: 15px;
    border-bottom: 1px solid #EFEFEF;
}

.spec-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.spec-label {
    color: #777;
    font-size: 0.95rem;
}

.spec-value {
    color: var(--text-color);
    font-weight: 500;
    font-size: 0.95rem;
}

/* 옵션 선택 폼 블록 */
.options-block {
    background-color: #FFFFFF;
    border: 1px solid #EAEAEA;
    border-radius: var(--border-radius);
    padding: 30px 25px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-row {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

/* 드롭다운과 전체 제품보기 버튼을 상하로 배치 */
.product-select-row {
    flex-direction: column;
    align-items: stretch;
    gap: 15px;
}

.select-col {
    width: 100%;
}

.btn-col {
    width: 100%;
}

.btn-col .btn-dark {
    width: 100%;
    background-color: #514D6F; /* 제품보기 페이지의 메인 컬러 테마 적용 */
}

.form-group {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.form-group label {
    font-size: 0.95rem;
    font-weight: 600;
    color: #444;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
}

.calc-select, .calc-input {
    width: 100%;
    padding: 14px 15px;
    border: 1px solid #D0D0D0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: var(--font-family);
    color: var(--text-color);
    background-color: var(--white-color);
    outline: none;
    transition: border-color 0.2s;
    appearance: none;
}

select.calc-select, div.calc-select.custom-material-display {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23666' 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 15px center;
    padding-right: 40px;
}

.calc-select:focus, .calc-input:focus {
    border-color: var(--primary-color);
}

.calc-select:disabled, .calc-input:disabled {
    background-color: #F5F5F5;
    color: #A0A0A0;
    cursor: not-allowed;
}

.btn-dark {
    background-color: var(--primary-color);
    color: var(--white-color);
    border: none;
    border-radius: 8px;
    padding: 14px 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
    height: 50px;
}

.btn-dark:hover {
    opacity: 0.9;
}

.unit {
    color: #888;
    margin-left: 5px;
    font-weight: normal;
}

.region-selects {
    display: flex;
    gap: 15px;
}

.badge {
    background-color: var(--primary-color);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
    margin-left: 10px;
}

.notice-text {
    color: #E53935;
    font-size: 0.85rem;
    margin-top: 6px;
}
.hidden { display: none !important; }

/* 우측 섹션 (고정형 사이드바) */
.right-section {
    width: 350px;
    flex-shrink: 0;
    position: sticky;
    top: 20px;
}

.summary-card {
    background-color: var(--white-color);
    border: 1px solid #EAEAEA;
    border-radius: var(--border-radius);
    padding: 30px 25px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
}

.summary-card h2 {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-bottom: 25px;
    font-weight: 700;
}

.summary-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid #EFEFEF;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.summary-item span {
    color: #666;
    font-size: 0.95rem;
}

.summary-item .value {
    color: var(--text-color);
    font-weight: 600;
}

.inquiry-warning {
    background-color: #FEF2F2;
    color: #DC2626;
    padding: 12px 15px;
    border-radius: 6px;
    font-size: 0.85rem;
    line-height: 1.5;
    margin-bottom: 20px;
    border: 1px solid #FCA5A5;
}

.warning-text {
    color: #E53935 !important;
    font-size: 0.85rem !important;
    justify-content: flex-start;
}

.total-price-box {
    background-color: #F8F8F8;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.total-price-box .label-col {
    display: flex;
    flex-direction: column;
}

.total-price-box .label-col strong {
    font-size: 1.05rem;
    color: var(--text-color);
}

.total-price-box .label-col small {
    font-size: 0.8rem;
    color: #888;
}

.total-price-box .price-col {
    color: var(--primary-color);
    display: flex;
    align-items: baseline;
    gap: 5px;
}

.total-price-box .price-col strong {
    font-size: 1.8rem;
    font-weight: 800;
}

.contact-form {
    background-color: #F8F5F5;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.contact-form label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #444;
    margin-bottom: 5px;
}

.contact-form .calc-input {
    padding: 10px 12px;
    font-size: 0.9rem;
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white-color);
    border: none;
    border-radius: 8px;
    padding: 15px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: opacity 0.2s;
}

.btn-primary:hover {
    opacity: 0.9;
}

.btn-outline {
    background-color: transparent;
    color: #666;
    border: 1px solid #CCC;
    border-radius: 8px;
    padding: 12px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-outline:hover {
    background-color: #F5F5F5;
    color: #333;
}

/* 반응형 처리 */
@media (max-width: 992px) {
    .calc-body {
        flex-direction: column;
    }
    
    .right-section {
        width: 100%;
        position: static;
    }
    
    .product-info-block {
        flex-direction: column;
    }
    
    .form-row.2-col {
        flex-direction: column;
    }
    
    .product-select-row {
        flex-direction: column;
        align-items: stretch;
    }
}

/* Custom Material Select */
.custom-material-select-wrapper {
    position: relative;
    width: 100%;
}
div.custom-material-display {
    cursor: pointer;
    user-select: none;
}
.custom-material-options {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: #fff;
    border: 1px solid var(--primary-color);
    border-radius: 8px;
    margin-top: 5px;
    z-index: 100;
    max-height: 200px;
    overflow-y: auto;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.custom-material-option {
    padding: 12px 15px;
    cursor: pointer;
    font-size: 1rem;
    color: var(--text-color);
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
}
.custom-material-option:last-child {
    border-bottom: none;
}
.custom-material-option:hover {
    background-color: #f8f9fa;
}
