/* ============================================================
   products.css - 제품 페이지 전용 스타일

   설명: 차량용 에어컨, 차량용 냉동기 제품 목록 페이지에서
         사용하는 스타일입니다.
   ============================================================ */

/* ──── 제품 소개 영역 ──── */
.product-intro {
    text-align: center;
    max-width: 800px;
    margin: 0 auto var(--space-xl);
}

.product-intro__text {
    font-size: var(--font-size-body);
    color: var(--color-cool-gray);
    line-height: 1.8;
    margin-bottom: var(--space-lg);
}

/* 제품 특징 아이콘 목록 */
.product-features {
    display: flex;
    justify-content: center;
    gap: var(--space-xl);
    flex-wrap: wrap;
}

.product-feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
}

.product-feature__icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--color-section-gray-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.product-feature__label {
    font-size: var(--font-size-caption);
    font-weight: var(--font-weight-medium);
    color: var(--color-heading);
}

/* ──── 제품 카드 ──── */
.product-card {
    background-color: var(--color-card-bg);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

/* 제품 이미지 */
.product-card__image {
    width: 100%;
    height: 220px;
    background-color: var(--color-light-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-normal);
}

.product-card:hover .product-card__image img {
    transform: scale(1.05);
}

/* 제품 정보 */
.product-card__body {
    padding: var(--space-lg);
}

.product-card__model {
    font-size: var(--font-size-small);
    color: var(--color-ice-blue);
    font-weight: var(--font-weight-semibold);
    letter-spacing: 1px;
    margin-bottom: var(--space-xs);
}

.product-card__name {
    font-size: var(--font-size-h4);
    font-weight: var(--font-weight-semibold);
    color: var(--color-heading);
    margin-bottom: var(--space-sm);
}

/* 간단 사양 표시 */
.product-card__specs {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    margin-bottom: var(--space-md);
    padding-top: var(--space-sm);
    border-top: 1px solid var(--color-border);
}

.product-card__spec {
    display: flex;
    justify-content: space-between;
    font-size: var(--font-size-caption);
}

.product-card__spec-label {
    color: var(--color-cool-gray);
}

.product-card__spec-value {
    font-weight: var(--font-weight-medium);
    color: var(--color-heading);
}

/* 상세보기 버튼 */
.product-card__btn {
    width: 100%;
    text-align: center;
}

/* ============================================================
   제품 상세 모달 (팝업)
   ============================================================ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

/* 모달이 열린 상태 */
.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background-color: var(--color-card-bg);
    border-radius: var(--border-radius);
    max-width: 900px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: transform var(--transition-normal);
}

.modal-overlay.active .modal {
    transform: scale(1);
}

/* 모달 헤더 (닫기 버튼) */
.modal__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-lg);
    border-bottom: 1px solid var(--color-border);
}

.modal__title {
    font-size: var(--font-size-h3);
    font-weight: var(--font-weight-bold);
    color: var(--color-heading);
}

.modal__close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--color-cool-gray);
    transition: all var(--transition-fast);
}

.modal__close:hover {
    background-color: var(--color-light-gray);
    color: var(--color-text-dark);
}

/* 모달 본문 */
.modal__body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
    padding: var(--space-lg);
}

/* 모달 제품 이미지 */
.modal__image {
    background-color: var(--color-light-gray);
    border-radius: var(--border-radius);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
}

.modal__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 모달 제품 정보 */
.modal__info {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.modal__model {
    font-size: var(--font-size-caption);
    color: var(--color-ice-blue);
    font-weight: var(--font-weight-semibold);
}

.modal__description {
    font-size: var(--font-size-body);
    color: var(--color-cool-gray);
    line-height: 1.7;
}

/* 사양 테이블 */
.modal__specs-table {
    width: 100%;
    border-collapse: collapse;
}

.modal__specs-table tr {
    border-bottom: 1px solid var(--color-border);
}

.modal__specs-table td {
    padding: 10px 0;
    font-size: var(--font-size-caption);
}

.modal__specs-table td:first-child {
    color: var(--color-cool-gray);
    width: 40%;
}

.modal__specs-table td:last-child {
    font-weight: var(--font-weight-medium);
    color: var(--color-heading);
}

/* 특장점 목록 */
.modal__features {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.modal__feature {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: var(--font-size-caption);
    color: var(--color-text-dark);
}

.modal__feature-icon {
    color: var(--color-success);
}

/* 모달 하단 버튼 */
.modal__footer {
    padding: var(--space-lg);
    border-top: 1px solid var(--color-border);
    display: flex;
    justify-content: flex-end;
    gap: var(--space-md);
}

/* 다크모드에서 카드/모달에 테두리 추가 (가독성) */
[data-theme="dark"] .product-card,
[data-theme="dark"] .modal {
    border: 1px solid var(--color-border);
}

[data-theme="dark"] .product-card__image {
    background-color: var(--color-section-gray-bg);
}

[data-theme="dark"] .modal__image {
    background-color: var(--color-section-gray-bg);
}
