*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body{
    background-color: var(--color-bg-base);
    max-width: 1400px;
}

.container{
    padding: 0.5rem 1rem 0 1rem;
    width: 100%;
    display: flex;
    flex-direction: column;
    text-align: center;
}

.all{
    display: grid;
    grid-template-columns: 300px 1fr;
    transition: grid-template-columns 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding-left: 0;
}

/*Lado izquierdo*/

.left-div{
    display: flex;
    width: 300px;
    padding: 1rem;
}

.filters-div{
    display: flex;
    flex-direction: column;
    width: 100%;
    height: max-content;
    gap: 20px;
    padding: 40px 30px;
    background-color: var(--color-card-bg);
    border-radius: 12px;
    border-top-right-radius: 0;
    box-shadow: var(--shadow-card-base);
    border: 1px solid var(--color-border-subtle);
    transition: var(--transition-smooth);
    overflow: hidden;
    white-space: nowrap;
}

.filters-div h4{
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    margin-bottom: 15px;
    text-align: center;
    border-bottom: 1px solid var(--color-border-subtle);
}

.no-padd{
    padding-left: 0;
    width: 100%;
}

.new-width{
    grid-template-columns: 45px 1fr;
}


.is-collapsed{
    width: 0;
    height: 0;
    padding: 0;
    border: none;
    opacity: 0;
    pointer-events: none;
}

.btn-filters-toggle{
    display: flex;
    background-color: var(--color-card-bg);
    border: none;
    border-radius: 4px;
    padding: 8px;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-filters-toggle .icon-close{
    display: block;
}
.btn-filters-toggle .icon-open{
    display: none;
}

.btn-filters-toggle.open .icon-close{
    display: none;
}

.btn-filters-toggle.open .icon-open{
    display: block;
}

.price-slider{
    width: 100%;
    height: 4px;
    background: var(--color-border-base);
    border-radius: 5px;
    outline: none;
    margin-bottom: 10px;
}

.price-slider{
    width: 100%;
    height: 3px;
    background: var(--color-bg-light-1);
    border-radius: 2px;
    margin: 15px 0;
    accent-color: var(--color-btn-base);
}

.price-slider:hover{
    transform: scale(1.1);
}

.price-labels{
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.filter-section{
    margin-bottom: 32px;
    display: flex;
    flex-direction: column;
}

.filter-section:last-child{
    margin-bottom: 0;
}

.filter-section label{
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 6px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.filter-section label:hover{
    color: var(--color-text-title);
    transform: translateX(4px);
}

.filter-section input[type="checkbox"]{
    appearance: none;
    width: 18px;
    height: 18px;
    border: 1px solid var(--color-border-subtle);
    border-radius: 4px;
    background-color: var(--color-bg-alt);
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
}

.filter-section input[type="checkbox"]:checked{
    background-color: var(--color-btn-base);
    border-color: var(--color-btn-base);
}

.filter-section input[type="checkbox"]:checked::after{
    content: "✓";
    color: white;
    font-size: 12px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/*Lado derecho*/

.right-div{
    display: flex;
    flex-direction: column;
}

.filters-tags{
    min-height: 90px;
    height: auto;
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 2rem;
    padding: 0.5rem;
    border-radius: 20px;
    border: 1px solid var(--color-border-subtle);
    background: var(--color-bg-light-2);
}

.filter-tag{
    display: flex;
    align-items: center;
    background-color: var(--color-tag-base);
    color: var(--color-text-title);
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
    width: 6rem;
    height: 2.5rem;
    box-shadow: var(--shadow-card-base);
    transition: var(--transition-smooth);
    animation: tagAppear 0.3s ease-out;
}

.filter-tag:hover{
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(27, 38, 59, 0.1);
}

.filter-tag span{
    margin-right: 8px;
    text-transform: capitalize;
    cursor: default;
}

.btn-remove-tag{
    background: none;
    border: none;
    color: var(--color-tag-remove);
    cursor: pointer;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    padding: 0;
    transition: var(--transition-smooth);
}

.btn-remove-tag:hover{
    color: var(--color-tag-remove-hover);
}

/*Contenedor root*/
.root{
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px ,1fr));
    gap: 30px;
    padding: 20px 0;
}

.product-card{
    background-color: var(--color-card-bg);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    transition: var(--transition-smooth);
    box-shadow: var(--shadow-card-base);
    height: 100%;
    border: 1px solid var(--color-border-subtle);
}

.product-card:hover{
    transform: translateY(-10px);
    box-shadow: var(--shadow-card-hover);
    border-color: var(--color-card-hover);
}

.img-container{
    width: 100%;
    height: 250px;
    overflow: hidden;
    background-color: var(--color-bg-light-1);
}

.img-container img{
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .img-container img{
    transform:  scale(1.05);
}

.product-info{
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
    text-align: center;
}

.product-info h3{
    margin: 0;
    font-size: 1.1rem;
    color: var(--color-text-title);
    font-weight: 600;
    line-height: 1.3;
}

.product-info .price{
    margin: 0;
    font-size: 1.2rem;
    color: var(--color-text-accent);
    font-weight: 700;
}

@keyframes tagAppear{
    from{
        opacity: 0;
        transform: scale(0.9);
    }
    to{
        opacity: 1;
        transform: scale(1);
    }
}
