/* ==========================================================================
   ARCHIVO DE TIENDA · filtros (categoría / precio / talla / material)
   Adaptado de piccolo_archive_init() + piccolo_ajax_filter_logic() (WooCommerce)
   Clases: pf-arc, pf-side, pf-fg, pf-grid, pf-ac, pf-pg ...
   ========================================================================== */
.pf-arc { background: #fff; }
.pf-arc .container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }

.pf-arc-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 22px; flex-wrap: wrap; padding: 52px 0 32px; }
.pf-arc-title { font: 400 40px/1.15 'Playfair Display', serif; color: #1c1917; margin: 6px 0 0; }
.pf-arc-sub { font-size: 13px; color: #78716c; margin-top: 8px; }

/* --- barra de herramientas --- */
.pf-arc-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pf-arc-search { position: relative; display: flex; align-items: center; }
.pf-arc-search svg { position: absolute; left: 13px; color: #a8a29e; pointer-events: none; }
.pf-arc-search input,
#pf-min, #pf-max {
  height: 42px; border: 1px solid #e7e5e4; border-radius: 4px; padding: 0 14px;
  font: 400 13px 'Inter', system-ui, sans-serif; color: #1c1917; background: #fff;
  transition: border-color .2s; width: 100%;
}
.pf-arc-search input { padding-left: 38px; min-width: 230px; }
#pf-min, #pf-max { min-width: 0; }
.pf-arc-search input:focus, #pf-min:focus, #pf-max:focus { outline: 0; border-color: #1c1917; }

.pf-arc-views { display: flex; border: 1px solid #1c1917; border-radius: 4px; overflow: hidden; }
.pf-vbtn { width: 42px; height: 40px; display: grid; place-items: center; background: #fff; color: #57534e; border: 0; cursor: pointer; transition: all .2s; }
.pf-vbtn + .pf-vbtn { border-left: 1px solid #1c1917; }
.pf-vbtn:hover { background: #f5f5f4; }
.pf-vbtn.is-on { background: #1c1917; color: #fff; }

.pf-filter-btn, .pf-price-btn {
  display: none; align-items: center; gap: 8px; height: 42px; padding: 0 16px;
  border: 1px solid #1c1917; border-radius: 4px; background: #1c1917; color: #fff;
  font: 600 11px 'Inter', sans-serif; letter-spacing: .1em; text-transform: uppercase; cursor: pointer;
}
.pf-price-btn { width: 100%; justify-content: center; margin-top: 12px; }

/* --- layout --- */
.pf-arc-body { display: grid; grid-template-columns: 252px 1fr; gap: 42px; align-items: start; padding-bottom: 80px; }
.pf-results { min-width: 0; }
.pf-res-head { display: flex; align-items: center; gap: 10px; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: #78716c; padding-bottom: 18px; border-bottom: 1px solid #e7e5e4; margin-bottom: 26px; }
.pf-spinner { width: 14px; height: 14px; border: 2px solid #e7e5e4; border-top-color: #1c1917; border-radius: 50%; animation: pfSpin .7s linear infinite; }
@keyframes pfSpin { to { transform: rotate(360deg); } }

/* --- sidebar --- */
.pf-side { position: sticky; top: 76px; }
.pf-side-head { display: flex; align-items: center; justify-content: space-between; padding-bottom: 14px; border-bottom: 2px solid #1c1917; margin-bottom: 4px; }
.pf-side-title { font: 600 11px 'Inter', sans-serif; letter-spacing: .16em; text-transform: uppercase; color: #1c1917; }
.pf-side-x { display: none; background: none; border: 0; color: #1c1917; cursor: pointer; padding: 4px; }

.pf-fg { padding: 20px 0; border-bottom: 1px solid #e7e5e4; }
.pf-fg-head { display: flex; align-items: center; justify-content: space-between; }
.pf-fg-title { font: 600 11px 'Inter', sans-serif; letter-spacing: .14em; text-transform: uppercase; color: #1c1917; margin: 0 0 14px; }
.pf-reset-cats { background: none; border: 0; font: 500 10px 'Inter', sans-serif; letter-spacing: .1em; text-transform: uppercase; color: #78716c; cursor: pointer; text-decoration: underline; }
.pf-reset-cats:hover { color: #1c1917; }

.pf-arc .pf-cats { list-style: none; margin: 0; padding: 0; max-height: 260px; overflow-y: auto; }
.pf-arc .pf-cats::-webkit-scrollbar { width: 3px; }
.pf-arc .pf-cats::-webkit-scrollbar-thumb { background: #d6d3d1; border-radius: 3px; }
.pf-cat-i { display: flex; align-items: center; gap: 10px; padding: 7px 0; font-size: 13px; color: #57534e; cursor: pointer; transition: color .18s; }
.pf-cat-i:hover { color: #1c1917; }
.pf-cat-i input { appearance: none; width: 15px; height: 15px; flex: 0 0 15px; border: 1px solid #a8a29e; border-radius: 3px; background: #fff; cursor: pointer; position: relative; transition: all .18s; }
.pf-cat-i input:checked { background: #1c1917; border-color: #1c1917; }
.pf-cat-i input:checked::after { content: ''; position: absolute; left: 4.5px; top: 1px; width: 4px; height: 8.5px; border: solid #fff; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }
.pf-cat-i .pf-cat-n { margin-left: auto; font-size: 11px; color: #a8a29e; }

.pf-prices { display: flex; align-items: center; gap: 8px; }
.pf-dash { color: #a8a29e; font-size: 12px; }
.pf-tags { display: flex; flex-wrap: wrap; gap: 7px; }
.pf-tag {
  min-width: 38px; height: 34px; padding: 0 11px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid #e7e5e4; border-radius: 3px; background: #fff; cursor: pointer;
  font: 500 12px 'Inter', sans-serif; color: #57534e; transition: all .18s;
}
.pf-tag:hover { border-color: #1c1917; color: #1c1917; }
.pf-tag.is-on { background: #1c1917; border-color: #1c1917; color: #fff; }
.pf-checks { display: flex; flex-direction: column; gap: 10px; max-height: 210px; overflow-y: auto; }
.pf-checks::-webkit-scrollbar { width: 3px; }
.pf-checks::-webkit-scrollbar-thumb { background: #d6d3d1; }
.pf-mat { display: flex; align-items: center; gap: 10px; font-size: 13px; color: #57534e; cursor: pointer; }
.pf-mat input { appearance: none; width: 15px; height: 15px; flex: 0 0 15px; border: 1px solid #a8a29e; border-radius: 3px; background: #fff; cursor: pointer; position: relative; transition: all .18s; }
.pf-mat input:checked { background: #1c1917; border-color: #1c1917; }
.pf-mat input:checked::after { content: ''; position: absolute; left: 4.5px; top: 1px; width: 4px; height: 8.5px; border: solid #fff; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }
.pf-clear { width: 100%; height: 44px; margin-top: 24px; border: 1px solid #1c1917; border-radius: 4px; background: #fff; color: #1c1917; font: 600 11px 'Inter', sans-serif; letter-spacing: .12em; text-transform: uppercase; cursor: pointer; transition: all .2s; }
.pf-clear:hover { background: #1c1917; color: #fff; }

/* --- grid / list --- */
.pf-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px 24px; }
.pf-grid[data-view="list"] { grid-template-columns: 1fr; gap: 0; }
.pf-ac { min-width: 0; }
.pf-ac-img { position: relative; display: block; aspect-ratio: 1/1; background: #f5f5f4; overflow: hidden; border-radius: 3px; }
.pf-ac-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s cubic-bezier(.25,.46,.45,.94); display: block; }
.pf-ac:hover .pf-ac-img img { transform: scale(1.05); }
.pf-ac-tag { position: absolute; top: 12px; left: 12px; z-index: 2; background: #1c1917; color: #fff; font: 700 9px 'Inter', sans-serif; letter-spacing: .1em; text-transform: uppercase; padding: 5px 8px; }
.pf-ac-view { position: absolute; left: 0; right: 0; bottom: 0; transform: translateY(100%); opacity: 0; padding: 13px; text-align: center; background: rgba(255,255,255,.95); backdrop-filter: blur(6px); color: #1c1917; font: 700 11px 'Inter', sans-serif; letter-spacing: .12em; text-transform: uppercase; transition: all .3s cubic-bezier(.25,.46,.45,.94); }
.pf-ac:hover .pf-ac-view { transform: translateY(0); opacity: 1; }
.pf-ac:hover .pf-ac-view:hover { background: #1c1917; color: #fff; }

.pf-ac-body { padding-top: 15px; }
.pf-ac-name { font: 400 17px/1.35 'Playfair Display', serif; margin: 0 0 5px; }
.pf-ac-name a { color: #1c1917; text-decoration: none; transition: color .2s; }
.pf-ac:hover .pf-ac-name a { color: #78716c; }
.pf-ac-meta { font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: #a8a29e; margin-bottom: 7px; }
.pf-ac-desc { display: none; font-size: 13px; line-height: 1.6; color: #78716c; margin-bottom: 8px; }
.pf-ac-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 4px; }
.pf-ac-price { font: 600 14px 'Inter', sans-serif; color: #1c1917; }
.pf-ac-cta { display: none; border: 1px solid #1c1917; border-radius: 3px; padding: 7px 15px; font: 600 10px 'Inter', sans-serif; letter-spacing: .1em; text-transform: uppercase; color: #1c1917; text-decoration: none; transition: all .2s; }
.pf-ac-cta:hover { background: #1c1917; color: #fff; }

/* vista lista */
.pf-grid[data-view="list"] .pf-ac { display: grid; grid-template-columns: 200px 1fr; gap: 26px; padding: 26px 0; border-bottom: 1px solid #e7e5e4; }
.pf-grid[data-view="list"] .pf-ac:first-child { border-top: 1px solid #e7e5e4; }
.pf-grid[data-view="list"] .pf-ac-body { padding-top: 0; display: flex; flex-direction: column; justify-content: center; }
.pf-grid[data-view="list"] .pf-ac-desc { display: block; }
.pf-grid[data-view="list"] .pf-ac-cta { display: inline-block; }
.pf-grid[data-view="list"] .pf-ac-name { font-size: 22px; }
.pf-grid[data-view="list"] .pf-ac-view { display: none; }

/* --- vacío --- */
.pf-none { grid-column: 1/-1; text-align: center; padding: 70px 20px; color: #a8a29e; }
.pf-none p { font-size: 14px; margin: 16px 0 0; }

/* --- paginador --- */
.pf-pager { display: flex; justify-content: center; align-items: center; gap: 6px; margin-top: 44px; flex-wrap: wrap; }
.pf-pg { min-width: 38px; height: 38px; padding: 0 11px; border: 1px solid #e7e5e4; border-radius: 3px; background: #fff; color: #57534e; font: 500 12px 'Inter', sans-serif; cursor: pointer; transition: all .18s; }
.pf-pg:hover:not(:disabled) { border-color: #1c1917; color: #1c1917; }
.pf-pg.is-on { background: #1c1917; border-color: #1c1917; color: #fff; }
.pf-pg:disabled { opacity: .35; cursor: default; }

/* --- overlay móvil --- */
.pf-side-bg { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 998; }
.pf-side-bg.is-on { display: block; }

@media (max-width: 1024px) {
  .pf-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .pf-arc .container { padding: 0 18px; }
  .pf-arc-top { padding: 32px 0 22px; }
  .pf-arc-title { font-size: 30px; }
  .pf-arc-body { grid-template-columns: 1fr; gap: 0; padding-bottom: 56px; }
  .pf-arc-tools { width: 100%; }
  /* buscador con su propia fila: no se aplasta junto a los botones */
  .pf-arc-search { flex: 1 1 100%; order: -1; }
  .pf-arc-search input { min-width: 0; }
  .pf-filter-btn { display: inline-flex; }
  .pf-side {
    position: fixed; top: 0; left: 0; bottom: 0; width: min(320px, 88vw); z-index: 999;
    background: #fff; overflow-y: auto; padding: 20px 22px 40px;
    transform: translateX(-100%); transition: transform .3s cubic-bezier(.4,0,.2,1);
  }
  .pf-side.is-on { transform: translateX(0); }
  .pf-side-x { display: block; }
  .pf-price-btn { display: flex; }
  .pf-arc-views { order: 3; }
}
@media (max-width: 560px) {
  .pf-grid { grid-template-columns: repeat(2, 1fr); gap: 22px 12px; }
  .pf-ac-name { font-size: 14px; }
  .pf-ac-meta { display: none; }
  .pf-ac-price { font-size: 13px; }
  .pf-grid[data-view="list"] .pf-ac { grid-template-columns: 118px 1fr; gap: 14px; }
  .pf-grid[data-view="list"] .pf-ac-name { font-size: 16px; }
  .pf-grid[data-view="list"] .pf-ac-desc { display: none; }
}
