/**
 * Product Categories Widget Styles
 * assets/css/product-categories-widget.css
 */

.product-categories-widget {
    width: 100%;
    font-family: 'Arial', sans-serif;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 30px;
    width: 100%;
}

.category-card {
    background: #f3edea;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(249, 115, 22, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    position: relative;
    height: 450px;
    border: 2px solid rgba(249, 115, 22, 0.2);
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(249, 115, 22, 0.25);
    border-color: #f97316;
}

/* Top row - Banner image */
.card-banner {
    height: 60%;
    position: relative;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: transform 0.4s ease;
}

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

/* Category title in default view */
.card-title {
    height: 20%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3edea;
    padding: 15px;
    border-top: 1px solid rgba(249, 115, 22, 0.1);
}

.card-title h3 {
    font-size: 1.3rem;
    color: #2d3748;
    margin: 0;
    font-weight: 600;
    text-align: center;
}

/* Bottom row - View More button */
.card-footer {
    height: 20%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3edea;
    padding: 15px;
}

.btn-view-more {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: #ffffff;
    padding: 10px 25px;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    box-shadow: 0 4px 15px rgba(249, 115, 22, 0.3);
}

.btn-view-more:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(249, 115, 22, 0.4);
    background: linear-gradient(135deg, #ea580c 0%, #dc2626 100%);
    color: #ffffff;
    text-decoration: none;
}

/* Overlay effect */
.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(243, 237, 234, 0.97);
    backdrop-filter: blur(10px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    padding: 25px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    border: 2px solid #f97316;
}

.category-card:hover .card-overlay {
    opacity: 1;
    visibility: visible;
}

.overlay-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    filter: drop-shadow(2px 2px 4px rgba(249, 115, 22, 0.3));
}

.overlay-title {
    font-size: 1.5rem;
    color: #2d3748;
    margin-bottom: 12px;
    font-weight: 700;
}

.overlay-description {
    font-size: 0.9rem;
    color: #2d3748;
    margin-bottom: 15px;
    line-height: 1.5;
    opacity: 0.9;
}

.overlay-list {
    list-style: none;
    margin-bottom: 20px;
    padding: 0;
}

.overlay-list li {
    padding: 3px 0;
    color: #2d3748;
    font-weight: 500;
    font-size: 0.85rem;
}

.overlay-list li:before {
    content: "✓ ";
    color: #f97316;
    font-weight: bold;
    margin-right: 5px;
}

.overlay-btn {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: #ffffff;
    padding: 12px 25px;
    border: none;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    margin: 0 auto;
    box-shadow: 0 6px 20px rgba(249, 115, 22, 0.3);
}

.overlay-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(249, 115, 22, 0.4);
    background: linear-gradient(135deg, #ea580c 0%, #dc2626 100%);
    color: #ffffff;
    text-decoration: none;
}

/* Add accent elements */
.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #f97316 0%, #ea580c 50%, #dc2626 100%);
    z-index: 1;
}

/* Responsive design */
@media (max-width: 768px) {
    .product-categories-home-grid {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(4, 1fr);
        gap: 20px;
    }
    
    .product-category-home-card {
        height: 450px;
    }
    
    .product-category-home-overlay-title {
        font-size: 1.3rem;
    }
    
    .product-category-home-overlay-description {
        font-size: 0.85rem;
    }
    
    .product-category-home-overlay-list li {
        font-size: 0.8rem;
    }

    .product-category-home-title h3 {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .product-categories-home-grid {
        gap: 15px;
    }
    
    .product-category-home-card {
        height: 300px;
    }
    
    .product-category-home-overlay-icon {
        font-size: 2.5rem;
        margin-bottom: 10px;
    }
    
    .product-category-home-overlay-title {
        font-size: 1.2rem;
        margin-bottom: 8px;
    }
    
    .product-category-home-overlay-description {
        font-size: 0.8rem;
        margin-bottom: 12px;
    }
    
    .product-category-home-overlay-btn {
        font-size: 0.9rem;
        padding: 10px 20px;
    }

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

    .product-category-home-btn {
        font-size: 0.9rem;
        padding: 8px 20px;
    }
}

/* Ensure widget fits within Elementor containers */
.elementor-widget-product-categories-widget {
    width: 100%;
}

.elementor-widget-product-categories-widget .product-categories-home-widget {
    width: 100%;
}

/* Fix for Elementor container integration */
.elementor-container .product-categories-home-widget {
    padding: 0;
    margin: 0;
}

/* Additional hover effects */
.product-category-home-card:hover .product-category-home-btn {
    background: linear-gradient(135deg, #ea580c 0%, #dc2626 100%);
}

.product-category-home-card:hover .product-category-home-overlay-list li:before {
    color: #ea580c;
}

/* Focus states for accessibility */
.product-category-home-btn:focus,
.product-category-home-overlay-btn:focus {
    outline: 2px solid rgba(249, 115, 22, 0.5);
    outline-offset: 2px;
}

/* Remove all problematic animations */
.product-category-home-banner,
.product-category-home-banner:hover,
.product-category-home-card .product-category-home-banner {
    animation: none !important;
    background-position: center !important;
   background-size: contain !important;
    transform: none !important;
}

.product-category-home-banner {
    height: 75%; /* Increase from 60% to 75% */
}
.product-category-home-title {
    height: 15%; /* Decrease from 20% to 15% */
}
.product-category-home-footer {
    height: 10%; /* Decrease from 20% to 10% */
}

/* Ensure no conflicting keyframes affect our images */
@keyframes none {
    0%, 100% { transform: none; }
}
@media (max-width: 768px) {
    .categories-grid {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(4, 1fr);
        gap: 20px;
    }
    
    .category-card {
        height: 450px;
    }
    
    .overlay-title {
        font-size: 1.3rem;
    }
    
    .overlay-description {
        font-size: 0.85rem;
    }
    
    .overlay-list li {
        font-size: 0.8rem;
    }

    .card-title h3 {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .categories-grid {
        gap: 15px;
    }
    
    .category-card {
        height: 300px;
    }
    
    .overlay-icon {
        font-size: 2.5rem;
        margin-bottom: 10px;
    }
    
    .overlay-title {
        font-size: 1.2rem;
        margin-bottom: 8px;
    }
    
    .overlay-description {
        font-size: 0.8rem;
        margin-bottom: 12px;
    }
    
    .overlay-btn {
        font-size: 0.9rem;
        padding: 10px 20px;
    }

    .card-title h3 {
        font-size: 1.1rem;
    }

    .btn-view-more {
        font-size: 0.9rem;
        padding: 8px 20px;
    }
}

/* Ensure widget fits within Elementor containers */
.elementor-widget-product-categories-widget {
    width: 100%;
}

.elementor-widget-product-categories-widget .product-categories-widget {
    width: 100%;
}

/* Fix for Elementor container integration */
.elementor-container .product-categories-widget {
    padding: 0;
    margin: 0;
}

/* Additional hover effects */
.category-card:hover .btn-view-more {
    background: linear-gradient(135deg, #ea580c 0%, #dc2626 100%);
}

.category-card:hover .overlay-list li:before {
    color: #ea580c;
}

/* Focus states for accessibility */
.btn-view-more:focus,
.overlay-btn:focus {
    outline: 2px solid rgba(249, 115, 22, 0.5);
    outline-offset: 2px;
}

/* Animation improvements */
.card-banner {
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.card-overlay {
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Better loading state */
.category-card .card-banner {
    background-color: #f3edea;
}

.category-card .card-banner:empty {
    background-image: linear-gradient(90deg, #f3edea 25%, rgba(255,255,255,0.2) 50%, #f3edea 75%);
/*     background-size: 200% 100%; */
/*     animation: loading 1.5s infinite; */
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}