/* =============================================
   Betters - Hardware POS Mayorista
   Paleta: Naranja #FF7F00 · Azul #0B1E4C · Blanco
   ============================================= */

:root {
  --bts-orange: #FF7F00;
  --bts-orange-dark: #e06c00;
  --bts-orange-light: #fff3e0;
  --bts-blue: #0B1E4C;
  --bts-blue-light: #1a3370;
  --bts-blue-soft: #e7ecf6;
  --bts-white: #ffffff;
  --bts-gray: #f6f7fb;
}

* { box-sizing: border-box; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, Arial, sans-serif;
  margin: 0;
  background: var(--bts-white);
  color: #222;
  scroll-behavior: smooth;
}

html { scroll-behavior: smooth; }

/* ---------- COLORES UTILITARIOS ---------- */
.text-orange { color: var(--bts-orange) !important; }
.text-blue   { color: var(--bts-blue) !important; }
.bg-orange   { background: var(--bts-orange) !important; color: #fff !important; }
.bg-blue     { background: var(--bts-blue) !important; color: #fff !important; }
.bg-light-orange { background: var(--bts-orange-light) !important; }
.border-orange { border-left: 4px solid var(--bts-orange) !important; }
.border-blue   { border-left: 4px solid var(--bts-blue) !important; }

/* ---------- BOTONES ---------- */
.btn-orange {
  background: var(--bts-orange);
  color: #fff;
  border: none;
  font-weight: 600;
  transition: .2s;
}
.btn-orange:hover, .btn-orange:focus {
  background: var(--bts-orange-dark);
  color: #fff;
  box-shadow: 0 4px 12px rgba(255,127,0,.3);
}
.btn-blue {
  background: var(--bts-blue);
  color: #fff;
  border: none;
  font-weight: 500;
}
.btn-blue:hover { background: var(--bts-blue-light); color: #fff; }
.btn-outline-blue {
  border: 1px solid var(--bts-blue);
  color: var(--bts-blue);
  background: transparent;
}
.btn-outline-blue:hover, .btn-outline-blue.active {
  background: var(--bts-blue);
  color: #fff;
}
.btn-cart {
  background: var(--bts-orange);
  color: #fff;
  border: none;
  font-weight: 500;
}
.btn-cart:hover { background: var(--bts-orange-dark); color: #fff; }

/* ---------- NAVBAR ---------- */
.navbar-bts {
  background: var(--bts-blue);
}
.navbar-bts .navbar-brand,
.navbar-bts .nav-link {
  color: #fff !important;
}
.navbar-bts .nav-link:hover,
.navbar-bts .nav-link.active {
  color: var(--bts-orange) !important;
}
.brand-mark {
  display: inline-block;
  width: 38px;
  height: 38px;
  line-height: 38px;
  background: var(--bts-orange);
  color: #fff;
  font-weight: 700;
  text-align: center;
  border-radius: 8px;
  letter-spacing: 1px;
}
.brand-text { font-weight: 600; letter-spacing: .5px; }

/* ---------- HERO ---------- */
.hero {
  background-size: cover;
  background-position: center;
  min-height: 70vh;
  display: flex;
  align-items: center;
}
.hero h1 { text-shadow: 0 2px 12px rgba(0,0,0,.4); }

/* ---------- BANNER STRIP ---------- */
.banner-strip {
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

/* ---------- STAT BOX ---------- */
.stat-box {
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: 1rem;
  background: var(--bts-blue-soft);
  border-radius: 10px;
  border-left: 4px solid var(--bts-orange);
}
.stat-box i {
  font-size: 1.8rem;
  color: var(--bts-blue);
}

/* ---------- PRODUCT CARDS ---------- */
.product-card {
  border: 1px solid #e9ecef;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  transition: transform .25s, box-shadow .25s;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(11,30,76,.12);
}
.product-card .card-img-top {
  height: 200px;
  object-fit: cover;
  background: var(--bts-gray);
}
.product-card.oferta { border: 2px solid var(--bts-orange); }
.ribbon {
  position: absolute;
  top: 12px;
  left: -8px;
  background: var(--bts-orange);
  color: #fff;
  padding: 4px 14px;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: 1px;
  border-radius: 0 4px 4px 0;
  box-shadow: 0 2px 6px rgba(0,0,0,.2);
  z-index: 2;
}
.ribbon::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  border: 4px solid var(--bts-orange-dark);
  border-bottom-color: transparent;
  border-left-color: transparent;
}

/* ---------- FILTRO CATEGORÍAS ---------- */
.cat-filter .btn { border-radius: 20px; padding: .35rem 1rem; }

/* ---------- FOOTER ---------- */
.footer-bts {
  background: var(--bts-blue);
  color: #fff;
}

/* ---------- CARRITO OFFCANVAS ---------- */
.cart-line {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .75rem 0;
  border-bottom: 1px solid #eee;
}
.cart-line img {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 6px;
  background: var(--bts-gray);
}
.cart-line-info { flex: 1; min-width: 0; }
.cart-line-info strong { display: block; font-size: .9rem; color: var(--bts-blue); }
.cart-qty {
  width: 60px;
  text-align: center;
}
.cart-empty {
  text-align: center;
  color: #999;
  padding: 2rem 1rem;
}

/* ---------- ADMIN ---------- */
.admin-body {
  background: var(--bts-gray);
  min-height: 100vh;
}
.stat-card {
  position: relative;
  overflow: hidden;
  background: #fff;
  border: none;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(11,30,76,.06);
}
.stat-icon {
  position: absolute;
  right: 12px;
  top: 12px;
  font-size: 2.5rem;
  opacity: .12;
  color: var(--bts-blue);
}

.login-page {
  background: linear-gradient(135deg, var(--bts-blue) 0%, var(--bts-blue-light) 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.login-card-wrap { width: 100%; max-width: 420px; }
.login-card { border: none; border-radius: 12px; }

/* ---------- TOAST ---------- */
#btsToast { background: var(--bts-blue); }
#btsToast.toast-success { background: #28a745; }
#btsToast.toast-error { background: #dc3545; }

/* ---------- RESPONSIVE TWEAKS ---------- */
@media (max-width: 768px) {
  .hero { min-height: 50vh; }
  .hero h1 { font-size: 1.8rem; }
  .product-card .card-img-top { height: 160px; }
  .banner-strip { background-attachment: scroll; }
}
