/* css/admin.css
   ─────────────────────────────────────────────
   Estilos del panel admin y la tienda pública.
   Clases específicas que no son reutilizables
   globalmente.
   ───────────────────────────────────────────── */

/* ── Admin: header ────────────────────────────── */
.admin-header-logo {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--fondo);
  border: 1.5px solid var(--borde);
}

.admin-header-nombre {
  font-size: .95rem;
  font-weight: 800;
  color: var(--texto);
  line-height: 1.1;
}

.admin-header-slug {
  font-size: .72rem;
  color: var(--texto-light);
}

.btn-ver-tienda {
  font-size: .78rem;
  color: var(--primario);
  font-weight: 700;
  text-decoration: none;
  padding: 6px 10px;
  border: 1.5px solid var(--primario);
  border-radius: 8px;
  transition: var(--trans);
}
.btn-ver-tienda:hover { background: var(--primario-bg); }

.btn-logout {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  color: var(--texto-light);
  padding: 4px;
  line-height: 1;
}

/* ── Admin: lista de productos ────────────────── */
.prod-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.prod-row-thumb {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--fondo);
}

.prod-row-placeholder {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  background: var(--fondo);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.prod-row-nombre {
  font-weight: 700;
  font-size: .92rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.prod-row-precio {
  font-size: .85rem;
  color: var(--texto-mid);
  margin-top: 2px;
}

.prod-row-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
}

/* ── Admin: pedido ────────────────────────────── */
.pedido-card  { margin-bottom: 10px; }

.pedido-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}

.pedido-cliente   { font-weight: 800; font-size: .92rem; }
.pedido-fecha     { font-size: .8rem; color: var(--texto-light); }
.pedido-items     { font-size: .83rem; color: var(--texto-mid); margin-bottom: 8px; line-height: 1.5; }
.pedido-footer    { display: flex; justify-content: space-between; align-items: center; }
.pedido-total     { font-weight: 800; font-size: .95rem; }
.pedido-acciones  { display: flex; gap: 6px; align-items: center; }

/* ── Admin: badge pedidos nuevos ──────────────── */
.badge-count {
  display: none;
  background: var(--error);
  color: #fff;
  border-radius: 10px;
  padding: 0 5px;
  font-size: .7rem;
  font-weight: 800;
}
.badge-count.visible { display: inline; }

/* ── Admin: config ────────────────────────────── */
.config-url-box {
  background: #fafafa;
  border-radius: var(--radio);
  padding: 14px 16px;
}
.config-url-label { font-size: .82rem; color: var(--texto-mid); font-weight: 700; margin-bottom: 4px; }
.config-url-link  { font-size: .88rem; color: var(--primario); font-weight: 700; word-break: break-all; }

.logo-preview {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 10px;
  display: block;
  border: 2px solid var(--borde);
}

/* ── Tienda: header ───────────────────────────── */
.tienda-header-logo {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.tienda-header-placeholder {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--fondo);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.btn-carrito {
  position: relative;
  background: var(--primario);
  border: none;
  border-radius: 10px;
  padding: 9px 14px;
  cursor: pointer;
  color: #fff;
  font-weight: 800;
  font-size: .85rem;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--trans);
}
.btn-carrito:hover { background: var(--primario-dk); }

/* ── Tienda: filtros de categoría ─────────────── */
.filtros-wrap {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  overflow-x: auto;
  scrollbar-width: none;
  background: #fff;
  border-bottom: 1px solid var(--borde);
}
.filtros-wrap::-webkit-scrollbar { display: none; }

.btn-cat {
  flex-shrink: 0;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1.5px solid var(--borde);
  background: #fff;
  color: var(--texto-mid);
  font-size: .82rem;
  font-weight: 700;
  cursor: pointer;
  transition: .15s;
  font-family: inherit;
}
.btn-cat.active {
  border-color: var(--primario);
  background: var(--primario);
  color: #fff;
}

/* ── Tienda: grilla de productos ──────────────── */
.prod-grilla {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 12px 16px;
}

.prod-card {
  cursor: pointer;
  padding: 0;
  overflow: hidden;
}

.prod-card-img-wrap {
  aspect-ratio: 1;
  background: var(--fondo);
  overflow: hidden;
}
.prod-card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s;
}
.prod-card:hover .prod-card-img-wrap img { transform: scale(1.04); }

.prod-card-body  { padding: 10px; }
.prod-card-nombre {
  font-size: .85rem;
  font-weight: 700;
  color: var(--texto);
  line-height: 1.3;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.prod-card-precio { font-size: .92rem; font-weight: 800; color: var(--primario-dk); }

.btn-agregar {
  margin-top: 8px;
  width: 100%;
  padding: 7px;
  background: var(--primario);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: .8rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--trans);
  font-family: inherit;
}
.btn-agregar:hover { background: var(--primario-dk); }

/* ── Tienda: carrito qty buttons ──────────────── */
.qty-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 1rem;
  cursor: pointer;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  font-family: inherit;
}
.qty-btn-menos { border: 1.5px solid var(--borde); background: #fff; color: var(--texto); }
.qty-btn-mas   { border: 1.5px solid var(--primario); background: var(--primario); color: #fff; }

/* ── Tienda: success screen ───────────────────── */
.success-screen {
  text-align: center;
  padding: 20px 0;
}
.success-icon  { font-size: 3rem; margin-bottom: 12px; display: block; }
.success-title { font-size: 1.1rem; font-weight: 800; margin-bottom: 8px; }
.success-desc  { font-size: .88rem; color: var(--texto-mid); margin-bottom: 20px; line-height: 1.5; }

.btn-wsp-grande {
  display: block;
  padding: 14px;
  background: linear-gradient(135deg, #25D366, #128C7E);
  color: #fff;
  border-radius: 10px;
  font-weight: 800;
  text-decoration: none;
  font-size: .95rem;
  margin-bottom: 10px;
  text-align: center;
  transition: opacity .2s;
}
.btn-wsp-grande:hover { opacity: .9; }
