/* Category Page Shared Styles */
* { font-family: 'Open Sans', sans-serif !important; }
h1, h2, h3, h4, h5, h6, .page-hero h1, .accordion-button, .category-sidebar h4 { font-family: 'Open Sans', sans-serif !important; font-weight: 700; }

/* Page Hero */
.page-hero {
    min-height: 40vh;
    padding: 140px 0 60px;
    background-size: cover;
    background-position: center;
    position: relative;
    margin-top: 0;
}

.page-hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(6, 24, 56, 0.85) 0%, rgba(10, 43, 80, 0.7) 100%);
    z-index: 1;
    pointer-events: none;
}

.page-hero .container {
    position: relative;
    z-index: 2;
}

.page-hero h1 {
    font-family: 'Open Sans', sans-serif !important;
    font-size: 3rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 15px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    text-align: center;
    letter-spacing: -0.5px;
}

.page-hero p {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.3);
    text-align: center;
}

@media (max-width: 768px) {
    .page-hero {
        min-height: 30vh;
        padding: 100px 0 40px;
    }

    .page-hero h1 {
        font-size: 2rem;
    }

    .page-hero p {
        font-size: 1rem;
    }
}

/* Section */
.section {
    padding: 80px 0;
    background: transparent;
}

/* Sidebar Categories */
.category-sidebar {
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(10, 43, 80, 0.06);
    position: sticky;
    top: 100px;
    z-index: 10;
}

.category-sidebar h4 {
    font-family: 'Open Sans', sans-serif !important;
    font-size: 1.2rem;
    font-weight: 700;
    color: #0A2B50;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #C9A962;
}

/* Category Buttons List */
.category-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.category-btn {
    display: block;
    width: 100%;
    padding: 14px 18px;
    background: linear-gradient(145deg, #f8f9fa, #ffffff);
    color: #0A2B50 !important;
    text-decoration: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 500;
    font-family: 'Open Sans', sans-serif !important;
    border: 1px solid rgba(10, 43, 80, 0.06);
    transition: all 0.3s ease;
    text-align: left;
    cursor: pointer;
}

.category-btn:hover {
    background: linear-gradient(145deg, #e9ecef, #f8f9fa);
    border-color: #C9A962;
    transform: translateX(5px);
}

.category-btn.active {
    background: linear-gradient(135deg, #0A2B50 0%, #061838 100%);
    color: #fff !important;
    border-color: #C9A962;
    box-shadow: 0 4px 15px rgba(10, 43, 80, 0.3);
}

/* Show All Button - Move to TOP */
.btn-show-all {
    display: block;
    padding: 12px 20px;
    background: linear-gradient(135deg, #C9A962 0%, #B8954A 100%);
    color: #fff !important;
    text-decoration: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s;
    border: none;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(201, 169, 98, 0.3);
}

.btn-show-all:hover,
.btn-show-all.active {
    background: linear-gradient(135deg, #B8954A 0%, #A6863A 100%);
    box-shadow: 0 6px 20px rgba(201, 169, 98, 0.4);
    transform: translateY(-2px);
}

/* Search Box */
.search-box {
    margin-bottom: 25px;
}

.search-box input {
    border: 2px solid rgba(10, 43, 80, 0.2);
    border-radius: 25px;
    padding: 12px 20px;
    width: 100%;
    font-size: 0.95rem;
    transition: all 0.3s;
}

.search-box input:focus {
    outline: none;
    border-color: #C9A962;
    box-shadow: 0 0 0 3px rgba(201, 169, 98, 0.15);
}

/* Product Count */
.product-count {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 20px;
}

/* Product Grid - List Style (E-commerce style) */
.product-card {
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(10, 43, 80, 0.06);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
    height: 100%;
    cursor: pointer;
    display: flex;
    flex-direction: row;
    align-items: stretch;
}

.product-card:hover {
    box-shadow: 0 12px 30px rgba(10, 43, 80, 0.1);
    border-color: #C9A962;
}

.product-card .img-wrap {
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
    width: 180px;
    min-height: 150px;
    background: #fff;
}

.product-card img {
    width: 100%;
    height: 100%;
    min-height: 150px;
    object-fit: contain;
    object-position: center;
    display: block;
    transition: transform 0.4s ease;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    padding: 15px;
    box-sizing: border-box;
}

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

.product-card .content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 150px;
}

.product-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #0A2B50;
    margin-bottom: 8px;
    font-family: 'Open Sans', sans-serif !important;
    line-height: 1.4;
}

.product-card .product-code {
    font-size: 0.8rem;
    color: #999;
    margin-bottom: 8px;
}

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

/* Product Grid Container - Single Column */
#productsGrid .col-lg-4,
#productsGrid .col-md-6 {
    flex: 0 0 100%;
    max-width: 100%;
}

/* Empty State */
.no-products {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

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

/* Mobile Responsive */
@media (max-width: 991px) {
    .category-sidebar {
        position: static;
        margin-bottom: 20px;
        z-index: auto;
    }

    .product-card .img-wrap {
        width: 140px;
        height: 120px;
        min-height: 120px;
    }

    .product-card img {
        height: 120px;
        min-height: 120px;
        max-height: 120px;
    }

    .product-card .content {
        padding: 15px;
        min-height: 120px;
    }

    .col-lg-3,
    .col-lg-9 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* Mobile Category Dropdown */
@media (max-width: 768px) {
    .category-sidebar {
        padding: 15px;
    }

    .category-sidebar h4 {
        margin-bottom: 0;
        padding-bottom: 15px;
        cursor: pointer;
        position: relative;
        user-select: none;
    }

    .category-sidebar h4::after {
        content: '\f078';
        font-family: 'Font Awesome 6 Free';
        font-weight: 900;
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
        font-size: 0.9rem;
        color: #0A2B50;
        transition: transform 0.3s ease;
    }

    .category-sidebar.open h4::after {
        transform: translateY(-50%) rotate(180deg);
    }

    .category-buttons {
        display: none;
        margin-top: 15px;
    }

    .category-sidebar.open .category-buttons {
        display: flex;
    }

    .btn-show-all {
        display: none;
    }

    .category-sidebar.open .btn-show-all {
        display: block;
    }

    .product-card .img-wrap {
        width: 120px;
        height: 100px;
        min-height: 100px;
    }

    .product-card img {
        height: 100px;
        min-height: 100px;
        max-height: 100px;
        padding: 10px;
    }

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

    .product-card h3 {
        font-size: 1rem;
    }

    .product-card p {
        font-size: 0.85rem;
    }
}

@media (max-width: 576px) {
    .section {
        padding: 40px 0;
    }

    .product-card .img-wrap {
        width: 100px;
        height: 90px;
        min-height: 90px;
    }

    .product-card img {
        height: 90px;
        min-height: 90px;
        max-height: 90px;
        padding: 8px;
    }

    .product-card .content {
        padding: 10px;
        min-height: 90px;
    }

    .product-card h3 {
        font-size: 0.95rem;
        margin-bottom: 5px;
    }

    .product-card p {
        font-size: 0.8rem;
        line-height: 1.4;
    }
}