﻿@import url("https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100..900;1,100..900&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700;800&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700&display=swap");
/* Variables del tema compartido. Desde aqui cuelga casi toda la web */
:root {
  --bg: #f6fbf6; /* fondo claro */
  --texto: #18201DB3; /* color texto */
  --tono-apagado: #5b6b5b; /* tono apagado */
  --verde-500: #1D622A; /* verde principal */
  --verde-300: #8fd19b;
  --verde-200: #95d5b2;
  --verde-100: #b7e4c7;
  --marron-700: #6b4226; /* marrón */
  --marron-900: #6b4226;
  --fondo-tarjeta: #ffffff;
  --glass: rgba(255, 255, 255, 0.65);
  --perla: #e0e4e1;
  --perla-gradient: linear-gradient(var(--bg) 0%, var(--perla) 100%);
  --shadow: 0 8px 24px rgba(45,106,79,.12);
  --texto-boton: #ffffff;
  --focus: rgba(47, 158, 68, 0.18);
  --verde-oscuro: #1e4d36;
}

/* En oscuro reutilizo los mismos nombres para no duplicar reglas por todas partes */
.dark-mode {
  --bg: #070707; /* fondo oscuro */
  --texto: #e8f8ea; /* texto claro */
  --tono-apagado: #9aa69a;
  --verde-500: #34d058;
  --verde-300: #66e07f;
  --verde-200: #61dd99;
  --verde-100: #84d4a0;
  --marron-700: #000000; /* marrón en oscuro */
  --marron-900: #e8b48a;
  --fondo-tarjeta: #0f0f0f;
  --glass: rgba(10, 10, 10, 0.6);
  --perla: #0c1f11;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  --texto-boton: #ffffff;
  --focus: rgba(52, 208, 88, 0.12);
  --verde-oscuro: #1e4d36;
}

/* Base general */
* {
  box-sizing: border-box
}

html,
body {
  height: 100%
}

body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  background: var(--bg);
  color: var(--texto);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.initial-load {
  transition: none;
}

body.theme-loaded {
  transition: background .35s ease, color .35s ease;
}

/* Barra de navegacion compartida */
.navbar-personalizada {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.85), rgba(220, 245, 230, 0.75));
  padding: .9rem 1rem;
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 12px rgba(35, 48, 41, 0.15);
  border-bottom: 1px solid rgba(47, 158, 68, 0.2);
}

.verde{
    color: var(--verde-500);
}

.dark-mode .navbar-personalizada {
  background: linear-gradient(90deg, rgba(15, 70, 40, 0.9), rgba(10, 50, 30, 0.85));
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
  border-bottom: 1px solid rgba(52, 208, 88, 0.3);
  color: var(--texto);

}
.dark-mode .navbar-toggler-icon {
    filter: invert(1);
}

.dark-mode .btn-close {
    filter: invert(1);
}

.navbar-brand {
  font-weight: 800;
  letter-spacing: .6px;
  color: var(--verde-500) !important
}

.nav-link {
  color: var(--texto)!important;
}


.cambiar-tema {
  border: 1px solid transparent;
  background: var(--verde-500);
  color: var(--texto-boton);
  padding: .45rem .65rem;
  border-radius: 8px;
  font-weight: 600;
}

/* Encabezado principal de la landing */
.encabezado {
  padding: 2.4rem 1rem;
}
.encabezado .display-6{
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.4rem, 5vw, 4rem);
}.encabezado .display-6 em {
    font-style: italic;
    color: var(--marron-900);
}
.encabezado .lead {
  font-size: 1.05rem;
  color: var(--tono-apagado);
  max-width: 70ch;
  margin-top: .5rem
}

/* Galería: imágenes cuadradas */
.galeria img {
  display: block;
  width: 100%;
  max-width: 100%;
  aspect-ratio: 1 / 1; /* cuadrado */
  object-fit: cover;
  border-radius: 8px;
}

/* Tarjeta de llamada del bloque antiguo de portada */
.tarjeta-cta {
  background: linear-gradient(180deg, #c8e6c9, #a5d6a7);
  border-radius: 12px;
  padding: 1.2rem;
  box-shadow: var(--shadow);
  border: 1px solid rgba(47, 158, 68, 0.3);
}

.dark-mode .tarjeta-cta {
  background: linear-gradient(180deg, #2d5a2d, #1e4620);
  border: 1px solid rgba(52, 208, 88, 0.4);
}

.tarjeta-cta h3 {
  margin-top: 0;
  font-weight: 700;
  color: rgba(35, 48, 41, 0.9);
  text-align: center;
}

.dark-mode .tarjeta-cta h3 {
  color: #ffffff;
}

.tarjeta-cta label {
  color: rgba(35, 48, 41, 0.85);
  margin-top: .75rem;
  display: block;
  font-weight: 500;
}

.dark-mode .tarjeta-cta label {
  color: #ffffff;
}

.tarjeta-cta .form-check-label {
  color: rgba(35, 48, 41, 0.85);
}

.dark-mode .tarjeta-cta .form-check-label {
  color: #ffffff;
}

.lista-beneficios {
  padding-left: 1rem
}

/* Controles de formulario compartidos */
.form-control,
.form-select {
  border-radius: 8px;
  border: 1px solid rgba(47, 158, 68, 0.3);
  padding: .6rem .75rem;
  background: rgba(255, 255, 255, 0.9);
  color: var(--texto)!important;
}

.dark-mode .form-control,
.dark-mode .form-select {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(52, 208, 88, 0.5);
  color: #e8f8ea!important;
}

.form-control::placeholder {
  color: rgba(35, 48, 41, 0.6);
}

.dark-mode .form-control::placeholder {
  color: rgba(232, 248, 234, 0.7);
}

/* Opciones de select (claro) */
.form-select optgroup option {
  color: #233029;
  background: #ffffff;
}

/* Opciones de select (oscuro) */
.dark-mode .form-select option {
  color: #ffffff;
  background: #2a2a2a;
}

.form-control:focus,
.form-select:focus {
  box-shadow: 0 0 0 6px var(--focus);
  border-color: var(--verde-500);
  outline: none
}

/* Icono ojo en contrasena del formulario antiguo */
.password-wrapper {
  position: relative;
  margin-bottom: 0.5rem;
}

.toggle-password {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  padding: 0;
  color: var(--texto);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s ease;
}

.toggle-password:hover {
  opacity: 0.7;
}

.dark-mode .toggle-password {
  color: #e8f8ea;
}

/* Botones base reutilizados en varias vistas */
.btn-primario {
  background: var(--verde-500);
  color: var(--bg);
  border: none;
  padding: .6rem .9rem;
  border-radius: 10px;
  font-weight: 700
}

.btn-primario-outline {
  background: transparent;
  color: var(--verde-500);
  border: 2px solid var(--verde-500);
  padding: .45rem .85rem;
  border-radius: 10px;
  font-weight: 700
}

.pie {
  padding: 1.6rem;
  text-align: center;
  color: var(--tono-apagado);
  background: transparent
}

/* Helper pequeno para botones compactos */
.btn-modo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .25rem .5rem;
  border-radius: 6px;
  cursor: pointer
}

/* Ajustes globales de responsive */
@media(min-width:992px) {
  .encabezado {
    padding: 3.2rem 2rem
  }

  /* Las imágenes mantienen 1:1 */

  #registrarse {
    min-height: 420px
  }
}

/* Utilidades sueltas */
.acento-marron {
  color: var(--marron-700)
}

button,
input,
select,
a {
  transition: all .18s ease
}

/* Evitar scroll horizontal por imágenes */
.container-fluid,
.encabezado,
.galeria,
.row {
  overflow-x: hidden;
}

.imagen {
  padding: 0;
  overflow: hidden;
}

.imagen img,
.galeria img,
.altura-igual {
  display: block;
  width: 100%;
  max-width: 100%;
  aspect-ratio: 1 / 1; /* mantener cuadrado */
  object-fit: cover;
}

/* Mantener cuadrado en desktop */
@media(min-width:992px) {
  .galeria img, .altura-igual { aspect-ratio: 1/1; }
}

/* Mantener cuadrado en móvil */
@media(max-width:991px) {
  .galeria img, .altura-igual { aspect-ratio: 1/1; }
}

/* Evitar overflow horizontal */
html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

/* Centrar formulario */
.tarjeta-cta {
  margin: 0 auto;
  max-width: 100%;
}

@media (min-width: 992px) {
  .tarjeta-cta {
    max-width: 520px;
  }
}

/* Estilos para modal en modo oscuro */
.dark-mode .modal-content {
  background-color: var(--fondo-tarjeta);
  color: var(--texto);
  border-color: var(--tono-apagado);
}

.dark-mode .modal-header {
  border-color: var(--tono-apagado);
}

.dark-mode .modal-footer {
  border-color: var(--tono-apagado);
}




/* Formulario antiguo de acceso. Se mantiene por compatibilidad visual con bloques viejos */
.contenedor{
    width: 100%;
    max-width: 800px;
    margin: auto;
    position: relative;
}

.caja_trasera{
    width: 100%;
    padding: 10px 20px;
    display: flex;
    justify-content: center;
    backdrop-filter: blur(5px);
    background-color: rgba(0, 128, 255, 0.3);
}

.caja_trasera div{
    margin: 100px 40px;
    color: white;
    transition: all 500ms;
}

.caja_trasera div p,
.caja_trasera div button {
    margin-top: 30px;
}

.caja_trasera div h3{
    font-weight: 400;
    font-size: 26px;
}

.caja_trasera button{
    padding: 10px 40px;
    border: 2px solid #fff;
    background: transparent;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    color: white;
    outline: none;
    transition: all 300ms;
}

.caja_trasera button:hover{
    background: white;
    color: #46A2FD;
}

/* Panel deslizante de login/registro */
.contenedor_login-register{
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 380px;
    position: relative;
    top: -185px;
    left: 10px;

    transition: left 500ms cubic-bezier(0.175, 0.885, 0.320, 1.275);
}

.contenedor_login-register form{
    width: 100%;
    padding: 80px 20px;
    background: #fff;
    position: absolute;
    border-radius: 20px;
}

.contenedor_login-register form h2{
    font-size: 30px;
    text-align: center;
    margin-bottom: 20px;
    color: #46A2FD;
}

.contenedor_login-register form input{
    width: 100%;
    margin-top: 20px;
    padding: 10px;
    border: none;
    background: #f2f2f2;
    font-size: 16px;
    outline: none;
}

.contenedor_login-register form input[type="date"]{
    width: 100%;
    margin-top: 5px;
    padding: 10px;
    border: none;
    background: #f2f2f2;
    font-size: 14px;
    outline: none;
    cursor: pointer;
}

.contenedor_login-register form input[type="date"]:focus{
    background: #e8e8e8;
    outline: 2px solid #46A2FD;
}

label {
    display: block;
    margin-top: 20px;
    margin-bottom: 5px;
    color: #333;
    font-weight: 500;
    font-size: 14px;
}

/* ====== GÉNERO (RADIO BUTTONS) ====== */
.radio-group {
    display: flex;
    gap: 15px; /* espacio entre opciones */
    margin-top: 8px;
    align-items: center;
    justify-content: flex-start;
}

.radio-group label {
    display: flex;
    align-items: center;
    gap: 6px; /* espacio entre radio y texto */
    cursor: pointer;
    margin: 0;
    white-space: nowrap;
    font-size: 14px;
    padding: 0;
}

.radio-group label:first-child {
    cursor: default;
}

/* ====== CHECKBOX ====== */
.form-check {
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* todo a la izquierda */
    margin-top: 15px;
    gap: 12px;
}

.form-check-label {
    display: flex;
    align-items: center;      /* centra verticalmente */
    gap: 10px;               /* espacio checkbox-texto */
    cursor: pointer;
    font-size: 14px;
    white-space: nowrap;     /* evita que se rompa en dos líneas */
    margin: 0;
    padding: 0;
}

.form-check-input {
    margin: 0;
    padding: 0;
    flex-shrink: 0;          /* evita que se encoja */
    width: 16px;
    height: 16px;
    cursor: pointer;
}



.contenedor_login-register form button{
    padding: 10px 40px;
    margin-top: 40px;
    border: none;
    font-size: 14px;
    background: #46A2FD;
    color: white;
    cursor: pointer;
    outline: none;
}

.formulario_login{
    opacity: 1;
    display: block;
}

.formulario_register{
    display: none;
}

/* Ajustes del formulario antiguo en movil */

@media screen and (max-width: 850px){
    .caja_trasera{
        max-width: 350px;
        height: 300px;
        flex-direction: column;
        margin: auto;
    }

    .caja_trasera div{
        margin: 0;
        position: absolute;
    }

    /*Formulario*/
    .contenedor_login-register{
        top: -10px;
        left: -5px;
        margin: auto;
    }

    .contenedor_login-register form{
        position: relative;
    }
}

/* Cesta global: badge, modal, pagina completa y avisos flotantes */
.header-cart-trigger {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: transparent;
    text-decoration: none;
    padding: .4rem .55rem !important;
    border-radius: 999px;
    color: var(--texto) !important;
}

.header-cart-trigger:hover,
.header-cart-trigger:focus-visible {
    color: var(--verde-500) !important;
}

.header-cart-trigger:focus-visible {
    box-shadow: 0 0 0 4px var(--focus);
    outline: none;
}

.header-auth-item {
    display: flex;
    align-items: center;
    gap: .35rem;
    flex-wrap: wrap;
}

.header-user-name {
    font-weight: 700;
    color: var(--verde-500) !important;
}

.header-logout-link {
    font-weight: 600;
}

.rv-cart-badge {
    position: absolute;
    top: -.15rem;
    right: -.15rem;
    min-width: 1.15rem;
    height: 1.15rem;
    padding: 0 .24rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--verde-500);
    color: var(--texto-boton);
    font-size: .72rem;
    font-weight: 800;
    line-height: 1;
    box-shadow: 0 8px 18px rgba(29, 98, 42, .25);
}

/* Le doy un ancho comodo al modal para que el resumen no quede apretado */
.rv-cart-modal .modal-dialog {
    max-width: 960px;
}

.rv-cart-surface {
    border: 0;
    border-radius: 1.4rem;
    overflow: hidden;
    background: #ffffff;
    backdrop-filter: none;
    color: var(--texto);
    box-shadow: var(--shadow);
}

.rv-cart-header {
    background: #f1f7f1;
    backdrop-filter: none;
    border-bottom: 1px solid rgba(29, 98, 42, .12);
}

.rv-cart-kicker {
    margin: 0;
    text-transform: uppercase;
    letter-spacing: .18em;
    font-size: .72rem;
    color: var(--tono-apagado);
    font-weight: 700;
}

.rv-cart-feedback {
    padding: 1.25rem;
    border-radius: 1rem;
    background: #f7fbf7;
    backdrop-filter: none;
    color: var(--tono-apagado);
    border: 1px solid rgba(29, 98, 42, .08);
}

.rv-cart-state {
    text-align: center;
}

.rv-cart-state-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    color: var(--texto);
    margin-bottom: .6rem;
}

.rv-cart-state-copy {
    max-width: 38rem;
    margin: 0 auto;
    color: var(--tono-apagado);
}

.rv-cart-count-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: .35rem .8rem;
    border-radius: 999px;
    background: rgba(29, 98, 42, .1);
    color: var(--verde-500);
    font-size: .85rem;
    font-weight: 700;
}

.rv-cart-items {
    display: grid;
    gap: 1rem;
}

.rv-cart-item {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 1rem;
    padding: 1rem;
    border-radius: 1rem;
    border: 1px solid rgba(29, 98, 42, .12);
    background: #ffffff;
    backdrop-filter: none;
    box-shadow: 0 10px 26px rgba(35, 48, 41, .06);
}

.rv-cart-item-image {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: .9rem;
}

.rv-cart-item-body {
    min-width: 0;
}

.rv-cart-item-top {
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    align-items: flex-start;
}

.rv-cart-item-copy {
    min-width: 0;
}

.rv-cart-item-kicker {
    margin: 0 0 .25rem;
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .14em;
    color: var(--tono-apagado);
    font-weight: 700;
}

.rv-cart-item-title {
    margin: 0 0 .45rem;
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--texto);
}

.rv-cart-item-description {
    margin: 0;
    color: var(--tono-apagado);
    line-height: 1.45;
}

.rv-cart-item-meta {
    margin-top: .9rem;
    display: flex;
    flex-wrap: wrap;
    gap: .65rem 1rem;
    color: var(--tono-apagado);
    font-size: .92rem;
}

.rv-cart-remove {
    flex-shrink: 0;
    border-radius: 999px;
    border: 1px solid rgba(29, 98, 42, .18);
    background: transparent;
    color: var(--verde-500);
    font-weight: 700;
    padding-inline: .85rem;
}

.rv-cart-remove:hover,
.rv-cart-remove:focus-visible {
    background: rgba(29, 98, 42, .08);
    color: var(--verde-500);
    border-color: rgba(29, 98, 42, .3);
}

.rv-cart-summary {
    padding: 1.35rem;
    border-radius: 1.1rem;
    background: #f7fbf7;
    backdrop-filter: none;
    border: 1px solid rgba(29, 98, 42, .12);
}

.rv-cart-summary-label {
    text-transform: uppercase;
    letter-spacing: .16em;
    font-size: .76rem;
    color: var(--tono-apagado);
    font-weight: 700;
}

.rv-cart-total {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.8rem, 3.5vw, 2.4rem);
    line-height: 1.1;
    color: var(--verde-500);
    font-weight: 800;
}

.rv-cart-inline-note {
    color: var(--tono-apagado);
    line-height: 1.5;
}

.rv-cart-page-shell {
    padding-top: 3rem;
    padding-bottom: 4rem;
}

.rv-cart-page-hero {
    max-width: 48rem;
    margin: 0 auto 2rem;
    text-align: center;
}

.rv-cart-page-hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.3rem, 5vw, 3.8rem);
    margin-bottom: .7rem;
    color: var(--texto);
}

.rv-cart-page-hero p {
    color: var(--tono-apagado);
    max-width: 40rem;
    margin: 0 auto 1rem;
}

.rv-cart-page-feedback {
    max-width: 48rem;
    margin: 0 auto;
}

.rv-cart-summary-page {
    position: sticky;
    top: 108px;
}

/* En oscuro fuerzo fondos solidos para que no transparente el contenido de detras */
.dark-mode .rv-cart-surface,
.dark-mode .rv-cart-item {
    background: #121212;
    border-color: rgba(255, 255, 255, .08);
}

.dark-mode .rv-cart-header,
.dark-mode .rv-cart-summary,
.dark-mode .rv-cart-feedback {
    background: #171717;
    border-color: rgba(255, 255, 255, .08);
}

.dark-mode .rv-cart-count-pill {
    background: rgba(52, 208, 88, .14);
    color: var(--verde-300);
}

.dark-mode .rv-cart-remove {
    border-color: rgba(52, 208, 88, .2);
    color: var(--verde-300);
}

.dark-mode .rv-cart-remove:hover,
.dark-mode .rv-cart-remove:focus-visible {
    background: rgba(52, 208, 88, .08);
    color: var(--verde-300);
}

/* Avisos cortos que sustituyen a los alert del navegador */
.rv-toast-stack {
    position: fixed;
    top: 92px;
    right: 1rem;
    z-index: 1200;
    display: grid;
    gap: 0.75rem;
    width: min(360px, calc(100vw - 2rem));
}

.rv-toast {
    border-radius: 1rem;
    padding: 0.95rem 1rem;
    font-weight: 600;
    line-height: 1.45;
    box-shadow: 0 16px 36px rgba(24, 32, 29, 0.18);
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity .22s ease, transform .22s ease;
}

.rv-toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.rv-toast--success {
    background: #eff9f0;
    border: 1px solid rgba(29, 98, 42, 0.18);
    color: #174e21;
}

.rv-toast--error {
    background: #fff1f1;
    border: 1px solid rgba(185, 39, 39, 0.2);
    color: #8d2222;
}

.rv-toast--info {
    background: #eef6ff;
    border: 1px solid rgba(42, 102, 180, 0.18);
    color: #214b86;
}

.dark-mode .rv-toast--success {
    background: #142218;
    border-color: rgba(52, 208, 88, 0.18);
    color: #bceec8;
}

.dark-mode .rv-toast--error {
    background: #261515;
    border-color: rgba(255, 120, 120, 0.16);
    color: #ffc8c8;
}

.dark-mode .rv-toast--info {
    background: #141d28;
    border-color: rgba(125, 172, 243, 0.16);
    color: #c8ddff;
}

/* En las tablas del admin dejo el flex dentro de un bloque interno para no romper la celda */
.admin-actions-cell {
    white-space: nowrap;
    min-width: 108px;
}

.admin-table-actions {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.admin-table-actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 767px) {
    .rv-cart-item {
        grid-template-columns: 1fr;
    }

    .rv-cart-item-top {
        flex-direction: column;
    }

    .rv-cart-summary-page {
        position: static;
    }

    .rv-toast-stack {
        top: auto;
        bottom: 1rem;
    }
}

