/* =====================================================
   POSEIDON THEME — archive-product.css
   Categorías / archivos de productos WooCommerce
   ===================================================== */

.poseidon-archive {
    background: var(--poseidon-bg, #f9fafb);
    min-height: 60vh;
    font-family: var(--poseidon-font, 'Inter', sans-serif);
}

.poseidon-archive__inner {
    max-width: var(--poseidon-container, 1280px);
    margin: 0 auto;
    padding: 40px 24px 80px;
}

/* ── Cabecera ── */
.poseidon-archive__header {
    margin-bottom: 28px;
}

.poseidon-archive__title {
    font-size: clamp(22px, 3vw, 34px);
    font-weight: 700;
    letter-spacing: -.6px;
    color: var(--poseidon-text, #111);
    margin: 0 0 6px;
}

.poseidon-archive__desc {
    font-size: 14px;
    color: var(--poseidon-text-muted, #6b7280);
    margin: 0;
    max-width: 600px;
    line-height: 1.6;
}

/* =====================================================
   TOOLBAR: filtros + sort
   ===================================================== */
.poseidon-archive__toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding: 14px 0;
    border-top: 1px solid rgba(0,0,0,.08);
    border-bottom: 1px solid rgba(0,0,0,.08);
    margin-bottom: 0;
    position: relative;
    z-index: 50;
}

.poseidon-archive__filters {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* Botón de filtro */
.poseidon-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 500;
    font-family: var(--poseidon-font, 'Inter', sans-serif);
    color: var(--poseidon-text, #111);
    background: var(--poseidon-surface, #fff);
    border: 1px solid var(--poseidon-border-strong, rgba(0,0,0,.14));
    border-radius: 50px;
    cursor: pointer;
    white-space: nowrap;
    transition: border-color .2s, background .2s, color .2s, box-shadow .2s;
    position: relative;
}

.poseidon-filter-btn:hover {
    border-color: var(--poseidon-text, #111);
    color: var(--poseidon-text, #111);
}

.poseidon-filter-btn.is-active {
    border-color: var(--poseidon-text, #111);
    color: var(--poseidon-text, #111);
    font-weight: 600;
}

.poseidon-filter-btn.is-open {
    background: var(--poseidon-text, #111);
    color: #fff;
    border-color: var(--poseidon-text, #111);
}

.poseidon-filter-btn.is-open .poseidon-filter-btn__chevron {
    transform: rotate(180deg);
}

/* Botón principal "Filtrar" */
.poseidon-filter-btn--main {
    background: var(--poseidon-surface-hover, #f3f4f6);
    border-color: var(--poseidon-border, rgba(0,0,0,.1));
    font-weight: 600;
}
.poseidon-filter-btn--main:hover {
    border-color: var(--poseidon-border, rgba(0,0,0,.1));
}

.poseidon-filter-btn--main.is-open {
    background: var(--poseidon-text, #111);
    color: #fff;
}

/* Chevron */
.poseidon-filter-btn__chevron {
    transition: transform .2s;
    flex-shrink: 0;
}

/* Punto indicador de filtro activo */
.poseidon-filter-btn__dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--poseidon-accent, #c00000);
    flex-shrink: 0;
}

/* Badge de filtros activos */
.poseidon-filter-btn__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    font-size: 11px;
    font-weight: 700;
    background: var(--poseidon-accent, #c00000);
    color: #fff;
    border-radius: 50px;
}

/* Lado derecho: count + sort */
.poseidon-archive__toolbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

.poseidon-archive__count {
    font-size: 13px;
    color: var(--poseidon-text-muted, #6b7280);
    white-space: nowrap;
}

/* Select de ordenamiento */
.poseidon-sort-wrap { position: relative; }

.poseidon-sort-select {
    appearance: none;
    -webkit-appearance: none;
    padding: 8px 32px 8px 12px;
    font-size: 13px;
    font-family: var(--poseidon-font, 'Inter', sans-serif);
    font-weight: 500;
    color: var(--poseidon-text, #111);
    background: var(--poseidon-surface, #fff) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23374151' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") no-repeat right 10px center / 14px;
    border: 1px solid var(--poseidon-border-strong, rgba(0,0,0,.14));
    border-radius: 50px;
    cursor: pointer;
    outline: none;
    transition: border-color .2s;
}

.poseidon-sort-select:hover,
.poseidon-sort-select:focus { border-color: var(--poseidon-text, #111); }

/* =====================================================
   PANELES DESPLEGABLES DE FILTROS
   ===================================================== */
.poseidon-filter-panels {
    position: relative;
}

.poseidon-filter-panel {
    position: absolute;
    top: 0;
    left: 0;
    min-width: 260px;
    background: var(--poseidon-surface, #fff);
    border: 1px solid var(--poseidon-border, rgba(0,0,0,.1));
    border-radius: 14px;
    box-shadow: 0 8px 32px var(--poseidon-border, rgba(0,0,0,.1));
    z-index: 200;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity .2s, visibility .2s, transform .2s;
    pointer-events: none;
}

.poseidon-filter-panel.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(6px);
    pointer-events: auto;
}

.poseidon-filter-panel__inner {
    padding: 20px;
}

.poseidon-filter-panel__label {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .5px;
    text-transform: uppercase;
    color: var(--poseidon-text-meta, #9ca3af);
    margin: 0 0 14px;
}

/* Lista de opciones */
.poseidon-filter-panel__list {
    list-style: none;
    margin: 0 0 16px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-height: 240px;
    overflow-y: auto;
}

.poseidon-filter-panel__list::-webkit-scrollbar { width: 4px; }
.poseidon-filter-panel__list::-webkit-scrollbar-thumb { background: var(--poseidon-border-strong, rgba(0,0,0,.14)); border-radius: 4px; }

/* Opción individual */
.poseidon-filter-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: background .15s;
    user-select: none;
}

.poseidon-filter-option:hover { background: var(--poseidon-focus, rgba(0,0,0,.04)); }
.poseidon-filter-option.is-checked { background: var(--poseidon-focus, rgba(0,0,0,.04)); }

.poseidon-filter-checkbox { display: none; }

/* Checkbox visual custom */
.poseidon-filter-option__check {
    width: 18px;
    height: 18px;
    border: 1.5px solid var(--poseidon-text-meta, #9ca3af);
    border-radius: 5px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s, border-color .15s;
    background: var(--poseidon-surface, #fff);
}

.poseidon-filter-option.is-checked .poseidon-filter-option__check {
    background: var(--poseidon-text, #111);
    border-color: var(--poseidon-text, #111);
}

.poseidon-filter-option.is-checked .poseidon-filter-option__check::after {
    content: '';
    display: block;
    width: 10px;
    height: 6px;
    border-left: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: rotate(-45deg) translateY(-1px);
}

.poseidon-filter-option__label {
    font-size: 13px;
    font-weight: 400;
    color: var(--poseidon-text, #111);
    flex: 1;
}

.poseidon-filter-option__count {
    font-size: 12px;
    color: var(--poseidon-text-meta, #9ca3af);
    flex-shrink: 0;
}

/* Acciones del panel: Limpiar + Aplicar */
.poseidon-filter-panel__actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding-top: 14px;
    border-top: 1px solid rgba(0,0,0,.07);
}

.poseidon-filter-panel__clear {
    font-size: 13px;
    font-weight: 500;
    font-family: var(--poseidon-font, 'Inter', sans-serif);
    color: var(--poseidon-text-muted, #6b7280);
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 6px 0;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color .15s;
}

.poseidon-filter-panel__clear:hover { color: var(--poseidon-text, #111); }

.poseidon-filter-panel__apply {
    padding: 8px 20px;
    font-size: 13px;
    font-weight: 600;
    font-family: var(--poseidon-font, 'Inter', sans-serif);
    color: #fff;
    background: var(--poseidon-text, #111);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: background .15s;
}

.poseidon-filter-panel__apply:hover { background: var(--poseidon-accent-hover, #333); }

/* =====================================================
   PRICE RANGE DUAL SLIDER
   ===================================================== */
.poseidon-price-range { padding: 8px 0 4px; }

.poseidon-price-range__track {
    position: relative;
    height: 4px;
    background: var(--poseidon-surface-hover, #f3f4f6);
    border-radius: 4px;
    margin: 20px 0 10px;
}

.poseidon-price-range__fill {
    position: absolute;
    height: 100%;
    background: var(--poseidon-text, #111);
    border-radius: 4px;
    pointer-events: none;
}

.poseidon-price-range__input {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    height: 4px;
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
    pointer-events: none;
    outline: none;
}

.poseidon-price-range__input::-webkit-slider-thumb {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--poseidon-surface, #fff);
    border: 2px solid var(--poseidon-text, #111);
    cursor: pointer;
    pointer-events: all;
    box-shadow: 0 1px 4px var(--poseidon-border-strong, rgba(0,0,0,.14));
    transition: border-color .15s, box-shadow .15s;
}

.poseidon-price-range__input::-webkit-slider-thumb:hover {
    box-shadow: 0 0 0 6px rgba(0,0,0,.08);
}

.poseidon-price-range__input::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--poseidon-surface, #fff);
    border: 2px solid var(--poseidon-text, #111);
    cursor: pointer;
    pointer-events: all;
}

.poseidon-price-range__labels {
    display: flex;
    justify-content: space-between;
    margin-top: 14px;
}

.poseidon-price-range__val {
    font-size: 13px;
    font-weight: 600;
    color: var(--poseidon-text, #111);
}

/* =====================================================
   TAGS DE FILTROS ACTIVOS
   ===================================================== */
.poseidon-active-filters {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 14px 0 0;
}

.poseidon-active-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 500;
    color: var(--poseidon-text, #111);
    background: var(--poseidon-surface, #fff);
    border: 1px solid var(--poseidon-border-strong, rgba(0,0,0,.14));
    border-radius: 50px;
    text-decoration: none;
    transition: background .15s, border-color .15s;
}

.poseidon-active-tag:hover {
    background: var(--poseidon-surface-hover, #f3f4f6);
    border-color: var(--poseidon-border, rgba(0,0,0,.1));
}

.poseidon-active-tag--clear {
    color: var(--poseidon-accent, #c00000);
    border-color: var(--poseidon-accent, #c00000);
    background: transparent;
}

.poseidon-active-tag--clear:hover {
    background: color-mix(in srgb, var(--poseidon-accent, #c00000) 8%, transparent);
}

/* =====================================================
   OVERLAY (cierra paneles al click fuera)
   ===================================================== */
.poseidon-filter-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: transparent;
    display: none;
}

.poseidon-filter-overlay.is-visible { display: block; }

/* =====================================================
   GRID DE PRODUCTOS — reutiliza .poseidon-search-card
   ===================================================== */
/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 768px) {
    .poseidon-archive__inner { padding: 28px 16px 60px; }
    .poseidon-archive__toolbar { flex-direction: column; align-items: flex-start; gap: 10px; }
    .poseidon-archive__toolbar-right { width: 100%; justify-content: space-between; }
    .poseidon-sort-select { flex: 1; }
}

@media (max-width: 480px) {
    .poseidon-filter-panel { min-width: calc(100vw - 32px); left: 0 !important; }
}

/* =====================================================
   GUÍA DE TALLAS
   ===================================================== */

.tabla-tallas{
  max-width: 900px;
  margin: 40px auto;
  font-family: Arial, sans-serif;
  color: var(--poseidon-text-body, #1a1a1a);
}

.tabla-tallas h2{
  text-align: center;
  margin-bottom: 20px;
  font-size: 32px;
}

.tabla-tallas table{
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(0,0,0,.08);
}

.tabla-tallas thead{
  background: var(--poseidon-accent-hover, #333);
  color: #fff;
}

.tabla-tallas th,
.tabla-tallas td{
  padding: 16px 14px;
  text-align: center;
  border-bottom: 1px solid var(--poseidon-border, rgba(0,0,0,.1));
}

.tabla-tallas tbody tr:nth-child(even){
  background: var(--poseidon-bg, #f9fafb);
}

.tabla-tallas tbody tr:hover{
  background: var(--poseidon-surface-hover, #f3f4f6);
}

.nota{
  margin-top: 22px;
  padding: 18px;
  background: var(--poseidon-surface-hover, #f3f4f6);
  border-radius: var(--poseidon-card-radius);
}

.nota h3{
  margin-top: 0;
}

.nota ul{
  margin: 10px 0 0 18px;
}