/**
 * ⚡ DYNAMIC CATEGORIES CSS
 * Styling cho hệ thống danh mục sản phẩm động
 */

/* Category Grid Styles */
.category-showcase {
    margin: 30px 0;
    padding: 20px 0;
    background: #f8f9fa;
    border-radius: 10px;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    padding: 20px;
}

.category-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    overflow: hidden;
    position: relative;
}

.category-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.category-image-wrapper {
    position: relative;
    height: 180px;
    overflow: hidden;
}

.category-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.category-card:hover .category-image {
    transform: scale(1.05);
}

.category-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(236, 45, 45, 0.1), rgba(236, 45, 45, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.category-card:hover .category-overlay {
    opacity: 1;
}

.category-content {
    padding: 20px;
    text-align: center;
}

.category-name {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0 0 10px 0;
    line-height: 1.4;
}

.category-desc {
    font-size: 14px;
    color: #666;
    margin: 0 0 15px 0;
    line-height: 1.5;
}

.category-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #ec2d2d;
    color: #fff;
    text-decoration: none;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.category-btn:hover {
    background: #d12626;
    color: #fff;
    text-decoration: none;
    transform: translateX(5px);
}

.category-btn i {
    transition: transform 0.3s ease;
}

.category-btn:hover i {
    transform: translateX(3px);
}

/* Loading States */
.category-loading {
    padding: 60px 20px;
    text-align: center;
}

.loading-placeholder {
    background: #fff;
    border-radius: 12px;
    padding: 40px 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.loading-placeholder .fa-spinner {
    font-size: 32px;
    color: #ec2d2d;
    margin-bottom: 15px;
}

.loading-placeholder p {
    font-size: 16px;
    color: #666;
    margin: 0;
}

/* Dropdown Menu Styles */
.dropdown-menu .nav-item {
    border-bottom: 1px solid #f0f0f0;
}

.dropdown-menu .nav-item:last-child {
    border-bottom: none;
}

.dropdown-menu .nav-link {
    padding: 12px 20px;
    color: #333;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dropdown-menu .nav-link:hover {
    background: #f8f9fa;
    color: #ec2d2d;
    text-decoration: none;
    padding-left: 25px;
}

.dropdown-menu .nav-link i {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .category-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        gap: 15px;
    }
}

@media (max-width: 768px) {
    .category-showcase {
        margin: 20px 0;
        padding: 15px 0;
    }
    
    .category-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 15px;
        padding: 15px;
    }
    
    .category-image-wrapper {
        height: 150px;
    }
    
    .category-content {
        padding: 15px;
    }
    
    .category-name {
        font-size: 16px;
    }
    
    .category-desc {
        font-size: 13px;
    }
    
    .category-btn {
        padding: 8px 16px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .category-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        padding: 10px;
    }
    
    .category-image-wrapper {
        height: 120px;
    }
    
    .category-content {
        padding: 10px;
    }
    
    .category-name {
        font-size: 14px;
        margin-bottom: 5px;
    }
    
    .category-desc {
        display: none;
    }
    
    .category-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
}

/* Animation cho category cards */
.category-card {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

.category-card:nth-child(1) { animation-delay: 0.1s; }
.category-card:nth-child(2) { animation-delay: 0.2s; }
.category-card:nth-child(3) { animation-delay: 0.3s; }
.category-card:nth-child(4) { animation-delay: 0.4s; }
.category-card:nth-child(5) { animation-delay: 0.5s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Global Technology Section Styles */
.global-tech-item {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 3px 12px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.global-tech-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}

.tech-image-container {
    margin-bottom: 15px;
}

.tech-image {
    width: 60px;
    height: 60px;
    object-fit: contain;
    margin: 0 auto;
    display: block;
}

.tech-content h3 {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0 0 10px 0;
}

.tech-description {
    font-size: 14px;
    color: #666;
    margin: 0 0 15px 0;
}

.tech-link {
    display: inline-block;
    padding: 8px 16px;
    background: #ec2d2d;
    color: #fff;
    text-decoration: none;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.tech-link:hover {
    background: #d12626;
    color: #fff;
    text-decoration: none;
    transform: scale(1.05);
}