:root {
    --color-primario: #d4af37;
    --color-primario-oscuro: #b8860b;
    --color-fondo: #fafafa;
    --color-contenido: #ffffff;
    --color-texto: #2d3748;
    --color-texto-secundario: #718096;
    --color-exito: #48bb78;
    --color-error: #e53e3e;
    --color-borde: #e2e8f0;
    --radio: 14px;
    --sombra: 0 8px 24px rgba(0, 0, 0, 0.08);
    --espaciado: 1.7rem;
}

/* RESET */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 16px;
    line-height: 1.6;
}

body {
    background: linear-gradient(100deg, #fafafa 60%, #fff5d6 100%);
    color: var(--color-texto);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--espaciado);
}

/* CONTENEDOR PRINCIPAL */
.container {
    width: 100%;
    max-width: 520px;
    background: var(--color-contenido);
    border-radius: var(--radio);
    box-shadow: var(--sombra);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: var(--espaciado);
    padding: calc(var(--espaciado) * 1.1);
}

/* HEADER */
.header-fruteria {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding-bottom: var(--espaciado);
    border-bottom: 1px solid var(--color-borde);
    gap: 0.7rem;
}

.header-fruteria h1 {
    font-size: 2.1rem;
    color: var(--color-primario-oscuro);
    font-weight: 700;
    margin-bottom: 0.2rem;
}

.header-fruteria img {
    width: 80px;
    height: auto;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.10));
}

/* INTRODUCTORIO */
.texto-intro {
    margin: 0.4rem 0 0.8rem 0;
    text-align: center;
    font-size: 1.1rem;
    color: var(--color-texto-secundario);
    background: #f9f5e8;
    border-radius: var(--radio);
    padding: 1.1rem 0.5rem;
    box-shadow: 0 1px 10px rgba(212, 175, 55, 0.08);
}

/* BOTONES PRINCIPALES */
.botones-principales {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 0.4rem;
}

.botones-principales .btn {
    width: 180px;
    text-align: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background-color: var(--color-primario);
    color: white;
    font-weight: 600;
    text-decoration: none;
    padding: 0.85rem 1.2rem;
    border-radius: var(--radio);
    transition: all 0.22s ease;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(212, 175, 55, 0.25);
}

.btn:hover {
    background-color: var(--color-primario-oscuro);
    box-shadow: 0 4px 14px rgba(184, 134, 11, 0.18);
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

/* MENSAJE ÉXITO/ERROR */
.mensaje {
    padding: 1rem;
    border-radius: var(--radio);
    font-size: 0.99rem;
    text-align: center;
    margin: 1rem 0;
    font-weight: 500;
}

.mensaje.error {
    background-color: #fff5f5;
    color: var(--color-error);
    border: 1px solid #feb2b2;
}

.mensaje.exito {
    background-color: #f0fff4;
    color: var(--color-exito);
    border: 1px solid #9ae6b4;
}

/* NEWSLETTER */
.form-newsletter {
    background: #eef6fd;
    border-radius: var(--radio);
    padding: 1.3rem 1rem;
    box-shadow: 0 1px 8px rgba(23, 153, 204, .13);
    margin-bottom: 0.6rem;
}

.form-newsletter h3 {
    text-align: center;
    font-size: 1.15rem;
    color: var(--color-primario-oscuro);
    margin-bottom: 1rem;
}

.form-newsletter form {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    align-items: stretch;
}

.form-newsletter input[type="email"] {
    padding: 1rem;
    border: 1px solid var(--color-borde);
    border-radius: var(--radio);
    font-size: 1rem;
    transition: border 0.2s ease;
}

.form-newsletter input[type="email"]:focus {
    outline: none;
    border-color: var(--color-primario);
    box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.16);
}

/* Enlace noticias */
.noticias-enlace {
    text-align: center;
    margin: 22px 0 6px 0;
}

/* FOOTER */
.texto-pie {
    font-size: 0.98rem;
    color: var(--color-texto-secundario);
    text-align: center;
    margin: 16px 0 0 0;
    padding: 10px 0 0 0;
    border-top: 1px solid var(--color-borde);
}

.texto-pie a {
    color: var(--color-primario-oscuro);
    text-decoration: underline;
    margin-left: 5px;
    font-weight: 500;
}

/* RESPONSIVO */
@media (max-width: 560px) {
    .container {
        padding: 1rem;
        gap: 0.9rem;
    }

    .header-fruteria h1 {
        font-size: 1.25rem;
    }

    .btn {
        padding: 0.7rem 1rem;
        font-size: 0.96rem;
    }

    .form-newsletter input[type="email"] {
        font-size: 0.93rem;
        padding: 0.85rem;
    }
}

/* CONTENEDOR DEL FORMULARIO */
.form-contacto {
    background: #f8fafc;
    border-radius: var(--radio);
    box-shadow: 0 2px 14px rgba(23, 153, 204, 0.09);
    padding: 2rem 1.5rem 1.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    max-width: 100%;
}

/* ESTILO DE LAS ETIQUETAS */
.form-contacto label {
    font-weight: 600;
    color: var(--color-texto);
    margin-bottom: 0.3rem;
    display: block;
}

/* CAMPOS DE ENTRADA Y TEXTAREA */
.form-contacto input[type="text"],
.form-contacto input[type="email"],
.form-contacto textarea {
    padding: 0.85rem 1rem;
    border: 1px solid var(--color-borde);
    border-radius: var(--radio);
    font-size: 1rem;
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    width: 100%;
    resize: vertical;
    /* Para textarea */
    font-family: inherit;
    line-height: 1.4;
}

/* EFECTO AL ENFOQUE */
.form-contacto input:focus,
.form-contacto textarea:focus {
    border-color: var(--color-primario);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15);
    outline: none;
}

/* ALTURA DEL TEXTAREA */
.form-contacto textarea {
    min-height: 100px;
    max-height: 250px;
}

/* CONTENEDOR DE BOTONES */
.botones-contacto {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 0.4rem;
}

/* BOTONES ESTILO BASE */
.botones-contacto .btn {
    flex: 0 0 auto;
    padding: 0.75rem 1.35rem;
    font-size: 1rem;
}

/* BOTÓN SECUNDARIO */
.btn-secundario {
    background-color: var(--color-texto-secundario);
    color: white;
    box-shadow: 0 2px 6px rgba(113, 128, 150, 0.3);
    transition: background-color 0.25s ease;
}

.btn-secundario:hover {
    background-color: #5a677a;
}

/* RESPONSIVE: apilar botones en pantallas pequeñas */
@media (max-width: 600px) {
    .form-contacto {
        padding: 1.2rem 0.7rem;
        gap: 1rem;
    }

    .botones-contacto {
        flex-direction: column;
        align-items: stretch;
        gap: 0.6rem;
    }

    .botones-contacto .btn {
        width: 100%;
        text-align: center;
    }
}

/* Estilos para el formulario de registro */
.form-container {
    max-width: 600px;
    margin: 2rem auto;
    padding: 2rem;
    background: var(--color-contenido);
    border-radius: var(--radio);
    box-shadow: var(--sombra);
    border: 1px solid var(--color-borde);
}

.form-container h2 {
    color: var(--color-primario);
    text-align: center;
    margin-bottom: 1.5rem;
}

.form-container .form-grid {
    display: grid;
    gap: var(--espaciado);
}

.form-container .form-group {
    display: flex;
    flex-direction: column;
}

.form-container label {
    margin-bottom: 0.5rem;
    color: var(--color-texto);
    font-weight: bold;
}

.form-container input {
    padding: 0.75rem;
    border: 1px solid var(--color-borde);
    border-radius: var(--radio);
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-container input:focus {
    outline: none;
    border-color: var(--color-primario);
    box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.2);
}

.form-container .btn-group {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1rem;
}

.form-container .btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radio);
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.form-container .btn-primary {
    background-color: var(--color-primario);
    color: white;
}

.form-container .btn-primary:hover {
    background-color: var(--color-primario-oscuro);
}

.form-container .btn-secundario {
    background-color: var(--color-texto-secundario);
    color: white;
}

.form-container .btn-secundario:hover {
    background-color: #4a5568;
}

.mensaje {
    padding: 0.75rem;
    border-radius: var(--radio);
    margin-bottom: 1rem;
    text-align: center;
}

.mensaje {
  padding: 0.75rem;
  border-radius: var(--radio);
  margin-bottom: 1rem;
  text-align: center;
}

.mensaje.error {
  background-color: rgba(229, 62, 62, 0.1);
  color: var(--color-error);
  border: 1px solid var(--color-error);
}

.mensaje.exito {
  background-color: rgba(72, 187, 120, 0.1);
  color: var(--color-exito);
  border: 1px solid var(--color-exito);
}