/* =====================================================
   CATEGORIES SECTION - 2025 Premium Card Design
   "Šta želite danas?" - Grid Cards on Desktop, List on Mobile
   ===================================================== */

.categories-section {
    padding: 100px 0;
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, 
        rgba(12, 12, 20, 0) 0%,
        rgba(16, 16, 32, 0.4) 50%,
        rgba(12, 12, 20, 0) 100%);
}

.categories-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse 60% 40% at 30% 20%, rgba(255, 107, 53, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse 50% 50% at 70% 80%, rgba(255, 152, 0, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

/* Categories Header */
.categories-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 50px;
    flex-wrap: wrap;
    gap: 20px;
    position: relative;
    z-index: 2;
}

.categories-header__content {
    max-width: 550px;
}

.categories-header__content h2 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, #fff 0%, rgba(255,255,255,0.9) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.categories-header__content p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.1rem;
    line-height: 1.6;
}

/* Categories Grid - Desktop: 3-4 columns, Tablet: 2, Mobile: List */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    position: relative;
    z-index: 2;
}

/* Category Card - Desktop Version (Vertical Cards) */
.category-card {
    position: relative;
    background: linear-gradient(145deg, 
        rgba(30, 30, 45, 0.7), 
        rgba(18, 18, 28, 0.9));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 32px 28px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 20px;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    min-height: 220px;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

/* Gradient border effect on hover */
.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, 
        transparent, 
        var(--primary), 
        var(--secondary, #ff9800),
        transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
}

/* Subtle background glow */
.category-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(
        circle at center,
        rgba(255, 107, 53, 0.1) 0%,
        transparent 50%
    );
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.category-card:hover {
    transform: translateY(-10px);
    border-color: rgba(255, 107, 53, 0.3);
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.4),
        0 0 40px rgba(255, 107, 53, 0.1);
}

.category-card:hover::before {
    opacity: 1;
}

.category-card:hover::after {
    opacity: 1;
}

/* Featured card - Special styling for first item */
.category-card--featured {
    grid-column: span 1;
    background: linear-gradient(145deg, 
        rgba(40, 30, 35, 0.8), 
        rgba(25, 18, 22, 0.95));
    border-color: rgba(255, 107, 53, 0.15);
}

/* Category Icon - Large centered icon */
.category-card__icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, 
        rgba(255, 107, 53, 0.2), 
        rgba(255, 140, 0, 0.1));
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--primary);
    transition: all 0.4s ease;
    border: 1px solid rgba(255, 107, 53, 0.2);
    position: relative;
    z-index: 2;
}

/* Icon inner glow */
.category-card__icon::after {
    content: '';
    position: absolute;
    inset: -5px;
    border-radius: 28px;
    background: radial-gradient(
        circle,
        rgba(255, 107, 53, 0.2) 0%,
        transparent 70%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.category-card:hover .category-card__icon {
    transform: scale(1.1) rotate(-3deg);
    background: linear-gradient(135deg, 
        rgba(255, 107, 53, 0.35), 
        rgba(255, 140, 0, 0.25));
    box-shadow: 0 10px 30px rgba(255, 107, 53, 0.3);
}

.category-card:hover .category-card__icon::after {
    opacity: 1;
}

/* Category Content */
.category-card__content {
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
    z-index: 2;
}

.category-card__title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    color: white;
    letter-spacing: -0.01em;
    line-height: 1.3;
    transition: color 0.3s ease;
}

.category-card:hover .category-card__title {
    color: white;
}

.category-card--featured .category-card__title {
    font-size: 1.35rem;
}

.category-card__count {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 400;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.category-card__count span {
    color: var(--primary);
    font-weight: 700;
    font-size: 1rem;
}

.category-card__description {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.5;
    margin-top: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Category Arrow - Desktop shows as "explore" button */
.category-card__arrow {
    width: 44px;
    height: 44px;
    min-width: 44px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.5);
    transition: all 0.4s ease;
    font-size: 0.9rem;
    margin-top: 8px;
    position: relative;
    z-index: 2;
}

.category-card:hover .category-card__arrow {
    background: linear-gradient(135deg, var(--primary), var(--secondary, #ff9800));
    border-color: transparent;
    color: white;
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.4);
}

/* =====================================================
   DESKTOP SPECIFIC - 992px+ (Card Grid)
   ===================================================== */
@media (min-width: 992px) {
    .categories-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 28px;
    }
    
    .category-card {
        padding: 36px 28px;
        min-height: 260px;
    }
    
    .category-card__icon {
        width: 90px;
        height: 90px;
        font-size: 2.2rem;
        border-radius: 28px;
    }
    
    .category-card__title {
        font-size: 1.3rem;
    }
    
    /* Hide arrow on desktop, show hover effect instead */
    .category-card__arrow {
        opacity: 0;
        transform: translateY(10px);
    }
    
    .category-card:hover .category-card__arrow {
        opacity: 1;
        transform: translateY(0) scale(1.1);
    }
}

/* =====================================================
   TABLET - 768px to 991px (2 Column Grid)
   ===================================================== */
@media (min-width: 768px) and (max-width: 991px) {
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .category-card {
        padding: 28px 24px;
        min-height: 200px;
    }
    
    .category-card__icon {
        width: 70px;
        height: 70px;
        font-size: 1.8rem;
    }
    
    .category-card__arrow {
        opacity: 0;
    }
    
    .category-card:hover .category-card__arrow {
        opacity: 1;
    }
}

/* =====================================================
   MOBILE - Under 768px (Compact List)
   ===================================================== */
@media (max-width: 767px) {
    .categories-section {
        padding: 60px 0;
    }
    
    .categories-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 16px;
        margin-bottom: 30px;
    }
    
    .categories-header__content {
        text-align: center;
    }
    
    .categories-header__content h2 {
        font-size: 1.6rem;
    }
    
    .categories-header__content p {
        font-size: 0.9rem;
    }
    
    /* Switch to horizontal list layout */
    .categories-grid {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
    
    .category-card {
        flex-direction: row;
        align-items: center;
        text-align: left;
        padding: 14px 16px;
        gap: 14px;
        border-radius: 16px;
        min-height: 0;
    }
    
    .category-card::before,
    .category-card::after {
        display: none;
    }
    
    /* Add left accent line on mobile */
    .category-card {
        border-left: 3px solid transparent;
        transition: all 0.3s ease, border-color 0.3s ease;
    }
    
    .category-card:hover {
        transform: translateX(6px);
        border-left-color: var(--primary);
    }
    
    .category-card__icon {
        width: 48px;
        height: 48px;
        min-width: 48px;
        font-size: 1.3rem;
        border-radius: 14px;
        flex-shrink: 0;
    }
    
    .category-card:hover .category-card__icon {
        transform: scale(1.05);
    }
    
    .category-card__content {
        flex: 1;
        min-width: 0;
        gap: 2px;
        align-items: flex-start;
    }
    
    .category-card__title {
        font-size: 1rem;
    }
    
    .category-card__count {
        font-size: 0.8rem;
        justify-content: flex-start;
    }
    
    .category-card__count span {
        font-size: 0.85rem;
    }
    
    .category-card__description {
        display: none;
    }
    
    /* Show arrow on mobile list */
    .category-card__arrow {
        width: 34px;
        height: 34px;
        min-width: 34px;
        font-size: 0.8rem;
        margin-top: 0;
        opacity: 1;
        transform: none;
    }
    
    .category-card:hover .category-card__arrow {
        transform: translateX(3px);
    }
}

/* Small mobile - 480px and below */
@media (max-width: 480px) {
    .categories-section {
        padding: 50px 0;
    }
    
    .categories-header {
        margin-bottom: 24px;
    }
    
    .categories-header__content h2 {
        font-size: 1.4rem;
    }
    
    .categories-header__content p {
        font-size: 0.85rem;
    }
    
    .categories-grid {
        gap: 8px;
    }
    
    .category-card {
        padding: 12px 14px;
        gap: 12px;
        border-radius: 14px;
    }
    
    .category-card__icon {
        width: 42px;
        height: 42px;
        min-width: 42px;
        font-size: 1.15rem;
        border-radius: 12px;
    }
    
    .category-card__title {
        font-size: 0.95rem;
    }
    
    .category-card__count {
        font-size: 0.75rem;
    }
    
    .category-card__count span {
        font-size: 0.8rem;
    }
    
    .category-card__arrow {
        width: 30px;
        height: 30px;
        min-width: 30px;
        font-size: 0.75rem;
    }
    
    .category-card:hover {
        transform: translateX(4px);
    }
}

/* =====================================================
   CATEGORIES PRODUCTS PREVIEW (if needed)
   ===================================================== */
.categories-products {
    margin-top: 50px;
    position: relative;
    z-index: 2;
}

.categories-products__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.categories-products__title {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 600;
    color: white;
}

.categories-products__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}
