/* Categories Section Styling */
.categories-section {
    padding: 40px 0;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    min-height: 500px;
}

.categories-section .container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 30px;
    width: 100%;
    margin: 0;
    padding: 0;
    grid-auto-flow: row;
    max-height: 660px;
}

/* Force the first 4 category cards into specific grid positions */
.category-card:nth-child(1) { grid-column: 1; grid-row: 1; }
.category-card:nth-child(2) { grid-column: 2; grid-row: 1; }
.category-card:nth-child(3) { grid-column: 1; grid-row: 2; }
.category-card:nth-child(4) { grid-column: 2; grid-row: 2; }
.category-card:nth-child(n+5) { display: none; }

.category-card {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    position: relative;
    min-height: 300px;
    height: 411px;
    text-decoration: none;
    display: block;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
    text-decoration: none;
}

.category-background {
    position: relative;
    width: 100%;
    height: 100%;
    background-size: 100%;
    /*background-position: center;*/
    background-repeat: no-repeat;
    display: flex;
    flex-direction: column;
}

/* Character positioning on left side */
.category-character {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 30%;
    width: 60%;
    z-index: 2;
}

.character-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: left center;
}

/* Badge positioning in top-right */
.category-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 300px;
    height: 218px;
    z-index: 3;
}

.badge-icon {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* Bottom purple section - exactly like image.png */
.category-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 25%;
    background: linear-gradient(90deg,rgba(82, 22, 182, 1) 0%, rgba(37, 150, 190, 1) 50%, rgba(103, 190, 217, 1) 100%);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 4;
}

.category-main {
    flex: 1;
}

.category-title {
    font-size: 1.4rem;
    font-weight: 900;
    color: #fbbf24;
    margin: 0 0 2px 0;
    text-transform: uppercase;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    line-height: 1.1;
}

.category-subtitle {
    font-size: 1.2rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    line-height: 1.1;
}

.category-footer {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.guarantee {
    font-size: 0.85rem;
    color: #ffffff;
    font-weight: 600;
    text-align: right;
    white-space: nowrap;
}

.view-all-btn {
    background: #ffffff;
    color: #e74c3c;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: bold;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    white-space: nowrap;
}

.view-all-btn:hover {
    background: #f8f9fa;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    color: #e74c3c;
    text-decoration: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .categories-section .container {
        padding: 0 1rem;
    }
    
    .categories-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        gap: 20px;
    }
    
    .category-card {
        height: 250px;
    }
    
    .category-character {
        width: 50%;
        bottom: 35%;
    }
    
    .category-badge {
        width: 80px;
        height: 60px;
        top: 8px;
        right: 8px;
    }
    
    .category-info {
        height: 35%;
        padding: 12px 15px;
    }
    
    .category-title {
        font-size: 1.1rem;
    }
    
    .category-subtitle {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .category-card {
        height: 220px;
    }
    
    .category-character {
        width: 45%;
        bottom: 40%;
    }
    
    .category-badge {
        width: 60px;
        height: 45px;
        top: 5px;
        right: 5px;
    }
    
    .category-info {
        height: 40%;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .category-footer {
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    
    .view-all-btn {
        padding: 6px 12px;
        font-size: 0.75rem;
    }
}