/* =============================================
   PRODUCTS PAGE - OPTIMIZED LAYOUT
   Based on deltamachine.ro structure
   ============================================= */

/* Products Hero Section - COMPACT */
.products-hero {
    background: linear-gradient(135deg, #0f1d36 0%, #1a2b4a 50%, #243a5e 100%);
    padding: calc(80px + 30px) 0 30px;
    position: relative;
    overflow: hidden;
}

.products-hero::before {
    content: '';
    position: absolute;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(237, 48, 61, 0.12) 0%, transparent 70%);
    border-radius: 50%;
    top: -300px;
    right: -200px;
    animation: float 25s ease-in-out infinite;
}

.products-hero::after {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(0, 180, 216, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    bottom: -200px;
    left: -150px;
    animation: float 20s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0);
    }
    50% {
        transform: translate(50px, -50px);
    }
}

.products-hero-content {
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.products-hero-content h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--color-white);
    margin-bottom: 12px;
    line-height: 1.2;
}

.products-hero-content h1 .highlight {
    background: linear-gradient(135deg, var(--color-vibrant-red) 0%, #FF6B60 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.products-hero-content p {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.4;
}

/* Main Categories Section - COMPACT */
.categories-main-section {
    padding: 40px 0;
    background: linear-gradient(to bottom, #FAFBFC 0%, #F5F7FA 100%);
}

/* Category Main Block - COMPACT */
.category-main-block {
    margin-bottom: 30px;
    background: var(--color-white);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    transition: var(--transition-smooth);
}

.category-main-block:hover {
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.1);
    transform: translateY(-4px);
}

.category-main-block:last-child {
    margin-bottom: 0;
}

/* Split Row Layout for 2 Categories Side by Side */
.category-split-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-bottom: 30px;
}

.category-half {
    margin-bottom: 0 !important;
}

/* Responsive: Stack on mobile */
@media (max-width: 968px) {
    .category-split-row {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* Category Main Header - COMPACT */
.category-main-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid #F0F2F5;
    position: relative;
}

.category-main-header::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 120px;
    height: 3px;
    background: linear-gradient(90deg, var(--color-vibrant-red) 0%, transparent 100%);
}

/* Category Main Icon - COMPACT */
.category-main-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, rgba(237, 48, 61, 0.1) 0%, rgba(237, 48, 61, 0.05) 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    transition: var(--transition-smooth);
}

.category-main-icon::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(237, 48, 61, 0.1), transparent);
    transform: rotate(45deg);
    transition: var(--transition-smooth);
}

.category-main-block:hover .category-main-icon {
    background: linear-gradient(135deg, rgba(237, 48, 61, 0.15) 0%, rgba(237, 48, 61, 0.1) 100%);
    transform: scale(1.05);
}

.category-main-block:hover .category-main-icon::before {
    animation: shimmer 1.5s ease;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) rotate(45deg);
    }
}

.category-main-icon i {
    font-size: 1.75rem;
    color: var(--color-vibrant-red);
    position: relative;
    z-index: 1;
    transition: var(--transition-fast);
}

.category-main-block:hover .category-main-icon i {
    transform: rotate(10deg) scale(1.1);
}

/* Category Main Text - COMPACT */
.category-main-text h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-navy);
    margin-bottom: 4px;
    line-height: 1.2;
}

.category-main-text p {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    font-weight: 500;
}

/* Subcategories Grid - COMPACT */
.subcategories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

/* Subcategory Card - COMPACT WITH IMAGE */
.subcategory-card {
    position: relative;
    background: var(--color-white);
    border: 2px solid #F0F2F5;
    border-radius: 10px;
    text-decoration: none;
    transition: var(--transition-smooth);
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 16px;
    overflow: hidden;
    min-height: 140px;
}

.subcategory-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(237, 48, 61, 0.03) 0%, transparent 50%);
    opacity: 0;
    transition: var(--transition-smooth);
}

.subcategory-card:hover {
    border-color: var(--color-vibrant-red);
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(237, 48, 61, 0.15);
}

.subcategory-card:hover::before {
    opacity: 1;
}

/* Product Image Preview */
.product-image-preview {
    width: 120px;
    height: 100%;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #e9ecef 0%, #f8f9fa 100%);
    flex-shrink: 0;
}

/* Background transparent pentru logo BlackFast */
.product-image-preview:has(img.logo-small) {
    background: #ffffff;
}

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

/* Logo BlackFast - maxim până la margini, fără background */
.product-image-preview img.logo-small {
    object-fit: contain;
    padding: 10px;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    background: transparent;
}

.subcategory-card:hover .product-image-preview img {
    transform: scale(1.15);
}

/* Logo BlackFast hover - scale simplu */
.subcategory-card:hover .product-image-preview img.logo-small {
    transform: scale(1.05);
}

.product-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(237, 48, 61, 0.8) 0%, rgba(0, 102, 204, 0.8) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.subcategory-card:hover .product-image-overlay {
    opacity: 1;
}

/* Subcategory Content Wrapper */
.subcategory-content {
    display: flex;
    flex-direction: column;
    padding: 16px 16px 16px 0;
    position: relative;
    z-index: 1;
}

/* Subcategory Icon - COMPACT */
.subcategory-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #F8F9FA 0%, #E9ECEF 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    transition: var(--transition-smooth);
    position: relative;
    z-index: 1;
}

.subcategory-card:hover .subcategory-icon {
    background: linear-gradient(135deg, var(--color-vibrant-red) 0%, #FF6B60 100%);
    transform: scale(1.1) rotate(-5deg);
    box-shadow: 0 8px 24px rgba(237, 48, 61, 0.3);
}

.subcategory-icon i {
    font-size: 1rem;
    color: var(--color-navy);
    transition: var(--transition-fast);
}

.subcategory-card:hover .subcategory-icon i {
    color: var(--color-white);
    transform: scale(1.1);
}

/* Subcategory Title - COMPACT */
.subcategory-card h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--color-navy);
    margin-bottom: 8px;
    line-height: 1.3;
    position: relative;
    z-index: 1;
    transition: var(--transition-fast);
}

.subcategory-card:hover h3 {
    color: var(--color-vibrant-red);
}

/* Subcategory List - COMPACT */
.subcategory-card ul {
    list-style: none;
    margin-bottom: 8px;
    flex-grow: 1;
    position: relative;
    z-index: 1;
}

.subcategory-card ul li {
    padding-left: 14px;
    color: var(--color-text-secondary);
    font-size: 0.8125rem;
    line-height: 1.4;
    position: relative;
    transition: var(--transition-fast);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.subcategory-card ul li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--color-vibrant-red);
    font-weight: 700;
    transition: var(--transition-fast);
}

.subcategory-card:hover ul li {
    color: var(--color-text-primary);
}

.subcategory-card:hover ul li::before {
    transform: translateX(4px);
}

/* Subcategory Count - COMPACT */
.subcategory-count {
    display: inline-block;
    padding: 6px 12px;
    background: linear-gradient(135deg, #F8F9FA 0%, #E9ECEF 100%);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--color-navy);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    position: relative;
    z-index: 1;
    transition: var(--transition-smooth);
    white-space: nowrap;
}

.subcategory-card:hover .subcategory-count {
    background: linear-gradient(135deg, var(--color-navy) 0%, #0D2238 100%);
    color: var(--color-white);
    transform: scale(1.05);
}

/* Featured Badge */
.subcategory-card.featured {
    border-color: rgba(237, 48, 61, 0.3);
    background: linear-gradient(135deg, rgba(237, 48, 61, 0.02) 0%, var(--color-white) 100%);
}

.subcategory-card.featured::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--color-vibrant-red) 0%, #FF6B60 100%);
}

.featured-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 4px 10px;
    background: linear-gradient(135deg, var(--color-vibrant-red) 0%, #FF6B60 100%);
    color: var(--color-white);
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(237, 48, 61, 0.3);
    animation: pulse-badge 2s ease-in-out infinite;
    z-index: 3;
}

@keyframes pulse-badge {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 4px 16px rgba(237, 48, 61, 0.3);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 8px 24px rgba(237, 48, 61, 0.5);
    }
}

/* Video Showcase Section */
.video-showcase-section {
    margin: 50px 0;
    padding: 40px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.video-showcase-header {
    text-align: center;
    margin-bottom: 35px;
}

.video-showcase-header h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--color-navy);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.video-showcase-header h2 i {
    color: var(--color-vibrant-red);
    font-size: 1.5rem;
}

.video-showcase-header p {
    color: var(--color-text-secondary);
    font-size: 1rem;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.video-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    display: block;
    color: inherit;
}

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

.video-thumbnail {
    position: relative;
    width: 100%;
    height: 180px;
    overflow: hidden;
    background: #000;
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease, opacity 0.3s ease;
}

.video-card:hover .video-thumbnail img {
    transform: scale(1.1);
    opacity: 0.8;
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--color-vibrant-red) 0%, #FF6B60 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(237, 48, 61, 0.4);
}

.video-card:hover .play-button {
    transform: translate(-50%, -50%) scale(1.15);
    box-shadow: 0 6px 30px rgba(237, 48, 61, 0.6);
}

.play-button i {
    margin-left: 4px;
}

.video-card h3 {
    padding: 16px 16px 8px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--color-navy);
    transition: color 0.3s ease;
}

.video-card:hover h3 {
    color: var(--color-vibrant-red);
}

.video-card p {
    padding: 0 16px 16px;
    color: var(--color-text-secondary);
    font-size: 0.875rem;
    line-height: 1.5;
}

/* Products Info Banner - EXACT DESIGN FROM IMAGE */
.products-info-banner {
    padding: 50px 0;
    background: linear-gradient(180deg, #0B0E2B 0%, #1D2450 100%);
    position: relative;
    overflow: hidden;
}

.products-info-banner::before {
    content: '';
    position: absolute;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(75, 85, 150, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    bottom: -400px;
    right: -300px;
}

.info-banner-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.info-banner-content h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.875rem;
    font-weight: 700;
    color: #FFFFFF;
    margin-bottom: 14px;
    line-height: 1.3;
    letter-spacing: -0.02em;
}

.info-banner-content p {
    font-size: 0.9375rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 26px;
    line-height: 1.5;
    font-weight: 400;
}

.info-banner-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    align-items: center;
}

/* Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md) var(--spacing-xl);
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
    border: none;
    cursor: pointer;
}

.btn-lg {
    padding: calc(var(--spacing-md) + 4px) calc(var(--spacing-xl) + 8px);
    font-size: 1.125rem;
}

.btn-primary {
    background: #FF5555;
    color: #FFFFFF;
    box-shadow: 0 6px 20px rgba(255, 85, 85, 0.35);
    border: none;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
    transition: left 0.5s ease;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(255, 85, 85, 0.45);
    background: #FF6666;
}

.btn-secondary {
    background: transparent;
    backdrop-filter: none;
    color: #FFFFFF;
    border: 2px solid rgba(255, 255, 255, 0.25);
    box-shadow: none;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(255, 255, 255, 0.15);
    color: #FFFFFF;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .subcategories-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }
}

@media (max-width: 768px) {
    .video-showcase-section {
        padding: 24px;
        margin: 30px 0;
    }
    
    .video-showcase-header h2 {
        font-size: 1.5rem;
        flex-direction: column;
        gap: 8px;
    }
    
    .video-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .video-thumbnail {
        height: 200px;
    }
    
    .products-hero {
        padding: calc(80px + var(--spacing-lg)) 0 var(--spacing-lg);
    }
    
    .products-hero-content h1 {
        font-size: 2.5rem;
    }
    
    .products-hero-content p {
        font-size: 1rem;
    }
    
    .categories-main-section {
        padding: var(--spacing-lg) 0;
    }
    
    .category-main-block {
        padding: var(--spacing-lg);
        margin-bottom: var(--spacing-xl);
    }
    
    .category-main-header {
        gap: var(--spacing-md);
        margin-bottom: var(--spacing-lg);
    }
    
    .category-main-icon {
        width: 60px;
        height: 60px;
    }
    
    .category-main-icon i {
        font-size: 2rem;
    }
    
    .category-main-text h2 {
        font-size: 1.75rem;
    }
    
    .category-main-text p {
        font-size: 1rem;
    }
    
    .subcategories-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .subcategory-card {
        grid-template-columns: 100px 1fr;
        gap: 12px;
    }
    
    .product-image-preview {
        width: 100px;
    }
    
    .subcategory-content {
        padding: 12px 12px 12px 0;
    }
    
    .subcategory-card h3 {
        font-size: 1.25rem;
    }
    
    .info-banner-content h2 {
        font-size: 2rem;
    }
    
    .info-banner-content p {
        font-size: 1rem;
    }
    
    .info-banner-actions {
        flex-direction: column;
    }
    
    .info-banner-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .products-hero-content h1 {
        font-size: 2rem;
    }
    
    .category-main-icon {
        width: 50px;
        height: 50px;
    }
    
    .category-main-icon i {
        font-size: 1.5rem;
    }
    
    .category-main-text h2 {
        font-size: 1.5rem;
    }
    
    .subcategory-card {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .product-image-preview {
        width: 100%;
        height: 120px;
    }
    
    .subcategory-content {
        padding: 12px;
    }
    
    .subcategory-icon {
        width: 36px;
        height: 36px;
    }
    
    .subcategory-icon i {
        font-size: 1rem;
    }
    
    .info-banner-content h2 {
        font-size: 1.75rem;
    }
}
