.category-page {
    max-width: 1440px;
    margin: auto;
    padding: 24px 30px 60px;
    color: #202938;
}

.category-breadcrumb {
    display: flex;
    gap: 10px;
    margin-bottom: 22px;
    color: #788394;
    font-size: 14px;
}

.category-breadcrumb a {
    color: #1674bd;
    text-decoration: none;
}

.category-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 230px;
    padding: 35px 55px;
    margin-bottom: 35px;
    overflow: hidden;
    border-radius: 16px;
    background: linear-gradient(120deg, #102b49, #1766a0);
    color: white;
}

.category-banner-content {
    max-width: 700px;
}

.category-eyebrow {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
    color: #a9d9ff;
}

.category-banner h1 {
    margin: 12px 0;
    font-size: clamp(28px, 4vw, 42px);
    color: white;
}

.category-banner p {
    max-width: 650px;
    line-height: 1.7;
    color: #e0ebf5;
}

.category-count {
    display: inline-block;
    margin-top: 12px;
    padding: 8px 14px;
    border: 1px solid #ffffff55;
    border-radius: 30px;
    font-size: 13px;
}

.category-banner-image {
    width: 190px;
    height: 160px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-banner-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.category-layout {
    display: grid;
    grid-template-columns: 230px minmax(0, 1fr);
    gap: 30px;
    align-items: start;
}

.category-sidebar {
    padding: 22px;
    border: 1px solid #e5eaf0;
    border-radius: 12px;
    background: white;
}

.category-sidebar h3 {
    margin: 0 0 18px;
    font-size: 18px;
}

.category-sidebar nav {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.category-sidebar nav a {
    padding: 11px 12px;
    border-radius: 7px;
    color: #455468;
    font-size: 14px;
    text-decoration: none;
}

.category-sidebar nav a:hover,
.category-sidebar nav a.active {
    background: #eaf4fc;
    color: #1269ad;
    font-weight: 700;
}

.category-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
    padding-bottom: 18px;
    border-bottom: 1px solid #e5eaf0;
}

.category-toolbar h2 {
    margin: 0 0 5px;
    font-size: 23px;
}

.category-toolbar p {
    margin: 0;
    color: #788394;
    font-size: 13px;
}

.category-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.category-filters input,
.category-filters select {
    min-height: 40px;
    padding: 8px 11px;
    border: 1px solid #d8e0e9;
    border-radius: 7px;
    background: white;
    color: #263445;
}

.category-filters button {
    padding: 8px 17px;
    border: 0;
    border-radius: 7px;
    background: #1269ad;
    color: white;
    cursor: pointer;
}

.category-product-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.category-product-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid #e5eaf0;
    border-radius: 12px;
    background: white;
    transition: transform .2s, box-shadow .2s;
}

.category-product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px #172b4514;
}

.category-product-image {
    height: 205px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: #f8fafc;
}

.category-product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.category-product-info {
    padding: 17px;
}

.category-product-label {
    color: #788394;
    font-size: 11px;
}

.category-product-info h3 {
    min-height: 48px;
    margin: 9px 0;
    font-size: 15px;
    line-height: 1.5;
}

.category-product-info h3 a {
    color: #263445;
    text-decoration: none;
}

.category-product-price {
    margin: 12px 0;
    color: #1269ad;
    font-size: 21px;
    font-weight: 800;
}

.category-in-stock,
.category-out-stock {
    margin-bottom: 14px;
    font-size: 12px;
}

.category-in-stock {
    color: #16834a;
}

.category-out-stock {
    color: #c43e3e;
}

.category-view-button {
    display: block;
    padding: 11px;
    border-radius: 7px;
    background: #1269ad;
    color: white;
    text-align: center;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
}

.category-view-button:hover {
    background: #0c4f85;
}

.category-empty {
    padding: 65px 20px;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    background: #f8fafc;
    text-align: center;
}

.category-empty-icon {
    font-size: 45px;
    color: #8ba0b5;
}

.category-empty h3 {
    margin: 12px 0;
}

.category-empty p {
    color: #718096;
}

.category-empty a {
    display: inline-block;
    margin-top: 12px;
    padding: 11px 18px;
    border-radius: 7px;
    background: #1269ad;
    color: white;
    text-decoration: none;
}

.category-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 30px;
}

.category-pagination a {
    padding: 9px 14px;
    border: 1px solid #d8e0e9;
    border-radius: 6px;
    color: #344256;
    text-decoration: none;
}

.category-pagination a.active {
    border-color: #1269ad;
    background: #1269ad;
    color: white;
}

@media (max-width: 1000px) {
    .category-product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .category-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 700px) {
    .category-page {
        padding: 18px 14px 40px;
    }

    .category-banner {
        min-height: auto;
        padding: 28px 22px;
    }

    .category-banner-image {
        width: 100px;
        height: 100px;
    }

    .category-layout {
        grid-template-columns: 1fr;
    }

    .category-sidebar nav {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .category-product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .category-product-image {
        height: 145px;
    }

    .category-product-info {
        padding: 12px;
    }

    .category-product-info h3 {
        font-size: 13px;
    }

    .category-product-price {
        font-size: 18px;
    }
}

@media (max-width: 420px) {
    .category-banner-image {
        display: none;
    }

    .category-filters {
        width: 100%;
    }

    .category-filters input {
        width: 100%;
    }
}

/* Override global navigation styles on category pages */
.category-page .category-sidebar nav {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    gap: 5px;
}

.category-page .category-sidebar nav a {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 11px 12px;
    background: transparent;
    color: #455468;
    border-radius: 7px;
    text-decoration: none;
    font-weight: 500;
}

.category-page .category-sidebar nav a:hover,
.category-page .category-sidebar nav a.active {
    background: #eaf4fc;
    color: #1269ad;
    font-weight: 700;
}

/* Category banner */
.category-page .category-banner {
    width: 100%;
    box-sizing: border-box;
}

.category-page .category-banner h1 {
    color: #ffffff;
    display: block;
}

.category-page .category-banner p {
    color: #e0ebf5;
    display: block;
}

.category-page .category-banner-image {
    background: transparent;
}

.category-page .category-banner-image img {
    background: transparent;
    object-fit: contain;
}
