/* ============================================================
   TechStore — Estilos personalizados
   ============================================================ */

:root {
  --ts-primary: #0d6efd;
  --ts-transition: .2s ease;
}

/* ---- Tipografía ---- */
body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: #212529;
}

/* ---- Navbar ---- */
.navbar {
  background-color: var(--ts-primary) !important;
}

/* ---- Carrito badge ---- */
#cart-badge:empty { display: none; }

/* ---- Tarjetas de producto ---- */
.product-card {
  transition: transform var(--ts-transition), box-shadow var(--ts-transition);
  border-radius: 12px;
  overflow: hidden;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,.12) !important;
}
.product-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: #f8f9fa;
}
.out-of-stock-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.45);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: .9rem;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* ---- Tarjetas de categoría ---- */
.category-card {
  transition: transform var(--ts-transition), box-shadow var(--ts-transition);
  border-radius: 12px;
}
.category-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 18px rgba(0,0,0,.1) !important;
}
.category-card:hover .text-primary {
  filter: brightness(1.2);
}

/* ---- Hero ---- */
.hero-section {
  min-height: 340px;
}

/* ---- Botón flotante WhatsApp ---- */
.whatsapp-float {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 58px;
  height: 58px;
  background: #25d366;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
  box-shadow: 0 4px 16px rgba(37,211,102,.45);
  z-index: 1050;
  transition: transform .2s, box-shadow .2s;
  text-decoration: none;
}
.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 22px rgba(37,211,102,.6);
  color: #fff;
}

/* ---- Paginación ---- */
.page-link { border-radius: 6px !important; margin: 0 2px; }

/* ---- Toast de notificación carrito ---- */
#cart-toast {
  position: fixed;
  bottom: 100px;
  right: 20px;
  z-index: 1060;
  min-width: 240px;
}

/* ---- Descripción del producto ---- */
.product-description ul { padding-left: 1.25rem; }
.product-description li { margin-bottom: .35rem; }

/* ---- Admin sidebar ---- */
@media (max-width: 767px) {
  .sidebar { width: 100%; min-height: auto; flex-direction: row !important; flex-wrap: wrap; }
  .sidebar .nav-section { display: none; }
  .sidebar .nav-link { font-size: .8rem; padding: .4rem .6rem; }
}

/* ---- Thumb imágenes detalle ---- */
.thumb-img {
  transition: opacity .15s;
}
.thumb-img:hover { opacity: .8; }
.thumb-img.active { border-color: var(--ts-primary) !important; }

/* ---- Badges ---- */
.bg-primary-subtle { background: rgba(13,110,253,.12); }

/* ---- Spinner de carga ---- */
.ts-spinner {
  display: inline-block;
  width: 1rem; height: 1rem;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin .6s linear infinite;
  vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- Responsive tables ---- */
@media (max-width: 576px) {
  .table-responsive { font-size: .8rem; }
}
