/* ---- Filter Bar ---- */
.rw-product-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

/* Shared button style */
.rw-filter-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 30px;
    border: 1px solid #c8c8c8;
    border-radius: 50px;
    background: #fff;
    color: #27292B;
    font-size: 13px;
    font-family: 'Nunito', sans-serif;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: border-color 0.2s, background-color 0.2s, color 0.2s;
    white-space: nowrap;
    line-height: 1;
    min-width: 160px;
}

.rw-filter-toggle {
    display: flex;
    justify-content: center;
    align-items: center;
}

.rw-filter-btn:hover {
    border-color: #27292B;
}

/* Active state */
.rw-filter-btn.is-active,
.rw-filter-btn.has-selection {
    background: #27292B;
    color: #fff;
    border-color: #27292B;
}

/* Reset button cuando está activo */
.rw-product-filters .rw-filter-reset.is-active {
    background: #262626;
    color: #fff;
    border-color: #262626;
}

/* Reset button cuando no está activo */
.rw-product-filters .rw-filter-reset:not(.is-active) {
    background: #fff;
    color: #303030;
    border-color: #303030;
}

/* Arrow icon - chevron style */
.rw-filter-arrow {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg);
    transition: transform 0.2s;
    margin-top: -3px;
    margin-left: 2px;
}

.rw-filter-dropdown.is-open .rw-filter-arrow {
    transform: rotate(-135deg);
    margin-top: 2px;
}

/* Dropdown container */
.rw-filter-dropdown {
    position: relative;
}

.rw-filter-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 100;
    min-width: 220px;
    max-height: 300px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #27292B;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    overflow: hidden;
}

.rw-filter-dropdown.is-open .rw-filter-dropdown-menu {
    display: block;
}

/* Dropdown options */
.rw-product-filters .rw-filter-option {
    display: block;
    width: 100%;
    padding: 11px 18px;
    border: none;
    border-radius: 0;
    background: none;
    text-align: left;
    font-size: 14px;
    font-family: 'Nunito', sans-serif;
    font-weight: 400;
    line-height: 1.4;
    cursor: pointer;
    color: #27292B;
    transition: background-color 0.15s, color 0.15s;
    box-sizing: border-box;
}

.rw-product-filters .rw-filter-option:hover {
    background: #27292B;
    color: #fff;
    border-radius: 0;
    padding: 11px 18px;
    font-size: 14px;
    font-weight: 400;
}

.rw-product-filters .rw-filter-option.is-active {
    background: #27292B;
    color: #fff;
    border-radius: 0;
    font-weight: 600;
}

/* ---- Product Grid ---- */
.rw-product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    column-gap: 15px;
    row-gap: 120px;
    margin-top: 50px;
}

@media (max-width: 1024px) {
    .rw-product-grid {
        grid-template-columns: repeat(3, 1fr);
        row-gap: 80px;
    }
}

@media (max-width: 768px) {
    .rw-product-grid {
        grid-template-columns: repeat(2, 1fr);
        row-gap: 60px;
    }
}

@media (max-width: 480px) {
    .rw-product-grid {
        grid-template-columns: 1fr;
    }
}

/* Loading state */
.rw-product-grid.rw-loading {
    opacity: 0.3;
    pointer-events: none;
    transition: opacity 0.2s;
}

/* ---- Product Card ---- */
.rw-product-card {
    display: flex;
    flex-direction: column;
}

.rw-product-card__link {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

.rw-product-card__link:hover {
    color: inherit;
    text-decoration: none;
}

.rw-product-card__image {
    width: 100%;
    aspect-ratio: 4 / 5;
    border-radius: 0;
}

@media (max-width: 768px) {
    .rw-product-card__image {
        aspect-ratio: 3 / 4;
    }
}

.rw-product-card__meta {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding-top: 20px;
}

.rw-product-card__taxonomies {
    display: flex;
    align-items: center;
    gap: 0;
    padding-bottom: 20px;
    font-family: 'Nunito', sans-serif;
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #27292B;
    line-height: 1;
}

@media (max-width: 768px) {
    .rw-product-card__taxonomies {
        font-size: 11px;
    }
}

.rw-product-card__tax {
    white-space: nowrap;
}

.rw-product-card__separator {
    margin: 0 8px;
    color: #27292B;
}

.rw-product-card__title {
    font-family: 'Nunito', sans-serif;
    font-size: 22px;
    font-weight: 600;
    line-height: 1.2;
    color: #27292B;
    margin: 0 0 10px 0;
}

@media (max-width: 768px) {
    .rw-product-card__title {
        font-size: 18px;
    }
}

.rw-product-card__desc {
    font-family: 'Nunito', sans-serif;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.4;
    color: #27292B;
    margin: 0 0 20px 0;
}

@media (max-width: 768px) {
    .rw-product-card__desc {
        font-size: 14px;
        line-height: 1.5;
    }
}

.rw-product-card__btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    background: #303030;
    color: #fff;
    border-radius: 999px;
    font-family: 'Nunito', sans-serif;
    font-size: 15px;
    font-weight: 400;
    line-height: 1;
    text-decoration: none;
    transition: background-color 0.2s;
    align-self: flex-start;
    margin-top: 5px;
}

.rw-product-card__link:hover .rw-product-card__btn {
    background: #868686;
}

.rw-product-card__btn svg {
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .rw-product-card__btn {
        font-size: 14px;
        padding: 12px 24px;
    }
}

/* No results */
.rw-no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 24px;
    color: #666;
    font-family: 'Nunito', sans-serif;
    font-size: 16px;
}

/* Responsive filters */
@media (max-width: 768px) {
    .rw-product-filters {
        gap: 8px;
    }

    .rw-filter-btn {
        padding: 10px 18px;
        font-size: 11px;
        min-width: auto;
    }

    .rw-filter-dropdown-menu {
        min-width: 180px;
    }
}
