html {
  font-size: 14px;
  position: relative;
  min-height: 100%;
  scroll-behavior: smooth;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

:root {
  --tp-rojo: #c62828;
  --tp-rojo-oscuro: #8e1f1f;
  --tp-amarillo: #ffd54f;
  --tp-crema: #fff8e1;
  --tp-texto: #2c2c2c;
  --tp-gris: #6c757d;
}

body {
  margin-bottom: 0;
  background-color: #fffdf8;
  color: var(--tp-texto);
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus,
.form-select:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem rgba(198, 40, 40, 0.25);
  border-color: var(--tp-rojo);
}

.form-floating > .form-control-plaintext::placeholder,
.form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder,
.form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* TOP BAR */
.tp-topbar {
  background: linear-gradient(90deg, var(--tp-rojo-oscuro), var(--tp-rojo));
  color: #fff;
  font-size: 0.92rem;
}

.tp-topbar a {
  color: #fff;
  text-decoration: none;
}

/* NAVBAR */
.tp-navbar {
  background-color: #ffffff;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.06);
}

.tp-navbar .navbar-brand img {
  height: 52px;
  width: auto;
}

.tp-navbar .nav-link {
  color: var(--tp-texto) !important;
  font-weight: 600;
  border-radius: 999px;
  padding: 0.55rem 0.9rem !important;
  transition: all 0.2s ease;
}

.tp-navbar .nav-link:hover,
.tp-navbar .nav-link.activo {
  background-color: #fff1f1;
  color: var(--tp-rojo) !important;
}

.tp-cart-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  background-color: var(--tp-rojo);
  color: #fff !important;
  border-radius: 999px;
  padding: 0.65rem 1rem !important;
  text-decoration: none;
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(198, 40, 40, 0.18);
}

.tp-cart-btn:hover {
  background-color: var(--tp-rojo-oscuro);
  color: #fff !important;
}

.tp-cart-badge {
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  border-radius: 999px;
  background-color: #fff;
  color: var(--tp-rojo);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 800;
}

.tp-auth-link {
  font-weight: 600;
}

.tp-auth-btn {
  border-radius: 999px;
  font-weight: 700;
  padding: 0.55rem 1rem;
}

/* MAIN */
.tp-main {
  min-height: 70vh;
}

/* FOOTER */
.tp-footer {
  background: #1f1f1f;
  color: rgba(255, 255, 255, 0.88);
  margin-top: 3rem;
}

.tp-footer h6 {
  color: #fff;
  font-weight: 700;
  margin-bottom: 1rem;
}

.tp-footer a {
  color: rgba(255, 255, 255, 0.88);
  text-decoration: none;
}

.tp-footer a:hover {
  color: var(--tp-amarillo);
}

.tp-footer .list-unstyled li {
  margin-bottom: 0.55rem;
}

.tp-footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.95rem;
}

.tp-pill {
  display: inline-block;
  background-color: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  font-size: 0.85rem;
  margin-right: 0.4rem;
  margin-bottom: 0.4rem;
}

/* PRODUCTOS - TARJETAS */
#productos .card {
  background-color: #ffffff;
  overflow: hidden;
}

/* 
   IMPORTANTE:
   No usamos height fijo ni object-fit: cover.
   Las imágenes generadas son cuadradas, entonces el contenedor también debe ser cuadrado.
*/
#productos .position-relative {
  width: 100%;
  aspect-ratio: 1 / 1;
  background-color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

#productos .position-relative > a {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #ffffff;
}

#productos .card-img-top {
  width: 100%;
  height: 100% !important;
  object-fit: contain !important;
  object-position: center center;
  background-color: #ffffff;
  padding: 0;
  margin: 0;
  display: block;
}

/* PRODUCTOS - CUERPO */
#productos .card-body {
  background-color: #ffffff;
}

/* MINIATURAS EN ADMINISTRACIÓN */
.table img.rounded.shadow-sm {
  object-fit: contain !important;
  background-color: #ffffff;
  padding: 2px;
  box-sizing: border-box;
}

/* UTIL */
.rounded-4 {
  border-radius: 1rem !important;
}

@media (max-width: 991.98px) {
  .tp-cart-mobile {
    margin-top: 0.75rem;
  }
}