/* Pideysigue.com - hoja de estilos única y responsive.
   Identidad: rojo corporativo heredado de la web anterior. */

:root {
    --rojo: #e40505;
    --rojo-intenso: #cc0000;
    --rojo-oscuro: #96000f;
    --gris-caja: #5f5f5f;
    --gris-borde: #6e6e6e;
    --gris-fondo: #f4f4f5;
    --gris-texto: #1a1a1a;
    --verde: #15803d;
    --radio: 10px;
    --radio-grande: 24px;
    --sombra: 0 2px 8px rgba(0, 0, 0, 0.18);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, "Segoe UI", Roboto, sans-serif;
    background: var(--gris-fondo);
    color: var(--gris-texto);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

body.pagina-portada {
    background: #ff0000;
    color: #111;
}

a {
    color: var(--rojo);
}

/* Cabecera */
.cabecera {
    background: #fff;
    border-bottom: 3px solid var(--rojo);
    box-shadow: var(--sombra);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
}

.cabecera-logo img {
    height: 52px;
    display: block;
}

.cabecera-nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.9rem;
    font-size: 0.95rem;
}

.cabecera-nav a {
    text-decoration: none;
    font-weight: 600;
}

.cabecera-nav a:hover {
    text-decoration: underline;
}

.saludo {
    color: #71717a;
}

/* Contenido */
.contenido {
    flex: 1;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: 1.2rem 1rem 4.5rem;
}

.contenido-portada {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0 0 5rem;
    flex: 1;
}

/* Logo portada: ancho completo como la web original */
.portada-logo {
    width: 100%;
    text-align: center;
    margin-top: 3%;
    padding: 0;
}

.portada-logo a {
    display: block;
    text-decoration: none;
}

.portada-logo img {
    width: 95%;
    max-width: none;
    height: auto;
    border-radius: 50px;
    display: inline-block;
}

.tarjeta {
    background: #fff;
    border-radius: var(--radio);
    box-shadow: var(--sombra);
    padding: 1.4rem;
    margin: 0 auto 1.2rem;
    max-width: 480px;
}

.tarjeta-ancha {
    max-width: 900px;
}

h1 {
    font-size: 1.45rem;
    margin: 0 0 0.8rem;
    color: var(--rojo-oscuro);
}

h2 {
    font-size: 1.1rem;
    margin: 1.2rem 0 0.5rem;
}

/* Formularios */
.formulario {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.formulario-inline {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 1rem;
}

.formulario input,
.formulario textarea,
.formulario select {
    width: 100%;
    padding: 0.65rem 0.8rem;
    border: 1px solid var(--gris-borde);
    border-radius: var(--radio);
    font: inherit;
    background: #fff;
}

.formulario-inline input {
    width: auto;
    flex: 1;
    min-width: 180px;
}

.formulario textarea {
    resize: vertical;
    min-height: 90px;
}

.formulario input:focus,
.formulario textarea:focus,
.formulario select:focus {
    outline: 2px solid var(--rojo);
    outline-offset: 1px;
    border-color: var(--rojo);
}

.boton {
    display: inline-block;
    background: var(--rojo);
    color: #fff;
    border: 0;
    border-radius: var(--radio);
    padding: 0.7rem 1.2rem;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: background 0.15s;
}

.boton:hover {
    background: var(--rojo-oscuro);
}

.boton-secundario {
    background: #fff;
    color: var(--rojo);
    border: 2px solid var(--rojo);
}

.boton-secundario:hover {
    background: #fee2e2;
}

.boton-mini {
    padding: 0.3rem 0.7rem;
    font-size: 0.85rem;
    width: auto;
}

.check {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.check input {
    width: auto;
    margin-top: 0.2rem;
}

.campo-select {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    font-size: 0.9rem;
    font-weight: 600;
}

.error {
    background: #fee2e2;
    color: var(--rojo-oscuro);
    border-radius: var(--radio);
    padding: 0.6rem 0.8rem;
    margin: 0;
    font-size: 0.92rem;
}

.exito {
    background: #dcfce7;
    color: var(--verde);
    border-radius: var(--radio);
    padding: 0.6rem 0.8rem;
    margin: 0 0 0.5rem;
    font-size: 0.92rem;
}

.enlace-discreto {
    font-size: 0.9rem;
    text-align: center;
}

.enviando {
    color: var(--rojo);
    font-weight: 700;
    text-align: center;
}

/* Portada — réplica de movilindex.php + estilonuevo.css */
.portada {
    width: 100%;
}

.portada-caja {
    width: 98%;
    margin: 4% auto 0;
    border-radius: 20px;
    background: #5f5f5f;
    padding: 0 0 2%;
    overflow: hidden;
}

.portada-form {
    display: block;
}

.portada-busqueda {
    display: block;
    width: 94%;
    margin: 4% auto 0;
    min-height: 4.2rem;
    padding: 0.75rem 1rem;
    box-sizing: border-box;
    border: 4px solid #6e6e6e;
    border-radius: 70px;
    background: #fff;
    font-family: sans-serif;
    font-size: clamp(1rem, 4.5vw, 1.35rem);
    text-align: center;
    color: #111;
    resize: none;
    line-height: 1.3;
}

.portada-busqueda::placeholder {
    color: #888;
}

.portada-busqueda:focus {
    outline: none;
    border-color: #fff;
}

.portada-botones {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: stretch;
    width: 100%;
    padding: 2% 0 1%;
    box-sizing: border-box;
}

.portada-boton-celda {
    width: 45%;
    background: #fff;
    border-radius: 100px;
    margin-top: 2%;
    overflow: hidden;
}

.portada-boton-celda-pedir {
    margin-left: 4%;
}

.portada-boton-celda-buscar {
    margin-right: 4%;
}

.portada-boton-img {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    line-height: 0;
}

.portada-boton-img img {
    width: 100%;
    height: auto;
    display: block;
}

.portada-atajos {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    width: 100%;
    padding: 0;
    margin-top: 5%;
    box-sizing: border-box;
}

.portada-atajo {
    width: 45%;
    margin-left: 3%;
    background: #fff;
    border-radius: 100px;
    overflow: hidden;
    text-decoration: none;
    line-height: 0;
}

.portada-atajo:last-child {
    margin-left: 0;
    margin-right: 3%;
}

.portada-atajo img {
    width: 100%;
    height: auto;
    display: block;
}

@media (min-width: 560px) {
    .portada-busqueda {
        min-height: 5rem;
        font-size: 1.35rem;
    }
}

/* Tablas de pedidos */
.tabla-pedidos {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.tabla-pedidos th {
    background: var(--rojo);
    color: #fff;
    text-align: left;
    padding: 0.55rem 0.7rem;
}

.tabla-pedidos td {
    padding: 0.55rem 0.7rem;
    border-bottom: 1px solid var(--gris-borde);
    vertical-align: top;
}

.celda-fecha {
    white-space: nowrap;
}

.celda-comentario {
    word-break: break-word;
}

.badge {
    display: inline-block;
    background: var(--gris-borde);
    border-radius: 999px;
    padding: 0.15rem 0.7rem;
    font-size: 0.82rem;
    font-weight: 700;
}

.badge-rojo {
    background: var(--rojo);
    color: #fff;
}

/* Detalle de pedido */
.detalle-fecha {
    color: #71717a;
    margin-top: -0.5rem;
}

.burbuja {
    background: var(--gris-fondo);
    border-radius: var(--radio);
    padding: 0.8rem 1rem;
    border-left: 4px solid var(--gris-borde);
}

.burbuja-cliente {
    border-left-color: var(--rojo);
}

.burbuja-respuesta {
    border-left-color: var(--verde);
    background: #f0fdf4;
}

.galeria {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.7rem;
}

.galeria img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: var(--radio);
    box-shadow: var(--sombra);
}

/* Fotos en formularios */
.fotos {
    border: 1px dashed var(--gris-borde);
    border-radius: var(--radio);
    padding: 0.8rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.fotos legend {
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0 0.4rem;
}

.previews {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.previews img {
    width: 90px;
    height: 90px;
    object-fit: cover;
    border-radius: var(--radio);
    box-shadow: var(--sombra);
}

/* Resultados del buscador */
.resultados {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.resultado {
    display: grid;
    grid-template-columns: 110px 1fr auto;
    gap: 0.8rem;
    align-items: center;
    background: var(--gris-fondo);
    border-radius: var(--radio);
    padding: 0.6rem;
}

.resultado-imagen img {
    width: 110px;
    height: 80px;
    object-fit: cover;
    border-radius: var(--radio);
    display: block;
}

.resultado-texto {
    text-decoration: none;
    color: var(--gris-texto);
    font-weight: 600;
    word-break: break-word;
}

.resultado-texto:hover {
    color: var(--rojo);
}

.resultado-precio {
    font-weight: 700;
    color: var(--rojo-oscuro);
    white-space: nowrap;
}

@media (max-width: 560px) {
    .resultado {
        grid-template-columns: 80px 1fr;
    }

    .resultado-imagen img {
        width: 80px;
        height: 60px;
    }

    .resultado-precio {
        grid-column: 2;
    }
}

/* WhatsApp flotante */
.whatsapp-flotante {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 10;
}

.whatsapp-flotante img {
    width: 56px;
    height: 56px;
    display: block;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: transform 0.15s;
}

.whatsapp-flotante:hover img {
    transform: scale(1.08);
}

/* Pie */
.pie {
    background: #fff;
    border-top: 1px solid var(--gris-borde);
    text-align: center;
    font-size: 0.85rem;
    color: #71717a;
    padding: 0.8rem 1rem;
}

.pie p {
    margin: 0;
}

@media (max-width: 560px) {
    .cabecera {
        justify-content: center;
        text-align: center;
    }

    .tabla-pedidos {
        font-size: 0.85rem;
    }

    .tabla-pedidos th,
    .tabla-pedidos td {
        padding: 0.4rem 0.45rem;
    }
}
