/* Consultation Form Styles */

body {
    background: #fff;
    overflow-x: hidden;
}

/* Main Content */
.consultation-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 120px 100px 200px;
    min-height: calc(100vh - 120px);
}

.consultation-container.center {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.consultation-container.center .consultation-title,
.consultation-container.center .consultation-subtitle {
    width: calc(250px * 5 + 5px * 4); /* 5 images + 4 gaps */
    text-align: left;
}

.consultation-container.center .quantity-input-wrapper {
    width: calc(250px * 2.5 + 5px * 2); /* 첫번째 이미지부터 화면 가운데까지 */
    text-align: left;
    align-self: flex-start;
    margin-left: calc(50% - (250px * 2.5 + 5px * 2));
}

.consultation-container.center .quantity-input {
    width: 100%;
}

/* Validation error styles */
.quantity-input.error,
.quantity-input.error:focus {
    border-color: #e53935;
}

.quantity-note.error {
    color: #e53935;
}

.consultation-title {
    font-size: 24px;
    font-weight: 400;
    color: #000;
    margin-bottom: 16px;
    line-height: 1.2;
}

.consultation-subtitle {
    font-size: 12px;
    color: #666;
    margin-bottom: 60px;
}

/* Category Grid - Step 1 */
.category-grid {
    display: grid;
    grid-template-columns: repeat(3, 400px);
    gap: 8px;
    margin-bottom: 40px;
}

.category-card {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    width: 400px;
    height: 220px;
}

.category-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.category-card-inner {
    width: 100%;
    height: 100%;
    position: relative;
}

.category-card-inner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.3), rgba(0, 0, 0, 0.3));
    z-index: 1;
    pointer-events: none;
}

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

.category-card-label {
    position: absolute;
    bottom: 24px;
    left: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    font-size: 13px;
    font-weight: 400;
    z-index: 2;
}

.category-radio {
    width: 20px;
    height: 20px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-radio::after {
    content: '';
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #fff;
    opacity: 0;
    transition: opacity 0.2s;
}

.category-card input[type="radio"]:checked + .category-card-inner .category-radio::after {
    opacity: 1;
}

.category-card input[type="radio"]:checked + .category-card-inner {
    outline: 3px solid #000;
}

/* Quantity Input - Step 2 */
.quantity-input-wrapper {
    max-width: 600px;
    margin-bottom: 60px;
}

.quantity-input {
    width: 100%;
    padding: 20px 24px;
    font-size: 11px;
    border: 1px solid #ddd;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.3s;
}

.quantity-input:focus {
    border-color: #000;
}

.quantity-input::placeholder {
    color: #999;
}

.quantity-note {
    margin-top: 12px;
    font-size: 8px;
    color: #666;
}

/* Product Description Input - Step 2 */
.description-input-wrapper {
    max-width: 800px;
    width: 100%;
}

.description-input {
    width: 100%;
    padding: 20px 24px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    border: 1px solid #ddd;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.3s;
    resize: none;
    overflow: hidden;
    min-height: 80px;
}

.description-input:focus {
    border-color: #000;
}

.description-input::placeholder {
    color: #999;
}

.description-input.error {
    border-color: #e53935;
}

/* Infinite Rolling Images */
.rolling-images-container {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    overflow: hidden;
    margin-top: 60px;
}

.rolling-images {
    display: flex;
    gap: 8px;
    animation: scroll 60s linear infinite;
}

.rolling-images img {
    width: 250px;
    height: 250px;
    object-fit: cover;
    flex-shrink: 0;
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(var(--scroll-distance, -50%));
    }
}

/* Sample Images Grid */
.sample-grid {
    display: grid;
    grid-template-columns: repeat(5, 250px);
    gap: 5px;
    margin-top: 60px;
}

.sample-item {
    aspect-ratio: 1;
    overflow: hidden;
    background: #f5f5f5;
}

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

/* Personal Info Form - Step 3 */
.form-group {
    display: flex;
    align-items: center;
    margin-bottom: 24px;
    max-width: 700px;
}

.form-label {
    width: 180px;
    font-size: 11px;
    font-weight: 400;
    color: #000;
    flex-shrink: 0;
}

.form-input {
    flex: 1;
    padding: 18px 24px;
    font-size: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.3s;
    background: #fff;
}

.form-input.error,
.form-input.error:focus {
    border-color: #e53935;
}

.form-input:focus {
    border-color: #000;
    background: #fff;
}

.form-input::placeholder {
    color: #999;
}

/* Consent Checkbox */
.consent-wrapper {
    max-width: 700px;
    margin-top: 16px;
}

.consent-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    background: #f5f5f5;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.2s;
}

.consent-box:has(input[type="checkbox"]:checked) {
    border-color: #000;
}

.consent-box.error {
    border-color: #e53935;
}

.consent-box input[type="checkbox"] {
    display: none;
}

.consent-text {
    font-size: 10px;
    color: #666;
    transition: color 0.2s;
}

.consent-box input[type="checkbox"]:checked + .consent-text {
    color: #000;
}

.consent-check {
    width: 24px;
    height: 24px;
    border: 2px solid #ddd;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.consent-box input[type="checkbox"]:checked + .consent-text + .consent-check {
    background: #000;
    border-color: #000;
}

.consent-box input[type="checkbox"]:checked + .consent-text + .consent-check::after {
    content: '✓';
    color: #fff;
    font-size: 8px;
}

/* Completion Page - Step 4 */
.completion-wrapper {
    display: flex;
    gap: 80px;
}

.completion-info {
    flex: 1;
}

.completion-title {
    font-size: 29px;
    font-weight: 400;
    color: #000;
    margin-bottom: 16px;
    white-space: nowrap;
}

.completion-subtitle {
    font-size: 14px;
    color: #666;
    margin-bottom: 40px;
    white-space: nowrap;
}

.info-table {
    width: 100%;
}

.info-row {
    display: flex;
    padding: 20px 0;
    border-bottom: 1px solid #eee;
}

.info-label {
    width: 200px;
    font-size: 14px;
    font-weight: 400;
    color: #000;
}

.info-value {
    font-size: 14px;
    color: #333;
}

.completion-slogan {
    flex: 1;
    min-width: 400px;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
}

.slogan-text {
    font-size: 60px;
    font-weight: 400;
    line-height: 1.1;
    text-align: right;
    color: #000;
    white-space: nowrap;
}

/* Progress Bar Footer */
.progress-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #000;
    padding: 30px 100px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    z-index: 100;
}

/* CSS Progress Steps */
.progress-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    left: 50%;
    bottom: 55px;
    transform: translateX(-50%);
    z-index: 101;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    width: 24px;
}

/* category-radio와 동일한 스타일 */
.progress-circle {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #666;
    background: #000;
    position: relative;
    z-index: 2;
    box-sizing: content-box;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 선: 원에 직접 연결 */
.progress-line-connector {
    width: 240px;
    height: 2px;
    background: #666;
    flex-shrink: 0;
}

.progress-line-connector.completed {
    background: #fff;
}

/* 완료된 단계: 흰색 테두리 + 내부 흰색 원 */
.progress-step.completed .progress-circle {
    border-color: #fff;
}

.progress-step.completed .progress-circle::after {
    content: '';
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #fff;
}

.progress-label {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 12px;
    font-size: 14px;
    color: #666;
    white-space: nowrap;
}

.progress-step.completed .progress-label {
    color: #fff;
}

/* progress-line은 더 이상 사용하지 않음 - pseudo-element로 대체 */
.progress-line {
    display: none;
}

/* Navigation Buttons */
.nav-buttons {
    display: flex;
    gap: 16px;
}

.btn-nav {
    padding: 14px 40px;
    font-size: 14px;
    font-weight: 400;
    border: 1px solid #fff;
    border-radius: 0;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-prev {
    background: transparent;
    color: #fff;
}

.btn-prev:hover {
    background: rgba(255,255,255,0.1);
}

.btn-next {
    background: transparent;
    color: #fff;
}

.btn-next:hover {
    background: #fff;
    color: #000;
}

.btn-done {
    background: #fff;
    color: #000;
    border-color: #fff;
}

.btn-done:hover {
    background: #f0f0f0;
}

/* Responsive */
@media (max-width: 1200px) {
    .consultation-container {
        padding: 120px 50px 200px;
    }
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .sample-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    .progress-footer {
        padding: 24px 50px 24px 20%;
    }
    .progress-line {
        width: 80px;
    }
    .completion-wrapper {
        flex-direction: column;
        gap: 40px;
    }
    .slogan-text {
        font-size: 36px;
        text-align: left;
    }
}

@media (max-width: 768px) {
    .consultation-container {
        padding: 100px 24px 180px;
    }
    .consultation-title {
        font-size: 19px;
    }
    .consultation-subtitle {
        font-size: 10px;
        margin-bottom: 40px;
    }
    .category-grid {
        grid-template-columns: 1fr;
    }
    .form-group {
        flex-direction: column;
        align-items: flex-start;
    }
    .form-label {
        width: 100%;
        margin-bottom: 8px;
    }
    .form-input {
        width: 100%;
    }
    .sample-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }
    .progress-footer {
        padding: 20px 24px;
        flex-direction: column;
        gap: 20px;
        padding-left: 24px;
    }
    .progress-steps {
        width: 100%;
        justify-content: center;
    }
    .progress-line {
        width: 40px;
    }
    .progress-label {
        font-size: 7px;
    }
    .nav-buttons {
        width: 100%;
    }
    .btn-nav {
        flex: 1;
        padding: 12px 20px;
    }
    .slogan-text {
        font-size: 24px;
    }
    .info-row {
        flex-direction: column;
        gap: 8px;
    }
    .info-label {
        width: 100%;
    }
}
