/* Products Page Styles */

.products-hero-section {
    background-color: #193B7B;
    color: #fff;
    padding-top: 120px; /* Space for header */
    padding-bottom: 0; /* Flush with bottom */
    position: relative;
    overflow: hidden;
    min-height: 80vh; /* Make it substantial */
    display: flex;
    flex-direction: column;
    font-family: var(--font-main);
}

.products-container {
    display: flex;
    max-width: 1440px;
    width: 100%; /* Ensure full width */
    margin: 0 auto;
    padding: 0 40px;
    position: relative;
    z-index: 2;
    flex-grow: 1;
    min-height: 600px;
    justify-content: space-between; /* Fix shifting: sidebar left, content right */
}

/* Sidebar */
.products-sidebar {
    width: 300px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* Align to top to prevent jumping */
    padding-top: 80px; /* Consistent top spacing */
    gap: 40px;
    /* border-right removed */
    padding-right: 40px;
    z-index: 10; /* Above grid floor */
}

.products-nav-list {
    display: flex;
    flex-direction: column;
    gap: 30px; /* Increased gap */
}

.product-cat-btn {
    display: flex;
    align-items: center;
    gap: 16px; /* Reduced gap */
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    padding: 0;
    border-radius: 0;
}

.product-cat-btn:hover,
.product-cat-btn.active {
    color: #fff;
    background: none; /* Remove background on hover/active */
}

.product-cat-icon-box {
    width: 56px; /* Further reduced */
    height: 56px; /* Further reduced */
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px; /* Proportional radius */
    border: 1px solid transparent;
    background: transparent;
    transition: all 0.3s ease;
    flex-shrink: 0; /* Prevent shrinking */
}

.product-cat-btn.active .product-cat-icon-box {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: none; /* Removed shadow per request */
}

.product-cat-icon {
    width: 28px; /* Further reduced */
    height: 28px; /* Further reduced */
    object-fit: contain;
    filter: brightness(0) invert(1); /* Make white */
    opacity: 0.4;
    transition: all 0.3s ease;
}

.product-cat-btn:hover .product-cat-icon,
.product-cat-btn.active .product-cat-icon {
    opacity: 1;
}

.product-cat-name {
    font-size: 16px; /* Further reduced */
    font-weight: 500;
    transition: all 0.3s ease;
    font-family: var(--font-main) !important; /* Force font */
}

.product-cat-btn.active .product-cat-name {
    font-weight: 600;
    font-size: 16px; /* Keep consistent size */
}

/* Visual Content Area (Hero) */
.products-visual-content {
    flex-grow: 1;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* overflow: hidden;  Allow hotspots to pop out if needed, but mainly for grid floor */
}

/* Grid Floor */
.products-grid-floor {
    position: absolute;
    bottom: -5%; /* Slightly below to cover edges */
    left: 50%;
    transform: translateX(-50%);
    width: 120%; /* Wider than container to cover perspective */
    height: auto;
    z-index: 1;
    pointer-events: none;
    opacity: 0.6; /* Adjust visibility as needed */
}

.products-grid-floor img {
    width: 100%;
    display: block;
}

/* Visual Items */
.product-visual-item {
    display: none;
    opacity: 0;
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 2; /* Above floor */
    align-items: center;
    justify-content: center;
}

.product-visual-item.active {
    display: flex;
    opacity: 1;
}

.product-blueprint-wrap {
    position: relative;
    display: inline-block; /* Shrink to fit image */
    width: auto;
    height: auto;
}

.product-blueprint-img {
    display: block;
    max-width: 100%;
    max-height: 500px; /* Restored constraint to prevent oversized images like engine */
    width: auto;
    height: auto;
    /* filter: drop-shadow(0 20px 40px rgba(0,0,0,0.3)); */ /* Remove shadow to help blend mode */
    mix-blend-mode: screen; /* Figma request */
    opacity: 0.8; /* Figma request */
}

/* Hotspots Layer */
.product-hotspots-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; /* Allow clicks through to image if needed */
}

/* Hotspots */
.product-hotspot {
    position: absolute;
    width: 30px;
    height: 30px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
    animation: pulse-white 2s infinite;
    color: #13519C;
    font-weight: 700;
    font-size: 14px;
    font-family: var(--font-main);
    z-index: 10;
    transition: transform 0.3s ease;
    pointer-events: auto; /* Re-enable clicks */
}

.product-hotspot:hover {
    transform: translate(-50%, -50%) scale(1.2);
    z-index: 11;
}

@keyframes pulse-white {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(255, 255, 255, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
}

/* Tooltip */
.product-tooltip {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    color: #13519C;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font-main);
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.product-hotspot:hover .product-tooltip {
    opacity: 1;
    visibility: visible;
    bottom: 45px;
}

/* Products Info Container */
.products-info-container {
    max-width: 1440px;
    width: 100%;
    margin: 0 auto;
    padding: 0 40px;
    box-sizing: border-box;
    display: block; /* Standard block layout */
}

/* Info Section (Below Hero) */
.products-info-section {
    background: #F5F9FF;
    color: #333;
    padding: 100px 0;
    font-family: var(--font-main);
    overflow: hidden; /* Prevent horizontal scroll */
}

.products-info-content {
    width: 100%;
    padding-left: 0;
}

.product-info-item {
    display: none;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.product-info-item.active {
    display: block;
    opacity: 1;
}

.product-info-grid {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px; /* Reduced gap */
    width: 100%;
    box-sizing: border-box;
}

.product-info-text-col {
    flex: 1;
    min-width: 0; /* Allow shrinking */
}

.product-cat-header {
    display: flex;
    flex-direction: column; /* Stack vertically */
    align-items: flex-start;
    gap: 16px; /* Reduced gap */
    margin-bottom: 24px; /* Reduced margin */
}

.product-cat-label {
    display: inline-block;
    padding: 6px 16px; /* Reduced padding */
    border: 1px solid #0C3C75;
    border-radius: 50px;
    background: transparent;
    color: #0C3C75;
    font-size: 13px; /* Reduced font size */
    font-weight: 500;
    margin-bottom: 0;
    flex-shrink: 0;
}

.product-cat-title {
    font-size: 40px; /* Reduced from 48px */
    font-weight: 700;
    margin-bottom: 0;
    line-height: 1.1;
    background: linear-gradient(180deg, #14284E 5.65%, #2E5CB4 92.34%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
}

.product-cat-desc-content {
    font-size: 16px; /* Reduced from 18px */
    font-weight: 300; /* Normal text */
    color: #1D1D1D;
    line-height: 1.6;
}

.product-cat-desc-content strong,
.product-cat-desc-content b {
    font-weight: 500; /* Bold text */
    color: #1D1D1D;
}

.product-cat-desc-content p {
    margin-bottom: 20px;
}

.product-cat-desc-content p:last-child {
    margin-bottom: 0;
}

.product-info-image-col {
    flex: 1;
    min-width: 0; /* Allow shrinking */
}

.product-real-image-wrap {
    width: 100%;
    max-width: 600px; /* Limit max width for desktop */
    margin: 0 auto; /* Center if smaller than column */
    border-radius: 30px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.product-real-image-wrap img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
    max-height: 400px; /* Limit height to keep it proportional */
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .product-cat-title {
        font-size: 32px;
    }
    
    .product-cat-desc-content {
        font-size: 15px;
    }
}

@media (max-width: 1024px) {
    .products-info-section {
        padding: 60px 0;
    }

    .products-info-container {
        padding: 0 20px;
    }

    .product-info-grid {
        flex-direction: column;
        gap: 30px;
    }

    .product-info-text-col,
    .product-info-image-col {
        width: 100%;
        max-width: 100%;
        flex: auto;
    }

    .product-info-image-col {
        order: -1; /* Image first on mobile */
    }

    .product-cat-header {
        flex-direction: column; /* Stack vertically on mobile */
        align-items: flex-start;
        gap: 15px;
    }
    
    .product-cat-title {
        font-size: 32px;
    }
    
    .product-cat-desc-content {
        font-size: 16px;
    }
}

.product-image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40%;
    background: linear-gradient(to top, rgba(25, 59, 123, 0.4), transparent);
    pointer-events: none;
}

/* Modal */
.product-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.65);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.product-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.product-modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 999px;
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    color: #13519C;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, opacity 0.2s ease;
    z-index: 10000;
    box-shadow: 0px 10px 30px rgba(15, 23, 42, 0.12);
}

.product-modal-nav:hover {
    background: #F5F9FF;
}

.product-modal-prev {
    left: calc(50% - min(47.5vw, 550px) - 64px);
}

.product-modal-next {
    right: calc(50% - min(47.5vw, 550px) - 64px);
}

.product-modal {
    background: #fff;
    color: #333;
    width: 1100px;
    max-width: 95vw;
    height: min(85vh, 650px);
    max-height: 85vh;
    border-radius: 30px;
    display: none;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

.product-modal-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 30px 50px 0 50px;
    flex-shrink: 0;
}

.product-modal-body {
    display: flex;
    align-items: stretch;
    gap: 40px;
    padding: 20px 50px 50px 50px;
    flex: 1 1 auto;
    min-height: 0;
}

.product-modal-close {
    background: transparent;
    border: none;
    cursor: pointer;
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s;
    box-shadow: none;
    flex-shrink: 0;
}

.product-modal-close:hover {
    transform: rotate(90deg);
}

.product-modal-close svg path {
    fill: #E2E8F0;
    transition: fill 0.3s;
}

.product-modal-close:hover svg path {
    fill: #333;
}

/* Content Left */
.product-modal-content {
    width: 50%;
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #fff;
    position: relative;
    overflow-y: auto;
    min-height: 0;
    min-width: 0;
}

.pm-header-title {
    font-size: 28px;
    font-weight: 700;
    color: #193B7B;
    margin-bottom: 0;
    flex-shrink: 0;
    line-height: 32px;
}

/* Modal Desc (Top paragraph) */
.pm-desc {
    font-size: 15px;
    line-height: 1.5;
    color: #000; /* Black color */
    margin-bottom: 30px;
    flex-shrink: 0;
    font-weight: 500; /* Medium weight */
}

.pm-meta-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 30px;
    flex-shrink: 0;
}

.pm-read-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 40px;
    background: #13519C;
    color: #fff;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    align-self: flex-start;
    transition: background 0.3s;
    margin-top: auto; /* Push to bottom */
    flex-shrink: 0;
}

/* Re-add missing meta styles */
.pm-desc strong, .pm-desc b {
    font-weight: 600;
}

.pm-title {
    display: none; 
}

.pm-meta-item {
    display: block;
}

.pm-label {
    font-size: 14px; /* Slightly bigger */
    color: #898989;
    margin-bottom: 4px;
}

.pm-value {
    font-size: 16px;
    font-weight: 400;
    color: #000;
}

.pm-read-more:hover {
    background: #0C3C75;
}

/* Image Right */
.product-modal-image {
    width: 50%;
    background: #fff;
    position: relative;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: visible;
    min-width: 0;
}

.product-modal-slider {
    width: 100%;
    flex: 1 1 auto;
    min-height: 0;
    border-radius: 24px;
    overflow: hidden;
}

.product-modal-slider .swiper-wrapper,
.product-modal-slider .swiper-slide {
    height: 100%;
}

.product-modal-slider .swiper-slide {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-modal-slider img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 24px;
}

.product-modal-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding-top: 14px;
    flex-shrink: 0;
}

.swiper-pagination-bullet {
    background: #ccc;
    opacity: 1;
}

.swiper-pagination-bullet-active {
    background: #13519C;
}

/* Responsive */
@media (max-width: 1024px) {
    .products-container {
        flex-direction: column;
        height: auto;
        padding-bottom: 40px;
    }
    
    .products-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        padding-right: 0;
        padding-bottom: 20px;
        margin-bottom: 20px;
    }
    
    .products-nav-list {
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 10px;
    }
    
    .product-cat-btn {
        flex-shrink: 0;
        background: rgba(255, 255, 255, 0.05);
    }
    
    .products-visual-content {
        padding-left: 0;
        min-height: 400px;
    }
    
    .products-info-content {
        padding-left: 0;
    }
    
    .product-info-grid {
        flex-direction: column;
        gap: 40px;
    }
    
    .product-info-text-col,
    .product-info-image-col {
        max-width: 100%;
    }

    .product-info-image-col {
        order: -1; 
    }

    .product-modal {
        flex-direction: column;
        width: 90%;
        max-height: 90vh;
    }

    .product-modal-topbar {
        padding: 20px 20px 0 20px;
    }

    .product-modal-body {
        flex-direction: column;
        gap: 20px;
        padding: 20px;
        overflow-y: auto;
    }

    .product-modal-image {
        width: 100%;
    }

    .product-modal-content {
        width: 100%;
    }
    
    .product-modal-close {
        width: 32px;
        height: 32px;
    }

    .product-modal-prev {
        left: calc(50% - min(47.5vw, 550px) - 56px);
    }

    .product-modal-next {
        right: calc(50% - min(47.5vw, 550px) - 56px);
    }
}
