/* ═══════════════════════════════════
   TIENDA PAGE — tienda.css
   ═══════════════════════════════════ */

/* ── HERO TIENDA ── */
.tnd-hero {
  background: linear-gradient(160deg, var(--color-dark) 0%, #091d3e 100%);
  padding: 40px 0 36px;
}
.tnd-hero-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.tnd-hero-left h1 {
  color: #fff;
  font-size: clamp(28px, 3.5vw, 42px);
  margin-bottom: 6px;
}
.tnd-hero-left p {
  color: rgba(255,255,255,0.55);
  font-size: 14px;
}
.tnd-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,0.45);
  margin-bottom: 10px;
}
.tnd-breadcrumb a { color: var(--color-primary); text-decoration: none; }
.tnd-breadcrumb a:hover { text-decoration: underline; }
.tnd-breadcrumb svg { opacity: 0.5; }

/* ── BARRA DE HERRAMIENTAS ── */
.tnd-toolbar {
  background: #fff;
  border-bottom: 1px solid #e8eef4;
  padding: 14px 0;
  position: sticky;
  top: 96px;   /* altura header */
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}
.tnd-toolbar-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.tnd-search-wrap {
  display: flex;
  border: 1.5px solid #d8e4ee;
  border-radius: 8px;
  overflow: hidden;
  flex: 1;
  min-width: 200px;
  max-width: 340px;
  transition: border-color 0.25s;
}
.tnd-search-wrap:focus-within { border-color: var(--color-primary); }
.tnd-search-wrap input {
  flex: 1;
  padding: 9px 14px;
  border: none;
  outline: none;
  font-size: 13.5px;
  font-family: var(--font-main);
  background: transparent;
  color: var(--color-text);
}
.tnd-search-wrap input::placeholder { color: var(--color-text-light); }
.tnd-search-wrap button {
  padding: 9px 14px;
  background: var(--color-primary);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  font-family: var(--font-main);
  border: none;
  cursor: pointer;
  transition: background 0.25s;
  display: flex;
  align-items: center;
  gap: 5px;
}
.tnd-search-wrap button:hover { background: #0097cc; }
.tnd-sort-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 0;
}
.tnd-sort-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--color-text-muted);
  white-space: nowrap;
}
.tnd-sort-wrap select {
  padding: 8px 32px 8px 12px;
  border: 1.5px solid #d8e4ee;
  border-radius: 8px;
  font-size: 13px;
  font-family: var(--font-main);
  color: var(--color-text);
  outline: none;
  cursor: pointer;
  appearance: none;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' stroke='%236b7a99' stroke-width='2.5' stroke-linecap='round' viewBox='0 0 24 24'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") no-repeat right 10px center;
  transition: border-color 0.25s;
}
.tnd-sort-wrap select:focus { border-color: var(--color-primary); }
.tnd-count {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--color-text-muted);
  white-space: nowrap;
}

/* ── FILTROS DE CATEGORÍA ── */
.tnd-filters {
  background: var(--color-bg-light);
  padding: 16px 0;
  border-bottom: 1px solid #e8eef4;
  overflow-x: auto;
  scrollbar-width: none;
}
.tnd-filters::-webkit-scrollbar { display: none; }
.tnd-filters-inner {
  display: flex;
  gap: 10px;
  flex-wrap: nowrap;
  min-width: max-content;
}

/* ── MAIN CONTENT ── */
.tnd-main {
  padding: 36px 0 80px;
  background: var(--color-bg-light);
  min-height: 600px;
}

/* ── PRODUCT GRID ── */
.tnd-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

/* ── PRODUCT CARD ── */
.tnd-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  position: relative;
  cursor: pointer;
  transition: transform 0.28s cubic-bezier(0.4,0,0.2,1),
              box-shadow 0.28s cubic-bezier(0.4,0,0.2,1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.tnd-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 48px rgba(0,0,0,0.14);
}
.tnd-badge {
  position: absolute;
  top: 10px; left: 10px;
  background: var(--color-accent);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 20px;
  z-index: 2;
  letter-spacing: 0.3px;
}
.tnd-img-wrap {
  width: 100%;
  aspect-ratio: 1/1;
  overflow: hidden;
  background: var(--color-bg-off);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.tnd-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.35s ease;
}
.tnd-card:hover .tnd-img-wrap img { transform: scale(1.06); }
.tnd-info {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.tnd-brand {
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--color-primary);
}
.tnd-name {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--color-text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.tnd-prices {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.tnd-price {
  font-size: 18px;
  font-weight: 900;
  color: var(--color-primary);
}
.tnd-old {
  font-size: 12px;
  color: var(--color-text-light);
  text-decoration: line-through;
}
.tnd-saving {
  font-size: 11.5px;
  font-weight: 700;
  color: #25a244;
  margin-top: 2px;
}
.tnd-cta {
  margin-top: auto;
  padding: 10px;
  background: var(--color-primary);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  font-family: var(--font-main);
  border: none;
  border-radius: 7px;
  cursor: pointer;
  transition: background 0.25s;
  margin-top: 10px;
}
.tnd-cta:hover { background: #0097cc; }

/* ── EMPTY STATE ── */
.tnd-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 20px;
  color: var(--color-text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.tnd-empty svg { opacity: 0.3; }
.tnd-empty p { font-size: 15px; font-weight: 600; }

/* ── RESPONSIVE ── */
@media (max-width: 1200px) {
  .tnd-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 1024px) {
  .tnd-toolbar { top: 88px; }
  .tnd-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
}
@media (max-width: 768px) {
  .tnd-toolbar { top: 80px; }
  .tnd-toolbar-inner { gap: 8px; }
  .tnd-search-wrap { max-width: 100%; }
  .tnd-sort-wrap { width: 100%; justify-content: flex-end; }
  .tnd-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .tnd-hero { padding: 28px 0 24px; }
}
@media (max-width: 480px) {
  .tnd-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .tnd-info { padding: 12px; }
  .tnd-price { font-size: 15px; }
}
