/* ==== VARIABLES DE COLOR ==== */
:root {
  /* Colores base (fondos) */
  --bg-marfil: #FAF7F2;
  --bg-beige: #EFE5D8;
  --bg-blanco: #FFFFFF;
  
  /* Texto */
  --text-principal: #1E1E1E;
  --text-secundario: #7A746C;
  
  /* Colores de elementos interactivos */
  --btn-latte: #B48A63;
  --btn-latte-hover: #9F7652;
  --link-color: #8E6A4A;
  --link-hover: #6F4F34;
  
  /* Color para bordes */
  --divider: #E2D9CF;
  
  /* Opacidades útiles */
  --latte-alpha-08: rgba(180, 138, 99, 0.08); 
  --latte-alpha-12: rgba(180, 138, 99, 0.12);
  --latte-alpha-18: rgba(180, 138, 99, 0.18);
  --latte-alpha-25: rgba(180, 138, 99, 0.25);
  --latte-alpha-35: rgba(180, 138, 99, 0.35);
  --latte-alpha-85: rgba(180, 138, 99, 0.85);
  --latte-solid: rgb(180, 138, 99);
  
  /* Opacidades de divider */
  --divider-alpha-55: rgba(226, 217, 207, 0.55);
  --divider-alpha-70: rgba(226, 217, 207, 0.7);
  --divider-alpha-90: rgba(226, 217, 207, 0.9);
  
  /* Sombras */
  --shadow-soft: 0 6px 14px var(--latte-alpha-18);
  --shadow-hover: 0 10px 28px var(--latte-alpha-25);
  
  /* Alturas de carousel para diferentes breakpoints */
  --carousel-height: 520px;
}

/* ==== ESTILOS BASE ==== */
body {
  background-color: var(--bg-marfil);
  color: var(--text-principal);
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.7;
}

/* ==== NAVBAR ==== */
.navbar.navbar-light {
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--divider);
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
  position: relative;
  z-index: 1100;
}

.navbar { overflow: visible; }

.navbar-brand {
  gap: 0.5rem;
}

.navbar-logo {
  height: 48px;
  width: auto;
  transition: transform 0.3s ease;
}

.navbar-brand:hover .navbar-logo {
  transform: scale(1.05);
}

.navbar-brand span:first-child {
  font-size: 1.75rem;
  font-weight: 900;
  letter-spacing: 1px;
  color: var(--text-principal);
}

.navbar-brand span:last-child {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--text-secundario);
}

.nav-link {
  color: var(--text-principal);
  font-weight: 500;
  padding: 0.5rem 0.75rem;
  border-radius: 10px;
  transition: all 0.2s ease;
}

.nav-link:hover {
  background-color: var(--latte-alpha-08);
  transform: translateY(-1px);
}

.nav-link.active,
.nav-link:focus {
  font-weight: 800;
  color: var(--btn-latte);
}

/* Dropdown */
.navbar .dropdown-menu {
  background-color: var(--bg-blanco);
  border: 1px solid var(--divider);
  border-radius: 14px;
  padding: 0.5rem;
  margin-top: 0.5rem;
  box-shadow: 0 10px 28px var(--latte-alpha-18);
  min-width: 220px;
  z-index: 1100;
}

.dropdown-item {
  color: var(--text-principal);
  padding: 0.65rem 1rem;
  border-radius: 10px;
  transition: all 0.2s ease;
  font-weight: 500;
  display: flex;
  align-items: center;
}

.dropdown-item:hover {
  background-color: var(--latte-alpha-08);
  color: var(--btn-latte);
}

.dropdown-item:active {
  background-color: var(--latte-alpha-12);
  color: var(--btn-latte-hover);
}

.dropdown-item i {
  color: var(--btn-latte);
  opacity: 0.85;
}

.dropdown-divider {
  border-color: var(--divider);
  margin: 0.5rem 0;
}

.dropdown-toggle::after {
  margin-left: 0.4em;
  transition: transform 0.2s ease;
}

.dropdown-toggle[aria-expanded="true"]::after {
  transform: rotate(180deg);
}

/* ==== CARRUSEL ==== */

.carousel-item {
  height: var(--carousel-height);
  position: relative;
  overflow: hidden;
}

.carousel-item img {
  object-fit: cover;
  height: 100%;
  width: 100%;
  filter: none;
  transform: scale(1.02);
}

/* Overlay para legibilidad del texto */
.carousel-item::before{
  content:"";
  position:absolute;
  inset:0;
  background: linear-gradient(
    90deg,
    rgba(30,30,30,.55) 0%,
    rgba(30,30,30,.22) 45%,
    rgba(30,30,30,0) 75%
  );
  pointer-events:none;
  z-index: 1;
}

/* Asegurar que el caption quede arriba del overlay */
.carousel-caption {
  z-index: 2;
}

/* Texto simple sobre carrusel */
.carousel-caption.caption-plain {
  left: 6%;
  right: auto;
  bottom: 18%;
  max-width: 520px;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.carousel-caption.caption-plain .caption-title {
  color: #fff;
  font-weight: 800;
  text-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

.carousel-caption.caption-plain .caption-subtitle {
  color: rgba(255, 255, 255, 0.88);
  text-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

/* Tamaños base de letras */
.caption-title {
  font-size: clamp(1.4rem, 2vw, 2rem);
  letter-spacing: -0.015em;
  margin-bottom: 0.35rem;
}

.caption-subtitle {
  font-size: 1rem;
  line-height: 1.45;
  margin-bottom: 0.9rem;
}

/* Botón en carrusel */
.carousel-caption.caption-plain .btn {
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

/* Botón custom */
.btn-ladelice {
  background: var(--btn-latte);
  color: #fff;
  border: 1px solid var(--btn-latte);
  border-radius: 12px;
  padding: 0.55rem 0.95rem;
}
.btn-ladelice:hover {
  background: var(--btn-latte-hover);
  border-color: var(--btn-latte-hover);
  color: #fff;
}

/* Indicadores */
.carousel-indicators button {
  width: 28px;
  height: 3px;
  border-radius: 999px;
  margin: 0 5px;
  background-color: var(--latte-alpha-35);
  border: 0;
  opacity: 1;
}
.carousel-indicators button.active {
  background-color: var(--latte-solid);
}

/* Controles */
.carousel-control-prev-icon,
.carousel-control-next-icon {
  background-color: var(--latte-alpha-85);
  border-radius: 999px;
  padding: 1.1rem;
  box-shadow: 0 10px 24px rgba(30, 30, 30, 0.18);
  opacity: 0.9;
}

.carousel-control-prev:hover .carousel-control-prev-icon,
.carousel-control-next:hover .carousel-control-next-icon {
  opacity: 1;
  transform: scale(1.05);
}

/* ==== SECCIÓN PRODUCTOS DESTACADOS ==== */
.section-featured {
  background-color: var(--bg-beige);
}

#productos {
  padding: 4rem 0;
}

#productos header p {
  color: var(--btn-latte-hover);
  font-weight: 600;
  font-size: 0.75rem;
}

#productos .display-5 {
  color: var(--text-principal);
  font-size: 3.5rem;
  font-weight: 800;
}

#productos .lead {
  color: var(--text-secundario);
  max-width: 60ch;
  margin-left: auto;
  margin-right: auto;
}

/* ==== BOTONES ==== */
.btn {
  border-radius: 999px;
  font-weight: 650;
  font-size: 0.95rem;
  padding: 0.65rem 1.25rem;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn:focus,
.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px var(--latte-alpha-18);
}

/* Botón primario */
.btn.btn-primary {
  background-color: var(--btn-latte);
  border-color: var(--btn-latte);
  color: var(--bg-blanco);
  box-shadow: var(--shadow-soft);
}

.btn.btn-primary:hover {
  background-color: var(--btn-latte-hover);
  border-color: var(--btn-latte-hover);
  color: var(--bg-blanco);
  box-shadow: var(--shadow-hover);
}

.btn.btn-primary:active,
.btn.btn-primary:focus,
.btn.btn-primary:focus-visible {
  background-color: var(--btn-latte-hover);
  border-color: var(--btn-latte-hover);
  color: var(--bg-blanco);
  box-shadow: 0 0 0 4px var(--latte-alpha-18);
}

.btn.btn-primary:active {
  transform: translateY(0);
}

.btn.btn-outline-primary {
  background-color: transparent;
  border-color: var(--btn-latte);
  color: var(--btn-latte);
}

.btn.btn-outline-primary:hover {
  background-color: var(--bg-beige);
  border-color: var(--btn-latte-hover);
  color: var(--btn-latte-hover);
  transform: translateY(-1px);
}

.btn.btn-outline-primary:active,
.btn.btn-outline-primary:focus,
.btn.btn-outline-primary:focus-visible {
  background-color: var(--bg-beige);
  border-color: var(--btn-latte-hover);
  color: var(--btn-latte-hover);
  box-shadow: 0 0 0 4px var(--latte-alpha-18);
}

.btn.btn-outline-primary:active {
  transform: translateY(0);
}

/* Tamaños de botones */
.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.btn-lg {
  padding: 0.875rem 1.75rem;
  font-size: 1.05rem;
  font-weight: 700;
}

/* ==== POSICIONAMIENTO DE BADGES ==== */
.position-absolute.badge {
  z-index: 10;
}

/* ==== ANIMACIONES SUAVES ==== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#productos .product-card {
  animation: fadeInUp 0.5s ease-out;
}

/* ==== MEJORAS DE ACCESIBILIDAD ==== */
.btn:focus-visible,
.nav-link:focus-visible,
.card:focus-visible {
  outline: 3px solid var(--btn-latte);
  outline-offset: 2px;
}

/* Clase personalizada para texto secundario */
.text-secondary-custom {
  color: var(--text-secundario);
}

a {
  color: var(--link-color);
  transition: color 0.2s ease;
}

a:hover {
  color: var(--link-hover);
}

/* ==== ESPACIADO Y RITMO VISUAL ==== */
section {
  padding: 3.5rem 0;
}
.container {
  max-width: 1140px;
}

.row {
  --bs-gutter-x: 1.5rem;
  --bs-gutter-y: 1.5rem;
}

/* ==== SOMBRAS SUAVES ==== */
.shadow-sm {
  box-shadow: 0 4px 10px var(--latte-alpha-08);
}

.shadow {
  box-shadow: 0 8px 20px var(--latte-alpha-12);
}

/* ==== COMPONENTE BASE: CARD ==== */
.card-base {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  border-radius: 18px;
  background: var(--bg-blanco);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-base:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

/* ==== COMPONENTE BASE: ICONO CIRCULAR ==== */
.icon-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

/* ==== TABLA TAMAÑOS ==== */

.section-sizes {
  background: var(--bg-marfil);
}

/* Contenedor tabla */
.table-sizes {
  width: 100%;
  margin-bottom: 0;
  background: var(--bg-blanco);
  border-radius: 16px;
  overflow: hidden;
  border-collapse: separate;
  border-spacing: 0;
  box-shadow: 0 12px 30px rgba(30, 30, 30, 0.08);
}

/* Encabezado */
.table-sizes thead th {
  background: var(--bg-beige);
  color: var(--text-principal);
  font-weight: 700;
  padding: 1rem;
  border-bottom: 1px solid rgba(226, 217, 207, 1);
  white-space: nowrap;
  text-align: center;
}

/* Celdas */
.table-sizes tbody td {
  padding: 1rem;
  border-bottom: 1px solid var(--divider-alpha-55);
  color: var(--text-secundario);
  text-align: center;
  vertical-align: middle;
}

/* Primera columna */
.table-sizes tbody td:first-child {
  font-weight: 700;
  color: var(--text-principal);
}

/* primera y última columna alineadas al centro */
.table-sizes thead th:is(:first-child, :last-child),
.table-sizes tbody td:is(:first-child, :last-child) {
  text-align: center;
}

/* Última fila sin borde */
.table-sizes tbody tr:last-child td {
  border-bottom: 0;
}

/* Hover suave */
.table-sizes tbody tr:hover td {
  background: rgba(239, 229, 216, 0.35);
  color: var(--text-principal);
}

/* Nota inferior */
.section-sizes .small {
  font-style: italic;
  opacity: 0.85;
}

/* ==== SECCIÓN ACERCA DE NOSOTROS ==== */
.bg-white {
  background-color: var(--bg-blanco);
}

#nosotros .card {
  background-color: var(--bg-blanco);
  border: 1px solid var(--divider);
}

#nosotros .card-img-top {
  border-radius: 18px 18px 0 0;
}

#nosotros .img-fluid {
  border-radius: 18px;
}

/* ==== SECCIÓN SUCURSALES ==== */
.branch-card {
  border-radius: 20px; 
}

.branch-card:hover {
  transform: translateY(-8px); 
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.branch-media {
  height: 280px;
  overflow: hidden;
  border-radius: 20px 20px 0 0;
}

.branch-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.4s ease;
}

.branch-card:hover .branch-media img {
  transform: scale(1.08);
}

.branch-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.65), transparent 55%);
  pointer-events: none;
}

.branch-tag {
  left: 18px;
  bottom: 18px;
  z-index: 1;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-shadow: 0 3px 10px rgba(0, 0, 0, 0.6);
}

.branch-meta {
  font-size: 0.9rem;
  color: var(--text-secundario);
  display: flex;
  align-items: center;
}

.branch-meta i {
  color: var(--btn-latte);
}

.branch-card .card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
}

.branch-card .btn {
  border-radius: 50px;
  padding: 0.65rem 1.25rem;
  font-weight: 600;
  transition: all 0.3s ease;
}

.branch-card .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(180, 138, 99, 0.3);
}

/* Tarjeta Coming Soon */
.branch-card--soon {
  position: relative;
}

.branch-card--soon .branch-overlay {
  background: linear-gradient(to top, rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0.3));
}

.branch-card--soon .branch-media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(180, 138, 99, 0.15);
  backdrop-filter: blur(1px);
}

.branch-soon-message {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secundario);
  font-size: 0.95rem;
  padding: 0.5rem 0;
}

.branch-soon-message i {
  color: var(--btn-latte);
  font-size: 1.1rem;
}

/* ==== SECCIÓN CONTACTO ==== */
.section-contact {
  background: var(--bg-marfil);
}

.contact-card,
.contact-form-card {
  background: var(--bg-blanco);
  border: 1px solid var(--divider);
  border-radius: 18px;
  box-shadow: 0 12px 30px rgba(30, 30, 30, 0.08);
  padding: 1.5rem;
}

.contact-card__title,
.contact-form-card__title {
  font-weight: 800;
  letter-spacing: -0.01em;
}

.contact-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  display: grid;
  gap: 1rem;
}

.contact-item {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
}

.contact-icon {
  width: 44px;
  height: 44px;
  background: var(--latte-alpha-08);
  border: 1px solid var(--divider-alpha-70);
  color: var(--btn-latte);
}

.contact-text {
  color: var(--text-secundario);
  font-size: 0.95rem;
}

.section-contact .form-control,
.section-contact .form-select {
  border-radius: 14px;
  border: 1px solid var(--divider-alpha-90);
  padding: 0.75rem 0.9rem;
}

.section-contact .form-control:focus,
.section-contact .form-select:focus {
  border-color: rgba(180, 138, 99, 0.55);
  box-shadow: 0 0 0 4px var(--latte-alpha-12);
}

/* ==== NEWSLETTER ==== */
.newsletter-section {
  background: linear-gradient(135deg, var(--bg-beige) 0%, var(--bg-marfil) 100%);
}

.newsletter-card {
  background: var(--bg-blanco);
  border-radius: 24px;
  padding: 3rem 2rem;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--divider);
}

.newsletter-icon {
  width: 70px;
  height: 70px;
  background: linear-gradient(135deg, var(--btn-latte) 0%, var(--btn-latte-hover) 100%);
  color: var(--bg-blanco);
  font-size: 2rem;
  margin: 0 auto;
  box-shadow: 0 8px 24px rgba(180, 138, 99, 0.3);
}

.newsletter-title {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-principal);
  letter-spacing: -0.02em;
}

.newsletter-subtitle {
  font-size: 1.05rem;
  color: var(--text-secundario);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

.newsletter-input {
  height: 54px;
  border-radius: 50px;
  border: 2px solid var(--divider);
  padding: 0 1.5rem;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.newsletter-input:focus {
  border-color: var(--btn-latte);
  box-shadow: 0 0 0 4px var(--latte-alpha-12);
  outline: none;
}

.newsletter-form .btn-primary {
  height: 54px;
  padding-left: 2rem;
  padding-right: 2rem;
}

.newsletter-disclaimer {
  color: var(--text-secundario);
  font-style: italic;
}

.newsletter-disclaimer i {
  color: var(--btn-latte);
}

/* ==== FOOTER ==== */
.separator {
  max-width: 1140px;
  margin: 2rem auto;
  border: 0;
  border-top: 2px solid var(--divider);
  opacity: 0.5;
}

.footer {
  background-color: var(--text-principal);
  color: rgba(255, 255, 255, 0.86);
}

.footer-logo {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--bg-blanco);
}

.footer-logo span {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 3px;
  color: rgba(255, 255, 255, 0.62);
}

.footer .footer-desc {
  max-width: 42ch;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.85);
}

/* Override de .text-muted dentro del footer para mantener legibilidad */
.footer .text-muted {
  color: rgba(255, 255, 255, 0.85);
}

.footer-section-title {
  color: var(--btn-latte);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 1rem;
}

.footer-list {
  display: grid;
  gap: 0.5rem;
}

.footer-link {
  color: rgba(255, 255, 255, 0.74);
  transition: all 0.3s ease;
}

.footer-link:hover {
  color: var(--btn-latte);
  transform: translateX(3px);
}

.footer-text {
  color: rgba(255, 255, 255, 0.74);
  transition: color 0.3s ease;
}

.footer-list li:hover .footer-text {
  color: var(--btn-latte);
}

.footer-list li i {
  color: rgba(255, 255, 255, 0.6);
  transition: all 0.3s ease;
}

.footer-list li:hover i {
  color: var(--btn-latte);
  transform: scale(1.1);
}

.footer-social {
  display: flex;
  gap: 0.5rem;
}

.footer-icon {
  width: 38px;
  height: 38px;
  background-color: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--btn-latte);
  color: var(--btn-latte);
  padding: 0;
}

.footer-icon:hover {
  background-color: var(--btn-latte);
  color: var(--bg-blanco);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(180, 138, 99, 0.4);
}

.footer-icon i {
  font-size: 1rem;
}

.footer-bar {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-copy {
  color: rgba(255, 255, 255, 0.55);
}

/* ==== PERSONALIZACIÓN DE SCROLLBAR ==== */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-beige);
}

::-webkit-scrollbar-thumb {
  background: var(--btn-latte);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--btn-latte-hover);
}

/* ==== MEDIA QUERIES - RESPONSIVE ==== */

/* ========== Pantallas grandes y medianas ========== */
@media (max-width: 991.98px) {
  :root {
    --carousel-height: 430px;
  }
}

/* ========== Tablets ========== */
@media (max-width: 768px) {
  :root {
    --carousel-height: 350px;
  }
  
  .carousel-caption h5 {
    font-size: 1.5rem;
  }
  
  .carousel-caption p {
    font-size: 0.95rem;
  }
  
  /* Navbar */
  .navbar-brand span:first-child {
    font-size: 1.5rem;
  }
  
  /* Productos */
  #productos .display-5 {
    font-size: clamp(2rem, 3vw, 3.1rem);
    font-weight: 800;
  }
  
  /* Newsletter */
  .newsletter-card {
    padding: 2rem 1.5rem;
  }
  
  .newsletter-title {
    font-size: 1.5rem;
  }
  
  .newsletter-subtitle {
    font-size: 0.95rem;
  }
  
  .newsletter-icon {
    width: 60px;
    height: 60px;
    font-size: 1.75rem;
  }
}

/* ========== Móviles (max-width: 576px) ========== */
@media (max-width: 576px) {
  :root {
    --carousel-height: 280px;
  }
  
  .carousel-caption {
    padding: 1rem;
    bottom: 1.5rem;
  }
  
  .carousel-caption.caption-plain {
    left: 5%;
    right: 5%;
    bottom: 10%;
    max-width: none;
  }
  
  .carousel-caption h5 {
    font-size: 1.25rem;
  }
  
  .carousel-caption p {
    font-size: 0.85rem;
  }
  
  /* Productos */
  #productos {
    padding: 3rem 0;
  }
  
  #productos .display-5 {
    font-size: 2rem;
  }
  
  /* Botones */
  .btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
  }
  
  /* Cards */
  .card-body {
    padding: 1rem;
  }
  
  /* Tabla de tamaños */
  .table-sizes thead th,
  .table-sizes tbody td {
    padding: 0.85rem 0.8rem;
    font-size: 0.95rem;
  }
  
  /* Contacto */
  .contact-card,
  .contact-form-card {
    padding: 1.15rem;
  }
}