/* --- CSS 변수: Tech / Dark Theme (Sellix/Sellauth Style) --- */
:root {
    --color-bg-dark: #121212;      /* 메인 배경 */
    --color-bg-card: #1e1e1e;      /* 카드/컨테이너 배경 */
    --color-text-light: #e0e0e0;   /* 밝은 텍스트 */
    --color-text-subtle: #9e9e9e;  /* 보조 텍스트 */
    --color-accent: #FFFFFF;       /* 흰색 악센트 */
    --color-border-dark: #333;     /* 경계선 */
    --radius-tech: 4px;            /* 깔끔한 각진 모서리 */
    --transition-speed: 0.2s;
}

/* -------------------------------------
 * 기본 설정 및 테마
 * ------------------------------------- */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body.dark-theme {
    font-family: 'Inter', sans-serif; 
    color: var(--color-text-light);
    background-color: var(--color-bg-dark);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: var(--color-accent);
    transition: color var(--transition-speed);
}
a:hover { color: var(--color-text-subtle); } 

/* -------------------------------------
 * 헤더 및 푸터 (Tech 공통)
 * ------------------------------------- */

.tech-header-minimal {
    display: flex; 
    justify-content: center; 
    align-items: center;
    padding: 15px 30px; 
    background-color: var(--color-bg-card);
    border-bottom: 1px solid var(--color-border-dark);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.tech-nav-minimal { 
    display: flex;
}

.nav-link-tech { 
    margin: 0 15px; font-weight: 500; color: var(--color-text-light);
    font-size: 1.1em;
}
.nav-link-tech:hover { color: var(--color-accent); }

.tech-footer {
    text-align: center; padding: 20px;
    background-color: var(--color-bg-card);
    color: var(--color-text-subtle); font-size: 0.85em;
    border-top: 1px solid var(--color-border-dark);
}

/* -------------------------------------
 * 메인 페이지 스타일 (index.html)
 * ------------------------------------- */

.tech-container {
    max-width: 1200px; margin: 0 auto; padding: 40px 60px 80px;
}

.main-page-title-tech {
    font-size: 1.8em; font-weight: 700;
    margin-bottom: 40px; text-align: center;
    color: var(--color-text-light);
    border-bottom: 2px solid var(--color-accent);
    display: block; 
    padding-bottom: 5px;
}

.product-grid-tech {
    display: flex; justify-content: center;
    gap: 30px;
    flex-wrap: wrap; 
}

.product-card-tech {
    display: block; max-width: 320px;
    width: 100%; 
    background-color: var(--color-bg-card);
    border: 1px solid var(--color-border-dark);
    border-radius: var(--radius-tech);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    transition: box-shadow var(--transition-speed), border-color var(--transition-speed);
}
.product-card-tech:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
    border-color: var(--color-accent); 
}

.product-image-tech {
    width: 100%; 
    height: 200px; /* 고정 높이 유지 */
    background-color: #252525;
    display: flex; justify-content: center; align-items: center;
    color: var(--color-text-subtle); font-size: 1em;
}

/* 이미지 자동 맞춤: object-fit: cover; 유지 */
.product-image-tech img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 컨테이너를 가득 채우고 비율 유지 (일부가 잘릴 수 있음) */
    border-radius: var(--radius-tech) var(--radius-tech) 0 0;
}

.product-info-tech {
    padding: 20px;
    text-align: left;
}

.product-name-tech {
    font-size: 1.3em; font-weight: 700;
    margin-bottom: 5px; color: var(--color-text-light);
}

.product-price-tech {
    font-size: 1.6em; font-weight: 700;
    color: var(--color-accent); 
    margin-bottom: 15px;
}

.view-detail-tech {
    display: block; 
    width: 100%;
    text-align: center;
    font-size: 1em; 
    font-weight: 600;
    color: var(--color-bg-card); 
    background-color: var(--color-accent); 
    padding: 10px 0;
    border-radius: var(--radius-tech);
    border: 1px solid var(--color-accent);
    transition: background-color var(--transition-speed), color var(--transition-speed);
}
.view-detail-tech:hover {
    background-color: var(--color-bg-dark); 
    color: var(--color-accent); 
    border-color: var(--color-accent);
}

/* -------------------------------------
 * 상세 페이지 스타일 (detail.html)
 * ------------------------------------- */

.detail-page-tech { padding-top: 20px; }

.back-link-tech {
    display: inline-block; margin-bottom: 20px;
    font-size: 0.9em; color: var(--color-text-subtle);
    transition: color var(--transition-speed);
}
.back-link-tech:hover { color: var(--color-accent); }

.product-detail-tech-layout {
    display: grid; grid-template-columns: 2fr 1fr; gap: 40px;
    margin-bottom: 60px;
}

.detail-content-left-tech {
    background-color: var(--color-bg-card);
    padding: 30px;
    border: 1px solid var(--color-border-dark);
    border-radius: var(--radius-tech);
}

.product-title-detail {
    font-size: 2em; font-weight: 700; margin-bottom: 5px;
    color: var(--color-accent);
}
.product-subtitle-detail {
    font-size: 1em; color: var(--color-text-subtle); margin-bottom: 20px;
}

.main-image-detail {
    width: 100%; 
    height: 400px; /* 고정 높이 유지 */
    background-color: #252525;
    margin-bottom: 30px;
    border-radius: var(--radius-tech);
    display: flex; justify-content: center; align-items: center;
    color: var(--color-text-subtle);
}

/* 이미지 자동 맞춤: object-fit: cover; 유지 */
.main-image-detail img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 컨테이너를 가득 채우고 비율 유지 (일부가 잘릴 수 있음) */
    border-radius: var(--radius-tech);
}


.spec-table-tech {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--color-border-dark);
}
.spec-table-tech h2 {
    font-size: 1.1em; margin-bottom: 15px; color: var(--color-text-light);
}
.spec-row {
    display: flex; justify-content: space-between;
    padding: 8px 0; border-bottom: 1px dashed var(--color-border-dark);
    font-size: 0.95em;
}
.spec-row span:first-child { font-weight: 600; }

.detail-sidebar-tech {
    background-color: var(--color-bg-card);
    padding: 25px;
    border: 1px solid var(--color-border-dark);
    border-radius: var(--radius-tech);
    position: sticky; top: 20px; height: fit-content;
}

.price-display-tech {
    font-size: 2.2em; font-weight: 700;
    color: var(--color-accent);
    margin-bottom: 30px; padding-bottom: 15px;
    border-bottom: 1px solid var(--color-border-dark);
    text-align: center;
}

.option-group-tech { margin-bottom: 15px; }
.option-group-tech label {
    display: block; font-weight: 600; margin-bottom: 5px;
    font-size: 0.9em;
}
.option-select-tech {
    width: 100%; padding: 10px;
    border: 1px solid var(--color-border-dark);
    border-radius: var(--radius-tech);
    background-color: #252525;
    color: var(--color-text-light);
    font-family: 'Inter', sans-serif;
    transition: border-color var(--transition-speed);
}
.option-select-tech:focus { border-color: var(--color-accent); outline: none; }

/* 버튼 스타일 */
.checkout-button-tech {
    width: 100%; padding: 15px;
    background-color: var(--color-accent);
    color: var(--color-bg-card); border: none;
    font-size: 1em; font-weight: 700; cursor: pointer;
    border-radius: var(--radius-tech);
    transition: background-color var(--transition-speed);
    margin-top: 20px;
}
.checkout-button-tech:hover { 
    background-color: var(--color-bg-dark);
    color: var(--color-accent);
}

.description-area-tech {
    margin-top: 40px; padding-top: 40px;
    border-top: 1px solid var(--color-border-dark);
    text-align: center;
}
.description-area-tech h2 {
    font-size: 1.5em; margin-bottom: 30px; color: var(--color-accent);
}
.long-image-placeholder-tech {
    width: 100%; 
    min-height: 1px; 
    height: auto;
    background-color: #252525;
    margin: 20px 0; border-radius: var(--radius-tech);
    display: flex; justify-content: center; align-items: center;
    color: var(--color-text-subtle);
    border: 1px dashed var(--color-border-dark);
}

/* 이미지 자체의 높이를 사용 */
.long-image-placeholder-tech img {
    width: 100%;
    height: auto; 
    object-fit: cover; 
    border-radius: var(--radius-tech);
}

/* -------------------------------------
 * 모달 팝업 스타일
 * ------------------------------------- */
.modal-overlay {
    position: fixed; top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.7); /* 블러 효과를 위한 배경 */
    backdrop-filter: blur(8px); /* 블러 효과 */
    display: flex; justify-content: center; align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: var(--color-bg-card);
    padding: 30px; border-radius: var(--radius-tech);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.6);
    text-align: center;
    max-width: 500px; width: 90%;
    transform: translateY(-20px);
    transition: transform 0.3s ease;
    border: 1px solid var(--color-accent);
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-instruction {
    font-size: 1.2em; font-weight: 700;
    color: var(--color-accent); margin-bottom: 20px;
}

.selected-options-list {
    text-align: left;
    margin-bottom: 25px;
    padding: 15px;
    background-color: #252525;
    border-radius: var(--radius-tech);
    border: 1px solid var(--color-border-dark);
}
.selected-options-list p {
    margin-bottom: 8px;
    color: var(--color-text-light);
    font-size: 0.95em;
}
.selected-options-list p strong {
    color: var(--color-accent);
    margin-right: 8px;
    font-weight: 600;
}

.progress-bar-container {
    width: 100%; height: 10px;
    background-color: #333; border-radius: 5px;
    margin-top: 20px; margin-bottom: 10px;
    overflow: hidden;
}

.progress-bar {
    width: 0%; height: 100%;
    background-color: var(--color-accent);
    border-radius: 5px;
    transition: width 0.1s linear; 
}

.redirect-countdown {
    font-size: 0.9em;
    color: var(--color-text-subtle);
}


/* -------------------------------------
 * 반응형 디자인 (Mobile Responsive)
 * ------------------------------------- */
@media (max-width: 768px) {
    .tech-header-minimal, .tech-footer {
        padding: 15px 20px; 
    }

    .tech-container {
        padding: 20px; 
    }

    .main-page-title-tech {
        font-size: 1.5em; 
        margin-bottom: 30px;
    }

    .product-grid-tech {
        flex-direction: column; 
        align-items: center; 
        gap: 20px;
    }

    .product-card-tech {
        max-width: 90%; 
    }

    .product-image-tech {
        height: 180px; 
    }

    .product-detail-tech-layout {
        grid-template-columns: 1fr; 
        gap: 30px;
    }

    .detail-content-left-tech, .detail-sidebar-tech {
        padding: 20px; 
    }

    .product-title-detail {
        font-size: 1.8em; 
    }

    .main-image-detail {
        height: 300px; 
    }

    .long-image-placeholder-tech {
        height: auto; 
        min-height: 300px; 
    }

    /* 모달 반응형 */
    .modal-content {
        padding: 20px;
    }
    .modal-instruction {
        font-size: 1.1em;
    }
    .selected-options-list {
        padding: 10px;
    }
    .selected-options-list p {
        font-size: 0.9em;
    }
}

@media (max-width: 480px) {
    .tech-header-minimal, .tech-footer {
        padding: 10px 15px;
    }

    .tech-nav-minimal .nav-link-tech {
        font-size: 0.9em;
        margin: 0 10px;
    }

    .main-page-title-tech {
        font-size: 1.3em;
        margin-bottom: 20px;
    }

    .product-card-tech {
        max-width: 100%;
    }

    .product-image-tech {
        height: 150px;
    }
    
    .product-name-tech {
        font-size: 1.2em;
    }
    .product-price-tech {
        font-size: 1.4em;
    }

    .product-title-detail {
        font-size: 1.5em;
    }
    .product-subtitle-detail {
        font-size: 0.9em;
    }
    
    .main-image-detail {
        height: 250px;
    }

    .spec-table-tech h2 {
        font-size: 1em;
    }
    .spec-row {
        font-size: 0.9em;
    }

    .price-display-tech {
        font-size: 1.8em;
    }
    .option-group-tech label {
        font-size: 0.85em;
    }
    .option-select-tech, .checkout-button-tech {
        padding: 8px;
        font-size: 0.9em;
    }
    
    .description-area-tech h2 {
        font-size: 1.3em;
    }
    .long-image-placeholder-tech {
        height: auto;
        min-height: 200px;
    }
}