/* ============================================================
   Manatus Tienda Online — estilos propios de la tienda
   (se suma a style.css, no lo reemplaza)
   ============================================================ */

.tienda-hero {
  padding: 150px 0 40px;
  text-align: center;
}
.tienda-hero h1 { font-size: clamp(28px, 3.4vw, 42px); }

.buscador {
  display: flex;
  gap: 10px;
  max-width: 560px;
  margin: 28px auto 0;
}
.buscador input {
  flex: 1;
  padding: 14px 18px;
  border-radius: 999px;
  border: 2px solid var(--border);
  font-family: inherit;
  font-size: 15px;
}
.buscador input:focus { outline: none; border-color: var(--blue); }

.cat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin: 24px 0 0;
}
.cat-chip {
  padding: 8px 18px;
  border-radius: 999px;
  border: 2px solid var(--border);
  font-size: 14px;
  font-weight: 600;
  color: var(--gray);
  white-space: nowrap;
}
.cat-chip.active, .cat-chip:hover { border-color: var(--blue); color: var(--blue); background: var(--blue-light); }

/* ---- Carrusel de inicio ---- */
.carrusel {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--blue-lighter);
  box-shadow: var(--shadow-sm);
}
.carrusel-track {
  display: flex;
  transition: transform .5s var(--ease);
}
.carrusel-slide {
  flex: 0 0 100%;
  aspect-ratio: 21 / 8;
}
.carrusel-slide img { width: 100%; height: 100%; object-fit: cover; }
.carrusel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,.85);
  color: var(--blue-darker);
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  transition: background .2s var(--ease), transform .2s var(--ease);
}
.carrusel-arrow:hover { background: var(--white); transform: translateY(-50%) scale(1.06); }
.carrusel-arrow.prev { left: 16px; }
.carrusel-arrow.next { right: 16px; }
.carrusel-dots {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}
.carrusel-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,.6);
  padding: 0;
}
.carrusel-dot.active { background: var(--white); box-shadow: 0 0 0 2px var(--blue); }
@media (max-width: 640px) {
  .carrusel-slide { aspect-ratio: 4 / 3; }
  .carrusel-arrow { width: 34px; height: 34px; font-size: 14px; }
}

/* ---- Catálogo: sidebar de categorías ---- */
.catalogo-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 32px;
  align-items: start;
}
.catalogo-sidebar {
  position: sticky;
  top: 100px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px;
}
.sidebar-toggle { display: none; }
.sidebar-menu {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 60vh;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.sidebar-menu::-webkit-scrollbar { width: 6px; }
.sidebar-menu::-webkit-scrollbar-track { background: transparent; }
.sidebar-menu::-webkit-scrollbar-thumb { background: var(--border); border-radius: 999px; }
.sidebar-menu::-webkit-scrollbar-thumb:hover { background: var(--gray-light); }
.sidebar-link {
  padding: 11px 14px;
  border-radius: 10px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--gray);
}
.sidebar-link:hover { background: var(--blue-lighter); color: var(--blue-darker); }
.sidebar-link.active { background: var(--blue); color: var(--white); }

@media (max-width: 900px) {
  .catalogo-layout { grid-template-columns: 1fr; }
  .catalogo-sidebar { position: static; padding: 4px; }
  .sidebar-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 12px 14px;
    background: none;
    border: none;
    font-weight: 700;
    font-size: 15px;
    color: var(--ink);
  }
  .sidebar-toggle i:last-child { transition: transform .2s var(--ease); font-size: 13px; }
  .sidebar-toggle.open i:last-child { transform: rotate(180deg); }
  .sidebar-menu {
    display: none;
    max-height: 320px;
    overflow-y: auto;
    padding: 0 4px 8px;
  }
  .sidebar-menu.open { display: flex; }
}

.productos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 22px;
  padding: 40px 0 96px;
}

.producto-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.producto-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }

.producto-card .img-wrap {
  aspect-ratio: 1 / 1;
  background: var(--blue-lighter);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.producto-card .img-wrap img { width: 100%; height: 100%; object-fit: contain; padding: 14px; }
.producto-card .img-wrap i { font-size: 40px; color: var(--blue); opacity: .35; }

.producto-card .body { padding: 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.producto-card h3 { font-size: 14.5px; font-weight: 600; line-height: 1.35; margin: 0; font-family: 'Inter', sans-serif; min-height: 38px; }
.producto-card .precio { font-size: 20px; font-weight: 800; color: var(--blue-darker); font-family: 'Poppins', sans-serif; margin-top: auto; }
.producto-card .stock-tag { font-size: 12px; font-weight: 600; }
.stock-tag.disponible { color: #1a9c5c; }
.stock-tag.consultar { color: var(--gray-light); }

.sin-resultados { text-align: center; padding: 60px 0; color: var(--gray); }

/* ---- Ficha de producto ---- */
.ficha-producto { padding: 150px 0 96px; }
.ficha-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
@media (max-width: 780px) { .ficha-grid { grid-template-columns: 1fr; } }
.ficha-img { background: var(--blue-lighter); border-radius: var(--radius); aspect-ratio: 1/1; display: flex; align-items: center; justify-content: center; }
.ficha-img img { max-width: 80%; max-height: 80%; object-fit: contain; }
.ficha-img i { font-size: 90px; color: var(--blue); opacity: .3; }
.ficha-precio { font-size: 34px; font-weight: 800; color: var(--blue-darker); font-family: 'Poppins', sans-serif; margin: 12px 0; }
.ficha-codigo { color: var(--gray-light); font-size: 13px; }
.cantidad-selector { display: flex; align-items: center; gap: 12px; margin: 18px 0; }
.cantidad-selector button { width: 38px; height: 38px; border-radius: 50%; border: 2px solid var(--border); background: var(--white); font-size: 18px; font-weight: 700; }
.cantidad-selector input { width: 56px; text-align: center; border: 2px solid var(--border); border-radius: 8px; padding: 8px; font-family: inherit; font-size: 16px; }

/* ---- Carrito ---- */
.cart-link { position: relative; }
.cart-badge {
  position: absolute; top: -6px; right: -6px;
  background: var(--blue); color: #fff;
  font-size: 11px; font-weight: 700;
  min-width: 18px; height: 18px; border-radius: 999px;
  display: flex; align-items: center; justify-content: center; padding: 0 4px;
}
.carrito-page { padding: 150px 0 96px; }
.carrito-item {
  display: grid; grid-template-columns: 64px 1fr auto auto; gap: 16px; align-items: center;
  padding: 16px 0; border-bottom: 1px solid var(--border);
}
.carrito-item .thumb { width: 64px; height: 64px; border-radius: 10px; background: var(--blue-lighter); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.carrito-item .thumb img { width: 100%; height: 100%; object-fit: contain; }
.carrito-item .thumb i { color: var(--blue); opacity: .35; font-size: 22px; }
.carrito-item .qty { display: flex; align-items: center; gap: 8px; }
.carrito-item .qty input { width: 48px; text-align: center; border: 2px solid var(--border); border-radius: 8px; padding: 6px; }
.carrito-item .remove { color: #d64545; font-size: 13px; font-weight: 600; }
.carrito-resumen { max-width: 380px; margin-left: auto; margin-top: 28px; text-align: right; }
.carrito-resumen .total { font-size: 26px; font-weight: 800; color: var(--blue-darker); }
.carrito-vacio { text-align: center; padding: 60px 0; }

.checkout-form { max-width: 520px; margin: 0 auto; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.form-group input, .form-group textarea {
  width: 100%; padding: 12px 14px; border-radius: 10px; border: 2px solid var(--border);
  font-family: inherit; font-size: 15px;
}
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--blue); }

.badge-estado { display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.badge-pendiente { background: #fff3d6; color: #916a00; }
.badge-confirmada { background: var(--blue-light); color: var(--blue-darker); }
.badge-entregada { background: #dcf7e3; color: #1a7d3d; }
.badge-cancelada { background: #fde0e0; color: #b02a2a; }
