/* --- PRODUCTS PAGE & CART SIDEBAR --- */
.page-title {
    color: var(--jp-navy);
    border-bottom: 3px solid var(--jp-blue-light);
    display: inline-block;
    padding-bottom: 5px;
    font-size: 2rem;
    margin-bottom: 30px;
}

.shop-container {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.sidebar-filter {
    flex: 0 0 auto;
    min-width: 250px;
    background: var(--jp-gray-bg);
    padding: 25px;
    border-radius: 4px;
    border: 1px solid #eee;
    position: sticky;
    top: 100px;
}

.sidebar-filter h4 {
    color: var(--jp-navy);
    margin-bottom: 15px;
    font-size: 1.1rem;
    border-left: 3px solid var(--jp-blue-light);
    padding-left: 10px;
}

.filter-list {
    margin-bottom: 30px;
}

.filter-list li {
    margin-bottom: 10px;
}

.filter-list a {
    color: var(--text-main);
    font-size: 0.95rem;
    display: block;
    padding: 5px 0;
    border-bottom: 1px dashed #ddd;
    white-space: nowrap;
}

.filter-list a:hover,
.filter-list a.active {
    color: var(--jp-blue-light);
    font-weight: 500;
    padding-left: 5px;
}

.products-area {
    flex: 1;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

@media (max-width: 1024px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .product-grid {
        grid-template-columns: 1fr;
    }
}

.product-card {
    background: white;
    border: 1px solid #eee;
    padding: 15px;
    transition: 0.3s;
    text-align: center;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    border-color: var(--jp-blue-light);
}

.product-card img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    background: #f9f9f9;
    margin-bottom: 15px;
    border-radius: 4px;
}

.product-card h3 {
    font-size: 1.1rem;
    margin: 5px 0;
    color: var(--jp-navy);
}

.product-spec {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 10px;
    flex-grow: 1;
}

.price-tag {
    color: var(--jp-blue-light);
    font-weight: 600;
    font-size: 1.3rem;
    margin: 10px 0;
}

.btn-add-cart,
.btn-buy {
    width: 100%;
    padding: 10px;
    background: var(--jp-navy);
    color: white;
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: 0.3s;
    border-radius: 4px;
    margin-top: auto;
}

.btn-add-cart:hover,
.btn-buy:hover {
    background: var(--jp-blue-light);
}

/* Slide-out Cart */
.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
}

.cart-overlay.active {
    opacity: 1;
    visibility: visible;
}

.cart-sidebar {
    position: fixed;
    top: 0;
    right: -450px;
    width: 400px;
    max-width: 100%;
    height: 100vh;
    background: var(--white);
    z-index: 1002;
    transition: 0.3s;
    display: flex;
    flex-direction: column;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.1);
}

.cart-sidebar.active {
    right: 0;
}

.cart-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--jp-gray-bg);
}

.cart-header h3 {
    color: var(--jp-navy);
    font-size: 1.2rem;
}

.cart-header button {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
    transition: 0.2s;
}

.cart-header button:hover {
    color: var(--danger);
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.empty-cart-msg {
    text-align: center;
    color: var(--text-light);
    margin-top: 50px;
    font-size: 1.1rem;
}

.cart-item {
    display: flex;
    gap: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

.cart-item img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #eee;
}

.cart-item-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.cart-item-title {
    font-weight: 500;
    color: var(--jp-navy);
    font-size: 0.95rem;
    line-height: 1.3;
}

.cart-item-price {
    color: var(--jp-blue-light);
    font-weight: 600;
    font-size: 1rem;
}

.cart-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.cart-controls button {
    width: 28px;
    height: 28px;
    border: 1px solid #ddd;
    background: white;
    cursor: pointer;
    border-radius: 4px;
    color: var(--jp-navy);
    font-weight: bold;
}

.cart-controls span {
    font-size: 0.95rem;
    min-width: 20px;
    text-align: center;
}

.cart-remove {
    color: var(--danger);
    cursor: pointer;
    font-size: 0.85rem;
    border: none;
    background: none;
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 5px;
}

.cart-footer {
    padding: 20px;
    border-top: 1px solid #eee;
    background: var(--jp-gray-bg);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--jp-navy);
}

.btn-checkout {
    width: 100%;
    padding: 15px;
    background: var(--jp-navy);
    color: white;
    border: none;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 4px;
    transition: 0.3s;
}

.btn-checkout:hover {
    background: var(--jp-blue-light);
}

/* Frontend general grid */
.front-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

/* Category Sub-Header Banner */
.category-banner {
    display: flex;
    background: var(--white);
    border: 1px solid var(--border-color, #E2E8F0);
    border-radius: 8px;
    margin-bottom: 30px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.category-banner img {
    width: 300px;
    background: var(--jp-gray-bg, #F4F7F9);
    object-fit: cover;
}

.category-banner .banner-content {
    padding: 25px;
    flex: 1;
}

.category-banner .banner-content h3 {
    color: var(--jp-navy);
    margin-bottom: 10px;
    font-size: 1.4rem;
    border-bottom: 2px solid var(--jp-blue-light);
    display: inline-block;
    padding-bottom: 5px;
}

.category-banner .banner-content p {
    color: var(--text-light);
    line-height: 1.6;
    margin-top: 10px;
}

@media (max-width: 900px) {
    .category-banner {
        flex-direction: column;
    }

    .category-banner img {
        width: 100%;
        height: 250px;
    }
}