/* ========================================
   CATEGORIES PAGE STYLING
======================================== */

/* Hero Banner */
.hero-banner {
    padding: 80px 0;
    background-size: cover !important;
    background-position: center !important;
    position: relative;
}

.hero-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(196, 30, 58, 0.85) 0%, rgba(0, 0, 0, 0.7) 100%);
}

.hero-banner .container {
    position: relative;
    z-index: 1;
}

/* Category Cards Container */
.category-card-container {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.category-card-container:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 40px rgba(196, 30, 58, 0.2);
}

/* Category Card Image Section */
.category-card {
    position: relative;
    height: 300px;
    overflow: hidden;
}

.category-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.category-card-container:hover .category-img {
    transform: scale(1.1);
}

/* Category Overlay */
.category-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.4) 70%, transparent 100%);
    padding: 30px 20px 20px;
    color: white;
}

.category-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 8px 0;
    color: white;
}

.category-count {
    font-size: 0.95rem;
    opacity: 0.95;
    font-weight: 500;
}

/* Category Info Section */
.category-card-container .p-3 {
    padding: 24px !important;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.category-card-container h5 {
    font-size: 1.15rem;
    color: #2C3E50;
    margin-bottom: 12px;
}

.category-card-container p {
    flex: 1;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #6C757D;
}

/* View Products Button */
.btn-add-to-cart {
    display: inline-block;
    width: 100%;
    padding: 12px 24px;
    background: linear-gradient(135deg, #C41E3A 0%, #A01828 100%);
    color: white;
    text-align: center;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    border: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    text-decoration: none;
    cursor: pointer;
}

.btn-add-to-cart:hover {
    background: linear-gradient(135deg, #A01828 0%, #8B1523 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(196, 30, 58, 0.3);
    color: white;
}

.btn-add-to-cart:active {
    transform: translateY(0);
}

/* Product Cards in Featured Section */
.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

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

/* Product Image Wrapper */
.product-img-wrapper {
    position: relative;
    height: 250px;
    overflow: hidden;
    background: #F8F9FA;
}

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

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

/* Product Badge */
.product-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: linear-gradient(135deg, #C41E3A 0%, #A01828 100%);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(196, 30, 58, 0.4);
}

.out-of-stock-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #6C757D;
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* Product Actions */
.product-actions {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    opacity: 0;
    transform: translateX(10px);
    transition: all 0.3s ease;
}

.product-card:hover .product-actions {
    opacity: 1;
    transform: translateX(0);
}

.action-btn {
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2C3E50;
    text-decoration: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.action-btn:hover {
    background: #C41E3A;
    color: white;
    transform: scale(1.1);
}

/* Product Info */
.product-info {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-category {
    font-size: 0.8rem;
    color: #C41E3A;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.product-title {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.4;
    min-height: 44px;
}

.product-title a {
    color: #2C3E50;
    text-decoration: none;
    transition: color 0.3s ease;
}

.product-title a:hover {
    color: #C41E3A;
}

/* Product Rating */
.product-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 12px;
}

.product-rating i {
    color: #FFC107;
    font-size: 0.85rem;
}

.rating-count {
    margin-left: 6px;
    font-size: 0.85rem;
    color: #6C757D;
    font-weight: 600;
}

/* Product Price */
.product-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: #C41E3A;
    margin-bottom: 16px;
}

.original-price {
    font-size: 1rem;
    color: #6C757D;
    text-decoration: line-through;
    margin-left: 8px;
    font-weight: 400;
}

/* CTA Section */
.cta-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #C41E3A 0%, #A01828 100%);
    color: white;
}

.cta-section h2 {
    color: white;
    font-weight: 700;
}

.cta-section .lead {
    color: rgba(255, 255, 255, 0.95);
}

.cta-section .btn-primary {
    background: white;
    color: #C41E3A;
    border: none;
}

.cta-section .btn-primary:hover {
    background: #F8F9FA;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.cta-section .btn-success {
    background: #25D366;
    border: none;
}

.cta-section .btn-success:hover {
    background: #20BA5A;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

/* Responsive Adjustments */
@media (max-width: 991px) {
    .hero-banner {
        padding: 60px 0;
    }

    .category-card {
        height: 250px;
    }

    .product-img-wrapper {
        height: 220px;
    }
}

@media (max-width: 767px) {
    .hero-banner {
        padding: 50px 0;
    }

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

    .category-card {
        height: 220px;
    }

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

    .category-card-container .p-3 {
        padding: 20px !important;
    }

    .product-img-wrapper {
        height: 200px;
    }

    .product-actions {
        opacity: 1;
        transform: translateX(0);
    }

    .cta-section {
        padding: 60px 0;
    }

    .cta-section h2 {
        font-size: 1.75rem;
    }
}

@media (max-width: 575px) {
    .category-card {
        height: 200px;
    }

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

    .btn-add-to-cart {
        padding: 10px 20px;
        font-size: 0.85rem;
    }

    .product-card {
        margin-bottom: 20px;
    }

    .product-img-wrapper {
        height: 180px;
    }

    .product-title {
        font-size: 0.95rem;
        min-height: 38px;
    }

    .product-price {
        font-size: 1.25rem;
    }
}

/* Button Secondary State */
.btn-secondary {
    background: #6C757D !important;
    cursor: not-allowed !important;
}

.btn-secondary:hover {
    transform: none !important;
    box-shadow: none !important;
}