/* =======================================================
   PALETA DE COLORES
   ======================================================= */
:root {
  --rojo: #c62828;
  --rojo-oscuro: #b71c1c;
  --negro: #222;
  --gris: #555;
  --fondo: #fdfdfd;
  --sombra: rgba(0, 0, 0, 0.15);
}

/* =======================================================
   ESTILOS GENERALES
   ======================================================= */
body {
  background-color: var(--fondo);
  font-family: "Poppins", sans-serif;
}

/* =======================================================
   CARDS DE PRODUCTOS
   ======================================================= */
.card {
  border: none;
  border-radius: 1rem;
  overflow: hidden;
  background: #fff;
  position: relative;
  transition: all 0.3s ease-in-out;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 22px var(--sombra);
}

/* Imagen del producto */
.card-img-top {
  width: 100%;
  height: 200px;
  object-fit: contain;
  padding: 1rem;
  background: #fff;
  transition: transform 0.35s ease-in-out;
}

.card:hover .card-img-top {
  transform: scale(1.12);
}

/* Overlay con descripción */
.card-desc-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 0;
  background: linear-gradient(to top, rgba(255, 255, 255, 0.9), transparent);
  padding: 1rem;
  opacity: 0;
  transition: all 0.35s ease-in-out;
  display: flex;
  align-items: flex-end;
}

.card:hover .card-desc-overlay {
  height: 60%;
  opacity: 1;
}

/* Texto del overlay */
.card-desc-overlay p {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--negro);
}

/* Información del card */
.card-body {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: center;
}

.card-title {
  font-weight: 600;
  color: var(--rojo);
}

.card-text {
  color: var(--gris);
  font-size: 0.9rem;
  min-height: 50px;
}

/* Botón agregar */
.btn-add-cart {
  border-radius: 30px;
  padding: 0.4rem 1.2rem;
  background-color: var(--rojo);
  color: #fff;
  font-weight: 500;
  transition: all 0.25s ease-in-out;
  margin-top: 0.5rem;
}

.btn-add-cart:hover {
  background-color: var(--rojo-oscuro);
  transform: scale(1.06);
}

/* =======================================================
   PANEL DEL CARRITO
   ======================================================= */
#cart-body img {
  border-radius: 8px;
  width: 55px;
  height: 55px;
  object-fit: cover;
}

.table > :not(caption) > * > * {
  vertical-align: middle;
}

/* Subtotales */
#subtotal,
#envio,
#total {
  font-weight: 700;
  color: var(--negro);
}

#finalizar-compra {
  border-radius: 10px;
  font-size: 1.05rem;
  padding: 0.7rem;
  font-weight: 600;
  background: var(--rojo);
  color: #fff;
  transition: all 0.3s ease-in-out;
}

#finalizar-compra:hover {
  background: var(--rojo-oscuro);
  transform: translateY(-2px);
}

/* =======================================================
   MODAL DE LOGIN
   ======================================================= */
#loginModal .modal-content {
  border-radius: 12px;
  border: none;
  box-shadow: 0 4px 25px var(--sombra);
  padding: 1rem;
}

#loginModal .form-control:focus {
  border-color: var(--rojo);
  box-shadow: 0 0 0 0.2rem rgba(198, 40, 40, 0.25);
}
