:root {
    --slider-bg: #f5f5f5;
    --card-bg: #D5D5D6;
    --text-primary: #575855;
    --text-secondary: #797977;
    --arrow-bg: #a2a2a2;
   
    /* Category block width: responsive - se mărește pe ecrane mari, se micșorează pe ecrane mici */
    --category-main-width: clamp(240px, 25vw, 420px);
    --category-main-gap: clamp(8px, 1.5vw, 16px);
    
    --product-card-gap: 50px;
    --product-card-padding: 0;
    --product-img-max-height: 320px;
    --product-text-padding: 16px 12px;
    --product-text-size: clamp(14px, calc(20px * 100vw / 1920px), 20px);
    --product-text-line-height: 1.4;
    
    --arrow-size: 52px;
    --arrow-icon-size: 22px;
    --arrow-offset: clamp(40px, 5vw, 80px);
    
    --visible-cards: 3;
    --product-card-width: calc((100% - (var(--visible-cards) - 1) * var(--product-card-gap)) / var(--visible-cards));
}

.dita-gama-produse-slider-wrapper {
    padding: 0;
    background: var(--slider-bg);
    box-sizing: border-box;
}

.gama-category-slider {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) minmax(320px, 2fr);
    gap: var(--category-main-gap);
    align-items: center;
    margin: 0;
    padding: clamp(18px, 3vw, 28px);
    background: var(--slider-bg);
    border-radius: 0;
    box-sizing: border-box;
}

.category-main {
    width: var(--category-main-width);
    max-width: 100%;
    height: auto;
    box-sizing: border-box;
    overflow: visible;
    background: #D5D5D6;
}

.category-image {
    width: 100%;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    line-height: 0;
}

.category-image img {
    width: 100%;
    height: auto;
    max-height: clamp(300px, 50vw, 500px);
    object-fit: contain;
    object-position: center;
    flex-shrink: 0;
    box-sizing: border-box;
}

.category-info {
    width: 100%;
    height: auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: clamp(8px, 1.5vw, 14px);
    padding: clamp(12px, 2vw, 20px);
    box-sizing: border-box;
}

.category-text {
    display: flex;
    flex-direction: column;
    gap: clamp(8px, 1.5vw, 14px);
    width: 100%;
    box-sizing: border-box;
}

.category-name {
    font-family: 'Brandon Text', sans-serif;
    font-weight: 700;
    font-size: clamp(18px, 1.6vw, 24px);
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: clamp(3px, 0.5vw, 5px);
    margin: 0;
    line-height: 1.2;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.category-description {
    font-family: 'Brandon Text', sans-serif;
    font-weight: 400;
    font-size: clamp(15px, 1.3vw, 18px);
    color: var(--text-secondary);
    line-height: 1.4;
    margin: 0;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.category-toggle {
    align-self: flex-end;
    flex-shrink: 0;
    width: clamp(28px, 3vw, 33px);
    height: clamp(28px, 3vw, 33px);
    padding: 0;
    margin: 0;
    border: 1px solid #C7C7C7;
    background: rgba(154, 154, 154, 0.2);
    border-radius: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    transition: background-color 0.2s ease;
}

.category-toggle:hover {
    background: rgba(154, 154, 154, 0.3);
}

.category-toggle-icon {
    width: 7px;
    height: 13px;
    flex-shrink: 0;
}

.category-toggle-icon path {
    fill: var(--text-primary);
}

.category-products-slider {
    position: relative;
    width: 100%;
    /* Spațiu fix pentru toate ecranele desktop - același ca la 1440px */
    margin-left: 2%;
    padding: 0;
    min-width: 0;
    box-sizing: border-box;
}

.products-slider-container {
    position: relative;
    overflow-x: auto;
    overflow-y: hidden;
    width: 100%;
    min-width: 0;
    padding-right: var(--product-card-gap);
    box-sizing: border-box;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.products-slider-container::-webkit-scrollbar {
    display: none;
}

.products-slider-track {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: var(--product-card-gap);
    width: 100%;
    min-width: 0;
    margin-right: calc(-1 * var(--product-card-gap));
    box-sizing: border-box;
    scroll-snap-type: x mandatory;
    transition: transform 0.3s ease;
}

.product-slide {
    flex: 0 0 var(--product-card-width);
    width: var(--product-card-width);
    min-width: var(--product-card-width);
    max-width: var(--product-card-width);
    height: auto;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: var(--product-card-padding);
    background: var(--card-bg);
    border-radius: 0;
    box-sizing: border-box;
    overflow: visible;
    scroll-snap-align: start;
}

.product-slide:hover,
.product-slide:active,
.product-slide:focus {
    width: var(--product-card-width);
    min-width: var(--product-card-width);
    max-width: var(--product-card-width);
    height: auto;
    padding: var(--product-card-padding);
    margin: 0;
    transform: none;
    scale: 1;
    border: none;
    outline: none;
    box-shadow: none;
}

.product-slide img {
    width: 100%;
    height: auto;
    max-height: var(--product-img-max-height);
    object-fit: contain;
    object-position: center;
    flex-shrink: 0;
    box-sizing: border-box;
    transform: none;
    transition: none;
}

.product-slide:hover img,
.product-slide:active img,
.product-slide:focus img {
    transform: none;
    scale: 1;
    width: 100%;
    height: auto;
    max-height: var(--product-img-max-height);
}

.product-name {
    width: 100%;
    padding: var(--product-text-padding);
    box-sizing: border-box;
    background: transparent;
    font-family: 'Brandon Text', sans-serif;
    font-weight: 400;
    font-size: var(--product-text-size);
    line-height: var(--product-text-line-height);
    color: var(--text-primary);
    text-transform: uppercase;
    text-align: center;
    margin: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
    transform: none;
    transition: none;
}

.product-slide:hover .product-name,
.product-slide:active .product-name,
.product-slide:focus .product-name {
    padding: var(--product-text-padding);
    margin: 0;
    transform: none;
    font-weight: 400;
    font-size: var(--product-text-size);
    line-height: var(--product-text-line-height);
    background: transparent;
}

.product-name p {
    margin: 0;
    padding: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.product-description {
    display: none;
    visibility: hidden;
    opacity: 0;
    max-height: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
    transition: opacity 0.3s ease, max-height 0.3s ease;
    text-align: center;
    font-family: 'Brandon Text', sans-serif;
    font-size: var(--product-text-size);
    color: var(--text-secondary);
    line-height: var(--product-text-line-height);
}

.product-slide:hover .product-description,
.product-slide:active .product-description,
.product-slide:focus .product-description {
    display: flex;
    visibility: visible;
    opacity: 1;
    max-height: 200px;
    margin: clamp(4px, 1vw, 6px) 0 0 0;
    padding: 0 var(--product-text-padding);
    overflow: visible;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.product-buy-button {
    display: none;
    visibility: hidden;
    opacity: 0;
    max-height: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
    transition: opacity 0.3s ease, max-height 0.3s ease, background 0.3s ease;
    font-family: 'Brandon Text', sans-serif;
    font-weight: 500;
    font-size: clamp(14px, 1.87vw, 17.931px);
    color: var(--text-primary);
    text-align: center;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: clamp(2px, 0.37vw, 3.5862px);
    box-sizing: border-box;
    background: white;
    border-radius: clamp(18px, 2.4vw, 23px);
    width: clamp(200px, 26vw, 260px);
    height: clamp(50px, 6.23vw, 59.77px);
}

.product-slide:hover .product-buy-button,
.product-slide:active .product-buy-button,
.product-slide:focus .product-buy-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    visibility: visible;
    opacity: 1;
    max-height: 100px;
    margin: clamp(12px, 2vw, 16px) auto 10px auto;
    padding: clamp(8px, 1vw, 10px) clamp(16px, 2vw, 20px);
    overflow: visible;
    background: white;
    border-radius: clamp(18px, 2.4vw, 23px);
    width: clamp(150px, 18vw, 220px);
    height: clamp(40px, 4.23vw, 39.77px);
}


.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: var(--arrow-size);
    height: var(--arrow-size);
    min-width: var(--arrow-size);
    min-height: var(--arrow-size);
    background: var(--arrow-bg);
    border: none;
    border-radius: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    box-sizing: border-box;
    transition: background-color 0.2s ease;
    z-index: 10;
    visibility: visible;
    opacity: 1;
}

.slider-arrow-prev {
    left: calc(-1 * var(--arrow-offset));
}

.slider-arrow-next {
    right: calc(0 * var(--arrow-offset));
}

.slider-arrow:hover {
    background: var(--arrow-bg-hover);
}

.slider-arrow:active {
    background: var(--arrow-bg-hover);
}

.slider-arrow:disabled,
.slider-arrow.swiper-button-disabled,
.slider-arrow.is-disabled,
.slider-arrow[disabled],
.slider-arrow[aria-disabled="true"],
.slider-arrow.disabled {
    display: flex;
    visibility: visible;
    opacity: 1;
    cursor: not-allowed;
}

.slider-arrow-prev:disabled,
.slider-arrow-prev.swiper-button-disabled,
.slider-arrow-prev.is-disabled,
.slider-arrow-prev[disabled],
.slider-arrow-prev[aria-disabled="true"],
.slider-arrow-prev.disabled {
    display: flex;
    visibility: visible;
    opacity: 1;
}

.slider-arrow-next:disabled,
.slider-arrow-next.swiper-button-disabled,
.slider-arrow-next.is-disabled,
.slider-arrow-next[disabled],
.slider-arrow-next[aria-disabled="true"],
.slider-arrow-next.disabled {
    display: flex;
    visibility: visible;
    opacity: 1;
}

.slider-arrow img,
.slider-arrow svg {
    width: var(--arrow-icon-size);
    height: var(--arrow-icon-size);
    flex-shrink: 0;
}

@media (min-width: 751px) {
    .category-info {
        position: relative;
        width: 100%;
        flex: 1;
        min-height: clamp(130px, 15vw, 130px);
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: clamp(0.864vw, 16.584px, 0.864vw);
        padding: clamp(10px, 1.5vw, 20px);
        box-sizing: border-box;
        text-align: center;
        z-index: 3;
        margin: 0;
        pointer-events: none;
    }
    
    .category-info .category-text,
    .category-info .category-toggle {
        pointer-events: auto;
    }
}

@media (min-width: 1024px) {
    :root {
        --visible-cards: 3;
        --product-text-size: clamp(16px, calc(20px * 100vw / 1920px), 20px);
    }
    
    .category-toggle {
        display: none;
    }
}

/* La ecrane mai mari de 1600px, mută sliderul cu 10% mai la stânga */
@media (min-width: 1601px) {
    .category-products-slider {
        margin-left: -2% !important; /* 2% - 10% = -8% (mută cu 10% mai la stânga) */
    }
}

@media (min-width: 751px) and (max-width: 1023px) {
    :root {
        --visible-cards: 2;
        --product-card-gap: 16px;
        --product-img-max-height: 300px;
        --product-text-padding: 14px 10px;
        --product-text-size: 13px;
        --arrow-size: 48px;
        --arrow-icon-size: 20px;
        --arrow-offset: clamp(30px, 4vw, 60px);
    }

    .gama-category-slider {
        grid-template-columns: 1fr;
    }

    .category-main {
        width: clamp(240px, 40vw, 380px);
    }

    .category-image img {
        max-height: clamp(250px, 45vw, 400px);
    }

    .product-slide img {
        max-height: clamp(250px, 45vw, 350px);
    }

    .product-slide:hover img,
    .product-slide:active img,
    .product-slide:focus img {
        max-height: clamp(250px, 45vw, 350px);
    }
}

@media (max-width: 750px) {
    :root {
        --visible-cards: 1;
        --product-card-gap: 44px;
        --product-img-max-height: 280px;
        --product-text-padding: 12px 8px;
        --product-text-size: 12px;
        --arrow-size: 42px;
        --arrow-icon-size: 18px;
        --arrow-offset: clamp(20px, 3vw, 40px);
    }

    .category-main {
        width: 100%;
        max-width: 100%;
        padding: 0;
        margin: 0;
    }

    .category-image {
        width: 100%;
        padding: 0;
        margin: 0;
        display: flex;
        flex-direction: column;
        align-items: stretch;
    }

    .category-image img {
        width: 100%;
        max-width: 100%;
        height: auto;
        max-height: none;
        object-fit: cover;
        object-position: center;
        flex: 0 0 auto;
        align-self: stretch;
        padding: 0;
        margin: 0;
    }

    .product-slide img {
        max-height: clamp(220px, 50vw, 300px);
    }

    .product-slide:hover img,
    .product-slide:active img,
    .product-slide:focus img {
        max-height: clamp(220px, 50vw, 300px);
    }

    .gama-category-slider {
        grid-template-columns: 1fr;
    }

    .category-products-slider {
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        pointer-events: none;
        transition: max-height 0.4s ease, opacity 0.3s ease;
        margin-top: 0;
        margin-left: 5%;
        width: 100%;
    }

    .gama-category-slider.is-products-open .category-products-slider {
        max-height: 5000px;
        opacity: 1;
        pointer-events: auto;
        margin-top: clamp(16px, 3vw, 24px);
    }

    .product-description {
        display: flex;
        visibility: visible;
        opacity: 1;
        max-height: 200px;
        margin: clamp(4px, 1vw, 6px) 0 0 0;
        padding: 0 var(--product-text-padding);
        overflow: visible;
        justify-content: center;
        align-items: center;
        text-align: center;
    }

    .product-buy-button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        visibility: visible;
        opacity: 1;
        max-height: 100px;
        margin: clamp(12px, 2vw, 16px) auto 10px auto;
        padding: clamp(8px, 1vw, 10px) clamp(16px, 2vw, 20px);
        overflow: visible;
        background: white;
        border-radius: clamp(18px, 2.4vw, 23px);
        width: clamp(180px, 60vw, 240px);
        height: clamp(40px, 4.23vw, 39.77px);
        white-space: nowrap;
    }

    .category-info {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        text-align: left;
        gap: clamp(12px, 2vw, 16px);
    }

    .category-text {
        flex: 1;
        text-align: left;
    }

    .category-name {
        text-align: left;
    }

    .category-description {
        text-align: left;
    }

    .category-toggle {
        align-self: center;
        flex-shrink: 0;
    }

    .slider-arrow {
        position: absolute;
        visibility: visible;
        opacity: 1;
        display: flex;
    }

    .slider-arrow-prev {
        left: -10%;
    }

    .slider-arrow-next {
        right: -10%;
    }
}
