/* Product Detail Page Styles */

/* Section Dividers */
.section-divider {
    border: none;
    border-top: 2px solid #e2e8f0;
    margin: 2rem 0;
}

/* Order Method Section */
.order-method-section {
    text-align: center;
    padding: 2rem 0;
}

.order-method-content {
    color: var(--text-color);
    font-size: 1rem;
    line-height: 1.6;
}

.order-method-wrapper {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}

/* 주문방법 테이블 선 제거 */
.order-method-content table {
    border: none !important;
    border-collapse: collapse;
}

.order-method-content table td,
.order-method-content table th {
    border: none !important;
    border-collapse: collapse;
}

.order-method-content table tr {
    border: none !important;
}

/* Product Detail Info Section */
.product-detail-info-section {
    margin-top: 2rem;
}

/* Section Title Bar */
.section-header {
    margin-bottom: 2rem;
}

.section-title-bar {
    background: transparent;
    color: var(--primary-color);
    padding: 0.75rem 0;
    margin-bottom: 1rem;
    position: relative;
    display: flex;
    align-items: center;
}

.section-title-bar .section-title {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--primary-color);
    border-left: 12px solid var(--primary-color);
}

/* Mark Image Section */
.mark-image-section {
    padding: 1rem 0;
    text-align: left;
}

.mark-image {
    max-width: 200px;
    height: auto;
}

/* Detail Images Section */
.detail-images-section {
    margin: 2rem 0;
}

.detail-img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.detail-img:hover {
    transform: scale(1.05);
}

/* Product Specifications Table */
.product-specifications-table {
    margin-top: 2rem;
}

.spec-note {
    font-size: 1rem;
    font-style: italic;
    font-weight: bold;
    color: #6c757d;
}

/* Hero Section 위치 조정 */
.products-hero-section {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 60vh;
}

/* Product Navigation Section */
.product-navigation-section {
    background: transparent;
    border-bottom: none;
    position: relative;
    z-index: 100;
    /* margin-top: auto; */ /* 히어로 섹션 내에서 아래쪽으로 밀어내기 */
    margin-top: -80px; /* 히어로 섹션 내에서 아래쪽으로 밀어내기 */
}

.product-nav-bar {
    padding: 1rem 0;
}

.nav-breadcrumb {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.nav-btn {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0.5rem 1.2rem;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
}

.nav-btn-all {
    background: rgba(255, 215, 0, 0.2);
    border-color: #FFD700;
    color: #FFD700;
    font-weight: 600;
}

.nav-btn-all:hover {
    background: #FFD700;
    color: #2B4DA0;
}

.nav-separator {
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.2rem;
    font-weight: 300;
}

.nav-dropdown {
    position: relative;
    display: inline-block;
}

.nav-btn-dropdown {
    border: 2px solid rgba(255, 255, 255, 0.4);
}

.nav-btn-dropdown i {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.nav-dropdown.show .nav-btn-dropdown i {
    transform: rotate(180deg);
}

.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    background: #000A55;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.3);
    min-width: max-content;
    max-width: 280px;
}

/* 데스크탑에서 기본 스타일 유지 */
@media (min-width: 769px) {
    .nav-dropdown-menu {
        position: absolute !important;
        left: 50% !important;
        top: 100% !important;
        transform: translateX(-50%) translateY(-10px) !important;
        z-index: 1000 !important;
    }
    
    .nav-dropdown-menu.show {
        opacity: 1 !important;
        visibility: visible !important;
        transform: translateX(-50%) translateY(5px) !important;
    }
}

.nav-dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(5px);
}

.nav-dropdown-item {
    display: block;
    padding: 0.875rem 1.25rem;
    color: #FFFFFF;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    white-space: nowrap;
    font-weight: 500;
    position: relative;
    overflow: hidden;
    background: transparent;
}

.nav-dropdown-item:first-child {
    border-radius: 10px 10px 0 0;
}

.nav-dropdown-item:last-child {
    border-bottom: none;
    border-radius: 0 0 10px 10px;
}

.nav-dropdown-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 0;
    height: 100%;
    background: rgba(255, 215, 0, 0.3);
    transition: width 0.3s ease;
    z-index: -1;
}

.nav-dropdown-item:hover {
    background: rgba(255, 215, 0, 0.2);
    color: #FFD700;
    text-decoration: none;
    transform: translateX(5px);
    font-weight: 600;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.nav-dropdown-item:hover::before {
    width: 100%;
}

/* 스크롤바 스타일링 */
.nav-dropdown-menu::-webkit-scrollbar {
    width: 6px;
}

.nav-dropdown-menu::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.nav-dropdown-menu::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.nav-dropdown-menu::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

.product-detail-section {
    background: white;
    min-height: 70vh;
    margin-top: auto; /* 네비게이션 높이만큼 마이너스 마진 */
}

/* 카테고리 선택 */
.category-selector-container {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.form-label {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.form-select {
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(43, 77, 160, 0.25);
}

/* Breadcrumb */
.breadcrumb {
    background: transparent;
    padding: 0;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: ">";
    color: var(--primary-color);
    font-weight: 600;
}

.breadcrumb-item a {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumb-item a:hover {
    text-decoration: underline;
}

.breadcrumb-item.active {
    color: var(--text-color);
    font-weight: 600;
}

/* Model Selector */
.model-selector {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.model-selector h5 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-weight: 600;
}

.model-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.model-btn {
    background: white;
    border: 2px solid var(--border-color);
    color: var(--text-color);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.model-btn:hover {
    border-color: var(--secondary-color);
    color: var(--primary-color);
    text-decoration: none;
}

.model-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* 제품 상세 컨텐츠 */
.product-detail-content {
    background: transparent;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
}

/* 대분류 헤더 */
.product-category-header {
    text-align: center;
    padding: 2rem 0;
    border-bottom: 2px solid #e2e8f0;
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 1rem;
}

.main-category-title {
    color: #0E23B7 !important;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.category-separator {
    color: #000000;
    font-size: 1.5rem;
    font-weight: 700;
}

.model-title {
    color: #000000;
    font-size: 5rem;
    font-weight: 700;
    margin: 0;
}

.category-title {
    color: var(--primary-color);
    font-size: 2.5rem;
    font-weight: 700;
    display: inline-block;
    padding: 1rem 2rem;
}

/* 제품 이미지 섹션 */
.product-image-section {
    text-align: center;
}

.sub-category-name h5 {
    margin: 0;
    font-weight: 500;
    color: #2b4da0 !important;
}

.product-main-img {
    max-width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

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

/* 제품 설계사양 */
.spec-content {
    color: var(--text-color);
    font-size: 0.85rem;
    line-height: 1.8;
}

/* 제품 구조 이미지 */
.product-structure-section {
    margin-top: 3rem;
}


.structure-images {
    background: #f8fafc;
    padding: 2rem;
    border-radius: 15px;
}

.structure-img {
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 1rem;
    background: white;
    transition: all 0.3s ease;
}

.structure-img:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* 제품 규격표 */
.product-specifications-table {
    margin-top: 3rem;
}


.specifications-table {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.specifications-table th,
.specifications-table td {
    padding: 1rem;
    text-align: center;
    border: 1px solid #e2e8f0;
    vertical-align: middle;
}

/* 헤더 영역 경계선 강화 */
.specifications-table thead th {
    border: 1px solid #ffffff !important;
    position: relative;
}

.specifications-table .table-header {
    background: var(--primary-color);
    color: white;
    font-weight: 600;
}

.specifications-table .table-header th {
    background: var(--primary-color) !important;
    color: white !important;
    font-weight: 600 !important;
    border: 1px solid #ffffff !important;
    border-collapse: separate !important;
}

/* 테이블 경계선 분리 모드 */
.specifications-table {
    border-collapse: separate !important;
    border-spacing: 0 !important;
}

/* Bootstrap 테이블 스타일 오버라이드 */
.table-bordered .table-header th,
.table-bordered thead th,
.specifications-table thead tr.table-header th {
    border: 1px solid #ffffff !important;
    background: var(--primary-color) !important;
    color: white !important;
    font-weight: 600 !important;
}

/* 추가 보정 - 모든 헤더 셀에 강제 적용 */
.product-specifications-table .table-header th {
    border-left: 1px solid #ffffff !important;
    border-right: 1px solid #ffffff !important;
    border-top: 1px solid #ffffff !important;
    border-bottom: 1px solid #ffffff !important;
    background-color: var(--primary-color) !important;
}

.specifications-table tbody tr:nth-child(even) {
    background: #f8fafc;
}

.specifications-table tbody tr:hover {
    background: #e2e8f0;
}

/* Product Info Sections */
.info-section {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1.5rem;
}

.info-section:last-child {
    border-bottom: none;
}

.info-section h4 {
    color: var(--primary-color);
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.spec-content {
    color: var(--text-color);
    line-height: 1.6;
}

.cert-content p {
    color: var(--text-color);
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

/* Order Section */
.order-section {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 10px;
    border-left: 4px solid var(--primary-color);
}

.order-section h4 {
    color: var(--primary-color);
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.order-info {
    background: white;
    padding: 1rem;
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.order-info p {
    color: var(--primary-color);
    font-weight: 600;
    margin: 0;
    font-family: monospace;
    font-size: 1.1rem;
}

/* Product Specs */
.product-specs h4 {
    color: var(--primary-color);
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.specs-icons {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.cert-icon {
    height: 40px;
    width: auto;
}

/* Product Image Section */
.product-image-section {
    text-align: center;
}


.main-product-image img {
    max-width: 100%;
    height: auto;
}

.product-thumbnails {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

.thumbnail {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    border: 2px solid var(--border-color);
    cursor: pointer;
    transition: all 0.3s ease;
}

.thumbnail:hover,
.thumbnail.active {
    border-color: var(--primary-color);
}

.inquiry-btn-section .btn {
    font-weight: 600;
    padding: 1rem;
}

/* Specifications Table */
.specifications-table {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.specifications-table h4 {
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .product-navigation-section {
        margin-top: -60px;
        padding: 0 1rem;
    }
    
    .nav-dropdown {
        position: relative;
    }
    
    /* 주문방법 모바일 최적화 */
    .order-method-wrapper {
        transform: scale(0.75);
        transform-origin: center;
        white-space: nowrap;
        overflow-x: auto;
        padding: 1rem 0;
    }
    
    .order-method-wrapper > div {
        white-space: nowrap !important;
        min-width: max-content;
    }
    
    .product-nav-bar {
        padding: 1rem 0;
    }
    
    .nav-breadcrumb {
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 0.3rem;
        justify-content: flex-start;
        overflow-x: auto;
        padding: 0 0.5rem;
        -webkit-overflow-scrolling: touch;
    }
    
    .nav-btn {
        padding: 0.5rem 0.6rem;
        font-size: 0.75rem;
        min-width: 85px;
        justify-content: center;
        flex: 0 0 auto;
        white-space: nowrap;
        text-overflow: ellipsis;
        overflow: hidden;
        -webkit-tap-highlight-color: rgba(255, 255, 255, 0.3);
        cursor: pointer;
        user-select: none;
    }
    
    .nav-btn-all {
        flex: 0 0 auto;
        min-width: 60px;
        font-size: 0.7rem;
    }
    
    .nav-separator {
        display: none;
    }
    
    .nav-dropdown-menu {
        min-width: 200px;
        max-width: 85vw;
        left: 0;
        top: calc(100% + 10px);
        transform: translateX(0);
        position: fixed !important;
        z-index: 99999 !important;
        background: #000A55 !important;
        border: 1px solid rgba(255, 255, 255, 0.3) !important;
        border-radius: 12px !important;
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25) !important;
        max-height: 300px;
        overflow-y: auto;
    }
    
    .nav-dropdown-menu.show {
        opacity: 1 !important;
        visibility: visible !important;
        transform: translateX(0) !important;
        display: block !important;
        background: #000A55 !important;
        position: fixed !important;
        z-index: 99999 !important;
    }
    
    .nav-dropdown-item {
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
        color: #ffffff !important;
        background: transparent !important;
    }
    
    .nav-dropdown-item:hover {
        background: rgba(255, 255, 255, 0.2) !important;
        color: #ffffff !important;
    }
    
    .nav-dropdown-item:hover {
        transform: translateX(8px);
    }
    
    .category-tabs .nav-link {
        font-size: 0.9rem;
        padding: 0.5rem 1rem;
        margin: 0.25rem;
    }
    
    .model-buttons {
        justify-content: center;
    }
    
    .product-detail-content {
        padding: 1.5rem;
    }
    
    .product-title {
        font-size: 1.5rem;
    }
    
    /* 모바일에서 제품 카테고리 헤더 세로 정렬 */
    .product-category-header {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
        padding: 1.5rem 0;
    }
    
    .main-category-title {
        font-size: 1.2rem;
    }
    
    .model-title {
        font-size: 2.5rem;
    }
    
    .category-separator {
        display: none;
    }
    
    .product-image-section {
        position: static;
        margin-top: 2rem;
    }
    
    .specs-icons {
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .product-navigation-section {
        margin-top: -50px;
        padding: 0 0.5rem;
    }
    
    .nav-dropdown {
        position: relative;
    }
    
    /* 주문방법 소형 모바일 최적화 */
    .order-method-wrapper {
        transform: scale(0.65) !important;
        transform-origin: center;
        white-space: nowrap !important;
        overflow-x: auto;
        padding: 0.5rem 0;
    }
    
    .order-method-wrapper * {
        white-space: nowrap !important;
    }
    
    .product-nav-bar {
        padding: 0.75rem 0;
    }
    
    .nav-breadcrumb {
        gap: 0.2rem;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding: 0 0.25rem;
        justify-content: flex-start;
        -webkit-overflow-scrolling: touch;
    }
    
    .nav-btn {
        padding: 0.4rem 0.5rem;
        font-size: 0.7rem;
        min-width: 75px;
        flex: 0 0 auto;
        white-space: nowrap;
        text-overflow: ellipsis;
        overflow: hidden;
        -webkit-tap-highlight-color: rgba(255, 255, 255, 0.3);
        cursor: pointer;
        user-select: none;
    }
    
    .nav-btn-all {
        min-width: 55px;
        font-size: 0.65rem;
        flex: 0 0 auto;
    }
    
    .nav-dropdown-menu {
        min-width: 180px;
        width: 200px;
        font-size: 0.8rem;
        position: fixed !important;
        z-index: 99999 !important;
        background: #000A55 !important;
        border: 1px solid rgba(255, 255, 255, 0.3) !important;
        border-radius: 12px !important;
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25) !important;
        max-height: 250px;
        overflow-y: auto;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: all 0.3s ease;
    }
    
    .nav-dropdown-menu.show {
        opacity: 1 !important;
        visibility: visible !important;
        transform: translateY(0) !important;
        display: block !important;
        background: #000A55 !important;
    }
    
    .nav-dropdown-item {
        padding: 0.75rem 1rem;
        font-size: 0.8rem;
        color: #ffffff !important;
        background: transparent !important;
    }
    
    .nav-dropdown-item:hover {
        background: rgba(255, 255, 255, 0.2) !important;
        color: #ffffff !important;
    }
    
    .category-tabs {
        flex-direction: column;
    }
    
    .category-tabs .nav-link {
        margin: 0.25rem 0;
        text-align: center;
    }
    
    .model-buttons {
        flex-direction: column;
    }
    
    .model-btn {
        text-align: center;
    }
    
    .product-detail-content {
        padding: 1rem;
    }
    
    /* 소형 모바일에서 제품 카테고리 헤더 추가 최적화 */
    .product-category-header {
        padding: 1rem 0;
        gap: 0.3rem;
    }
    
    .main-category-title {
        font-size: 1rem;
    }
    
    .model-title {
        font-size: 2rem;
    }
    
    .product-image-section {
        padding: 1rem;
    }
    
    .specifications-table {
        padding: 1rem;
    }
}