/* =============================================
   Galletitas - Catálogo Online - Estilos
   ============================================= */

/* ---- Variables ---- */
:root {
  --primary:        #2d4a8a;
  --primary-hover:  #1e3366;
  --accent:         #f59e0b;
  --card-radius:    12px;
  /* Bootstrap 5 overrides */
  --bs-primary:         #2d4a8a;
  --bs-primary-rgb:     45, 74, 138;
  --bs-link-color:      #2d4a8a;
  --bs-link-hover-color:#1e3366;
}

body {
  background-color: #f0f4fb;
  min-height: 100vh;
}

/* ---- Bootstrap color overrides ---- */
.btn-primary {
  background-color: #2d4a8a;
  border-color:     #2d4a8a;
  color: #fff;
}
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary:focus-visible,
.btn-primary.active {
  background-color: #1e3366 !important;
  border-color:     #1e3366 !important;
  color: #fff !important;
}
.btn-outline-primary {
  color:        #2d4a8a;
  border-color: #2d4a8a;
}
.btn-outline-primary:hover,
.btn-outline-primary:active {
  background-color: #2d4a8a;
  border-color:     #2d4a8a;
  color: #fff;
}
.text-primary   { color:            #2d4a8a !important; }
.bg-primary     { background-color: #2d4a8a !important; }
.border-primary { border-color:     #2d4a8a !important; }
.alert-info {
  background-color: #e8eef9;
  border-color:     #2d4a8a;
  color:            #1e3366;
}
.alert-info .fas { color: #2d4a8a; }
.spinner-border.text-primary { color: #2d4a8a !important; }
.page-link        { color: #2d4a8a; }
.page-link:hover  { color: #1e3366; }
.page-item.active .page-link {
  background-color: #2d4a8a;
  border-color:     #2d4a8a;
}

/* ---- Banner carousel ---- */
.banner-slide {
  height: 210px;
  position: relative;
}
.banner-slide--blue {
  background: linear-gradient(135deg, #1e3366 0%, #2d4a8a 50%, #3d5fa8 100%);
}
.banner-slide--teal {
  background: linear-gradient(135deg, #065f46 0%, #0f766e 50%, #14b8a6 100%);
}
.banner-slide--purple {
  background: linear-gradient(135deg, #4c1d95 0%, #6d28d9 50%, #8b5cf6 100%);
}
.banner-slide--caramel {
  background: linear-gradient(135deg, #78350f 0%, #b45309 50%, #d97706 100%);
}
.banner-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: #fff;
  padding: 0 1.5rem;
  width: 100%;
  max-width: 700px;
}
.banner-icons {
  font-size: 2.2rem;
  margin-bottom: .5rem;
  opacity: .9;
  display: flex;
  justify-content: center;
  gap: .75rem;
}
.banner-title {
  font-size: clamp(1.15rem, 3.5vw, 1.75rem);
  font-weight: 700;
  margin-bottom: .35rem;
  text-shadow: 0 1px 4px rgba(0,0,0,.25);
}
.banner-subtitle {
  font-size: clamp(.8rem, 2vw, 1rem);
  opacity: .9;
  margin: 0;
}
#banner-carousel .carousel-indicators [data-bs-slide-to] {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  opacity: .55;
}
#banner-carousel .carousel-indicators .active { opacity: 1; }
@media (max-width: 576px) {
  .banner-slide  { height: 170px; }
  .banner-icons  { font-size: 1.6rem; }
}


.product-card {
  border: none;
  border-radius: var(--card-radius);
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .12) !important;
}
.product-card .card-img-top {
  height: 190px;
  object-fit: cover;
  background: #f0f0f0;
}
.product-card .badge-destacado {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 1;
}
.product-card .badge-promo {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 1;
}
/* Bloque de precio: altura fija para alinear cards con y sin promo */
.card-price-wrap {
  min-height: 3.2rem;
}

/* ---- Image placeholder ---- */
.img-placeholder {
  height: 190px;
  background: linear-gradient(135deg, #ececec, #d9d9d9);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #bbb;
  font-size: 3rem;
}
.img-placeholder img.product-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
}

/* ---- Cart offcanvas ---- */
.offcanvas-cart .cart-item {
  border-bottom: 1px solid #eee;
  padding: 8px 0;
}

/* ---- Order status badges ---- */
.badge-Pendiente       { background-color: #ffc107; color: #000; }
.badge-Aprobado        { background-color: #198754; color: #fff; }
.badge-En-preparación  { background-color: #0d6efd; color: #fff; }
.badge-En-expedición   { background-color: #fd7e14; color: #fff; }
.badge-Entregado       { background-color: #2d4a8a; color: #fff; }
.badge-Cancelado       { background-color: #dc3545; color: #fff; }

/* ---- Footer ---- */
.footer-main {
  background-color: #1e2a3a;
  color: #cbd5e1;
}
.footer-heading {
  color: #fff;
  font-weight: 700;
  text-transform: uppercase;
  font-size: .75rem;
  letter-spacing: .08em;
  border-bottom: 2px solid #2d4a8a;
  padding-bottom: .4rem;
  margin-bottom: 1rem;
}
.footer-links li { line-height: 1.8; }
.footer-links a {
  color: #cbd5e1;
  text-decoration: none;
}
.footer-links a:hover { color: #fff; }
.footer-brand-text { color: #cbd5e1; }
.footer-logo {
  max-width: 120px;
  width: 100%;
  border-radius: 50%;
  background: #fff;
  padding: 6px;
  box-shadow: 0 4px 14px rgba(0,0,0,.35);
}
.footer-division {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #f59e0b;
}
.footer-logo-placeholder {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.8rem;
  color: #2d4a8a;
  box-shadow: 0 4px 14px rgba(0,0,0,.35);
  margin-inline: auto;
}
.footer-map-wrap iframe {
  filter: grayscale(20%);
}
.footer-bottom {
  background-color: #131d29;
  border-top: 1px solid #2d3748;
  color: #fff;
}
.footer-bottom small,
.footer-bottom .text-muted {
  color: #fff !important;
}

/* ---- Auth cards ---- */
.auth-card {
  max-width: 460px;
  margin: 60px auto;
  border-radius: 16px;
  border: none;
  box-shadow: 0 6px 28px rgba(0, 0, 0, .10);
}

/* ---- FAB cart button ---- */
#fab-cart {
  width: 60px;
  height: 60px;
  z-index: 1050;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

/* ---- Filters bar ---- */
.filters-bar {
  background: #fff;
  border-radius: 10px;
  padding: 12px 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
}

/* ---- Checkout card ---- */
.checkout-card {
  border: none;
  border-radius: var(--card-radius);
  box-shadow: 0 4px 16px rgba(0,0,0,.08);
}

/* ---- Spinner overlay ---- */
.spinner-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, .75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

/* ---- Responsive tweaks ---- */
@media (max-width: 576px) {
  .auth-card { margin: 20px auto; }
  .product-card .card-img-top,
  .img-placeholder { height: 160px; }
}

/* ---- Chat de pedidos ---- */
.chat-box {
  min-height: 80px;
  max-height: 220px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
}
.chat-burbuja {
  max-width: 80%;
  padding: 7px 11px;
  border-radius: 14px;
  font-size: .875rem;
  line-height: 1.4;
  word-break: break-word;
}
.chat-remoto {
  align-self: flex-end;
  background-color: #2d4a8a;
  color: #fff;
  border-bottom-right-radius: 3px;
}
.chat-local {
  align-self: flex-start;
  background-color: #e9ecef;
  color: #212529;
  border-bottom-left-radius: 3px;
}
.chat-hora {
  font-size: .68rem;
  opacity: .7;
  margin-top: 3px;
  text-align: right;
}
.chat-local .chat-hora { text-align: left; }
