/* 제품소개형 게시판 스타일 */

/* 컨테이너 */
.board-product-container {
    max-width: var(--site-width);
    margin: 0 auto;
    padding: 20px;
}

/* 제품 그리드 */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin: 20px 0;
}

/* 제품 아이템 */
.product-item {
    transition: transform 0.3s ease;
}

.product-item:hover {
    transform: translateY(-5px);
}

.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.product-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.product-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

/* 제품 이미지 */
.product-image {
    position: relative;
    width: 100%;
    padding-top: 100%; /* 1:1 비율 */
    overflow: hidden;
    background: #f8f9fa;
}

.product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.no-image-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
    color: #9e9e9e;
    font-size: 48px;
}

/* 제품 정보 */
.product-info {
    padding: 20px;
}

.product-title {
    font-size: 16px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 8px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-subtitle {
    font-size: 14px;
    color: #6c757d;
    margin: 0 0 12px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-spec {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #495057;
    margin-bottom: 12px;
}

.product-spec i {
    color: #6c757d;
}

/* 가격 영역 */
.product-price-wrap {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e9ecef;
}

.product-price-original {
    font-size: 13px;
    color: #6c757d;
    text-decoration: line-through;
    margin-bottom: 4px;
}

.product-price-sale {
    display: flex;
    align-items: center;
    gap: 8px;
}

.product-price-sale .price {
    font-size: 18px;
    font-weight: 700;
    color: #e74c3c;
}

.product-price-sale .discount {
    display: inline-block;
    padding: 3px 8px;
    background: #e74c3c;
    color: white;
    font-size: 12px;
    font-weight: 700;
    border-radius: 4px;
}

/* 제품 상세보기 */
.product-view {
    max-width: var(--site-width);
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    overflow: hidden;
}

.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding: 40px;
}

/* 제품 갤러리 */
.product-gallery {
    position: sticky;
    top: 20px;
}

.product-main-image {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    background: #f8f9fa;
    margin-bottom: 15px;
}

.product-main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: zoom-in;
}

.no-image-large {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
    color: #9e9e9e;
}

.no-image-large i {
    font-size: 64px;
    margin-bottom: 10px;
}

/* 썸네일 슬라이더 */
.product-thumbnail-slider {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
}

.slider-btn {
    width: 32px;
    height: 32px;
    border: 1px solid #dee2e6;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    flex-shrink: 0;
}

.slider-btn:hover {
    background: #3498db;
    border-color: #3498db;
    color: white;
}

.thumbnail-container {
    flex: 1;
    overflow: hidden;
}

.thumbnail-track {
    display: flex;
    gap: 10px;
    transition: transform 0.3s ease;
}

.thumbnail-item {
    width: 100px;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s;
    flex-shrink: 0;
}

.thumbnail-item:hover {
    border-color: #3498db;
}

.thumbnail-item.active {
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.thumbnail-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 제품 요약 정보 */
.product-summary {
    display: flex;
    flex-direction: column;
}

.product-category {
    margin-bottom: 10px;
}

.product-view-title {
    font-size: 28px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 10px 0;
    line-height: 1.3;
}

.product-view-subtitle {
    font-size: 16px;
    color: #6c757d;
    margin: 0 0 30px 0;
    line-height: 1.5;
}

/* 제품 정보 테이블 */
.product-info-table {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
}

.info-row {
    display: flex;
    border-bottom: 1px solid #dee2e6;
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    flex: 0 0 140px;
    padding: 15px 20px;
    background: #f8f9fa;
    font-weight: 600;
    color: #495057;
    display: flex;
    align-items: center;
    gap: 8px;
    border-right: 1px solid #dee2e6;
}

.info-value {
    flex: 1;
    padding: 15px 20px;
    color: #212529;
}

/* 가격 행 */
.price-row .info-value {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.price-original {
    font-size: 16px;
    color: #6c757d;
    text-decoration: line-through;
}

.price-sale {
    display: flex;
    align-items: center;
    gap: 10px;
}

.price-amount {
    font-size: 24px;
    font-weight: 700;
    color: #e74c3c;
}

.price-discount {
    display: inline-block;
    padding: 4px 10px;
    background: #e74c3c;
    color: white;
    font-size: 14px;
    font-weight: 700;
    border-radius: 4px;
}

/* 공유 버튼 */
.product-share {
    margin-top: auto;
    padding-top: 20px;
}

.btn-share {
    width: 100%;
    padding: 15px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    font-weight: 600;
    color: #495057;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-share:hover {
    background: #3498db;
    border-color: #3498db;
    color: white;
}

/* 탭 메뉴 */
.product-tabs {
    border-top: 1px solid #e9ecef;
}

.tab-menu {
    display: flex;
    border-bottom: 2px solid #e9ecef;
    padding: 0 40px;
}

.tab-btn {
    padding: 15px 25px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 16px;
    font-weight: 600;
    color: #6c757d;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: -2px;
}

.tab-btn:hover {
    color: #3498db;
}

.tab-btn.active {
    color: #3498db;
    border-bottom-color: #3498db;
}

.tab-content {
    padding: 40px;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

.product-content {
    font-size: 16px;
    line-height: 1.8;
    color: #495057;
}

.product-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
}

.product-content p {
    margin-bottom: 15px;
}

/* 리스트 헤더 */
.list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    margin-bottom: 20px;
}

.total-count {
    font-weight: 600;
    color: #495057;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: #6c757d;
}

.empty-state i {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 18px;
    font-weight: 500;
    margin: 0;
}

/* 반응형 */
@media (max-width: 992px) {
    .product-detail {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 30px;
    }
    
    .product-gallery {
        position: relative;
        top: 0;
    }
}

@media (max-width: 768px) {
    .board-product-container {
        padding: 15px;
    }
    
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .product-info {
        padding: 15px;
    }
    
    .product-title {
        font-size: 14px;
    }
    
    .product-subtitle {
        font-size: 13px;
    }
    
    .product-price-sale .price {
        font-size: 16px;
    }
    
    .product-detail {
        padding: 20px;
    }
    
    .product-view-title {
        font-size: 22px;
    }
    
    .info-label {
        flex: 0 0 100px;
        font-size: 14px;
        padding: 12px 15px;
    }
    
    .info-value {
        font-size: 14px;
        padding: 12px 15px;
    }
    
    .tab-content {
        padding: 20px;
    }
    
    .thumbnail-item {
        width: 80px;
        height: 80px;
    }
}

@media (max-width: 480px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .slider-btn {
        width: 28px;
        height: 28px;
    }
    
    .thumbnail-item {
        width: 60px;
        height: 60px;
    }
}
