/* ===================================================================
   EVENTIA · Catálogo en línea (catalogo.html)
=================================================================== */

.catalog-toolbar{
  display: flex;
  gap: var(--sp-3);
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-bottom: var(--sp-4);
}
.search-box{
  position: relative;
  flex: 1 1 260px;
  max-width: 360px;
}
.search-box input{
  width: 100%;
  padding: 0.75em 1em 0.75em 2.4em;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
}
.search-box svg{ position: absolute; left: 0.9em; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; stroke: var(--ink-faint); }

.catalog-layout{
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: var(--sp-5);
  align-items: start;
}
.filters-panel{
  position: sticky;
  top: 90px;
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  padding: var(--sp-4);
  background: var(--surface);
}
.filters-panel h4{ font-family: var(--font-body); font-size: var(--step-caption); text-transform: uppercase; letter-spacing: var(--tracking-mid); color: var(--ink-faint); margin-bottom: var(--sp-2); }
.filter-list{ display: flex; flex-direction: column; gap: 4px; margin-bottom: var(--sp-4); }
.filter-list button{
  text-align: left;
  background: none; border: none;
  padding: 0.5em 0.6em;
  border-radius: var(--radius-s);
  font-size: var(--step-small);
  color: var(--ink-soft);
}
.filter-list button:hover{ background: var(--bg-alt); }
.filter-list button.is-active{ background: var(--dorado-100); color: var(--cafe-900); font-weight: 500; }
.filter-list button .count{ float: right; color: var(--ink-faint); }

.price-sort select{
  width: 100%;
  padding: 0.6em 0.8em;
  border-radius: var(--radius-s);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
}

.results-count{ font-size: var(--step-small); color: var(--ink-faint); }

.product-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-4);
}
.product-card{
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  overflow: hidden;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  transition: transform var(--dur-med) var(--ease), box-shadow var(--dur-med) var(--ease);
}
.product-card:hover{ transform: translateY(-4px); box-shadow: var(--shadow-card); }
.product-art{ position: relative; aspect-ratio: 1; background: var(--nude-100); overflow: hidden; }
.product-art .circle{ position: absolute; border-radius: 50%; }
.product-badge{
  position: absolute; top: 10px; left: 10px;
  background: var(--dorado-500); color: var(--cafe-900);
  font-size: 0.68rem; text-transform: uppercase; letter-spacing: var(--tracking-mid);
  padding: 0.3em 0.7em; border-radius: 999px; font-weight: 500;
}
.product-body{ padding: var(--sp-3) var(--sp-3) var(--sp-4); display: flex; flex-direction: column; gap: 6px; flex: 1; }
.product-cat{ font-size: 0.68rem; text-transform: uppercase; letter-spacing: var(--tracking-mid); color: var(--ink-faint); }
.product-body h3{ font-size: 1.05rem; font-family: var(--font-body); font-weight: 500; color: var(--ink); }
.product-desc{ font-size: var(--step-small); color: var(--ink-soft); flex: 1; }
.product-footer{ display: flex; align-items: center; justify-content: space-between; margin-top: var(--sp-2); }
.product-price{ font-family: var(--font-display); font-size: 1.3rem; color: var(--cafe-900); }
.product-price span{ font-size: 0.7rem; color: var(--ink-faint); font-family: var(--font-body); }
.add-btn{
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--cafe-900); color: var(--nude-50);
  border: none; font-size: 1.2rem; line-height: 1;
  transition: background var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
.add-btn:hover{ background: var(--dorado-600); transform: scale(1.06); }

.empty-state{
  grid-column: 1/-1;
  text-align: center;
  padding: var(--sp-6) var(--sp-4);
  color: var(--ink-soft);
}

@media (max-width: 980px){
  .catalog-layout{ grid-template-columns: 1fr; }
  .filters-panel{ position: static; display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); flex-wrap: wrap; }
  .filter-list{ flex-direction: row; flex-wrap: wrap; margin-bottom: 0; }
  .product-grid{ grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px){
  .product-grid{ grid-template-columns: 1fr; }
}

/* ---------- Carrito lateral ---------- */
.cart-toggle{
  position: relative;
  background: var(--cafe-900);
  color: var(--nude-50);
  width: 44px; height: 44px;
  border-radius: 50%;
  border: none;
  display: flex; align-items: center; justify-content: center;
}
.cart-toggle svg{ width: 18px; height: 18px; stroke: var(--nude-50); fill: none; }
.cart-count{
  position: absolute; top: -4px; right: -4px;
  background: var(--dorado-500); color: var(--cafe-900);
  font-size: 0.65rem; font-weight: 700;
  width: 18px; height: 18px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}

.cart-drawer{
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(380px, 100%);
  background: var(--nude-50);
  box-shadow: -20px 0 40px -20px rgba(58,42,31,0.4);
  z-index: 300;
  transform: translateX(100%);
  transition: transform var(--dur-med) var(--ease);
  display: flex;
  flex-direction: column;
}
.cart-drawer.is-open{ transform: translateX(0); }
.cart-drawer-head{ padding: var(--sp-4); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.cart-drawer-head h3{ font-size: var(--step-h4); }
.cart-close{ background: none; border: none; font-size: 1.3rem; }
.cart-items{ flex: 1; overflow-y: auto; padding: var(--sp-3) var(--sp-4); }
.cart-item{ display: flex; gap: var(--sp-2); padding-block: var(--sp-3); border-bottom: 1px solid var(--line); }
.cart-item-art{ width: 56px; height: 56px; border-radius: var(--radius-s); background: var(--nude-100); position: relative; overflow: hidden; flex: none; }
.cart-item-art .circle{ position: absolute; border-radius: 50%; }
.cart-item-info{ flex: 1; }
.cart-item-info h5{ font-size: var(--step-small); font-weight: 500; margin-bottom: 2px; }
.cart-item-qty{ display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.cart-item-qty button{ width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); font-size: 0.8rem; }
.cart-item-remove{ font-size: 0.7rem; color: var(--error); background: none; border: none; margin-top: 4px; text-decoration: underline; }
.cart-empty{ text-align: center; color: var(--ink-faint); padding: var(--sp-6) 0; font-size: var(--step-small); }
.cart-drawer-foot{ padding: var(--sp-4); border-top: 1px solid var(--line); }
.cart-total-row{ display: flex; justify-content: space-between; font-family: var(--font-display); font-size: var(--step-h4); margin-bottom: var(--sp-3); }
.cart-drawer-foot .btn{ width: 100%; justify-content: center; margin-bottom: 8px; }
.cart-overlay{
  position: fixed; inset: 0; background: rgba(58,42,31,0.4);
  z-index: 290; opacity: 0; pointer-events: none; transition: opacity var(--dur-med) var(--ease);
}
.cart-overlay.is-open{ opacity: 1; pointer-events: auto; }
