﻿/* Category Header Section */
.category-header-section {
    background: linear-gradient(135deg, var(--primary-blue) 0%, #152a6b 100%);
    color: white;
    padding: 3rem 0 5rem;
    margin-bottom: -2rem;
    position: relative;
}

.category-header-content {
    position: relative;
    z-index: 2;
}

/* Breadcrumb */
.breadcrumb-nav {
    margin-bottom: 2rem;
}

.breadcrumb {
    background: transparent;
    padding: 0;
}

.breadcrumb-item a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
}

    .breadcrumb-item a:hover {
        color: white;
    }

.breadcrumb-item.active {
    color: white;
    font-weight: 600;
}

.breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255, 255, 255, 0.6);
}

/* Category Title */
.category-title-section {
    margin-top: 2rem;
}

.category-title {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: white;
    text-transform: capitalize;
}

.title-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.divider-line {
    width: 80px;
    height: 2px;
    background: rgba(255, 255, 255, 0.8);
}

.divider-icon {
    color: var(--primary-red);
    font-size: 1.3rem;
}

.category-subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    margin-top: 1rem;
}

/* Category Products Section */
.category-products-section {
    padding: 5rem 0;
    background: #f8f9fa;
}

/* Products Header */
.products-header {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.products-count {
    margin: 0;
    font-size: 1.2rem;
    color: var(--primary-blue);
}

.count-number {
    font-weight: 700;
    font-size: 1.4rem;
    color: var(--primary-red);
}

.sorting-options {
    display: flex;
    align-items: center;
    gap: 1rem;
    justify-content: flex-end;
}

.sort-select {
    width: auto;
    min-width: 200px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
}

    .sort-select:focus {
        border-color: var(--primary-blue);
        box-shadow: 0 0 0 0.25rem rgba(52, 152, 219, 0.25);
    }

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

/* Product Card */
.product-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: transform 0.3s ease;
}

    .product-card-link:hover {
        text-decoration: none;
        color: inherit;
        transform: translateY(-5px);
    }

.product-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    border: 1px solid #f0f0f0;
    height: 100%;
}

.product-card-link:hover .product-card {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
    border-color: var(--primary-blue);
}

.product-image-container {
    position: relative;
    height: 480px;
    overflow: hidden;
    background: #f8f9fa;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card-link:hover .product-image {
    transform: scale(1.05);
}

/* Sale Badge */
.sale-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: linear-gradient(45deg, var(--primary-red), #e74c3c);
    color: white;
    padding: 0.6rem 1.2rem;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    animation: pulse 2s infinite;
    z-index: 10;
    box-shadow: 0 3px 10px rgba(231, 76, 60, 0.3);
}

    .sale-badge i {
        font-size: 0.8rem;
    }

/* New Badge */
.new-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(45deg, #28a745, #20c997);
    color: white;
    padding: 0.6rem 1.2rem;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.85rem;
    z-index: 10;
    box-shadow: 0 3px 10px rgba(40, 167, 69, 0.3);
}

/* Product Info */
.product-info {
    padding: 1.5rem;
}

.product-name {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--primary-blue);
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 3.2rem;
    transition: color 0.3s ease;
}

.product-card-link:hover .product-name {
    color: var(--primary-red);
}

.product-category {
    color: var(--dark-text);
    opacity: 0.7;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

    .product-category:before {
        content: "•";
        color: var(--primary-red);
    }

.product-price {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.original-price {
    text-decoration: line-through;
    color: var(--dark-text);
    opacity: 0.5;
    font-size: 0.95rem;
}

.discounted-price {
    color: var(--primary-red);
    font-weight: 700;
    font-size: 1.3rem;
}

.current-price {
    color: var(--primary-blue);
    font-weight: 700;
    font-size: 1.3rem;
}

.product-savings {
    margin-top: 0.5rem;
}

.savings-text {
    color: #28a745;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Empty State */
.empty-category {
    background: white;
    padding: 4rem 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

    .empty-category i {
        opacity: 0.5;
    }

    .empty-category h3 {
        color: var(--primary-blue);
        margin-bottom: 1rem;
    }

/* No Products Message */
.no-products-message {
    background: white;
    padding: 3rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    text-align: center;
}

/* Back to Top Button */
.btn-back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary-blue);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 3px 10px rgba(52, 152, 219, 0.3);
}

    .btn-back-to-top.visible {
        opacity: 1;
        visibility: visible;
    }

    .btn-back-to-top:hover {
        background: var(--primary-red);
        transform: translateY(-3px);
    }

/* Animations */
@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(217, 35, 35, 0.7);
    }

    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(217, 35, 35, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(217, 35, 35, 0);
    }
}

/* Responsive Design */
@media (max-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 1.5rem;
    }

    .category-title {
        font-size: 3rem;
    }
}

@media (max-width: 992px) {
    .category-title {
        font-size: 2.5rem;
    }

    .divider-line {
        width: 60px;
    }

    .category-header-section {
        padding: 2.5rem 0 4rem;
    }
}

@media (max-width: 768px) {
    .category-header-section {
        padding: 2rem 0 3.5rem;
    }

    .category-title {
        font-size: 2.2rem;
    }

    .category-subtitle {
        font-size: 1.1rem;
    }

    .products-header {
        padding: 1rem;
    }

    .products-count {
        font-size: 1.1rem;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1.25rem;
    }

    .product-image-container {
        height: 220px;
    }

    .sorting-options {
        justify-content: flex-start;
        margin-top: 1rem;
    }

    .btn-back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}

@media (max-width: 576px) {
    .category-title {
        font-size: 1.8rem;
    }

    .category-subtitle {
        font-size: 1rem;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .product-image-container {
        height: 180px;
    }

    .product-info {
        padding: 1rem;
    }

    .product-name {
        font-size: 1.1rem;
        height: 2.8rem;
    }

    .discounted-price,
    .current-price {
        font-size: 1.1rem;
    }

    .divider-line {
        width: 40px;
    }

    .divider-icon {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: 1fr;
        max-width: 350px;
        margin: 0 auto;
    }

    .product-image-container {
        height: 250px;
    }

    .category-title {
        font-size: 1.6rem;
    }

    .sort-select {
        width: 100%;
    }
}
