/**
 * Universal Product Page Styling
 * Untuk halaman produk Sheet Metal Fabrication dan Steel Fabrication
 * Author: FMG Elgisa V2 Theme
 */

/* ==================== CONTAINER ==================== */
.product-page-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ==================== HEADER ==================== */
.product-page-header {
    text-align: center;
    margin-bottom: 40px;
}

.product-page-header h1 {
    font-size: 48px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 20px 0;
    letter-spacing: -0.5px;
}

.product-page-header .breadcrumb {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
}

.product-page-header .breadcrumb a {
    color: #ff3333;
    text-decoration: none;
}

.product-page-header .breadcrumb a:hover {
    text-decoration: underline;
}

/* ==================== TABS NAVIGATION ==================== */
.product-tabs-navigation {
    display: flex;
    width: 100%;
    gap: 0;
    margin: 40px 0;
    padding: 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Override for 2 tabs */
.product-tabs-navigation:has(.product-tab-btn:nth-child(2):last-child) .product-tab-btn {
    flex: 1;
}

/* Override for 3 tabs */
.product-tabs-navigation:has(.product-tab-btn:nth-child(3):last-child) .product-tab-btn {
    flex: 1;
}

/* Override for 4+ tabs */
.product-tabs-navigation:has(.product-tab-btn:nth-child(4)) .product-tab-btn {
    flex: 1;
}

.product-tab-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    padding: 18px 20px;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    background: white;
    border: none;
    border-right: 1px solid #ddd;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    min-height: 60px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.product-tab-btn:last-child {
    border-right: none;
}

/* Ensure ellipsis works properly */
.product-tab-btn span,
.product-tab-btn {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-tab-btn:hover {
    background: #ff3333;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 51, 51, 0.3);
}

.product-tab-btn.active {
    background: #ff3333;
    color: white;
    box-shadow: 0 4px 12px rgba(255, 51, 51, 0.4);
}

/* ==================== TAB CONTENT ==================== */
.product-tab-content {
    display: none;
    animation: fadeIn 0.5s ease;
}

.product-tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==================== PRODUCT SECTION ==================== */
.product-section {
    margin: 50px 0;
    padding: 40px 0;
    border-bottom: 1px solid #e5e7eb;
}

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

.product-section.alternate-bg {
    background: #fafbfc;
    padding: 50px 30px;
    margin-left: -30px;
    margin-right: -30px;
    border-radius: 12px;
}

/* ==================== TYPOGRAPHY ==================== */
.product-section h2 {
    font-size: 36px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 15px 0;
    line-height: 1.3;
}

.product-section h3 {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin: 35px 0 20px 0;
    padding-top: 20px;
}

.product-section p {
    font-size: 16px;
    line-height: 1.8;
    color: #444;
    margin: 0 0 20px 0;
    text-align: justify;
}

.product-section p strong {
    color: #1a1a1a;
    font-weight: 600;
    font-size: 18px;
}

/* ==================== PRODUCT IMAGES ==================== */
.product-images {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.product-image-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-image-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.product-image-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

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

.product-image-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: white;
    padding: 20px 15px 15px;
    font-size: 14px;
    text-align: center;
}

/* ==================== FEATURES LIST ==================== */
.product-features-list,
.product-section ul {
    list-style: none;
    padding: 0;
    margin: 25px 0;
}

.product-features-list li,
.product-section ul li {
    padding: 18px 20px 18px 25px;
    margin: 15px 0;
    position: relative;
    font-size: 16px;
    line-height: 1.8;
    color: #444;
    background: #f8f9fa;
    border-left: 4px solid #ff3333;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.product-features-list li:hover,
.product-section ul li:hover {
    background: #ffe8e8;
    border-left-color: #cc0000;
    transform: translateX(8px);
    box-shadow: 0 2px 8px rgba(255, 51, 51, 0.1);
}

.product-features-list li strong,
.product-section ul li strong {
    color: #ff3333;
    display: block;
    margin-bottom: 6px;
    font-size: 17px;
}

.product-features-list li::before,
.product-section ul li::before {
    content: "✓";
    position: absolute;
    left: -15px;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    background: #ff3333;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 16px;
}

/* ==================== SPECIFICATIONS TABLE ==================== */
.product-specs-table {
    width: 100%;
    margin: 30px 0;
    border-collapse: collapse;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.product-specs-table th,
.product-specs-table td {
    padding: 15px 20px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.product-specs-table th {
    background: #ff3333;
    color: white;
    font-weight: 600;
    font-size: 16px;
}

.product-specs-table tr:nth-child(even) {
    background: #f8f9fa;
}

.product-specs-table tr:hover {
    background: #ffe8e8;
}

/* ==================== CALL TO ACTION ==================== */
.product-cta {
    text-align: center;
    margin: 50px 0;
    padding: 40px 20px;
    background: linear-gradient(135deg, #ff3333 0%, #cc0000 100%);
    border-radius: 12px;
    color: white;
}

.product-cta h3 {
    font-size: 28px;
    margin: 0 0 15px 0;
    color: white;
}

.product-cta p {
    font-size: 18px;
    margin: 0 0 25px 0;
    color: rgba(255, 255, 255, 0.9);
}

.product-cta-button {
    display: inline-block;
    padding: 15px 40px;
    background: white;
    color: #ff3333;
    font-size: 18px;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.product-cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

/* ==================== RESPONSIVE DESIGN ==================== */
@media (max-width: 768px) {
    .product-page-wrapper {
        padding: 30px 15px;
    }

    .product-page-header h1 {
        font-size: 32px;
    }

    .product-tabs-navigation {
        flex-direction: column;
        gap: 0;
    }

    .product-tab-btn {
        flex: none;
        border-right: none;
        border-bottom: 1px solid #ddd;
    }

    .product-tab-btn:last-child {
        border-bottom: none;
    }

    .product-section h2 {
        font-size: 28px;
    }

    .product-section h3 {
        font-size: 22px;
    }

    .product-section.alternate-bg {
        margin-left: -15px;
        margin-right: -15px;
        padding: 30px 15px;
    }

    .product-images {
        grid-template-columns: 1fr;
    }

    .product-specs-table {
        font-size: 14px;
    }

    .product-specs-table th,
    .product-specs-table td {
        padding: 10px 12px;
    }

    .product-cta h3 {
        font-size: 24px;
    }

    .product-cta p {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .product-page-header h1 {
        font-size: 28px;
    }

    .product-section h2 {
        font-size: 24px;
    }

    .product-tab-btn {
        font-size: 14px;
        padding: 10px 20px;
    }
}

/* ==================== FLATMASTER LAYOUT ==================== */
.flatmaster-images-container {
    display: flex !important;
    gap: 20px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.flatmaster-image-item {
    flex: 1;
    min-width: 300px;
}

.flatmaster-image-item img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

@media (max-width: 768px) {
    .flatmaster-images-container {
        flex-direction: column;
    }

    .flatmaster-image-item {
        min-width: 100%;
    }
}

/* ==================== PRINT STYLES ==================== */
@media print {
    .product-tabs-navigation {
        display: none;
    }

    .product-tab-content {
        display: block !important;
    }

    .product-cta {
        display: none;
    }
}