/* 제품소개형 게시판 스타일 */

/* Alert 메시지 스타일 */
.board-container .alert {
    padding: 15px 50px 15px 20px;
    margin-bottom: 25px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: 15px;
    line-height: 1.6;
    position: relative;
    display: block;
    width: 100%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.board-container .alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
    border-left: 4px solid #28a745;
}

.board-container .alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
    border-left: 4px solid #dc3545;
}

.board-container .alert .close {
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    padding: 0;
    color: inherit;
    opacity: 0.6;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s;
}

.board-container .alert .close:hover {
    opacity: 1;
}

.board-container .alert .close span {
    display: block;
    font-weight: bold;
}

.board-container .alert i {
    margin-right: 10px;
    font-size: 16px;
}

/* 컨테이너 */
.board-product-container {
    max-width: var(--site-width);
    margin: 0 auto;
    padding: 20px;
}

/* 제품 그리드 */
.product-grid {
    display: grid;
    gap: 25px;
    margin: 20px 0;
    /* grid-template-columns는 list.php에서 스킨 옵션에 따라 동적으로 설정됨 */
}

/* 제품 아이템 */
.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;
    border:#ddd solid 1px;
    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: 18px;
    font-weight: 700;
    letter-spacing: -1px;
    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: 14px;
    color: #495057;
    margin-bottom: 12px;
}

.product-spec i {
    color: #777;
}

/* 가격 영역 */
.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: 17px;
    font-weight: 600;
    color: #444;
}

.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;
    overflow: hidden;
}

.product-detail {
    display: grid;
    grid-template-columns: 500px 1fr;
    gap: 40px;
    padding: 0px;
}

/* 제품 갤러리 */
.product-gallery {
    position: sticky;
    top: 20px;
}

.product-main-image {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    background: #f8f9fa;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    position: relative;
}

.product-main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.3s ease;
    display: block;
}

.product-main-image:hover img {
    transform: scale(1.02);
}

.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;
    color: #333;
    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: 18px;
    font-weight: 600;
    color: #111;
}

.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;
    }
}

/* 제품 썸네일 리스트 */
.product-thumbnail-list {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.product-thumbnail-list .thumbnail-item {
    width: 80px;
    height: 80px;
    border: 2px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s;
    flex-shrink: 0;
    background: #f8f9fa;
}

.product-thumbnail-list .thumbnail-item:hover {
    border-color: #3498db;
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
}

.product-thumbnail-list .thumbnail-item.active {
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.3);
}

.product-thumbnail-list .thumbnail-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* 제품 섹션 */
.product-youtube-section,
.product-content-section,
.product-ingredients-section {
    margin-top: 20px;
    padding-top: 20px;
}

.section-title {
    font-size: 24px;
    font-weight: 700;
    color: #2c3e50;
    text-align:left !important;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #4498db;
}

.section-title:after {
    content: '';
    position: absolute;
    bottom: -18px;
    left: 0%;
    transform: translateX(-50%);
    width: 0px;
    height: 3px;
    background: #fff;
}

.product-content-section img {margin:20px auto !important;max-width: 90%;}

.product-content-section h1 {margin:20px 0;}
.product-content-section h2 {font-size:24px !important;letter-spacing:-1px;margin:20px 0;color:#4c8dd0;}

.product-ingredients {
    font-size: 16px;
    line-height: 1.8;
    color: #333;
    padding-bottom:20px;
}

.post-actions {justify-content: right;border-top:#ccc solid 1px;}

/* SNS 공유 섹션 (웹진형 스타일) */
.sns-share-section {
    padding: 20px 30px;
    background: #f8f9fa;
    border-top: 1px solid #ddd;
    margin-top: 40px;
}

.sns-share-section h3 {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sns-icons {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.sns-icon {
    display: inline-block;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.sns-icon:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.sns-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@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: 16px !important;letter-spacing: -1px;line-height: 24px;height:26px;overflow: hidden;
    }
    
    .sns-share-section {
        padding: 20px 15px;
    }
    
    .sns-share-section h3 {
        font-size: 16px !important;
        margin-bottom: 12px;
    }
    
    .sns-icons {
        gap: 6px;
    }
    
    .sns-icon {
        width: 36px;
        height: 36px;
    }
    
    .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;
    }

    .info-label {
        flex: 0 0 120px;
        padding: 10px 12px;
        background: #f8f9fa;
        color: #333;
        display: flex;
        align-items: center;
        gap: 8px;
        border-right: 1px solid #dee2e6;
    }

    .info-value {
        flex: 1;
        padding: 10px 12px;
        color: #212529;
    }    

    .product-content-section img {margin:20px auto !important;max-width: 100% !important;}

    .product-content-section h1 {font-size:24px !important;margin:20px 0;line-height: 32px !important;letter-spacing: -1px;color:#d81616 !important;}
    .product-content-section h2 {font-size:20px !important;letter-spacing:-1px;margin:20px 0;color:#4c8dd0;line-height: 26px !important;}    
}

@media (max-width: 480px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .slider-btn {
        width: 28px;
        height: 28px;
    }
    
    .thumbnail-item {
        width: 60px;
        height: 60px;
    }
}
