/* Malu Category Slider - Grid Sistema */

.malu-category-slider-wrapper {
    position: relative;
    max-width: 100%;
    margin: 40px auto;
    padding: 0 50px;
}

.malu-category-slider {
    position: relative;
    display: flex;
    align-items: center;
    gap: 20px;
}

.malu-category-slider-container {
    overflow: hidden;
    flex: 1;
    position: relative;
}

/* ============================================
   GRID SISTEMA - Paprastas ir patikimas
   ============================================ */

.malu-category-slider-track {
    display: grid;
    grid-template-columns: repeat(var(--desktop-cols, 4), 1fr);
    grid-template-rows: repeat(var(--desktop-rows, 1), 1fr);
    gap: 20px;
    transition: transform 0.4s ease-in-out;
    width: 100%;
}

.malu-category-item {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    width: 100%;
    display: flex;
    flex-direction: column;
}

.malu-category-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.malu-category-link {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

.malu-category-image {
    width: 100%;
    overflow: hidden;
    background: #f5f5f5;
    position: relative;
    padding-top: 100%;
    flex-shrink: 0;
}

.malu-category-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.malu-category-item:hover .malu-category-image img {
    transform: scale(1.05);
}

.malu-category-title {
    font-size: clamp(14px, 1.2vw, 18px);
    font-weight: 600;
    margin: 15px 15px 5px;
    color: #333;
    text-align: center;
    line-height: 1.3;
}

.malu-category-count {
    display: block;
    font-size: clamp(12px, 1vw, 14px);
    color: #666;
    text-align: center;
    margin: 0 15px 15px;
    margin-top: auto;
}

/* ============================================
   PAVEIKSLĖLIO FORMOS
   ============================================ */

.malu-shape-square .malu-category-image {
    border-radius: 0;
    padding-top: 100%;
}

.malu-shape-rounded .malu-category-image {
    border-radius: 12px;
    padding-top: 100%;
}

.malu-shape-soft-rounded .malu-category-image {
    border-radius: 6px;
    padding-top: 100%;
}

.malu-shape-circle .malu-category-image {
    border-radius: 50%;
    padding-top: 100%;
}

.malu-shape-portrait .malu-category-image {
    padding-top: 133.33%;
}

.malu-shape-landscape .malu-category-image {
    padding-top: 75%;
}

/* ============================================
   ŠEŠĖLIAI
   ============================================ */

.malu-shadow-none .malu-category-item {
    box-shadow: none;
    border: 1px solid #e0e0e0;
}

.malu-shadow-none .malu-category-item:hover {
    box-shadow: none;
    border-color: #ccc;
}

.malu-shadow-subtle .malu-category-item {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.malu-shadow-subtle .malu-category-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.malu-shadow-normal .malu-category-item {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.malu-shadow-normal .malu-category-item:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.malu-shadow-strong .malu-category-item {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.malu-shadow-strong .malu-category-item:hover {
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
}

.malu-shadow-glow .malu-category-item {
    box-shadow: 0 0 20px rgba(0, 123, 255, 0.15);
}

.malu-shadow-glow .malu-category-item:hover {
    box-shadow: 0 0 30px rgba(0, 123, 255, 0.3);
}

/* ============================================
   SLIDER KONTROLĖS
   ============================================ */

.malu-slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    color: #333;
}

.malu-slider-arrow:hover {
    background: #333;
    border-color: #333;
    color: #fff;
}

.malu-slider-arrow:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.malu-slider-arrow:disabled:hover {
    background: #fff;
    border-color: #e0e0e0;
    color: #333;
}

.malu-slider-prev {
    left: -50px;
}

.malu-slider-next {
    right: -50px;
}

.malu-slider-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

.malu-slider-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ddd;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.malu-slider-dot:hover {
    background: #999;
}

.malu-slider-dot.active {
    background: #333;
    width: 32px;
    border-radius: 6px;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media screen and (max-width: 1024px) {
    .malu-category-slider-wrapper {
        padding: 0 40px;
    }
    
    .malu-slider-arrow {
        width: 40px;
        height: 40px;
    }
    
    .malu-slider-prev {
        left: -40px;
    }
    
    .malu-slider-next {
        right: -40px;
    }
    
    .malu-category-title {
        font-size: clamp(13px, 1.5vw, 16px);
        margin: 12px 10px 5px;
    }
    
    .malu-category-count {
        font-size: clamp(11px, 1.2vw, 13px);
        margin: 0 10px 12px;
    }
}

@media screen and (max-width: 768px) {
    .malu-category-slider-wrapper {
        padding: 0 10px;
    }
    
    .malu-category-slider-track {
        grid-template-columns: repeat(var(--mobile-cols, 2), 1fr);
        grid-template-rows: repeat(var(--mobile-rows, 2), 1fr);
        gap: 15px;
    }
    
    .malu-slider-arrow {
        width: 36px;
        height: 36px;
        border-width: 1px;
    }
    
    .malu-slider-arrow svg {
        width: 20px;
        height: 20px;
    }
    
    .malu-slider-prev {
        left: -5px;
    }
    
    .malu-slider-next {
        right: -5px;
    }
    
    .malu-category-title {
        font-size: 14px;
        margin: 10px 8px 5px;
    }
    
    .malu-category-count {
        font-size: 12px;
        margin: 0 8px 10px;
    }
    
    .malu-slider-dots {
        margin-top: 20px;
    }
    
    .malu-slider-dot {
        width: 8px;
        height: 8px;
    }
    
    .malu-slider-dot.active {
        width: 24px;
    }
}

@media screen and (max-width: 480px) {
    .malu-category-slider-wrapper {
        padding: 0 5px;
    }
    
    .malu-category-slider-track {
        gap: 10px;
        grid-template-columns: repeat(var(--mobile-cols, 2), 1fr);
    }
    
    .malu-slider-arrow {
        width: 32px;
        height: 32px;
    }
    
    .malu-slider-arrow svg {
        width: 18px;
        height: 18px;
    }
    
    .malu-category-item {
        border-radius: 8px;
    }
    
    .malu-category-title {
        font-size: 13px;
        margin: 8px 6px 4px;
    }
    
    .malu-category-count {
        font-size: 11px;
        margin: 0 6px 8px;
    }
}

/* ============================================
   GRID OPTIMIZACIJA PAGAL STULPELIŲ SKAIČIŲ
   ============================================ */

.malu-category-slider-wrapper[data-desktop-cols="5"] .malu-category-title,
.malu-category-slider-wrapper[data-desktop-cols="6"] .malu-category-title {
    margin: 10px 8px 4px;
    font-size: clamp(12px, 1vw, 16px);
}

.malu-category-slider-wrapper[data-desktop-cols="5"] .malu-category-count,
.malu-category-slider-wrapper[data-desktop-cols="6"] .malu-category-count {
    margin: 0 8px 10px;
    font-size: clamp(11px, 0.9vw, 13px);
}

.malu-category-slider-wrapper[data-desktop-cols="1"] .malu-category-title {
    font-size: clamp(16px, 2vw, 22px);
    margin: 20px 15px 8px;
}

.malu-category-slider-wrapper[data-desktop-cols="1"] .malu-category-count {
    font-size: clamp(14px, 1.5vw, 16px);
    margin: 0 15px 20px;
}

@media screen and (max-width: 768px) {
    .malu-category-slider-wrapper[data-mobile-cols="1"] .malu-category-title {
        font-size: 16px;
        margin: 15px 12px 6px;
    }
    
    .malu-category-slider-wrapper[data-mobile-cols="1"] .malu-category-count {
        font-size: 14px;
        margin: 0 12px 15px;
    }
    
    .malu-category-slider-wrapper[data-mobile-cols="3"] .malu-category-title {
        font-size: 12px;
        margin: 8px 6px 4px;
    }
    
    .malu-category-slider-wrapper[data-mobile-cols="3"] .malu-category-count {
        font-size: 11px;
        margin: 0 6px 8px;
    }
}