/* ═══════════════════════════════════════════════
   MESAS HORECA — Tienda / Catálogo
   ═══════════════════════════════════════════════ */

/* ── Cabecera ── */
.tienda-header {
  background: var(--color-bg);
  padding: 72px 32px 40px;
  margin-top: 64px;
}
.tienda-header__inner {
  max-width: var(--container);
  margin: 0 auto;
}

/* ── Breadcrumb (inline en tienda) ── */
.breadcrumb {
  font-size: 12px;
  color: var(--color-muted);
  letter-spacing: 0.3px;
}
.breadcrumb a {
  color: var(--color-text);
  transition: color 0.3s var(--ease-premium);
}
.breadcrumb a:hover { color: var(--color-heading); }
.breadcrumb__sep {
  margin: 0 8px;
  color: #ccc;
}

/* ═══════════════ SUBCATEGORÍAS ═══════════════ */
.subcats {
  background: var(--color-bg);
  padding: 16px 32px 100px;
}
.subcats__inner {
  max-width: var(--container);
  margin: 0 auto;
}
.subcats__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.subcat-card {
  background: var(--color-white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.4s var(--ease-premium);
}
.subcat-card:hover {
  box-shadow: var(--shadow-md);
}
.subcat-card__image {
  height: 200px;
  overflow: hidden;
}
.subcat-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-premium);
}
.subcat-card:hover .subcat-card__image img {
  transform: scale(1.03);
}
.subcat-card__body {
  padding: 24px;
}
.subcat-card__title {
  font-size: 17px;
  font-weight: 500;
  color: var(--color-heading);
  margin-bottom: 6px;
}
.subcat-card__text {
  font-size: 13px;
  color: var(--color-text);
  line-height: 1.6;
  margin-bottom: 14px;
  font-weight: 300;
}
.subcat-card__link {
  font-size: 12px;
  font-weight: 500;
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ═══════════════ FILTRO DE STOCK ═══════════════ */
.stock-filter {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.stock-filter__label {
  font-size: 13px;
  color: var(--color-text);
}
.stock-filter__options {
  display: flex;
  gap: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.stock-filter__btn {
  padding: 8px 18px;
  background: var(--color-white);
  border: none;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  font-size: 13px;
  color: var(--color-text);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  border-right: 1px solid var(--color-border);
}
.stock-filter__btn:last-child { border-right: none; }
.stock-filter__btn:hover { background: var(--color-surface); }
.stock-filter__btn--active {
  background: var(--color-dark);
  color: var(--color-white);
}
.stock-filter__count {
  font-size: 12px;
  color: var(--color-muted);
  margin-left: auto;
}

/* ═══════════════ LAYOUT TIENDA ═══════════════ */
.tienda {
  background: var(--color-bg);
  padding: 0 32px 100px;
}
.tienda__inner {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 230px 1fr;
  gap: 40px;
  align-items: start;
}
.tienda__inner--full {
  grid-template-columns: 1fr;
}

/* ── Toggle filtros (mobile) ── */
.filters-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 10px 18px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  font-size: 13px;
  color: var(--color-dark);
  cursor: pointer;
  margin-bottom: 20px;
  grid-column: 1 / -1;
  transition: box-shadow 0.3s var(--ease-premium);
}
.filters-toggle:hover {
  box-shadow: var(--shadow-sm);
}

/* ── Filtros sidebar ── */
.filters {
  background: var(--color-white);
  border-radius: var(--radius-md);
  padding: 28px;
  position: sticky;
  top: 80px;
  box-shadow: var(--shadow-sm);
}
.filters__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}
.filters__title {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-heading);
  letter-spacing: 0.3px;
}
.filters__clear {
  background: none;
  border: none;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  font-size: 12px;
  color: var(--color-accent);
  cursor: pointer;
  padding: 0;
  transition: opacity 0.2s;
}
.filters__clear:hover { opacity: 0.7; }

.filters__group {
  margin-bottom: 22px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--color-border);
}
.filters__group:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}
.filters__group-title {
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--color-heading);
  margin-bottom: 14px;
}
.filters__check {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--color-text);
  cursor: pointer;
  padding: 5px 0;
  transition: color 0.2s;
}
.filters__check:hover { color: var(--color-heading); }
.filters__check input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--color-accent);
  cursor: pointer;
  flex-shrink: 0;
}

/* ═══════════════ GRID DE PRODUCTOS ═══════════════ */
.products {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.products--full {
  grid-template-columns: repeat(4, 1fr);
}

/* ── Product card ── */
.product-card {
  background: var(--color-white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.4s var(--ease-premium);
}
.product-card:hover {
  box-shadow: var(--shadow-md);
}
.product-card__image {
  aspect-ratio: 4/3;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 14px;
  position: relative;
  overflow: hidden;
}
.product-card__image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-premium);
}
.product-card:hover .product-card__image img {
  transform: scale(1.03);
}
.product-card__badge {
  display: inline-block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 500;
  color: var(--color-white);
  background: rgba(44, 44, 44, 0.75);
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  position: relative;
  z-index: 1;
}
.product-card__badge.badge--mel {
  background: rgba(160, 120, 90, 0.8);
}
.product-card__badge--out {
  background: rgba(160, 120, 90, 0.7) !important;
}
.product-card__body {
  padding: 20px 22px 22px;
}
.product-card__title {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-heading);
  margin-bottom: 4px;
}
.product-card__finish {
  font-size: 12px;
  color: var(--color-muted);
  margin-bottom: 12px;
  font-weight: 300;
}
.product-card__price {
  font-size: 15px;
  font-weight: 500;
  color: var(--color-dark);
}
.product-card__price small {
  font-size: 12px;
  font-weight: 300;
  color: var(--color-muted);
}

/* ── Empty state ── */
.products__empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 72px 24px;
}
.products__empty p {
  font-size: 15px;
  color: var(--color-text);
  margin-bottom: 20px;
  font-weight: 300;
}

/* ── Variante redonda ── */
.product-card--round .product-card__image {
  border-radius: 50%;
  margin: 14px auto 0;
  width: calc(100% - 28px);
  aspect-ratio: 1;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.product-card--round .product-card__badge {
  position: absolute;
  top: 14px;
  left: 14px;
}

.product-card--hidden {
  display: none;
}

/* ═══════════════ RESPONSIVE ═══════════════ */

@media (max-width: 768px) {
  .tienda__inner {
    grid-template-columns: 1fr;
  }
  .filters-toggle { display: flex; }
  .filters {
    display: none;
    position: static;
  }
  .filters.filters--open { display: block; }

  .products,
  .products--full {
    grid-template-columns: repeat(2, 1fr);
  }

  .subcats__grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .products,
  .products--full {
    grid-template-columns: 1fr;
  }
}
