/* =========================================================
   RESET Y LAYOUT BASE
========================================================= */
html,
body {
    height: 100%;
    margin: 0;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    /* El body ocupa toda la pantalla */
    background-color: var(--bs-body-bg, #f8f9fa);
    /* fallback */
    color: var(--bs-body-color, #212529);
}

/* =========================================================
   HEADER FIJO
========================================================= */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1020;
    /* encima de todo */
}

/* =========================================================
   NAVBAR
========================================================= */
.navbar {
    background-color: #214d21 !important;
}


/* Botón modo oscuro */
#toggle-theme {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 0.7rem;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    color: rgba(255, 255, 255, 0.5) !important;
    background: transparent !important;
    box-shadow: none;
}
#toggle-theme:hover {
    border-color: rgba(255, 255, 255, 0.7) !important;
    color: rgba(255, 255, 255, 0.9) !important;
    background: rgba(255, 255, 255, 0.1) !important;
}

.navbar-toggler {
    border-color: rgba(255, 255, 255, 0.5) !important;
}

.navbar-toggler-icon {
    filter: brightness(1.5);
}

.navbar-toggler:hover {
    border-color: rgba(255, 255, 255, 0.8) !important;
    background: rgba(255, 255, 255, 0.1) !important;
}

/* Logo de la navbar */
.navbar-brand img {
    height: 40px;
    margin-right: 10px;
}

@media (max-width: 992px) {
    .navbar {
        padding-top: 0.75rem !important;
        padding-bottom: 0.75rem !important;
    }
}

.navbar-brand span {
    font-size: 1.2rem;
    text-shadow: 2px 2px 5px #000;
}

/* =========================================================
   NAVBAR MEJORADO
========================================================= */
.nav-link-afs {
    position: relative;
    padding-bottom: 4px !important;
    transition: color 0.2s ease;
    color: rgba(255, 255, 255, 0.85) !important;
}

.nav-link-afs:hover {
    color: white !important;
}

.nav-link-afs::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #4a9e4a;
    transition: width 0.3s ease;
}

.nav-link-afs:hover::after,
.nav-link-afs.active::after {
    width: 100%;
}

.nav-link-afs.active {
    color: #90EE90 !important;
}

.navbar .form-control::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.navbar .form-control {
    color: whitesmoke;
    border: 1px solid whitesmoke !important;
    border-radius: 4px;
}

/* =========================================================
   MAIN
========================================================= */
main {
    flex: 1;
    /* Ocupa todo el espacio disponible */
    margin-top: 80px;
    /* Deja hueco para el header fijo */
    overflow: visible;
    /* Scroll normal */
}

/* =========================================================
   FOOTER
========================================================= */
footer {
    width: 100%;
    background-color: #212529;
    /* bg-dark */
    color: #fff;
    margin-top: auto;
    /* Empuja el footer al fondo */
}

/* Links del footer */
footer a {
    color: #ced4da;
    /* text-white-50 */
    text-decoration: none;
}

footer a:hover {
    color: #ffffff;
    text-decoration: underline;
}

/* Pequeño espaciado y tipografía en footer */
footer .small {
    font-size: 0.8rem;
}

footer h6 {
    font-weight: bold;
    margin-bottom: 0.5rem;
}

/* =========================================================
   SERVICIOS Y TARJETAS
========================================================= */

/* Efecto hover para crecer la tarjeta */
.servicio-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.servicio-card:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* Efecto hover solo para la imagen de detalle */
.detalle-img {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.detalle-img:hover {
    transform: scale(1.05);
    box-shadow: 0 0.5rem 2rem rgba(0, 0, 0, 0.25);
}

 /* Input cantidad carrito — mobile-first */
  #input-cantidad {
      width: 100%;
      font-size: 1rem;
      font-weight: 600;
      letter-spacing: 1px;
      text-align: right;
  }

  @media (min-width: 576px) {
      #input-cantidad {
          width: 170px;
          font-size: 1.1rem;
          letter-spacing: 2px;
      }
  }

  .row-cols-1 > .col {
      flex: 0 0 100%;
      max-width: 100%;
      width: 100%;
  }



/* =========================================================
   TABLAS Y ELEMENTOS GENERALES
========================================================= */
.table {
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 0.75rem;
}

.table td,
.table th {
    vertical-align: middle;
}

.table tbody tr:hover {
    background-color: rgba(var(--bs-body-color-rgb), 0.02);
}

  /* =========================================================
     VISTA CARRITO — mobile-first (base = móvil)
  ========================================================= */
  .table thead {
      display: none;
  }

  .table tbody tr {
      display: block;
      margin-bottom: 0.75rem;
      background: var(--bs-body-secondary-bg);
      border-radius: 0.75rem;
      padding: 0.75rem 1rem;
      box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  }

  .table tbody tr td {
      display: flex;
      justify-content: space-between;
      align-items: center;
      border: none !important;
      font-size: 0.92rem;
      padding: 0.35rem 0;
  }

  .table tbody tr td::before {
      content: attr(data-label);
      font-weight: 600;
      color: var(--bs-secondary-color);
      margin-right: 0.75rem;
      flex: 0 0 auto;
  }

  .carrito-thumb {
      width: 50px !important;
      height: 50px !important;
      flex: 0 0 auto;
      object-fit: cover;
  }

  .table tbody tr td .btn {
      min-width: 38px;
      padding: 0.35rem 0.55rem;
  }

    /* ESCRITORIO: recuperamos la tabla normal */
  @media (min-width: 769px) {
      .table thead {
          display: table-header-group;
      }

      .table tbody tr {
          display: table-row;
          margin-bottom: 0;
          background: transparent;
          border-radius: 0;
          padding: 0;
          box-shadow: none;
      }

      .table tbody tr td {
          display: table-cell;
          font-size: 1rem;
          padding: 0.75rem;
      }

      .table tbody tr td::before {
          display: none;
      }

      .carrito-table-wrap .table {
          border-radius: 0.75rem;
          overflow: hidden;
          box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
      }

      .carrito-row {
          border-top: 1px solid rgba(0, 0, 0, 0.04);
      }
  }


/* =========================================================
   TOASTS (NOTIFICACIONES FLOTANTES) – VISTOSOS
========================================================= */

/* Tamaño, padding, tipografía y efecto vidrio */
  .toast {
      opacity: 0.9;
      backdrop-filter: blur(6px);
      box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
      border-radius: 1rem;
      padding: 0.75rem 1rem;
      font-size: 0.95rem;
      font-weight: 600;
      transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
      animation: slideUp 0.5s ease-out;
      min-width: 0;
      width: calc(100vw - 2rem);
      max-width: 100%;
  }

  @media (min-width: 576px) {
      .toast {
          padding: 1rem 1.5rem;
          font-size: 1.1rem;
          width: auto;
          min-width: 300px;
          max-width: 400px;
      }
  }


/* Hover: más opaco y ligeramente agrandado */
.toast:hover {
    opacity: 1;
    transform: scale(1.05);
}

/* Animación suave al aparecer */
@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 0.95;
    }
}

/* =========================================================
   TOASTS: COLORES DE TEXTO POR TIPO
========================================================= */

/* Texto negro para toasts informativos y de advertencia */
.toast.bg-info,
.toast.bg-warning,
.toast.bg-success {
    color: #000 !important;
}

/* Botón de cierre visible para todos los tipos */
.toast .btn-close {
    filter: invert(0) !important;
    width: 1.2rem;
    height: 1.2rem;
}

/* Colores de fondo más vivos */
.toast.bg-success {
    background-color: #32FF62 !important;
}

.toast.bg-danger {
    background-color: #dc3545 !important;
    color: #fff;
}

.toast.bg-warning {
    background-color: #ffc107 !important;
}

.toast.bg-info {
    background-color: #0062FF !important;
}

/* =========================================================
   GALERÍA
========================================================= */
.galeria-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 0.75rem !important;
}

.galeria-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15) !important;
}

.galeria-img {
    transition: transform 0.4s ease;
}

.galeria-card:hover .galeria-img {
    transform: scale(1.05);
}

  /* =========================================================
     CONTACTO — mobile-first - gestionado por Bootstrap (col-12 col-md-6)
  ========================================================= */