/* ==========================================================================
   1. ESTILOS BASE (Grid, Paginación, Header)
   ========================================================================== */
.fade-grid { opacity: 0; transform: translateY(20px); transition: all .4s ease; }
.fade-grid.loaded { opacity: 1; transform: translateY(0); }

.productos-pagination { text-align: center; margin-top: 20px; }
.productos-pagination button { margin: 0 4px; padding: 6px 12px; border: 1px solid #ccc; background: #fff; cursor: pointer; transition: all 0.3s ease; }
.productos-pagination button:hover { background: #f5f5f5; }
.productos-pagination button.active { background: #000; color: #fff; border-color: #000; }

.productos-loading-top { text-align: center; margin: 15px 0; font-weight: bold; color: #444; padding: 20px; }
.pagination-dots { display: inline-block; margin: 0 6px; color: #666; }

/* Header */
.productos-header { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 30px; }

@media (min-width: 768px) {
  .productos-header { justify-content: space-between; }
  .productos-header .productos-count { order: 1; font-weight: 600; font-size: 16px; }
  .productos-header .productos-order { order: 2; margin-left: auto; }
  .pc-mobile-only { display: none !important; }
}

@media (max-width: 767px) {
  .productos-header { justify-content: space-between; }
  .productos-header .pc-mobile-only { order: 1; }
  .productos-header .productos-order { order: 2; margin-left: auto; }
  .productos-header .productos-count { order: 3; width: 100%; text-align: center; margin-top: 6px; font-weight: 600; font-size: 14px; }
}

/* Select Orden */
.productos-order form.woocommerce-ordering { position: relative; display: inline-block; }
.productos-order select.orderby { appearance: none; -webkit-appearance: none; background-color: #fff; border: 1px solid #ddd; border-radius: 6px; padding: 8px 35px 8px 12px; font-size: 14px; color: #333; cursor: pointer; min-width: 220px; line-height: 1.4; transition: border-color 0.3s ease; }
.productos-order select.orderby:hover { border-color: #999; }
.productos-order select.orderby:focus { border-color: #000; outline: none; box-shadow: 0 0 0 2px rgba(0,0,0,0.1); }
.productos-order form.woocommerce-ordering::after { content: '▼'; font-size: 10px; color: #666; position: absolute; right: 12px; top: 50%; transform: translateY(-50%); pointer-events: none; }

/* Off-canvas */
.pc-offcanvas { position: fixed; inset: 0; pointer-events: none; z-index: 9999; }
.pc-offcanvas.is-open { pointer-events: auto; }
.pc-offcanvas__overlay { position: absolute; inset: 0; background: rgba(0,0,0,.5); opacity: 0; transition: opacity .3s ease; }
.pc-offcanvas.is-open .pc-offcanvas__overlay { opacity: 1; }
.pc-offcanvas__panel { position: absolute; top: 0; right: 0; height: 100%; width: min(92vw, 420px); background: #fff; transform: translateX(100%); transition: transform .3s cubic-bezier(.28,.11,.32,1); display: flex; flex-direction: column; box-shadow: -2px 0 10px rgba(0,0,0,0.1); }
.pc-offcanvas.is-open .pc-offcanvas__panel { transform: translateX(0); }
.pc-offcanvas__close { align-self: flex-end; margin: 15px; background: #fff; border: 1px solid #000; border-radius: 6px; padding: 8px 12px; color: #000; cursor: pointer; font-size: 16px; transition: all 0.3s ease; }
.pc-offcanvas__content { overflow: auto; padding: 10px 20px 30px; flex: 1; }

/* ==========================================================================
   2. FILTROS IZQUIERDA (Estilos Base)
   ========================================================================== */
#filtros-categoria { border: 1px solid #e6e6e6; border-radius: 10px; padding: 15px; background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,0.05); }
.fc-title { font-size: 18px; font-weight: 700; margin: 0 0 15px 0; color: #000; }

.fc-accordion { border-top: 1px solid #eee; position: relative; }
.fc-accordion:first-of-type { border-top: 0; }

.fc-accordion-panel { overflow: hidden; max-height: 0; opacity: 0; transition: max-height .4s, opacity .3s; padding: 0; }
.fc-accordion-panel.is-open { opacity: 1; padding: 0 0 15px 0; max-height: 500px; }

.fc-list { display: block; max-height: 300px; overflow-y: auto; }
.fc-actions { padding: 15px 0 5px; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; border-top: 1px solid #eee; margin-top: 10px; }

.fc-clear, .fc-apply, .fc-show-more { background: #f7f7f7; border: 1px solid #ddd; padding: 10px 16px; border-radius: 6px; cursor: pointer; font-size: 14px; transition: all 0.3s ease; flex: 1; }
.fc-apply { background: #000; color: #fff; border-color: #000; }
.fc-show-more { margin: 10px 0 0; background: transparent; border: none; color: #666; text-decoration: underline; }

@media (min-width: 768px) { #filtros-categoria .fc-apply { display: none; } }
@media (max-width: 767px) { #filtros-categoria .fc-apply { display: inline-flex; } }

/* Botón Mobile */
.ph-open-filters { background: #000; color: #fff; border: none; padding: 10px 16px; border-radius: 6px; cursor: pointer; font-size: 14px; font-weight: 500; }

/* ==========================================================================
   3. SNIPPET DE CORRECCIÓN (Tu código específico)
   ========================================================================== */
#filtros-categoria-form * { color: #000; }

#filtros-categoria-form {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
}

#filtros-categoria-form .fc-accordion {
    padding: 0;
    width: 100%;
}

/* ESTO PONE EL ICONO A LA IZQUIERDA (Row Reverse) */
#filtros-categoria-form .fc-accordion button, 
#filtros-categoria-form .fc-actions, 
#filtros-categoria-form .fc-actions button {
    display: flex;
    flex-direction: row-reverse; /* Icono izquierda, texto derecha */
    justify-content: flex-end;   /* Todo alineado a la izquierda */
    gap: 10px;
    padding: 15px 0; /* Padding restaurado aquí */
    border: 0;
    width: 100%;
    background-color: transparent !important;
    text-align: left;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    align-items: center;
}

#filtros-categoria-form .fc-clear {
    margin-top: 0;
    font-size: 14px;
    background: #f7f7f7;
    border: 1px solid #ddd;
    /* Resetear flex para el botón limpiar si es necesario */
    flex-direction: row; 
    justify-content: center;
}

#filtros-categoria-form .fc-check span, 
#filtros-categoria-form .fc-radio span {
    font-size: 14px;
    line-height: 18px;
    margin-left: 0;
}

.fc-check input, .fc-radio input {
    margin-right: 5px; /* Tu snippet decía 0 */
    margin-left: 10px; /* Separación si está reverse? o standard */
    accent-color: #671b22;
    margin-top: 1px;
    width: 16px;
    height: 16px;
}

/* Corrección de Inputs para que se vean bien (flex normal) */
.fc-check, .fc-radio {
    display: flex;
    align-items: flex-start;
    margin: 8px 0;
    padding: 5px 0;
    cursor: pointer;
    flex-direction: row; /* Mantener input a la izquierda del texto */
}
.fc-check input, .fc-radio input {
    margin-left: 0;
    margin-right: 5px!important;
}

/* ROTACIÓN DEL ICONO */
/* Aplicamos al caret cuando el botón tiene aria-expanded="true" */
#filtros-categoria-form .fc-accordion button[aria-expanded="true"] .fc-caret {
    transform: rotate(90deg); /* O 45deg según prefieras */
    transition: transform 0.3s ease;
}
.fc-caret {
    transition: transform 0.3s ease;
    font-weight: 700;
    font-size: 16px;
}

/* ==========================================================================
   4. MINI FILTROS (Estilos Píldora)
   ========================================================================== */
.mini-filtros-container {
    display: flex;
    gap: 10px;
    padding: 15px 0;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
    margin-bottom: 20px;
    align-items: center;
}
.mini-filtros-container::-webkit-scrollbar { display: none; }

.mini-filtro-btn {
    display: inline-block;
    padding: 8px 20px;
    border: 1px solid #e0e0e0;
    border-radius: 50px;
    background: #fff;
    color: #333;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    text-decoration: none;
    line-height: 1.2;
}

.mini-filtro-btn.active, 
.mini-filtro-btn:hover {
    background-color: #671b22 !important;
    border-color: #671b22 !important;
    color: #fff !important;
}

@media (min-width: 768px) {
    .mini-filtros-container { flex-wrap: wrap; overflow-x: visible; }
}
/* Separación exclusiva del grid de cards en categorías. */
#productos-categoria-wrap .productos-grid { gap: 10px; column-gap: 10px; row-gap: 10px; }
