/* === Reset y base === */
* {
  box-sizing: border-box;
}

body {
  background-color: #fafafa;
  color: #333;
  font-family: system-ui, -apple-system, sans-serif;
  margin: 0;
  transition: background-color 0.3s, color 0.3s;
}

body.dark {
  background-color: #292c35;
  color: #e0e0e0;
}

/* === Navbar === */
.navbar {
  background-color: #000050;
  padding: 0.5rem 0.75rem;
  transition: background-color 0.3s;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

body.dark .navbar {
  background-color: #111;
}

.navbar-brand {
  font-weight: 700;
  color: #ffffff !important;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.1rem;
}

.navbar-brand i {
  font-size: 1.25rem;
}

/* Ajuste en móviles pequeños */
@media (max-width: 300px) {
  .navbar-brand span {
    display: none;
  }
  .navbar-brand i {
    font-size: 1.3rem;
  }
  .navbar {
    padding: 0.4rem 0.5rem;
  }
}

/* Hamburguesa */
.navbar-toggler {
  border: none;
  padding: 0.25rem 0.5rem;
}

.navbar-toggler:focus {
  box-shadow: none;
}

/* Enlaces de navegación */
.nav-link {
  color: rgba(255, 255, 255, 0.85) !important;
  position: relative;
  padding: 0.4rem 0.8rem;
  font-weight: 500;
  margin: 0 0.3rem;
}

.nav-link:hover,
.nav-link:focus {
  color: #bb86fc !important;
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: 0.3rem;
  left: 50%;
  width: 0;
  height: 2px;
  background-color: #bb86fc;
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* Centrado solo en desktop */
@media (min-width: 992px) {
  .navbar-nav-centered {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex !important;
    flex-direction: row !important;
  }
  .navbar-brand {
    font-size: 1.25rem;
  }
  .navbar {
    padding: 0.75rem 1rem;
  }
}

/* === Switch de Dark Mode (aislado, sin colisiones) === */
.dark-mode-switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 26px;
  margin-left: 0.5rem;
}

.dark-mode-switch .checkbox {
  opacity: 0;
  position: absolute;
  width: 0;
  height: 0;
}

.dark-mode-switch .label {
  background-color: #111;
  border-radius: 50px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px;
  position: relative;
  height: 26px;
  width: 50px;
  transform: scale(1.2);
}

.dark-mode-switch .label .ball {
  background-color: #fff;
  border-radius: 50%;
  position: absolute;
  top: 2px;
  left: 2px;
  height: 22px;
  width: 22px;
  transform: translateX(0px);
  transition: transform 0.2s linear;
}

.dark-mode-switch .checkbox:checked + .label .ball {
  transform: translateX(24px);
}

.dark-mode-switch .fa-moon {
  color: #bb86fc;
  font-size: 0.7rem;
}

.dark-mode-switch .fa-sun {
  color: #bb86fc;
  font-size: 0.7rem;
}

.btn-hero {
  background-color: #bb86fc;
  color: #fff;
}

.btn-hero:hover {
  background-color: #9759e2;
  color: #fff;
}

/* === Personalización Botón Outline Primary === */
.btn-outline-primary {
  color: #bb86fc !important;
  border-color: #bb86fc !important;
  background-color: transparent;
  font-weight: 600;
  padding: 0.75rem 2rem;
  transition: all 0.3s ease;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active {
  color: #000000 !important;
  background-color: #bb86fc !important;
  border-color: #bb86fc !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(187, 134, 252, 0.3);
}

.btn-outline-primary:active {
  transform: translateY(0);
}

/* Versión Dark Mode */
body.dark .btn-outline-primary {
  color: #bb86fc !important;
  border-color: #bb86fc !important;
}

body.dark .btn-outline-primary:hover,
body.dark .btn-outline-primary:focus,
body.dark .btn-outline-primary:active {
  color: #000000 !important;
  background-color: #bb86fc !important;
  border-color: #bb86fc !important;
}

/* Escala ligeramente mayor en desktop */
@media (min-width: 768px) {
  .dark-mode-switch .label {
    transform: scale(1.35);
  }
}

/* === Footer === */

.footer {
  background-color: #000050;
  color: var(--navbar-text-light);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 2.5rem;
  padding-bottom: 2rem;
}

body.dark .footer {
  background-color: var(--navbar-bg-dark);
  color: #e0e0e0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer h5 {
  font-weight: 700;
  color: var(--navbar-text-light);
}

body.dark .footer h5 {
  color: #ffffff;
}

.footer .text-muted {
  color: rgba(255, 255, 255, 0.6) !important;
}

body.dark .footer .text-muted {
  color: rgba(255, 255, 255, 0.5) !important;
}

.text-orange {
  color: #bb86fc;
}

body.dark .text-orange {
  color: #bb86fc;
}

.footer a {
  color: rgba(255, 255, 255, 0.7);
  transition: color 0.2s;
}

.footer a:hover {
  color: #bb86fc;
}

body.dark .footer a {
  color: rgba(255, 255, 255, 0.6);
}

body.dark .footer a:hover {
  color: #bb86fc;
}

/* Iconos de redes sociales */
.footer .fab {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f1c40f;
  color: white;
  border-radius: 50%;
  transition: all 0.2s;
}

body.dark .footer .fab {
  background-color: #f39c12;
}

.footer .fab:hover {
  background-color: #e67e22;
  transform: scale(1.1);
}

body.dark .footer .fab:hover {
  background-color: #d35400;
  transform: scale(1.1);
}

/* Línea divisoria */
.footer hr {
  border-color: rgba(255, 255, 255, 0.1);
}

body.dark .footer hr {
  border-color: rgba(255, 255, 255, 0.05);
}

/* Copyright */
.footer p {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
}

body.dark .footer p {
  color: rgba(255, 255, 255, 0.4);
}

/* Ajuste en móvil */
@media (max-width: 767.98px) {
  .footer .col-lg-3,
  .footer .col-lg-2 {
    margin-bottom: 1.5rem;
  }
  .footer .text-orange {
    font-size: 1.1rem;
  }
  .footer {
    padding-top: 2rem;
    padding-bottom: 1.5rem;
  }
}

/* About Section */
.about-section {
  background-color: var(--bakery-cream);
  position: relative;
  overflow: hidden;
  padding: 5rem 0;
}

.about-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url('data:image/svg+xml,<svg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><g fill="%235d4037" fill-opacity="0.05"><circle cx="30" cy="30" r="4"/></g></g></svg>');
  opacity: 0.3;
  pointer-events: none;
}

.section-subtitle {
  font-family: "Georgia", serif;
  color: #888;
  letter-spacing: 0.3em;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.section-title {
  font-family: "Georgia", serif;
  font-weight: bold;
  font-style: italic;
  font-size: 5rem;
  line-height: 0.9;
  margin-bottom: 3rem;
  color: var(--bakery-brown);
}

@media (max-width: 768px) {
  .section-title {
    font-size: 3.5rem;
  }
}

.content-title {
  font-family: "Georgia", serif;
  font-weight: bold;
  font-size: 2.2rem;
  margin-bottom: 1.5rem;
  color: var(--bakery-brown);
}

.content-text {
  font-size: 1.1rem;
  line-height: 1.7;
  color: #5a5a5a;
  margin-bottom: 2rem;
}

.feature-list {
  list-style: none;
  padding: 0;
}

.feature-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
}

.feature-icon {
  color: var(--bakery-pink);
  font-size: 1.3rem;
  margin-right: 1rem;
  flex-shrink: 0;
  margin-top: 0.2rem;
}

.feature-text {
  font-weight: 600;
  color: var(--bakery-brown);
}

/* Carrusel Styles */
.carousel-container {
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  position: relative;
}

.carousel-item {
  height: 500px;
  background-size: cover;
  background-position: center;
}

.carousel-control-prev,
.carousel-control-next {
  width: 50px;
  height: 50px;
  background-color: rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.carousel-container:hover .carousel-control-prev,
.carousel-container:hover .carousel-control-next {
  opacity: 1;
}

.carousel-control-prev {
  left: 20px;
}

.carousel-control-next {
  right: 20px;
}

.carousel-indicators {
  bottom: 20px;
}

.carousel-indicators button {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin: 0 5px;
}

/* Animation styles */
.text-content > * {
  opacity: 0;
}

/* Pasteleria */
.pasteleria-section {
  padding: 5rem 0;
  background-color: var(--cream-light);
  color: var(--text-light);
  transition: all 0.3s ease;
}

body.dark .pasteleria-section {
  background-color: var(--cream-dark);
  color: var(--text-dark);
}

.section-subtitle {
  font-family: "Georgia", serif;
  color: #888;
  letter-spacing: 0.3em;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

body.dark .section-subtitle {
  color: #aaa;
}

.section-title {
  font-family: "Georgia", serif;
  font-weight: bold;
  font-style: italic;
  font-size: 4rem;
  line-height: 0.9;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

body.dark .section-title {
  color: var(--accent-color);
}

.section-description {
  font-size: 1.2rem;
  color: #666;
  margin-bottom: 3rem;
}

body.dark .section-description {
  color: #ccc;
}

/* Card Styles */
.pastel-card {
  background: white;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: none;
  height: 100%;
}

body.dark .pastel-card {
  background: #1e1e1e;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.pastel-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

body.dark .pastel-card:hover {
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.card-image-container {
  height: 250px;
  overflow: hidden;
  position: relative;
}

.card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.pastel-card:hover .card-image {
  transform: scale(1.1);
}

.card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, transparent 60%, rgba(0, 0, 0, 0.3));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.pastel-card:hover .card-overlay {
  opacity: 1;
}

.card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  height: 140px;
}

.card-title {
  font-family: "Georgia", serif;
  font-weight: bold;
  font-size: 1.3rem;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

body.dark .card-title {
  color: var(--accent-color);
}

.card-description {
  color: #666;
  font-size: 0.9rem;
  flex-grow: 1;
  margin-bottom: 1rem;
}

body.dark .card-description {
  color: #ccc;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1em;
}

.card-price {
  font-size: 1.4rem;
  font-weight: bold;
  color: var(--accent-color);
}

.btn-pastel {
  background-color: #bb86fc;
  color: white;
  border: none;
  padding: 0.6rem 1.5rem;
  border-radius: 25px;
  font-weight: 600;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.btn-pastel:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(187, 134, 252, 0.4);
  color: white;
  background: #9759e2;
}

/* Modal Styles */
.modal-content {
  border-radius: 20px;
  border: none;
  overflow: hidden;
  background: white;
}

body.dark .modal-content {
  background: #1e1e1e;
  color: var(--text-dark);
}

.modal-header {
  background: var(--primary-color);
  color: white;
  border-bottom: none;
  padding: 1.5rem 2rem;
}

.modal-title {
  color: #1e1e1e !important;
  font-family: "Georgia", serif;
  font-weight: bold;
  font-size: 1.8rem;
}

body.dark .btn-close {
  filter: invert(1);
}

.modal-body {
  padding: 2rem;
}

.modal-image {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: 15px;
  margin-bottom: 1.5rem;
}

.detail-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem 0;
  border-bottom: 1px solid #eee;
}

body.dark .detail-item {
  border-bottom: 1px solid #444;
}

.detail-label {
  font-weight: 600;
  color: var(--primary-color);
}

body.dark .detail-label {
  color: var(--accent-color);
}

.detail-value {
  color: #666;
  text-align: right;
}

body.dark .detail-value {
  color: #ccc;
}

.modal-price {
  font-size: 2rem;
  font-weight: bold;
  color: var(--accent-color);
  text-align: center;
  margin: 1.5rem 0;
}

.btn-order {
  background-color: #bb86fc;
  color: white;
  border: none;
  padding: 1rem 2rem;
  border-radius: 25px;
  font-weight: 600;
  font-size: 1.1rem;
  width: 100%;
  transition: all 0.3s ease;
}

.btn-order:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(187, 134, 252, 0.4);
  background: #9759e2;
}

.btn-close {
  color: #111 !important;
}

/* Responsive */
@media (max-width: 768px) {
  .section-title {
    font-size: 2.5rem;
  }

  .card-image-container {
    height: 200px;
  }

  .card-footer {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
  }

  .btn-pastel {
    width: 100%;
  }
}
