/* ============================================================
   DPZ — Arte en acrílico · Hoja de estilos principal
   Paleta y tipografías según manual de marca.
   ============================================================ */

:root {
    /* Paleta de marca */
    --terra:        #C0562F;
    --terra-light:  #D98A4E;
    --terra-deep:   #9E3D24;
    --ink:          #211D19;
    --gold:         #C9A24B;
    --ivory:        #FBF5EC;
    --stone:        #9A9082;
    --sage:         #6E7C5A;
    --sold:         #B23A3A;

    /* Derivados */
    --paper:        #FFFFFF;
    --line:         #EAE0D2;
    --ink-soft:     #4A423B;

    /* Tipografía */
    --font-display: 'Fraunces', Georgia, serif;
    --font-serif:   'Cormorant Garamond', Georgia, serif;
    --font-body:    'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-script:  'Cookie', cursive;

    /* Formas */
    --radius:       14px;
    --radius-sm:    10px;
    --shadow-soft:  0 8px 30px rgba(33,29,25,.08);
    --shadow-hover: 0 16px 46px rgba(33,29,25,.16);
}

/* ── Base ──────────────────────────────────────────────────── */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.7;
    color: var(--ink);
    background: var(--ivory);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.15;
    color: var(--ink);
    margin: 0 0 .5em;
}

h1 { font-size: clamp(2rem, 4vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.6rem); }

p { margin: 0 0 1rem; }

a { color: var(--terra); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--terra-deep); }

img { max-width: 100%; height: auto; }

.container { max-width: 1200px; }

/* Texto de apoyo elegante */
.lead { font-family: var(--font-serif); font-size: 1.35rem; color: var(--ink-soft); line-height: 1.5; }
.eyebrow {
    font-family: var(--font-serif);
    text-transform: uppercase;
    letter-spacing: .28em;
    font-size: .8rem;
    color: var(--stone);
    font-weight: 600;
}

/* ── Botones ───────────────────────────────────────────────── */
.btn { font-family: var(--font-body); font-weight: 600; border-radius: 999px; padding: .7rem 1.6rem; transition: all .2s ease; }
.btn-primary  { background: var(--terra); border-color: var(--terra); color: #fff; }
.btn-primary:hover  { background: var(--terra-deep); border-color: var(--terra-deep); }
.btn-outline-primary { color: var(--terra); border-color: var(--terra); }
.btn-outline-primary:hover { background: var(--terra); border-color: var(--terra); color: #fff; }
.btn-light { background: #fff; border-color: var(--line); color: var(--ink); }

/* ── Navbar ────────────────────────────────────────────────── */
.navbar {
    background: rgba(251,245,236,.9);
    backdrop-filter: saturate(160%) blur(10px);
    border-bottom: 1px solid var(--line);
    transition: box-shadow .3s ease, background .3s ease;
    padding: .6rem 0;
}
.navbar.scrolled { box-shadow: 0 4px 20px rgba(33,29,25,.06); }
.navbar-brand { display: inline-flex; align-items: center; }
.navbar-brand svg { height: 46px; width: auto; display: block; }
.navbar .nav-link {
    font-family: var(--font-body);
    font-weight: 500;
    color: var(--ink);
    letter-spacing: .01em;
    padding: .4rem 1rem;
}
.navbar .nav-link:hover, .navbar .nav-link.active { color: var(--terra); }
.lang-switcher { font-size: .85rem; color: var(--stone); }
.lang-switcher a { color: var(--stone); padding: 0 .25rem; }
.lang-switcher a.active { color: var(--terra); font-weight: 700; }

/* ── Hero ──────────────────────────────────────────────────── */
.hero { padding: clamp(3rem, 8vw, 6rem) 0; }
.hero-title { font-size: clamp(2.4rem, 6vw, 4.4rem); }
.hero-title .script { font-family: var(--font-script); color: var(--terra); font-weight: 400; font-size: 1.25em; }

/* ── Secciones ─────────────────────────────────────────────── */
.section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.section-ivory { background: var(--ivory); }
.section-paper { background: var(--paper); }
.section-ink { background: var(--ink); color: var(--ivory); }
.section-ink h1, .section-ink h2, .section-ink h3 { color: var(--ivory); }

.section-head { text-align: center; max-width: 680px; margin: 0 auto 3rem; }

/* ── Card de obra ──────────────────────────────────────────── */
.obra-card {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform .3s ease, box-shadow .3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}
.obra-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); }
.obra-card .thumb {
    position: relative;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    background: #efe7da;
}
.obra-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.obra-card:hover .thumb img { transform: scale(1.04); }
.obra-card .body { padding: 1.1rem 1.2rem 1.3rem; display: flex; flex-direction: column; gap: .3rem; flex: 1; }
.obra-card .titulo { font-family: var(--font-serif); font-size: 1.35rem; font-weight: 600; color: var(--ink); line-height: 1.2; }
.obra-card .meta { font-size: .85rem; color: var(--stone); }
.obra-card .precio { font-weight: 600; color: var(--terra); margin-top: auto; padding-top: .5rem; }

/* Badges de estado (pieza única) */
.badge-estado {
    position: absolute; top: 12px; left: 12px;
    font-family: var(--font-body); font-size: .72rem; font-weight: 600;
    letter-spacing: .08em; text-transform: uppercase;
    padding: .3rem .7rem; border-radius: 999px;
    backdrop-filter: blur(4px);
}
.badge-disponible { background: rgba(110,124,90,.92); color: #fff; }
.badge-reservada  { background: rgba(201,162,75,.95); color: var(--ink); }
.badge-vendida    { background: rgba(178,58,58,.95); color: #fff; }

/* Overlay "vendida" sobre la imagen */
.thumb.is-vendida::after {
    content: "";
    position: absolute; inset: 0;
    background: rgba(33,29,25,.28);
}

/* ── Chips de colección / filtros ──────────────────────────── */
.chip-filtro {
    display: inline-block;
    font-family: var(--font-body); font-size: .9rem; font-weight: 500;
    padding: .45rem 1.1rem; border-radius: 999px;
    border: 1px solid var(--line); background: #fff; color: var(--ink-soft);
    transition: all .2s ease;
}
.chip-filtro:hover { border-color: var(--terra); color: var(--terra); }
.chip-filtro.active { background: var(--terra); border-color: var(--terra); color: #fff; }

/* ── Page header (páginas internas) ────────────────────────── */
.page-header { background: var(--ink); color: var(--ivory); padding: clamp(2.5rem,6vw,3.5rem) 0 clamp(2rem,5vw,3rem); }
.page-header h1 { color: var(--ivory); }
.page-header .eyebrow { color: var(--terra-light); }
.breadcrumb-dpz { font-size: .85rem; color: var(--stone); padding: 1rem 0; }
.breadcrumb-dpz a { color: var(--stone); }
.breadcrumb-dpz a:hover { color: var(--terra); }

/* ── Footer ────────────────────────────────────────────────── */
.site-footer { background: var(--ink); color: #cfc6b8; padding: 3.5rem 0 1.5rem; }
.site-footer svg { height: 54px; width: auto; }
.site-footer h3 { font-family: var(--font-display); font-size: 1rem; color: var(--ivory); margin-bottom: 1rem; letter-spacing: .02em; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: .5rem; }
.footer-links a { color: #cfc6b8; font-size: .95rem; }
.footer-links a:hover { color: var(--terra-light); }
.footer-divider { border-color: rgba(255,255,255,.12); margin: 2rem 0 1rem; }
.footer-bottom { font-size: .85rem; color: var(--stone); }

/* ── Botón flotante WhatsApp ───────────────────────────────── */
.whatsapp-float {
    position: fixed; right: 22px; bottom: 22px; z-index: 999;
    width: 56px; height: 56px; border-radius: 50%;
    background: #25D366; color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.7rem; box-shadow: 0 6px 20px rgba(0,0,0,.2);
    transition: transform .2s ease;
}
.whatsapp-float:hover { transform: scale(1.08); color: #fff; }

.scroll-top {
    position: fixed; right: 24px; bottom: 88px; z-index: 998;
    width: 46px; height: 46px; border-radius: 50%;
    background: var(--terra); color: #fff; border: none;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; pointer-events: none; transition: opacity .3s ease, transform .2s ease;
}
.scroll-top.visible { opacity: 1; pointer-events: auto; }
.scroll-top:hover { background: var(--terra-deep); }

/* ── Utilidades ────────────────────────────────────────────── */
.text-terra { color: var(--terra) !important; }
.bg-ivory { background: var(--ivory); }
.script { font-family: var(--font-script); }

/* Accesibilidad: foco visible */
a:focus-visible, button:focus-visible, .btn:focus-visible {
    outline: 2px solid var(--terra); outline-offset: 2px;
}

/* ── Skip link (accesibilidad) ─────────────────────────────── */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 2000;
    background: var(--ink);
    color: var(--ivory);
    padding: .7rem 1.2rem;
    border-radius: 0 0 8px 0;
    font-family: var(--font-body);
    font-weight: 600;
    text-decoration: none;
}
.skip-link:focus {
    left: 0;
    color: var(--ivory);
}

/* ── Ajuste de contraste (AA) ──────────────────────────────────
   El gris piedra original (#9A9082) no alcanza 4.5:1 sobre marfil
   para texto pequeño. Se oscurece a un tono con contraste suficiente
   manteniendo el carácter cálido de la marca. */
:root {
    --stone: #7A7264;         /* antes #9A9082 — mejora contraste texto secundario */
    --stone-soft: #9A9082;    /* tono original reservado para texto grande/decorativo */
}

/* Estado inválido de campos de formulario */
.form-control.is-invalid {
    border-color: var(--sold);
}
.field-error { display: block; min-height: 1em; }

/* ── Galería de obra (ficha) ───────────────────────────────── */
.gallery-main { position: relative; }
.gallery-zoom-hint {
    position: absolute; bottom: 12px; right: 12px;
    background: rgba(33,29,25,.72); color: #fff;
    font-size: .8rem; padding: .3rem .7rem; border-radius: 999px;
    opacity: 0; transition: opacity .2s ease; pointer-events: none;
}
.gallery-main:hover .gallery-zoom-hint { opacity: 1; }
.gallery-thumb { transition: border-color .2s ease, opacity .2s ease; opacity: .75; }
.gallery-thumb:hover { opacity: 1; }
.gallery-thumb.active { border-color: var(--terra) !important; opacity: 1; box-shadow: 0 0 0 2px var(--terra); }

/* ── Lightbox ──────────────────────────────────────────────── */
.lightbox {
    position: fixed; inset: 0; z-index: 3000;
    background: rgba(20,18,15,.92);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 3rem 1rem 2rem;
}
.lightbox[hidden] { display: none; }
.lightbox-stage {
    flex: 1; display: flex; align-items: center; justify-content: center;
    max-width: 100%; overflow: auto; width: 100%;
}
.lightbox-stage img {
    max-width: 92vw; max-height: 80vh; object-fit: contain;
    border-radius: 6px; cursor: zoom-in; transition: transform .25s ease;
}
.lightbox-stage img.zoomed { cursor: zoom-out; transform: scale(2); }
.lightbox-close {
    position: absolute; top: 16px; right: 20px;
    background: none; border: none; color: #fff; font-size: 2.4rem; line-height: 1;
    cursor: pointer; padding: .2rem .6rem;
}
.lightbox-close:hover { color: var(--terra-light); }
.lightbox-caption {
    color: #cfc6b8; font-family: var(--font-serif); font-size: 1.05rem;
    letter-spacing: 2px; text-transform: uppercase; margin: 1rem 0 0; text-align: center;
}
