/* =========================
   RESET CONTRA EL THEME
========================= */

.csw-layout a,
.csw-layout a:hover,
.csw-layout a:focus,
.csw-layout a:active {
    text-decoration: none !important;
    color: inherit !important;
}

/* =========================
   LAYOUT
========================= */

.csw-layout {
    display: flex;
    gap: 40px;
    align-items: flex-start; /* 🔥 CLAVE */
    font-family: 'Poppins', sans-serif;
}

/* =========================
   FILTRO
========================= */

.csw-filters {
    width: 280px;
    padding: 25px;
    border-radius: 14px;
    background: transparent;
    border: 1px solid #0000001A;
}

.csw-filter-title {
    font-family: 'Poppins', sans-serif !important;
    font-weight: 700 !important;
    font-size: 24px !important;
    line-height: 28px !important;
    letter-spacing: 0% !important;
    color: #000 !important;
    margin-bottom: 25px;
}

/* Padre */

.csw-parent-row {
    display: flex;
    justify-content: space-between; /* flecha derecha */
    align-items: center;
    margin-bottom: 12px;
}

.csw-parent-link {
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
    font-size: 14px;
    line-height: 100%;
    letter-spacing: 0%;
    color: #000 !important;
}

/* Flecha dinámica */

.csw-toggle {
    cursor: pointer;
    font-size: 14px;
    transition: 0.2s ease;
}

/* Flecha cerrada */
.csw-toggle::before {
    content: ">";
}

/* Flecha abierta */
.csw-toggle.open::before {
    content: "⌵";
}

/* Hijas */

.csw-children {
    display: none;
    list-style: none;
    padding: 0;   /* alineado izquierda */
    margin: 0 0 12px 0;
}

.csw-children li {
    margin-bottom: 8px;
}

.csw-children a {
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
    font-size: 14px;
    line-height: 100%;
    letter-spacing: 0%;
    color: #1D1D1D99 !important;
}

/* =========================
   PRODUCTOS
========================= */

.csw-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 35px;
}

.csw-card {
    display: block;
    background: #F9F9F9;
    padding: 25px;
    border-radius: 18px;
    transition: 0.2s ease;
}

.csw-card:hover {
    transform: translateY(-4px);
}

/* Título EXACTO */

.csw-product-title {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 24px;
    line-height: 28px;
    letter-spacing: 0%;
    margin-bottom: 10px;
    color: #000 !important;
}

.csw-product-desc {
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
    font-size: 14px;
    margin-bottom: 15px;
    color: #555 !important;
}

.price {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 16px;
    color: #000 !important;
}
/* Padre */

.csw-parent-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

/* Quitamos cualquier padding lateral */
.csw-parent-link {
    padding: 0;
    margin: 0;
}

/* Hijas */

.csw-children {
    display: none;
    list-style: none;
    padding: 0;          /* 🔥 SIN padding */
    margin: 0 0 12px 0;  /* 🔥 alineado igual que padre */
}

.csw-children li {
    margin-bottom: 8px;
}
/* =========================
   FIX DEFINITIVO ALINEACIÓN
========================= */

/* Quitamos cualquier sangría heredada del theme */
.csw-filters ul {
    margin-left: 0 !important;
    padding-left: 0 !important;
}

/* Forzamos que padre e hijas arranquen exactamente en el mismo eje */

.csw-filter-group {
    padding-left: 0 !important;
    margin-left: 0 !important;
}

/* Asegura que las hijas no tengan indentación invisible */

.csw-children {
    margin-left: 0 !important;
    padding-left: 0 !important;
}

/* Links de hijas alineados igual que padre */

.csw-children a,
.csw-parent-link {
    display: block;
}
/* =========================
   PAGINACIÓN
========================= */

.csw-pagination {
    margin-top: 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Botones Previous / Next */

.csw-page-btn {
    width: 115px;
    height: 37px;
    border-radius: 8px;
    border: 1px solid #0000001A;
    padding: 8px 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
    font-size: 14px;
    color: #000 !important;
    text-decoration: none !important;
}

/* Contenedor números centrado real */

.csw-page-numbers {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: center;
    flex: 1; /* 🔥 esto hace que quede exactamente en medio */
}

/* Números */

.csw-page-number {
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
    font-size: 14px;
    line-height: 100%;
    text-align: center;
    color: #000 !important;
    text-decoration: none !important;
}

/* Página activa */

.csw-page-number.active {
    font-weight: 600;
}
/* =========================
   TITULO CATEGORIA PRODUCTOS
========================= */

.csw-products-title,
.woocommerce-products-header__title,
.page-title {
    font-family: 'Poppins', sans-serif !important;
    font-weight: 700 !important;
    font-size: 24px !important;
    line-height: 28px !important;
    letter-spacing: 0% !important;
    color: #000 !important;
    margin-bottom: 25px;
}
/* =========================
   PRODUCTS HEADER
========================= */

.csw-products-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.csw-current-category {
    font-family: 'Poppins', sans-serif !important;
    font-weight: 700 !important;
    font-size: 24px !important;
    line-height: 28px !important;
    color: #000 !important;
    margin: 0;
}

/* =========================
   HEADER PRODUCTOS FIX
========================= */

.csw-products-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
}

.csw-products-meta {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Showing alineado antes del botón */

.csw-showing {
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
    font-size: 14px;
    color: #000;
}

/* Showing text */

.csw-showing {
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
    font-size: 14px;
    color: #000;
    flex: 1; /* 🔥 ocupa todo el espacio */
}
/* Dropdown */

/* =========================
   ORDER DROPDOWN CUSTOM
========================= */

.csw-order-wrapper {
    position: relative;
    font-family: 'Poppins', sans-serif;
}

.csw-order-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
}

/* Flecha cerrada */
.csw-order-arrow::before {
    content: ">";
    font-size: 14px;
    transition: 0.2s ease;
}

/* Flecha abierta */
.csw-order-arrow.open::before {
    content: "⌵";
}

/* Dropdown */

.csw-order-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: 28px;
    background: #fff;
    border: 1px solid #0000001A;
    border-radius: 8px;
    padding: 10px;
    min-width: 180px;
    z-index: 10;
}

.csw-order-dropdown a {
    display: block;
    padding: 6px 8px;
    font-size: 14px;
    font-weight: 400;
    color: #000 !important;
}

.csw-order-dropdown a:hover {
    background: #f5f5f5;
}