/* ========================================
   PRODUCTS PAGE STYLES
   ======================================== */

/* Highlight Animation for Scrolled Categories */
@keyframes highlightPulse {
    0% {
        background: rgba(0, 120, 193, 0.2);
        box-shadow: 0 0 0 0 rgba(0, 120, 193, 0.4);
    }
    50% {
        box-shadow: 0 0 0 20px rgba(0, 120, 193, 0);
    }
    100% {
        background: transparent;
        box-shadow: 0 0 0 0 rgba(0, 120, 193, 0);
    }
}

/* Hero */
.products-hero {
    background: linear-gradient(135deg, #002b49 0%, #003d6b 50%, #002b49 100%);
    color: #fff;
    padding: 60px 0 50px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.products-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 50%;
}

.products-hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -5%;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 50%;
}

.products-hero h1 {
    font-size: 2.2rem;
    font-weight: 900;
    font-style: italic;
    margin-bottom: 10px;
    letter-spacing: -0.3px;
}

.products-hero h1 i {
    margin-right: 10px;
    opacity: 0.8;
}

.products-hero p {
    font-size: 1.05rem;
    opacity: 0.85;
    max-width: 600px;
    margin: 0 auto;
}

/* Search Section */
.products-search-section {
    background: #f0f2f5;
    padding: 24px 0;
}

.products-search-box {
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 10px;
    padding: 12px 20px;
    max-width: 600px;
    margin: 0 auto;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    border: 1px solid #e0e4ea;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.products-search-box:focus-within {
    border-color: #0078c1;
    box-shadow: 0 2px 16px rgba(0, 120, 193, 0.12);
}

.products-search-box i {
    color: #999;
    margin-right: 12px;
    font-size: 1.1rem;
}

.products-search-box input {
    border: none;
    outline: none;
    flex: 1;
    font-size: 1rem;
    color: #333;
    font-family: 'Roboto', sans-serif;
}

.products-search-box input::placeholder {
    color: #aaa;
}

/* Products Sidebar Categories */
.products-sidebar {
    position: sticky;
    top: 140px;
    padding: 24px;
    background: linear-gradient(135deg, #f8f9fa 0%, #eef3f7 100%);
    border-radius: 16px;
    border: 1px solid #e0e8f0;
}

.products-sidebar-header {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid #0078c1;
}

.products-sidebar-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #002b49;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.products-sidebar-header i {
    color: #0078c1;
}

.category-filter-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 14px 16px;
    margin-bottom: 10px;
    background: #fff;
    border: 2px solid #e0e8f0;
    border-radius: 12px;
    color: #333;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: left;
}

.category-filter-btn:hover {
    border-color: #0078c1;
    background: #eef6fc;
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0, 120, 193, 0.12);
}

.category-filter-btn.active {
    background: linear-gradient(135deg, #0078c1, #005a94);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 6px 20px rgba(0, 120, 193, 0.25);
}

.category-filter-btn span:first-child {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.category-filter-btn i {
    font-size: 1rem;
    opacity: 0.7;
}

.category-filter-btn.active i {
    opacity: 1;
}

.category-count {
    background: rgba(0, 120, 193, 0.1);
    color: #0078c1;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    min-width: 28px;
    text-align: center;
}

.category-filter-btn.active .category-count {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
}

/* Product Card - Modern Design */
.product-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #e8ecf0;
    display: flex;
    flex-direction: column;
    position: relative;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #0078c1, #005a94);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s;
    z-index: 2;
}

.product-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 20px 48px rgba(0, 120, 193, 0.22);
    border-color: #0078c1;
}

.product-card:hover::before {
    transform: scaleX(1);
}

.product-card.selected-main {
    border: 2px solid #0078c1;
    box-shadow: 0 16px 48px rgba(0, 120, 193, 0.28);
    background: linear-gradient(135deg, #eef6fc 0%, #e8f1f9 100%);
}

/* Product Header/Icon Section */
.product-card-header {
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: background 0.3s;
    flex: 1;
    background: linear-gradient(135deg, #f5f7fb 0%, #f0f3f8 100%);
    padding: 20px;
    min-height: 180px;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.product-card-header::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 150px;
    height: 150px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
}

.product-card:hover .product-card-header {
    background: linear-gradient(135deg, #eef6fc 0%, #e8f1f9 100%);
}

.product-card-header .product-card-icon {
    background: linear-gradient(135deg, #0078c1, #005a94);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: #fff;
    width: 100px;
    height: 100px;
    border-radius: 16px;
    position: relative;
    z-index: 1;
    box-shadow: 0 8px 24px rgba(0, 120, 193, 0.3);
    transition: all 0.3s;
}

.product-card:hover .product-card-header .product-card-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 12px 32px rgba(0, 120, 193, 0.4);
}

.product-card-header .product-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
}

/* Product Content Section */
.product-card-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #fff;
}

.product-card-name {
    font-size: 1.15rem;
    font-weight: 700;
    color: #002b49;
    margin-bottom: 8px;
    transition: color 0.3s;
}

.product-card:hover .product-card-name {
    color: #0078c1;
}

.product-card-desc {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

/* Sub-products Grid - Image Heavy */
.product-children {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
    padding: 24px;
    background: linear-gradient(135deg, #fafbfc 0%, #f5f7fb 100%);
}

.sub-product-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid #f0f0f0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    position: relative;
}

.sub-product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #0078c1, #005a94);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s;
    z-index: 2;
}

.sub-product-card:hover {
    border-color: #0078c1;
    box-shadow: 0 12px 32px rgba(0, 120, 193, 0.18);
    transform: translateY(-6px);
}

.sub-product-card:hover::before {
    transform: scaleX(1);
}

.sub-product-card.selected-sub {
    border-color: #0078c1;
    background: linear-gradient(135deg, #eef6fc 0%, #e8f1f9 100%);
    box-shadow: 0 12px 32px rgba(0, 120, 193, 0.25);
}

/* Sub-product Image Container */
.sub-product-image {
    width: 100%;
    height: auto;
    aspect-ratio: auto;
    object-fit: contain;
    object-position: center;
    display: block;
    background: #f5f7fb;
    border-radius: 8px;
    margin: 8px 0;
    border: 1px solid #e0e4ea;
    min-height: 120px;
}

.sub-product-card:has(.sub-product-image[src=""])::before,
.sub-product-card:has(.sub-product-image:not([src]))::before {
    content: '📸';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    opacity: 0.3;
}

/* Sub-product Info */
.sub-product-content {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.sub-product-icon {
    display: none;
}

.sub-product-name {
    font-size: 1rem;
    font-weight: 700;
    color: #002b49;
    margin-bottom: 8px;
    line-height: 1.3;
}

.sub-product-desc {
    color: #666;
    font-size: 0.85rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Selected Product Detail - Modern Layout */
.products-detail-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #eef3f7 100%);
    padding: 40px 0;
    margin-top: 40px;
    border-top: 1px solid #e0e8f0;
}

.selected-product-detail {
    background: #fff;
    border-radius: 18px;
    padding: 40px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid #f0f0f0;
    animation: slideDown 0.4s ease;
}

.detail-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
}

.detail-image-section {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 600px;
}

.detail-image-showcase {
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
}

.detail-image-showcase img {
    width: 100%;
    height: auto;
    display: block;
}

.detail-info-section {
    padding: 20px;
    width: 100%;
    max-width: 600px;
    text-align: center;
}

.detail-product-title {
    font-size: 2.2rem;
    font-weight: 800;
    color: #002b49;
    margin: 16px 0 24px;
    line-height: 1.2;
}

.detail-description {
    margin: 24px 0;
    padding: 24px;
    background: linear-gradient(135deg, #fafbfc, #f5f7fb);
    border-radius: 12px;
    border-left: 4px solid #0078c1;
}

.detail-description p {
    color: #555;
    line-height: 1.8;
    font-size: 1rem;
    margin: 0;
}

.detail-info-box {
    margin-top: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #eef6fc, #e8f1f9);
    border-radius: 12px;
    border: 2px solid #d6e8f5;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Detail Layout */
@media (max-width: 1024px) {
    .detail-container {
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .selected-product-detail {
        padding: 24px;
    }
    
    .detail-product-title {
        font-size: 1.8rem;
    }
    
    .detail-container {
        gap: 20px;
    }
}
}

/* Products Section */
.products-section {
    padding: 50px 0 60px;
    background: #f8f9fa;
}

.products-grid {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

#productsContainer.products-grid {
    display: block;
    max-width: none;
    margin: 0;
    padding: 0;
}

/* Product Card */
.product-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.1);
}

.product-card.selected-main {
    border: 1px solid #8bb4d8;
    box-shadow: 0 8px 26px rgba(0, 120, 193, 0.18);
}

.product-card.hidden {
    display: none;
}

.product-card-header {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px 30px;
    border-bottom: 1px solid #eee;
}

.product-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: linear-gradient(135deg, #0078c1, #005a94);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.product-card-icon i {
    font-size: 1.2rem;
    color: #fff;
}

.product-card-info {
    flex: 1;
    min-width: 0;
}

.product-card-info h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #002b49;
    margin-bottom: 4px;
}

.product-card-info p {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
}

.product-card-thumb {
    width: 120px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
    border: 1px solid #e8e8e8;
}

.product-card-body {
    padding: 20px 30px 24px;
}

/* Sub-products grid */
.sub-products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 10px;
}

.sub-product-card {
    background: #f4f6f8;
    border-radius: 10px;
    padding: 20px;
    border: 1px solid #e0e4ea;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.sub-product-card:hover {
    border-color: #0078c1;
    box-shadow: 0 4px 15px rgba(0, 120, 193, 0.1);
}

.sub-product-card.selected-sub {
    border-color: #0078c1;
    box-shadow: 0 4px 18px rgba(0, 120, 193, 0.2);
    background: #eef6fc;
}

.sub-product-card-image {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 12px;
}

.sub-product-card h4 {
    font-size: 1.1rem;
    color: #002b49;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sub-product-card h4 i {
    color: #0078c1;
    font-size: 0.95rem;
}

.sub-product-card p {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.6;
}

.sub-product-more {
    margin-top: 10px;
    border: 1px solid #c3d7e8;
    background: #fff;
    color: #005f9a;
    padding: 7px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
}

.sub-product-more:hover {
    border-color: #0078c1;
    color: #0078c1;
}

/* Loading */
.products-loading {
    text-align: center;
    padding: 60px 20px;
    color: #888;
    font-size: 1.1rem;
}

.products-loading i {
    display: block;
    font-size: 2rem;
    margin-bottom: 15px;
    color: #0078c1;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.products-empty {
    text-align: center;
    padding: 60px 20px;
    color: #888;
}

.products-empty i {
    font-size: 3rem;
    margin-bottom: 15px;
    color: #ccc;
}

.products-no-result {
    text-align: center;
    padding: 40px 20px;
    color: #999;
    font-size: 1.05rem;
    display: none;
}

.products-no-result i {
    font-size: 2.5rem;
    margin-bottom: 12px;
    color: #ddd;
    display: block;
}

/* Product Card Content Styles */
.product-card-content {
    flex: 1;
    min-width: 0;
}

.product-card-name {
    font-size: 1.15rem;
    font-weight: 700;
    color: #002b49;
    margin-bottom: 8px;
}

.product-card-desc {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-image {
    width: 100%;
    height: auto;
    aspect-ratio: auto;
    object-fit: contain;
    object-position: center;
    border-radius: 8px;
    margin-top: 10px;
    display: block;
    background: #f5f7fb;
    min-height: 150px;
}

/* Product Children (Sub-products Container) */
.product-children {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 16px;
    padding: 20px 30px;
    background: #f8f9fa;
}

/* Updated Sub-Product Card Styles */
.sub-product-card {
    background: #fff;
    border-radius: 10px;
    padding: 16px;
    border: 1px solid #e0e4ea;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sub-product-card:hover {
    border-color: #0078c1;
    box-shadow: 0 4px 15px rgba(0, 120, 193, 0.15);
    transform: translateY(-2px);
}

.sub-product-card.selected-sub {
    border-color: #0078c1;
    box-shadow: 0 4px 20px rgba(0, 120, 193, 0.25);
    background: #eef6fc;
}

.sub-product-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: linear-gradient(135deg, #0078c1, #005a94);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sub-product-icon i {
    font-size: 1.1rem;
    color: #fff;
}

.sub-product-content {
    flex: 1;
}

.sub-product-image {
    width: 100%;
    height: auto;
    aspect-ratio: auto;
    object-fit: contain;
    object-position: center;
    border-radius: 8px;
    margin: 8px 0;
    display: block;
    border: 1px solid #e0e4ea;
    background: #f5f7fb;
    min-height: 120px;
}

.sub-product-name {
    font-size: 1rem;
    font-weight: 700;
    color: #002b49;
    margin-bottom: 6px;
}

.sub-product-desc {
    color: #666;
    font-size: 0.85rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Responsive */
@media (max-width: 768px) {
    .products-hero h1 {
        font-size: 1.8rem;
    }

    .selected-product-top {
        flex-direction: column;
    }

    .selected-product-icon {
        width: 100%;
        height: 170px;
    }

    .product-card-header {
        flex-wrap: wrap;
        padding: 16px;
    }

    .product-card-thumb {
        width: 100%;
        height: 140px;
        order: -1;
    }

    .product-card-body {
        padding: 16px;
    }

    .sub-products {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .products-hero {
        padding: 40px 0 30px;
    }

    .products-hero h1 {
        font-size: 1.5rem;
    }
}

/* ========================================
   PRODUCTS LAYOUT - MODERN GRID
   ======================================== */
.products-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 40px 0 60px;
}

.products-section {
    background: #f8f9fa;
    padding: 40px 0 60px;
}

.products-content {
    display: flex;
    flex-direction: column;
}

.products-content-full {
    grid-column: 1 / -1;
}

.products-header {
    margin-bottom: 40px;
    text-align: center;
}

.products-header h2 {
    font-size: 2.2rem;
    font-weight: 700;
    color: #002b49;
    margin: 0 0 12px 0;
    letter-spacing: -0.3px;
}

.products-header p {
    font-size: 1.1rem;
    color: #666;
    margin: 0;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 28px;
}

.product-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.product-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-4px);
}

.product-card-icon {
    height: 140px;
    background: linear-gradient(135deg, #f0f7fc 0%, #e8f4fd 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 2px solid #e0e0e0;
    position: relative;
    overflow: hidden;
}

.product-card-icon::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(0, 120, 193, 0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.product-card-icon i {
    font-size: 4rem;
    color: #0078c1;
    z-index: 1;
}

.product-card-content {
    padding: 18px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-card-name {
    font-size: 1rem;
    font-weight: 700;
    color: #002b49;
    margin-bottom: 8px;
    line-height: 1.3;
}

.product-card-desc {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: auto;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card-link {
    margin-top: 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #0078c1;
}

/* ========================================
   CHILD PRODUCT CARDS - MODERN DESIGN
   ======================================== */
.child-products-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 20px !important;
}

.child-product-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.38s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    cursor: pointer;
    border: 1.5px solid #f0f3f8;
    position: relative;
}

.child-product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #0078c1, #005a94, #0078c1);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.38s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
}

.child-product-card:hover {
    box-shadow: 0 12px 32px rgba(0, 120, 193, 0.2);
    transform: translateY(-8px);
    border-color: #d4e3f2;
}

.child-product-card:hover::before {
    transform: scaleX(1);
}

.child-product-header {
    height: 160px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.child-product-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    background: #fff;
}

.child-product-icon {
    width: 90px;
    height: 90px;
    background: linear-gradient(135deg, #0078c1, #005a94);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: #fff;
    box-shadow: 0 8px 20px rgba(0, 120, 193, 0.3);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.child-product-card:hover .child-product-icon {
    transform: scale(1.12) rotate(4deg);
    box-shadow: 0 12px 28px rgba(0, 120, 193, 0.4);
}

.child-product-content {
    padding: 18px;
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #fff;
}

.child-product-name {
    font-size: 1rem;
    font-weight: 700;
    color: #002b49;
    margin: 0 0 8px 0;
    line-height: 1.3;
    transition: color 0.3s;
}

.child-product-card:hover .child-product-name {
    color: #0078c1;
}

.child-product-desc {
    font-size: 0.82rem;
    color: #666;
    margin: 0;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
    font-size: 0.85rem;
    font-weight: 600;
    transition: gap 0.2s;
}

.product-card:hover .product-card-link {
    gap: 10px;
}

.product-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.product-empty i {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

.product-empty p {
    font-size: 1rem;
    margin: 0;
}

/* ========================================
   CATEGORY GROUPS
   ======================================== */
.products-category-group {
    margin-bottom: 80px;
    break-inside: avoid;
}

.products-category-group:last-child {
    margin-bottom: 0;
}

.category-section-header {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 50px;
    padding: 30px 30px;
    border-radius: 16px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 2px solid #e8ecf0;
    border-left: 5px solid #0078c1;
    box-shadow: 0 4px 12px rgba(0, 120, 193, 0.08);
    transition: all 0.3s ease;
    cursor: pointer;
}

.category-section-header:hover {
    border-left-color: #005a94;
    box-shadow: 0 8px 24px rgba(0, 120, 193, 0.12);
    transform: translateY(-2px);
}

.category-header-text {
    flex: 1;
}

.category-detail-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid #c8dff1;
    background: #fff;
    color: #0f639b;
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.category-detail-link:hover {
    border-color: #8ebcde;
    color: #084f80;
    box-shadow: 0 8px 18px rgba(0, 120, 193, 0.16);
}

.category-title {
    font-size: 2rem;
    font-weight: 700;
    color: #002b49;
    margin: 0 0 10px 0;
    letter-spacing: -0.5px;
}

.category-desc {
    font-size: 1.05rem;
    color: #555;
    margin: 0;
    line-height: 1.6;
}

.products-category-group .products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 28px;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 1200px) {
    .products-grid,
    .products-category-group .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .child-products-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 1024px) {
    .products-grid,
    .products-category-group .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .child-products-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 768px) {
    .category-section-header {
        flex-direction: column;
        text-align: center;
        margin-bottom: 40px;
        gap: 16px;
        padding: 24px 20px;
    }

    .category-title {
        font-size: 1.5rem;
        margin-bottom: 8px;
    }
    
    .category-desc {
        font-size: 0.95rem;
    }

    .category-detail-link {
        width: 100%;
    }

    .products-grid,
    .products-category-group .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    .child-products-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 16px !important;
    }

    .product-card-icon {
        height: 120px;
    }

    .product-card-icon i {
        font-size: 3rem;
    }

    .product-card-content {
        padding: 14px;
    }

    .product-card-name {
        font-size: 0.9rem;
    }

    .product-card-desc {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .category-section-header {
        gap: 12px;
        padding: 20px 16px;
        margin-bottom: 30px;
    }

    .category-title {
        font-size: 1.1rem;
    }

    .category-desc {
        font-size: 0.85rem;
    }

    .products-grid,
    .products-category-group .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .child-products-grid {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }
    
    .child-product-header {
        height: 140px;
    }
    
    .child-product-icon {
        width: 75px;
        height: 75px;
        font-size: 2rem;
    }
    
    .child-product-content {
        padding: 14px;
    }
    
    .child-product-name {
        font-size: 0.9rem;
    }
    
    .child-product-desc {
        font-size: 0.75rem;
        -webkit-line-clamp: 1;
    }

    .product-card-icon {
        height: 100px;
    }

    .product-card-icon i {
        font-size: 2.2rem;
    }

    .product-card-content {
        padding: 12px;
    }

    .product-card-name {
        font-size: 0.85rem;
        margin-bottom: 6px;
    }

    .product-card-desc {
        font-size: 0.75rem;
        -webkit-line-clamp: 1;
    }
}

/* ========================================
   PRODUCT DETAIL PAGE STYLES
   ======================================== */

/* Generic Button Styles */
.btn {
    display: inline-block;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #0078c1 0%, #005a94 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 120, 193, 0.3);
}

.btn-secondary {
    background: white;
    color: #0078c1;
    border: 2px solid #0078c1;
}

.btn-secondary:hover {
    background: #f0f7ff;
    transform: translateY(-2px);
}

/* Product Detail Hero */
.product-detail-hero {
    background: linear-gradient(135deg, #002b49 0%, #003d6b 50%, #002b49 100%);
    color: #fff;
    padding: 40px 0 30px;
    position: relative;
    overflow: hidden;
}

.product-detail-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 50%;
}

.product-detail-hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -5%;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 50%;
}

.product-detail-hero h1 {
    font-size: 2rem;
    margin: 0;
    position: relative;
    z-index: 1;
}

/* Breadcrumb */
.breadcrumb {
    font-size: 0.9rem;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.breadcrumb a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: #fff;
}

.breadcrumb .separator {
    margin: 0 8px;
    color: rgba(255, 255, 255, 0.5);
}

.breadcrumb span:last-child {
    color: #fff;
    font-weight: 500;
}

/* Product Detail Section */
.product-detail-section {
    padding: 60px 0;
    background: #f8f9fa;
}

.product-detail-wrapper {
    min-height: 400px;
}

/* Product Detail Content */
.product-detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    background: white;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Product Image Section */
.product-detail-image-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.product-image-container {
    width: 100%;
    aspect-ratio: 1;
    background: #f1f3f5;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.main-product-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 20px;
    display: block;
    transition: transform 0.3s ease;
}

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

/* Image Gallery */
.product-image-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.image-thumbnail {
    aspect-ratio: 1;
    width: 100%;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    background: #f1f3f5;
}

.image-thumbnail:hover {
    transform: scale(1.05);
    border-color: #0078c1;
}

.image-thumbnail.active {
    border-color: #0078c1;
    box-shadow: 0 4px 12px rgba(0, 120, 193, 0.3);
}

/* Product Info Section */
.product-detail-info-section {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-detail-header {
    margin-bottom: 30px;
}

.product-category {
    color: #0078c1;
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0 0 12px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-detail-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: #002b49;
    margin: 12px 0;
    line-height: 1.2;
}

.product-detail-description {
    font-size: 1rem;
    color: #555;
    line-height: 1.6;
    margin: 20px 0 0 0;
}

/* Product Information Cards */
.product-detail-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    padding: 30px 0;
    border-top: 1px solid #e9ecef;
    border-bottom: 1px solid #e9ecef;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.info-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #0078c1;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-label i {
    font-size: 0.9rem;
}

.info-value {
    font-size: 1rem;
    color: #333;
    font-weight: 500;
}

/* Product Detail Actions */
.product-detail-actions {
    display: flex;
    gap: 15px;
    padding-top: 30px;
}

.product-detail-actions .btn {
    flex: 1;
    padding: 14px 24px;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
    border: none;
    cursor: pointer;
}

.product-detail-actions .btn-primary {
    background: linear-gradient(135deg, #0078c1 0%, #005a94 100%);
    color: white;
}

.product-detail-actions .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 120, 193, 0.3);
}

.product-detail-actions .btn-secondary {
    background: white;
    color: #0078c1;
    border: 2px solid #0078c1;
}

.product-detail-actions .btn-secondary:hover {
    background: #f0f7ff;
    transform: translateY(-2px);
}

/* Related Products Section */
.related-products-section {
    padding: 60px 0;
    background: white;
}

.related-products-section h2 {
    font-size: 1.8rem;
    color: #002b49;
    margin-bottom: 40px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.related-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.related-product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.related-product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
}

.related-product-image {
    width: 100%;
    aspect-ratio: 1;
    background: #f1f3f5;
    overflow: hidden;
}

.related-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.related-product-card:hover .related-product-image img {
    transform: scale(1.08);
}

.related-product-info {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.related-product-info h3 {
    font-size: 1.1rem;
    color: #002b49;
    margin: 0;
    font-weight: 600;
    line-height: 1.4;
}

.related-product-info p {
    font-size: 0.9rem;
    color: #666;
    margin: 0;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.btn-link {
    color: #0078c1;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: gap 0.3s ease, color 0.3s ease;
    align-self: flex-start;
}

.btn-link:hover {
    color: #005a94;
    gap: 12px;
}

/* Error Message */
.error-message {
    text-align: center;
    padding: 60px 40px;
    background: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: 12px;
    color: #856404;
}

.error-message i {
    font-size: 3rem;
    margin-bottom: 20px;
    display: block;
    color: #ff9800;
}

.error-message h2 {
    font-size: 1.5rem;
    margin: 0 0 12px 0;
}

.error-message p {
    margin: 0 0 20px 0;
    font-size: 0.95rem;
}

/* Loading Spinner */
.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    gap: 20px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(0, 120, 193, 0.2);
    border-top: 4px solid #0078c1;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-spinner p {
    color: #666;
    font-size: 1rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .product-detail-content {
        grid-template-columns: 1fr;
        gap: 40px;
        padding: 30px;
    }
    
    .product-detail-title {
        font-size: 1.8rem;
    }
    
    .related-products-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 24px;
    }
}

@media (max-width: 768px) {
    .product-detail-hero h1 {
        font-size: 1.5rem;
    }
    
    .product-detail-content {
        padding: 20px;
        border-radius: 12px;
    }
    
    .product-detail-title {
        font-size: 1.5rem;
    }
    
    .product-detail-description {
        font-size: 0.95rem;
    }
    
    .product-detail-info {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 20px 0;
    }
    
    .product-detail-actions {
        flex-direction: column;
    }
    
    .product-detail-actions .btn {
        padding: 12px 16px;
    }
    
    .product-image-gallery {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .related-products-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .related-product-card {
        display: grid;
        grid-template-columns: 120px 1fr;
        gap: 15px;
    }
    
    .related-product-image {
        aspect-ratio: 1;
    }
    
    .product-detail-info-section {
        order: -1;
    }
}

@media (max-width: 480px) {
    .product-detail-hero {
        padding: 30px 0 20px;
    }
    
    .product-detail-hero h1 {
        font-size: 1.2rem;
    }
    
    .breadcrumb {
        font-size: 0.8rem;
    }
    
    .product-detail-content {
        padding: 15px;
        gap: 30px;
    }
    
    .product-detail-title {
        font-size: 1.3rem;
    }
    
    .product-detail-description {
        font-size: 0.9rem;
    }
    
    .product-detail-info {
        padding: 15px 0;
        gap: 12px;
    }
    
    .info-label {
        font-size: 0.75rem;
    }
    
    .info-value {
        font-size: 0.9rem;
    }
    
    .product-detail-actions {
        gap: 10px;
    }
    
    .product-detail-actions .btn {
        padding: 10px 12px;
        font-size: 0.85rem;
    }
    
    .product-image-gallery {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .related-products-section {
        padding: 40px 0;
    }
    
    .related-products-section h2 {
        font-size: 1.3rem;
        margin-bottom: 20px;
    }
    
    .related-product-card {
        grid-template-columns: 100px 1fr;
    }
}
