@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700&family=Lato:wght@300;400;600;700&display=swap');

/* ─────────────────────────────────────────────
   VARIABLES Y RESET
───────────────────────────────────────────── */
:root {
    --verde-oscuro:  #3a7a20;
    --verde-medio:   #5a9e3a;
    --verde-claro:   #9ccc85;
    --verde-suave:   #b7daa2;
    --verde-fondo:   #f0f7ea;
    --rojo:          #c0392b;
    --beige:         #f5f0e8;
    --beige-oscuro:  #e8e0d0;
    --gris-texto:    #4a4a4a;
    --blanco:        #ffffff;
    --sombra:        0 2px 12px rgba(0,0,0,0.10);
    --radio:         10px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--beige);
    font-family: 'Lato', Georgia, sans-serif;
    color: var(--gris-texto);
    /* móvil: header(60px) + nav que puede ser 2 líneas (~80px) */
    padding-top: 140px;
}

/* ─────────────────────────────────────────────
   CABECERA — BASE MÓVIL
───────────────────────────────────────────── */
.usuario-barra {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: linear-gradient(90deg, #c8e6b0, #a8d488);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 16px;
    box-shadow: 0 3px 12px rgba(0,0,0,0.15);
    border-bottom: 2px solid var(--verde-claro);
    z-index: 2000;
}

.header-izq img {
    height: 40px;
    object-fit: contain;
}

.header-der {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-der img {
    height: 20px;
    cursor: pointer;
    opacity: 0.80;
    transition: opacity 0.2s;
}

.header-der img:hover { opacity: 1; }

/* Icono cesta con badge contador */
.icono-carrito {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.contador-carrito {
    position: absolute;
    top: -7px;
    right: -7px;
    background: var(--rojo);
    color: var(--blanco);
    font-size: 10px;
    font-weight: 700;
    font-family: 'Lato', sans-serif;
    min-width: 17px;
    height: 17px;
    border-radius: 50%;
    display: none; /* oculto hasta que haya items */
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0 3px;
    pointer-events: none;
    border: 1.5px solid var(--blanco);
}

.btn-header{
    border: 1.5px solid var(--verde-oscuro);
    border-radius: 6px;
    background-color: var(--blanco);
    color: var(--rojo);
    padding: 4px 10px;
    text-decoration: none;
    font-family: 'Lato', sans-serif;
    font-size: 12px;
    font-weight: 600;
    transition: background 0.2s, color 0.2s;
}

.btn-header:hover {
    background-color: var(--verde-oscuro);
    color: var(--blanco);
}

/* ─────────────────────────────────────────────
   NAVEGACIÓN — BASE MÓVIL
   flex-wrap para que los links bajen si no caben
───────────────────────────────────────────── */
.nav-principal {
    position: fixed;
    top: 60px;
    left: 0;
    width: 100%;
    background-color: var(--verde-medio);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    padding: 6px 10px;
    box-shadow: 0 3px 8px rgba(0,0,0,0.18);
    z-index: 1500;
}

.nav-principal a {
    color: var(--blanco);
    text-decoration: none;
    font-family: 'Lato', sans-serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.4px;
    padding: 5px 10px;
    border: 1.5px solid rgba(255,255,255,0.45);
    border-radius: 5px;
    transition: background 0.2s, border-color 0.2s;
    white-space: nowrap;
}

.nav-principal a:hover,
.nav-principal a.activo {
    background-color: rgba(255,255,255,0.22);
    border-color: rgba(255,255,255,0.9);
}

/* ─────────────────────────────────────────────
   MAIN — BASE MÓVIL
───────────────────────────────────────────── */
main {
    width: 100%;
    padding: 20px 14px 50px;
}

/* ─────────────────────────────────────────────
   SECCIONES — BASE MÓVIL
───────────────────────────────────────────── */
.seccion {
    margin-bottom: 36px;
}

.seccion-titulo {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 17px;
    font-weight: 600;
    color: var(--verde-oscuro);
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--verde-claro);
}

.linea-verde {
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--verde-medio), transparent);
    border-radius: 2px;
    margin: 0 0 36px 0;
}

/* ─────────────────────────────────────────────
   GRID PRODUCTOS — BASE MÓVIL (1 columna)
───────────────────────────────────────────── */
.muestra {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.item {
    background: var(--blanco);
    border: 1px solid var(--beige-oscuro);
    border-radius: var(--radio);
    padding: 14px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    box-shadow: var(--sombra);
    transition: transform 0.22s, box-shadow 0.22s;
}

.item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.13);
}

.item h4 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 16px;
    font-weight: 700;
    color: var(--verde-oscuro);
    text-align: center;
}

.item img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 6px;
}

.item p {
    font-size: 13px;
    color: #777;
    text-align: center;
    line-height: 1.4;
}

.precio {
    font-weight: 700;
    color: var(--rojo);
    font-size: 15px;
}

.btn-cesta,
.btn-noticia {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 1.5px solid var(--verde-oscuro);
    border-radius: 6px;
    background-color: var(--verde-suave);
    color: var(--rojo);
    padding: 7px 14px;
    text-decoration: none;
    font-family: 'Lato', sans-serif;
    font-size: 13px;
    font-weight: 600;
    width: 100%;
    text-align: center;
    transition: background 0.2s, color 0.2s;
}

.btn-cesta:hover,
.btn-noticia:hover {
    background-color: var(--verde-oscuro);
    color: var(--blanco);
}

.item-mas {
    justify-content: center;
    background: var(--verde-fondo);
    border: 1.5px dashed var(--verde-claro);
    min-height: 120px;
}

.ver-mas {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--verde-medio);
    font-family: 'Lato', sans-serif;
    font-size: 15px;
    font-weight: 600;
    gap: 8px;
}

.ver-mas:hover { color: var(--verde-oscuro); }

.ver-mas img {
    height: 50px;
    width: auto;
    object-fit: contain;
    transition: transform 0.2s;
}

.ver-mas:hover img { transform: translateX(5px); }

.btn-agregar {
    color: var(--blanco);
    background-color: var(--verde-medio);
    text-decoration: none;
    font-family: 'Lato', sans-serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.4px;
    padding: 5px 10px;
    border: 1.5px solid rgba(255,255,255,0.45);
    border-radius: 5px;
    transition: background 0.2s, border-color 0.2s;
    white-space: nowrap;
    cursor: pointer;
    display: inline-block;
}
/* ─────────────────────────────────────────────
   SECCIÓN ALQUILER — BASE MÓVIL (columna)
───────────────────────────────────────────── */
.seccion-alquiler {
    background: var(--verde-fondo);
    border: 1px solid #d4e8c2;
    border-radius: 14px;
    padding: 18px 14px;
    box-shadow: var(--sombra);
}

.alquiler {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.alquiler-foto img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: var(--radio);
    box-shadow: 0 4px 14px rgba(0,0,0,0.14);
}

.alquiler-calendario iframe {
    width: 100%;
    height: 220px;
    border-radius: 8px;
    box-shadow: var(--sombra);
    display: block;
}

.alquiler-cta {
    display: flex;
    justify-content: center;
}

.btn-casita {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    border: 1.5px solid var(--verde-oscuro);
    border-radius: 10px;
    background-color: var(--verde-suave);
    color: var(--rojo);
    padding: 14px 24px;
    text-decoration: none;
    font-family: 'Lato', sans-serif;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    transition: background 0.2s, color 0.2s, transform 0.2s;
}

.btn-casita:hover {
    background-color: var(--verde-oscuro);
    color: var(--blanco);
    transform: translateY(-2px);
}

/* ─────────────────────────────────────────────
   NOTICIAS — BASE MÓVIL (1 columna)
───────────────────────────────────────────── */
.noticias {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.articulo {
    background: var(--blanco);
    border: 1px solid var(--beige-oscuro);
    border-radius: var(--radio);
    padding: 16px;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: var(--sombra);
    transition: transform 0.22s, box-shadow 0.22s;
}

.articulo:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.13);
}

.articulo h4 {
    font-family: 'Playfair Display', Georgia, serif;
    color: var(--verde-oscuro);
    font-size: 16px;
    font-weight: 700;
}

.articulo p {
    color: #777;
    font-size: 13px;
    flex-grow: 1;
    line-height: 1.5;
}

.articulo-mas {
    justify-content: center;
    align-items: center;
    background: var(--verde-fondo);
    border: 1.5px dashed var(--verde-claro);
    min-height: 100px;
}

/* ─────────────────────────────────────────────
   FOOTER — BASE MÓVIL (columna centrada)
───────────────────────────────────────────── */
footer {
    background: linear-gradient(90deg, #c8e6b0, #a8d488);
    padding: 18px 16px;
    box-shadow: 0 -3px 10px rgba(0,0,0,0.10);
    border-top: 2px solid var(--verde-claro);
}

.footer-inner {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
}
.form-agregar input {
    width: 40px;
}
.btn-top {
    border: 1.5px solid var(--verde-oscuro);
    border-radius: 6px;
    background-color: var(--blanco);
    color: var(--rojo);
    padding: 6px 16px;
    text-decoration: none;
    font-family: 'Lato', sans-serif;
    font-size: 13px;
    font-weight: 600;
    transition: background 0.2s, color 0.2s;
}

.btn-top:hover {
    background-color: var(--verde-oscuro);
    color: var(--blanco);
}

.redes {
    display: flex;
    gap: 14px;
    align-items: center;
}

.redes a {
    display: inline-flex;
    transition: transform 0.2s;
}

.redes a:hover { transform: scale(1.15); }

.redes img {
    opacity: 0.85;
    transition: opacity 0.2s;
}

.redes img:hover { opacity: 1; }

.direccion {
    text-align: center;
    font-size: 13px;
    color: var(--verde-oscuro);
}
.comienzo-footer{
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr; 
    align-items: center;
    gap: 15px;

    text-decoration: none;
    color: var(--verde-oscuro);

    border-bottom: 0.5px solid black;
    margin-bottom: 10px;
    padding-bottom: 10px;
}

.comienzo-footer a{
    text-decoration: none;
    color: var(--verde-oscuro);
}

.footer-col{
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* columnas de logos */
.logo{
    align-items: center;
}

.logo img{
    max-height: 130px; /* controla el tamaño */
    width: auto;
    object-fit: contain;
}
/* ==============================================
   TABLET — min-width: 768px
   2 columnas · nav en una fila · alquiler en fila
   ============================================== */
@media (min-width: 768px) {

    body { padding-top: 120px; }

    .usuario-barra {
        height: 70px;
        padding: 0 30px;
    }

    .header-izq img { height: 50px; }
    .header-der img { height: 22px; }
    .btn-header { font-size: 13px; padding: 5px 14px; }

    .nav-principal {
        top: 70px;
        flex-wrap: nowrap;
        height: 50px;
        padding: 0;
        gap: 6px;
    }

    .nav-principal a {
        font-size: 13px;
        padding: 6px 12px;
    }

    main { padding: 28px 24px 60px; }

    .seccion-titulo { font-size: 19px; }

    /* 2 columnas de productos */
    .muestra {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .item { width: calc(50% - 7px); }

    /* Alquiler en fila */
    .alquiler {
        flex-direction: row;
        align-items: center;
        flex-wrap: wrap;
    }

    .alquiler-foto img {
        width: 260px;
        height: 190px;
    }

    .alquiler-calendario iframe {
        width: 280px;
        height: 220px;
    }

    /* 2 columnas de noticias */
    .noticias {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .articulo { width: calc(50% - 7px); }

    /* Footer en fila */
    .footer-inner {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
}


/* ==============================================
   ESCRITORIO — min-width: 1200px
   3 columnas · ancho máximo centrado
   ============================================== */
@media (min-width: 1200px) {

    .usuario-barra { padding: 0 48px; }

    .nav-principal { gap: 10px; }

    .nav-principal a {
        font-size: 15px;
        padding: 6px 16px;
    }

    main {
        max-width: 1100px;
        margin: 0 auto;
        padding: 34px 24px 70px;
    }

    .seccion-titulo { font-size: 22px; }

    /* 3 items de producto en fila */
    .item { width: 210px; }

    /* Alquiler sin salto de línea */
    .alquiler {
        flex-wrap: nowrap;
        gap: 32px;
    }

    .alquiler-foto img {
        width: 300px;
        height: 210px;
    }

    .alquiler-calendario iframe {
        width: 300px;
        height: 240px;
    }

    /* 3 artículos de noticia en fila */
    .articulo { width: 240px; }

    .footer-inner {
        max-width: 1100px;
        margin: 0 auto;
    }
}
/**************/
/* Login */
/**************/

/* Formulario */
.formulario-login{
    display:flex;
    flex-direction:column;
    gap:15px;
}

/* Grupo de inputs */
.form-grupo{
    display:flex;
    flex-direction:column;
}

/* Labels */
.form-grupo label{
    margin-bottom:5px;
    font-weight:600;
    color:#555;
}

/* Inputs */
.form-grupo input{
    padding:10px;
    border:1px solid #ccc;
    border-radius:6px;
    font-size:14px;
    transition:0.2s;
}

/* Efecto al seleccionar */
.form-grupo input:focus{
    outline:none;
    border-color: var(--verde-claro);
    box-shadow:0 0 4px var(--verde-oscuro);
}

/* Botón principal */
.btn-confirmar-pedido{
    margin-top:10px;
    padding:12px;
    border:none;
    border-radius:6px;
    background:var(--verde-claro);
    color:white;
    font-weight:bold;
    cursor:pointer;
    transition:0.2s;
}

.btn-confirmar-pedido:hover{
    background:var(--verde-oscuro);
}

/* Botón secundario */
.btn-volver{
    display:inline-block;
    margin-left:5px;
    padding:6px 12px;
    background:#e5e7eb;
    border-radius:6px;
    text-decoration:none;
    color:#333;
    font-weight:600;
    transition:0.2s;
}

.btn-volver:hover{
    background:#d1d5db;
}

/* Mensajes de error */
p[style*="color:red"]{
    text-align:center;
    margin-bottom:10px;
    font-size:14px;
}

/* ─────────────────────────────────────────────
   CARRITO LATERAL
   z-index: 3000 → por encima del header (2000)
   y del nav (1500)
───────────────────────────────────────────── */

/* Overlay oscuro detrás del carrito */
.carrito-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 2999;
}

.carrito-overlay.activo {
    display: block;
}

/* Carrito lateral: contenedor */
.carrito-lateral {
    position: fixed;
    top: 0;
    right: -400px; /* oculto por defecto */
    width: 350px;
    max-width: 90%;
    height: 100%;
    background: #fff;
    box-shadow: -4px 0 15px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    transition: right 0.3s ease;
    z-index: 3000; /* ← por encima de header (2000) y nav (1500) */
    font-family: Arial, Helvetica, sans-serif;
}

/* Carrito abierto */
.carrito-lateral.activo {
    right: 0;
}

/* Header del carrito */
.carrito-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
}

.carrito-header h3 {
    font-size: 20px;
    font-weight: bold;
    color: #333;
}

/* Botón de cerrar */
.btn-cerrar {
    background: transparent;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #555;
    transition: color 0.2s;
}

.btn-cerrar:hover {
    color: #111;
}

/* Contenido del carrito */
#contenido-carrito {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.carrito-vacio {
    text-align: center;
    color: #777;
    font-style: italic;
}

/* Item del carrito */
.item-carrito {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 10px;
}

.item-carrito .info-producto {
    flex: 1;
}

.item-carrito .info-producto h4 {
    margin: 0 0 5px 0;
    font-size: 16px;
    color: #333;
}

.item-carrito .controles-cantidad {
    display: flex;
    align-items: center;
    gap: 5px;
    margin: 5px 0;
}

.item-carrito .controles-cantidad input {
    width: 50px;
    text-align: center;
    padding: 5px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.item-carrito .controles-cantidad button {
    padding: 4px 8px;
    border: none;
    background: var(--verde-medio);
    color: white;
    border-radius: 4px;
    cursor: pointer;
}

.item-carrito .controles-cantidad button:hover {
    background: var(--verde-oscuro);
}

.item-carrito .btn-eliminar {
    background: transparent;
    border: none;
    color: red;
    font-size: 20px;
    cursor: pointer;
    margin-left: 10px;
}

/* Footer del carrito */
.carrito-footer {
    padding: 20px;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#total-carrito {
    font-size: 16px;
    font-weight: bold;
    color: #111;
}

/* Botón finalizar pedido */
.btn-finalizar {
    display: block;
    text-align: center;
    padding: 12px;
    background: var(--verde-medio);
    color: #fff;
    font-weight: bold;
    border-radius: 6px;
    text-decoration: none;
    transition: background 0.2s;
}

.btn-finalizar:hover {
    background: var(--verde-oscuro);
}

/* ─────────────────────────────────────────────
   FORMULARIO DE PEDIDO
───────────────────────────────────────────── */

/* Contenedor principal: columna en móvil, fila en escritorio */
.contenedor-pedido {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Formulario */
.formulario-pedido {
    background: var(--blanco);
    border: 1px solid var(--beige-oscuro);
    border-radius: var(--radio);
    padding: 24px;
    box-shadow: var(--sombra);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.formulario-pedido form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.formulario-pedido textarea {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
    font-family: 'Lato', sans-serif;
    resize: vertical;
    transition: 0.2s;
}

.formulario-pedido textarea:focus {
    outline: none;
    border-color: var(--verde-claro);
    box-shadow: 0 0 4px var(--verde-oscuro);
}

.formulario-pedido select {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
    font-family: 'Lato', sans-serif;
    background: var(--blanco);
    transition: 0.2s;
}

.formulario-pedido select:focus {
    outline: none;
    border-color: var(--verde-claro);
    box-shadow: 0 0 4px var(--verde-oscuro);
}

/* Panel lateral del resumen */
.resumen-pedido-lateral {
    background: var(--verde-fondo);
    border: 1px solid #d4e8c2;
    border-radius: var(--radio);
    padding: 20px;
    box-shadow: var(--sombra);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.resumen-pedido-lateral h4 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 18px;
    font-weight: 700;
    color: var(--verde-oscuro);
    padding-bottom: 8px;
    border-bottom: 2px solid var(--verde-claro);
}

/* Items del resumen */
.item-resumen {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--beige-oscuro);
    flex-wrap: wrap;
}

.nombre-item {
    flex: 1;
    font-weight: 600;
    font-size: 14px;
    color: var(--gris-texto);
}

.precio-item {
    font-weight: 700;
    color: var(--rojo);
    font-size: 14px;
    min-width: 60px;
    text-align: right;
}

.item-resumen .controles-cantidad {
    display: flex;
    align-items: center;
    gap: 5px;
}

.item-resumen .controles-cantidad input {
    width: 46px;
    text-align: center;
    padding: 4px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 13px;
}

.item-resumen .controles-cantidad button {
    padding: 3px 8px;
    border: none;
    background: var(--verde-medio);
    color: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}

.item-resumen .controles-cantidad button:hover {
    background: var(--verde-oscuro);
}

/* Total final */
.total-final {
    margin-top: 6px;
    font-size: 17px;
    color: var(--gris-texto);
    text-align: right;
}

.total-final span {
    color: var(--rojo);
    font-size: 19px;
}

.carrito-vacio-msg {
    color: #999;
    font-style: italic;
    font-size: 13px;
}

/* ── Tablet y escritorio: formulario + resumen en fila ── */
@media (min-width: 768px) {
    .contenedor-pedido {
        flex-direction: row;
        align-items: flex-start;
    }

    .formulario-pedido {
        flex: 1 1 0;
    }

    .resumen-pedido-lateral {
        width: 300px;
        flex-shrink: 0;
        /* Se queda fijo mientras el formulario hace scroll */
        position: sticky;
        top: 130px; /* header(70px) + nav(50px) + 10px margen */
    }
}

@media (min-width: 1200px) {
    .resumen-pedido-lateral {
        width: 340px;
        top: 110px;
    }
}
