/**
 * 스티커 컴팩트 페이지 전용 CSS
 * 명함 시스템 기반으로 스티커용 최적화
 * Created: 2025년 12월 (AI Assistant - Frontend Persona)
 */

/* 스티커 전용 컨테이너 배경 (공통 레이아웃 유지) */
.compact-container {
    /* background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%); */
    margin-top: 0;
    padding-top: 0;
    gap: 0;
}

/* 스티커 상세 설명 섹션 (공통 1200px 폭 적용) */
.sticker-detail-combined {
    max-width: 1200px;
    margin: 7.5px auto;
    padding: 25px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
}

/* 갤러리 타이틀 - 스티커 전용 스타일 유지 */
.gallery-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 20px;
    text-align: center;
    padding-bottom: 15px;
    border-bottom: 2px solid #e74c3c;
}

#stickerGallery {
    min-height: 0;
    height: auto;
}

.loading {
    text-align: center;
    padding: 50px 20px;
    color: #7f8c8d;
    font-size: 1.1rem;
}

.calculator-header {
    display: none;
}

.calculator-header h3 {
    display: none;
}

/* 옵션 그리드 */
.options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 25px;
}

.option-group {
    display: flex;
    flex-direction: column;
}

.option-group.full-width {
    grid-column: 1 / -1;
}

.option-label {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.option-select, .option-input {
    padding: 12px 15px;
    border: 2px solid #e0e6ed;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    transition: all 0.3s ease;
    font-weight: 500;
}

.option-select:focus, .option-input:focus {
    outline: none;
    border-color: #e74c3c;
}

.option-select:hover, .option-input:hover {
    border-color: #bdc3c7;
}

/* 가격 표시 - 자동 계산 */
.price-display {
    background: linear-gradient(135deg, #e0e0e0 0%, #d0d0d0 100%);
    color: #333;
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 25px;
    position: relative;
    overflow: hidden;
}

.price-display.calculated {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    animation: priceGlow 2s ease-in-out infinite alternate;
}

@keyframes priceGlow {
    0% { opacity: 0.9; }
    100% { opacity: 1; }
}

.price-label {
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 5px;
    font-weight: 500;
}

.price-amount {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.price-details {
    font-size: 0.9rem;
    opacity: 0.8;
    font-weight: 400;
}

/* 업로드 및 주문 버튼 */
.upload-order-button {
    text-align: center;
}

/* .btn-upload-order 스타일은 common-styles.css에서 통합 관리 (SSOT) */

/* 업로드 모달 스타일 */
.upload-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: white;
    border-radius: 15px;
    padding: 0;
    max-width: 900px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #eee;
    background: #f8f9fa;
    border-radius: 15px 15px 0 0;
}

.modal-title {
    margin: 0;
    color: #2c3e50;
    font-size: 1.3rem;
    font-weight: 700;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #7f8c8d;
    padding: 5px;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: #e74c3c;
    color: #333;
}

.modal-body {
    padding: 25px;
}

.upload-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

.upload-label {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 10px;
    display: block;
    font-size: 1rem;
}

.upload-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.btn-upload-method {
    padding: 10px 15px;
    border: 2px solid #e0e6ed;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.btn-upload-method.active {
    background: #e74c3c;
    color: #333;
    border-color: #e74c3c;
}

.btn-upload-method:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.upload-area {
    margin-bottom: 15px;
}

.upload-dropzone {
    border: 2px dashed #bdc3c7;
    border-radius: 8px;
    padding: 30px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.upload-dropzone:hover {
    border-color: #e74c3c;
    background: #fff5f5;
}

.upload-dropzone.dragover {
    border-color: #e74c3c;
    background: #fff5f5;
    transform: scale(1.02);
}

.upload-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 10px;
}

.upload-text {
    color: #7f8c8d;
    font-size: 0.95rem;
}

.upload-info {
    font-size: 0.85rem;
    color: #95a5a6;
    line-height: 1.4;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 5px;
}

.memo-textarea {
    width: 100%;
    height: 120px;
    padding: 12px;
    border: 2px solid #e0e6ed;
    border-radius: 8px;
    font-size: 0.95rem;
    resize: vertical;
    font-family: inherit;
}

.memo-textarea:focus {
    outline: none;
    border-color: #e74c3c;
}

.upload-notice {
    margin-top: 15px;
}

.notice-item {
    background: #fff3cd;
    color: #856404;
    padding: 8px 12px;
    border-radius: 5px;
    margin-bottom: 8px;
    font-size: 0.85rem;
    border-left: 4px solid #ffc107;
}

.modal-footer {
    padding: 20px 25px;
    border-top: 1px solid #eee;
    text-align: center;
    background: #f8f9fa;
    border-radius: 0 0 15px 15px;
}

.modal-btn {
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-cart {
    background: #27ae60;
    color: #333;
}

.btn-cart:hover {
    background: #219a52;
    transform: translateY(-1px);
}

/* 업로드된 파일 리스트 */
.uploaded-files {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.uploaded-files h5 {
    margin: 0 0 10px 0;
    color: #2c3e50;
    font-size: 1rem;
}

.file-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: white;
    border-radius: 5px;
    border: 1px solid #e0e6ed;
}

.file-name {
    font-size: 0.9rem;
    color: #2c3e50;
}

.file-size {
    font-size: 0.8rem;
    color: #7f8c8d;
}

.file-remove {
    background: #e74c3c;
    color: #333;
    border: none;
    border-radius: 3px;
    padding: 2px 6px;
    font-size: 0.7rem;
    cursor: pointer;
}

/* 반응형 디자인 */
@media (max-width: 1200px) {
    .main-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .gallery-section {
        position: static;
    }
}

@media (max-width: 768px) {
    .compact-container {
        padding: 15px;
    }
    
    .options-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .upload-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .modal-content {
        width: 95%;
        margin: 10px;
    }
    
    .page-title h1 {
        font-size: 1.8rem;
    }
    
    .price-amount {
        font-size: 1.6rem;
    }
}

/* 명함 갤러리 방식 스타일 - 큰 이미지 + 작은 이미지들 */
.gallery-main-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 20px 0;
}

/* 큰 이미지 (메인) */
.gallery-main-image {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f8f9fa;
    height: 300px;
}

.gallery-main-image:hover {
    transform: translateY(-3px);
}

.gallery-main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.3s ease;
}

.gallery-main-image:hover img {
    transform: scale(1.05);
}

/* 작은 이미지들 (썸네일) */
.gallery-thumbnails {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.gallery-thumbnail {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f8f9fa;
    aspect-ratio: 1;
}

.gallery-thumbnail:hover {
    transform: translateY(-2px);
}

.gallery-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.3s ease;
}

.gallery-thumbnail:hover img {
    transform: scale(1.1);
}

/* 오버레이 스타일 */
.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(231, 76, 60, 0.8), rgba(192, 57, 43, 0.8));
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    font-weight: 600;
    font-size: 1rem;
}

.gallery-main-image:hover .gallery-overlay {
    opacity: 1;
}

.thumbnail-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(52, 152, 219, 0.8), rgba(41, 128, 185, 0.8));
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    font-weight: 600;
    font-size: 1.2rem;
}

.gallery-thumbnail:hover .thumbnail-overlay {
    opacity: 1;
}

/* 반응형 디자인 - 썸네일 */
@media (max-width: 768px) {
    .gallery-main-image {
        height: 250px;
    }
    
    .gallery-thumbnails {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .gallery-overlay,
    .thumbnail-overlay {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .gallery-main-image {
        height: 200px;
    }
    
    .gallery-thumbnails {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }
}