﻿/**
 * Educational Toys Section Styles
 */

/* Age Tabs Container */
.age-tabs {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

/* Individual Tab */
.age-tab {
    cursor: pointer;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.age-tab:hover {
    transform: translateY(-5px);
}

/* Tab Icon Container */
.age-icon {
    width: 90px;
    height: 90px;
    margin: 0 auto 12px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: var(--shadow-sm, 0 6px 16px rgba(86, 69, 147, 0.06));
    border: 3px solid transparent;
    padding: 5px;
    background: white;
    transition: all 0.3s ease;
}

.age-icon-active {
    border-color: var(--purple-deep, #564593);
}

.age-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.age-tab:hover .age-icon {
    box-shadow: 0 8px 20px rgba(86, 69, 147, 0.15);
}

/* Tab Title */
.age-tab h3 {
    font-size: 0.95rem;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
    color: var(--gray-600, #5e6775);
    margin: 0;
    line-height: 1.3;
}

.age-tab.active h3 {
    color: var(--purple-deep, #564593);
}

/* Product grid responsive */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

@media (max-width: 768px) {
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 20px;
    }
}

/* Product card enhancements */
.product-card {
    background: white;
    border-radius: var(--radius-card, 24px);
    overflow: hidden;
    box-shadow: var(--shadow-sm, 0 6px 16px rgba(86, 69, 147, 0.06));
    transition: all 0.3s ease;
    position: relative;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover, 0 20px 30px rgba(86, 69, 147, 0.12));
}

.product-img {
    position: relative;
    width: 100%;
    height: 280px;
    overflow: hidden;
    background: var(--gray-100, #f8fafc);
}

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

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

.sale-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #ff4757;
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(255, 71, 87, 0.3);
}

.product-content {
    padding: 24px;
}

.product-content h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gray-800, #2c3e4e);
    margin-bottom: 10px;
    line-height: 1.4;
    min-height: 2.8em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-desc {
    font-size: 0.9rem;
    color: var(--gray-600, #5e6775);
    margin-bottom: 16px;
    line-height: 1.5;
    min-height: 3em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--purple-deep, #564593);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sale-price {
    color: var(--grass-green);
    font-weight: 800;
}

.regular-price {
    font-size: 1rem;
    font-weight: 500;
    color: var(--gray-600, #5e6775);
    text-decoration: line-through;
}

.product-btn {
    width: 100%;
    padding: 14px 24px;
    background: var(--purple-deep, #564593);
    color: white;
    border: none;
    border-radius: var(--radius-btn, 60px);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.product-btn:hover {
    background: var(--purple-soft, #735885);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(86, 69, 147, 0.25);
}

.product-btn i {
    font-size: 1.1rem;
}

/* Notification animations */
@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

/* Loading spinner */
.fa-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray-600, #5e6775);
}

.empty-state i {
    font-size: 4rem;
    color: var(--gray-200, #e9edf2);
    margin-bottom: 20px;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .age-tabs {
        gap: 15px;
    }
    
    .age-icon {
        width: 80px;
        height: 80px;
    }
}

@media (max-width: 768px) {
    .age-tabs {
        gap: 20px 16px;
        padding: 0 10px;
    }
    
    .age-tab {
        flex: 0 1 calc(50% - 8px);
        min-width: 140px;
    }
    
    .age-icon {
        width: 75px;
        height: 75px;
    }
    
    .age-tab h3 {
        font-size: 0.88rem;
    }
}

@media (max-width: 640px) {
    .age-tabs {
        gap: 16px 12px;
        padding: 0 8px;
    }
    
    .age-tab {
        flex: 0 1 calc(50% - 6px);
        min-width: 130px;
    }
    
    .age-icon {
        width: 70px;
        height: 70px;
        margin: 0 auto 10px;
    }
    
    .age-tab h3 {
        font-size: 0.82rem;
        padding: 0 4px;
    }
    
    .product-img {
        height: 220px;
    }
    
    .product-content {
        padding: 18px;
    }
    
    .product-content h3 {
        font-size: 1rem;
    }
    
    .product-price {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .age-tabs {
        gap: 14px 10px;
    }
    
    .age-tab {
        flex: 0 1 calc(50% - 5px);
        min-width: 120px;
    }
    
    .age-icon {
        width: 65px;
        height: 65px;
        margin: 0 auto 8px;
        padding: 4px;
    }
    
    .age-tab h3 {
        font-size: 0.75rem;
        line-height: 1.2;
        padding: 0 2px;
    }
}

@media (max-width: 380px) {
    .age-tabs {
        gap: 12px 8px;
    }
    
    .age-tab {
        flex: 0 1 calc(50% - 4px);
        min-width: 110px;
    }
    
    .age-icon {
        width: 60px;
        height: 60px;
        margin: 0 auto 6px;
        padding: 3px;
    }
    
    .age-tab h3 {
        font-size: 0.7rem;
    }
}
