:root{
  --gold:#c5a848;
  --text:#f4f4f4;
}

/* ====== PRODUCT PAGE / CARDS ====== */
main.product-page{
  max-width:1200px;
  margin:28px auto 48px;
  padding:20px 18px;
  color:var(--text);
  padding-bottom: 10px;
}

.products-grid{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 50px;
}

.product-card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 340px;
  border-radius: 24px;
  line-height: 1.6;
  transition: all 0.48s cubic-bezier(0.23, 1, 0.32, 1);
}

.product-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
  padding: 0;
  border-radius: 22px 22px 0 22px;
  color: #ffffff;
  overflow: hidden;
  background: #484848;
  transition: inherit;
  width: 100%;
  height: 100%;
  border: 2px solid var(--gold);
}

.product-content::before,
.product-content::after {
  position: absolute;
  content: "";
  left: 50%;
  transform: translate(-50%);
  border-radius: inherit;
  transform-origin: bottom;
  transition: inherit;
}
.product-content::before {
  top: -4%;
  width: 90%;
  height: 90%;
  background: #b6943c;
  z-index: -1;
}
.product-content::after  {
  top: -8%;
  width: 80%;
  height: 80%;
  background: #d3c171;
  z-index: -2;
}

.product-card:hover { transform: translate(0px, -16px); }
.product-card:hover .product-content::before {
  rotate: -8deg; top: 0; width: 100%; height: 100%;
}
.product-card:hover .product-content::after  {
  rotate:  8deg; top: 0; width: 100%; height: 100%;
}

.product-destacado {
  position: absolute;
  background-color: var(--gold);
  color: #111;
  right: 0; top: 0;
  border-radius: 0 22px 0 2rem;
  padding: 8px 16px; margin: 0;
  display: flex; justify-content: center; align-items: center;
  font-weight: bold;
}

.img-estrella { height: clamp(16px, 24px, 20px); margin-right: 5px; }

.product-info {
  position: absolute;
  background: rgba(0,0,0,.85);
  width: 100%;
  left: 0; bottom: 0;
  border-radius: 0 5rem 0 22px;
  padding: 18px 10px; margin: 0;
  display: flex; justify-content: space-between; align-items: center;
  font-weight: 600; border: 2px solid var(--gold);
}
.product-info span:first-child {
  color:#fff;
  font-size: clamp(1rem, .9rem + .3vw, 1.15rem);
  margin-left: 1.5rem;
}
.product-info span:last-child  {
  color:var(--gold);
  font-size: clamp(1rem, .9rem + .3vw, 1.15rem);
  margin-right: 2rem;
}

.product-img { height: 100%; width: 100%; object-fit: cover; display: block; }

/* === RESPONSIVE PRODUCTOS === */
@media (max-width: 960px){
  .products-grid{
    grid-template-columns: repeat(2, 1fr);
    gap: 6%;
  }
}
@media (max-width: 600px){
  .products-grid{
    grid-template-columns: repeat(2, 1fr);
    gap: 6%;
  }
  .product-card { height: 200px; }
  .product-destacado { padding: 6px 14px; margin: 0; font-size: 14px; }
  .product-info span:first-child { font-size: 14px; margin-left: 0.1rem; }
  .product-info span:last-child  { font-size: 14px; margin-right: 1rem; }
  .product-info { padding: 5px 10px; }
  main.product-page{ padding-bottom: 300px; }
}

/* =========================================================
   BARRA SUPERIOR (pf-*)
   ========================================================= */
.pf-bar{
  display:flex; align-items:center; gap:12px;
  margin-bottom: 80px;
  flex-wrap: nowrap;
  min-width: 0;
}
.pf-left{
  display:flex; align-items:center; gap:10px;
  flex: 0 0 auto; min-width: max-content;
}
.pf-center{
  flex: 1 1 auto;
  min-width: 0;
  display:flex; align-items:center;
}
.pf-right{
  display:flex; align-items:center; gap:10px;
  flex: 0 0 auto;
}

/* Botones (look dorado) */
.pf-btn{
  position:relative;
  display:inline-flex;
  align-items:center;
  gap:8px;

  /* >> TOTALMENTE REDONDOS (píldora) */
  height: 52px;
  padding: 0 1.2rem;
  border-radius: 52px;

  font-weight:800;
  font-size:15px;
  line-height:1;
  color:#f6f6f6;
  background:transparent;
  border:2px solid rgba(212,175,55,.65);
  box-shadow:0 10px 20px rgba(0,0,0,.20);
  transition:
    transform .22s,
    border-color .22s,
    background .22s,
    box-shadow .22s,
    color .22s;
  cursor:pointer;
  user-select:none;
  overflow:hidden;
}
.pf-btn::before{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  background-image:linear-gradient(120deg,
    rgba(255,255,255,0) 30%,
    rgba(255,255,255,.7),
    rgba(255,255,255,0) 70%);
  width:110px;
  left:-140px;
  opacity:.55;
  transform:skewX(-12deg);
  border-radius:inherit;
}
.pf-btn:hover{
  transform: translateY(-1px);
  background: rgba(212,175,55,.18);
  border-color: rgba(212,175,55,.9);
  box-shadow: 0 16px 30px rgba(0,0,0,.30),
              0 0 0 1px rgba(212,175,55,.18) inset;
  color:#fff;
}
.pf-btn:hover::before{ animation: rdBtnShine 1.4s ease-out 1; }

.pf-btn.is-active{
  color:#111;
  border-color: rgba(0,0,0,.3);
  background: linear-gradient(180deg, var(--gold), #B9931A);
  box-shadow: 0 16px 32px rgba(212,175,55,.35),
              inset 0 -2px 0 rgba(0,0,0,.25),
              inset 0 1px 0 rgba(255,255,255,.55);
}
.pf-btn__icon{
  width:20px; height:20px; display:block; object-fit:contain;
  filter: invert(1) brightness(2);
}

/* Icono negro cuando el botón está activo */
.pf-btn.is-active .pf-btn__icon{
  filter:none;
}

/* Botones SOLO icono (filtro / limpiar): círculos perfectos */
.pf-right > .pf-btn,
.pf-filter .pf-btn{
  width: 52px;
  padding: 0;
  justify-content: center;
}

/* Buscador dentro de la barra */
.pf-center .rd-searchbox{
  --size: 50px;
  width:100%;
  min-width:0;
}
.pf-center .rd-searchbox__input{
  width:100%;
  min-width:0;
}

/* FILTRO: botón + panel overlay */
.pf-filter{
  position: relative;
}

/* Panel de filtros (overlay) */
.pf-panel{
  position:absolute;
  right:0;
  top:calc(100% + 10px);
  width:min(92vw, 360px);
  background:#111;
  color:var(--text);
  border:2px solid var(--gold);
  border-radius:18px;
  padding:14px;
  box-shadow:0 24px 50px rgba(0,0,0,.5);
  display:none;
  z-index:40;
}
.pf-panel.open{
  display:block;
  animation:pf-pop .16s ease-out;
}
@keyframes pf-pop{
  from{ transform:translateY(-6px); opacity:0; }
  to{ transform:none; opacity:1; }
}

.pf-panel__group{ margin-bottom:12px; }
.pf-panel__title{
  font-weight:800;
  color:var(--gold);
  margin-bottom:8px;
}

/* Chips de orden: lista vertical */
.pf-panel__group .pf-chip {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  background: rgba(0,0,0,0.45);
  border: 1px solid rgba(255,255,255,0.06);
  transition:
    background-color .18s ease,
    transform .12s ease,
    box-shadow .18s ease;
  margin-bottom: 6px;
}
.pf-panel__group .pf-chip:last-child {
  margin-bottom: 0;
}
.pf-panel__group .pf-chip:hover {
  background: rgba(0,0,0,0.7);
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(0,0,0,0.7);
}
.pf-panel__group .pf-chip:active {
  transform: translateY(0);
  box-shadow: none;
}

/* Radios personalizados dentro del chip */
.pf-chip input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.7);
  background-color: transparent;
  margin-right: 6px;
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
  transition:
    border-color .18s ease,
    box-shadow .18s ease,
    background-color .18s ease,
    transform .15s ease;
}
.pf-chip input[type="radio"]:hover {
  box-shadow: 0 0 0 3px rgba(255,255,255,0.18);
}
.pf-chip input[type="radio"]:checked {
  border-color: #ffffff;
  background-color: rgba(0,0,0,0.8);
  transform: scale(1.05);
}
.pf-chip input[type="radio"]:checked::after {
  content: "";
  width: 8px;
  height: 8px;
  background-color: #ffd54a;
  border-radius: 50%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.pf-chip span {
  font-size: 0.9rem;
  transition: color .18s ease, font-weight .18s ease;
}
.pf-chip input[type="radio"]:checked + span {
  color: #ffd54a;
  font-weight: 600;
}

/* Inputs numéricos de rango */
.pf-range{
  display:flex;
  align-items:center;
  gap:.5rem;
}
.pf-input-num{
  width:100%;
  max-width:120px;
  padding:.4rem .6rem;
  border-radius:12px;
  border:2px solid var(--gold);
  background:rgba(255,255,255,.06);
  color:var(--text);
}

/* Acciones del panel */
.pf-panel__actions{
  display:flex;
  justify-content:flex-end;
  gap:.5rem;
  margin-top:6px;
}

/* Botón Aplicar deshabilitado/activo */
.pf-panel__actions .pf-btn[disabled] {
  opacity: 0.4;
  cursor: default;
  box-shadow: none !important;
  transform: none !important;
}
.pf-panel__actions .pf-btn.is-active:not([disabled]) {
  box-shadow: 0 0 0 2px rgba(255, 213, 74, 0.7),
              0 10px 24px rgba(0,0,0,0.8);
  transform: translateY(-1px);
}

/* Botón del filtro cuando HAY filtros activos (no al abrir/cerrar) */
.pf-filter #pfFilterBtn.is-active {
  background-color: #000;
  color: #ffd54a;
  box-shadow: 0 0 0 2px #ffd54a;
  border-color: #ffd54a;
}

/* ===== RESPONSIVE BARRA SUPERIOR ===== */
@media (max-width: 768px) {
  .pf-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "cats cats"
      "search filter";
    row-gap: 10px;
    column-gap: 8px;
    align-items: stretch;
    margin-bottom: 70px;
  }

  .pf-bar .pf-left {
    grid-area: cats;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .pf-bar .pf-left .pf-btn {
    width: 100%;
  }

  .pf-bar .pf-left .pf-btn:nth-child(5) {
    grid-column: 1 / -1;
  }

  .pf-bar .pf-center {
    grid-area: search;
  }

  .pf-bar .pf-center .rd-searchbox {
    width: 100%;
  }

  .pf-bar .pf-right {
    grid-area: filter;
    display: flex;
    justify-content: flex-end;
    align-items: center;
  }

  .pf-filter {
    width: auto;
  }

  #pfFilterBtn {
    min-width: 52px;
    padding-inline: 0; /* ya controlado por width/height */
  }

  .pf-panel {
    width: min(340px, 90vw);
  }
}

@media (max-width: 600px){
  .pf-btn{
    height: 46px;
    padding: 0 1rem;
    font-size:.94rem;
  }
  .pf-btn__icon{
    width:18px;
    height:18px;
  }
}

.pf-panel__actions .pf-btn{
  border-radius:12px;          /* rectangulares con esquinas redondeadas */
  padding:10px 45px;
  min-width:0;
  justify-content:center;
}