/* Pideysigue.com — diseño responsive unificado */

:root {
    --brand: #dc2626;
    --brand-dark: #b91c1c;
    --brand-soft: #fef2f2;
    --brand-glow: rgba(220, 38, 38, 0.15);
    --bg: #f8fafc;
    --surface: #ffffff;
    --border: #e2e8f0;
    --text: #0f172a;
    --muted: #64748b;
    --ok: #15803d;
    --hero-dark: #0f172a;
    --hero-mid: #1e293b;
    --radius: 14px;
    --radius-sm: 10px;
    --radius-lg: 20px;
    --shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
    --shadow-md: 0 12px 32px rgba(15, 23, 42, 0.1);
    --shadow-lg: 0 24px 48px rgba(15, 23, 42, 0.12);
    --header-h: 68px;
    --font: "Plus Jakarta Sans", "Segoe UI", system-ui, sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

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

/* Cabecera */
.cabecera {
    position: sticky;
    top: 0;
    z-index: 20;
    background: var(--surface);
    border-bottom: 3px solid var(--brand);
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    min-height: var(--header-h);
    padding: 0.5rem 1rem;
}

/* Marca tipográfica (sustituye al logo JPG antiguo) */
.marca {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    text-decoration: none !important;
    color: inherit;
}

.marca__icono {
    position: relative;
    flex-shrink: 0;
    width: 2.65rem;
    height: 2.65rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #ef4444 0%, #dc2626 45%, #b91c1c 100%);
    border-radius: 11px;
    color: #fff;
    box-shadow: 0 4px 14px rgba(220, 38, 38, 0.35);
}

.marca__icono svg {
    width: 1.45rem;
    height: 1.45rem;
}

.marca__icono-badge {
    position: absolute;
    bottom: -3px;
    right: -4px;
    min-width: 1.35rem;
    padding: 0.1rem 0.25rem;
    background: #fff;
    color: #dc2626;
    font-size: 0.58rem;
    font-weight: 800;
    line-height: 1.2;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
    text-align: center;
}

.marca__texto {
    font-family: var(--font);
    font-size: clamp(1.15rem, 3.5vw, 1.35rem);
    font-weight: 800;
    letter-spacing: -0.035em;
    color: var(--text);
    line-height: 1;
}

.marca__tld {
    color: var(--brand);
}

.marca:hover .marca__texto {
    color: var(--brand-dark);
}

.marca:hover .marca__tld {
    color: var(--brand-dark);
}

.cabecera--inicio {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    border-bottom-color: transparent;
    box-shadow: 0 1px 0 var(--border);
}

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

.cabecera-nav a {
    text-decoration: none;
    font-weight: 600;
    color: var(--brand);
}

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

.saludo {
    color: var(--muted);
    font-weight: 500;
}

/* Contenido */
.contenido {
    flex: 1;
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    padding: 1.5rem 1.25rem 5rem;
}

.contenido--inicio {
    max-width: none;
    padding: 0 0 4rem;
}

.tarjeta {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    padding: 1.35rem;
    margin: 0 auto 1.25rem;
    max-width: 520px;
}

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

h1 {
    font-size: clamp(1.35rem, 3vw, 1.65rem);
    margin: 0 0 0.75rem;
    color: var(--brand-dark);
    line-height: 1.25;
}

h2 {
    font-size: 1.05rem;
    margin: 1rem 0 0.5rem;
    color: var(--text);
}

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

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

.formulario input,
.formulario textarea,
.formulario select {
    width: 100%;
    padding: 0.7rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font: inherit;
    background: var(--surface);
    color: var(--text);
}

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

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

.formulario input:focus,
.formulario textarea:focus,
.formulario select:focus {
    outline: 2px solid rgba(196, 30, 42, 0.25);
    border-color: var(--brand);
}

.boton {
    display: inline-block;
    background: var(--brand);
    color: #fff;
    border: 0;
    border-radius: var(--radius-sm);
    padding: 0.72rem 1.15rem;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: background 0.15s, transform 0.1s;
}

.boton:hover {
    background: var(--brand-dark);
}

.boton:active {
    transform: translateY(1px);
}

.boton-secundario {
    background: var(--surface);
    color: var(--brand);
    border: 2px solid var(--brand);
}

.boton-secundario:hover {
    background: var(--brand-soft);
}

.boton-mini {
    padding: 0.35rem 0.75rem;
    font-size: 0.85rem;
    width: auto;
}

.boton-grande {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 1.25rem;
    font-size: 0.95rem;
    border-radius: var(--radius-sm);
}

.boton-grande svg {
    flex-shrink: 0;
}

.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.35rem;
    font-size: 0.9rem;
    font-weight: 600;
}

.error {
    background: #fee2e2;
    color: var(--brand-dark);
    border-radius: var(--radius-sm);
    padding: 0.65rem 0.85rem;
    margin: 0;
    font-size: 0.92rem;
}

.exito {
    background: #dcfce7;
    color: var(--ok);
    border-radius: var(--radius-sm);
    padding: 0.65rem 0.85rem;
    margin: 0 0 0.5rem;
    font-size: 0.92rem;
}

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

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

/* Tablas */
.tabla-pedidos {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.94rem;
    background: var(--surface);
    border-radius: var(--radius-sm);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.tabla-pedidos th {
    background: var(--brand);
    color: #fff;
    text-align: left;
    padding: 0.6rem 0.75rem;
}

.tabla-pedidos td {
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}

.tabla-pedidos tr:last-child td {
    border-bottom: 0;
}

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

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

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

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

.detalle-fecha {
    color: var(--muted);
    margin-top: -0.4rem;
}

.burbuja {
    background: var(--bg);
    border-radius: var(--radius-sm);
    padding: 0.85rem 1rem;
    border-left: 4px solid var(--border);
}

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

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

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

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

.fotos {
    border: 1px dashed var(--border);
    border-radius: var(--radius-sm);
    padding: 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

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

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

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

/* Buscador */
.resultados {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.resultado {
    display: grid;
    grid-template-columns: 110px 1fr auto;
    gap: 0.75rem;
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.65rem;
}

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

.catalogo-imagen {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.catalogo-imagen__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-sm);
    display: block;
    position: relative;
    z-index: 1;
}

.resultado-imagen .catalogo-imagen {
    width: 110px;
    height: 80px;
}

.catalogo-sin-foto[hidden] {
    display: none !important;
}

.catalogo-sin-foto {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    width: 100%;
    height: 100%;
    min-height: 54px;
    padding: 0.5rem;
    box-sizing: border-box;
    border-radius: var(--radius-sm);
    border: 1px dashed #cbd5e1;
    background: linear-gradient(160deg, #f8fafc 0%, #eef2f7 100%);
    color: #94a3b8;
    text-align: center;
}

.catalogo-sin-foto__icono {
    width: 2rem;
    height: 2rem;
    flex-shrink: 0;
}

.catalogo-sin-foto__texto {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    line-height: 1.2;
    color: #94a3b8;
}

.catalogo-sin-foto--compacto {
    min-height: 0;
    padding: 0.2rem;
    gap: 0;
}

.catalogo-sin-foto--compacto .catalogo-sin-foto__icono {
    width: 1.35rem;
    height: 1.35rem;
}

.resultado-imagen img[src*="sin-imagen"],
.producto-galeria img[src*="sin-imagen"] {
    object-fit: contain;
    background: #f1f5f9;
    padding: 0.25rem;
}

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

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

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

.whatsapp-flotante {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 1150;
    line-height: 0;
    background: transparent;
}

.whatsapp-flotante img {
    width: 56px;
    height: 56px;
    display: block;
    border-radius: 50%;
    background: transparent;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.28));
    transition: transform 0.15s;
}

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

.pie {
    background: var(--hero-dark);
    color: #cbd5e1;
    padding: 2rem 1.25rem 1.25rem;
    margin-top: auto;
}

.pie__contenido {
    max-width: 1040px;
    margin: 0 auto 1.25rem;
    display: grid;
    gap: 1.5rem;
}

@media (min-width: 720px) {
    .pie__contenido {
        grid-template-columns: 1.2fr 1fr;
        align-items: start;
    }
}

.pie__nombre {
    margin: 0 0 0.35rem;
    font-size: 1.05rem;
    font-weight: 800;
    color: #fff;
}

.pie__empresa,
.pie__dato {
    margin: 0.2rem 0;
    font-size: 0.84rem;
    line-height: 1.5;
}

.pie a {
    color: #f8fafc;
    text-decoration: none;
}

.pie a:hover {
    color: #fca5a5;
    text-decoration: underline;
}

.pie__enlaces {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    font-size: 0.84rem;
    font-weight: 600;
}

.pie__copy {
    margin: 0;
    text-align: center;
    font-size: 0.78rem;
    color: #94a3b8;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
    padding-top: 1rem;
    max-width: 1040px;
    margin-left: auto;
    margin-right: auto;
}

.cookies-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1100;
    padding: 0.85rem;
    pointer-events: none;
}

.cookies-banner[hidden] {
    display: none;
}

.cookies-banner__panel {
    pointer-events: auto;
    max-width: 920px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.15rem;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
}

.cookies-banner__titulo {
    margin: 0 0 0.25rem;
    font-size: 0.95rem;
    font-weight: 800;
}

.cookies-banner__desc {
    margin: 0;
    font-size: 0.82rem;
    color: var(--muted);
    line-height: 1.45;
    max-width: 52ch;
}

.cookies-banner__desc a {
    color: var(--brand);
    font-weight: 600;
}

.cookies-banner__aceptar {
    white-space: nowrap;
    padding: 0.6rem 1.1rem;
    font-size: 0.85rem;
}

body.cookies-visible .whatsapp-flotante {
    bottom: 5.5rem;
}

@media (max-width: 640px) {
    body.cookies-visible .whatsapp-flotante {
        bottom: 7.5rem;
    }
}

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

    .resultado {
        grid-template-columns: 80px 1fr;
    }

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

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

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

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