/**
 * Estilos de las páginas internas (confirmación, lista de deseos).
 * Misma paleta y tipografías que la invitación. No depende de Vite.
 */
:root {
    --blush: #ffeae1;
    --blush-soft: #fff5f1;
    --white: #ffffff;
    --terracotta: #ba6a60;
    --terracotta-dark: #a4544a;
    --terracotta-deep: #8f453c;
    --line: rgba(186, 106, 96, 0.3);
    --script: 'Allura', cursive;
    --display: 'Playfair Display', serif;
    --sans: 'Montserrat', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body.boda {
    margin: 0;
    min-height: 100dvh;
    background: var(--white);
    color: var(--terracotta);
    font-family: var(--sans);
    -webkit-font-smoothing: antialiased;
    padding-bottom: calc(4.5rem + env(safe-area-inset-bottom, 0px));
}

img { max-width: 100%; display: block; }

/* ——— Cabecera ——— */
.b-header {
    background: var(--blush);
    text-align: center;
    padding: calc(1.6rem + env(safe-area-inset-top, 0px)) 1rem 1.4rem;
}

.b-header a { text-decoration: none; color: inherit; }

.b-header .names {
    font-family: var(--display);
    font-weight: 800;
    font-size: 0.8rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
}

.b-header h1 {
    margin: 0.2rem 0 0;
    font-family: var(--script);
    font-weight: 400;
    font-size: clamp(2.6rem, 10vw, 3.6rem);
    line-height: 1.1;
}

.b-main {
    max-width: 40rem;
    margin: 0 auto;
    padding: 1.5rem 1rem 2rem;
}

/* ——— Avisos ——— */
.b-alert {
    margin: 0 0 1.25rem;
    padding: 0.85rem 1rem;
    border-radius: 14px;
    font-size: 0.9rem;
    line-height: 1.4;
    text-align: center;
}

.b-alert--ok { background: #f1f6ee; color: #4d6b3f; border: 1px solid #d5e5cc; }
.b-alert--err { background: #fff1ee; color: var(--terracotta-deep); border: 1px solid #f3c9bf; }

/* ——— Tarjetas ——— */
.b-card {
    background: var(--blush);
    border-radius: 18px;
    padding: 1.6rem 1.25rem;
    text-align: center;
}

.b-card + .b-card { margin-top: 1rem; }

.b-card--line { background: var(--white); border: 1px solid var(--line); }

.b-eyebrow {
    margin: 0 0 0.4rem;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.28em;
    text-transform: uppercase;
}

.b-title {
    margin: 0;
    font-family: var(--script);
    font-weight: 400;
    font-size: clamp(2.2rem, 8vw, 2.8rem);
    line-height: 1.1;
}

.b-text { margin: 0.6rem 0 0; font-size: 0.95rem; line-height: 1.5; }
.b-text a, .b-empty a { color: var(--terracotta-dark); font-weight: 600; text-underline-offset: 3px; }
.b-muted { opacity: 0.75; font-size: 0.82rem; }

.b-passes {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1.1rem;
    flex-wrap: wrap;
}

.b-pass {
    min-width: 6.5rem;
    padding: 0.7rem 1rem;
    border-radius: 14px;
    background: var(--white);
    border: 1px solid var(--line);
}

.b-pass strong { display: block; font-family: var(--display); font-size: 2rem; line-height: 1; }
.b-pass span { font-size: 0.7rem; letter-spacing: 0.18em; text-transform: uppercase; }

/* ——— Botones ——— */
.b-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-height: 44px;
    padding: 0.55rem 1.6rem;
    border-radius: 999px;
    border: 0;
    background: var(--terracotta);
    color: var(--white);
    font-family: var(--sans);
    font-size: 0.95rem;
    letter-spacing: 0.05em;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s ease;
}

.b-btn:hover { background: var(--terracotta-dark); }
.b-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.b-btn--block { width: 100%; }
.b-btn--ghost { background: transparent; color: var(--terracotta); border: 1.5px solid var(--terracotta); }
.b-btn--ghost:hover { background: var(--blush); }
.b-btn--small { min-height: 36px; padding: 0.35rem 1.1rem; font-size: 0.8rem; }

/* ——— Formulario de confirmación ——— */
.b-form { text-align: left; margin-top: 1.4rem; }

.b-choice {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
}

.b-choice input { position: absolute; opacity: 0; pointer-events: none; }

.b-choice label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    padding: 1rem 0.5rem;
    border-radius: 14px;
    border: 1.5px solid var(--line);
    background: var(--white);
    text-align: center;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.b-choice label svg { width: 26px; height: 26px; stroke: currentColor; fill: none; stroke-width: 1.6; }

.b-choice input:checked + label { border-color: var(--terracotta); background: var(--terracotta); color: var(--white); }
.b-choice input:focus-visible + label { outline: 2px dashed var(--terracotta); outline-offset: 3px; }

.b-counters { margin-top: 1.2rem; display: grid; gap: 0.6rem; }

.b-counter {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 0.9rem;
    border-radius: 14px;
    background: var(--white);
    border: 1px solid var(--line);
}

.b-counter-label strong { display: block; font-size: 0.95rem; }
.b-counter-label span { font-size: 0.75rem; opacity: 0.8; }

.b-stepper { display: flex; align-items: center; gap: 0.4rem; }

.b-stepper button {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1.5px solid var(--terracotta);
    background: var(--white);
    color: var(--terracotta);
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
}

.b-stepper button:disabled { opacity: 0.3; cursor: not-allowed; }

.b-stepper input {
    width: 2.6rem;
    text-align: center;
    border: 0;
    background: transparent;
    color: var(--terracotta);
    font-family: var(--display);
    font-weight: 700;
    font-size: 1.5rem;
    -moz-appearance: textfield;
}

.b-stepper input::-webkit-outer-spin-button,
.b-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.b-field { margin-top: 1.2rem; }

.b-field label { display: block; font-size: 0.8rem; font-weight: 600; margin-bottom: 0.4rem; }

.b-field textarea {
    width: 100%;
    min-height: 90px;
    padding: 0.75rem 0.9rem;
    border-radius: 14px;
    border: 1px solid var(--line);
    font-family: var(--sans);
    font-size: 0.95rem;
    color: var(--terracotta-deep);
    background: var(--white);
    resize: vertical;
}

.b-field textarea:focus { outline: 2px solid var(--terracotta); outline-offset: 1px; }

.b-check { display: flex; align-items: flex-start; gap: 0.55rem; margin-top: 0.7rem; font-size: 0.85rem; line-height: 1.4; cursor: pointer; }
.b-check input { width: 18px; height: 18px; margin: 0.1rem 0 0; flex-shrink: 0; accent-color: var(--terracotta); }

.b-error { margin: 0.4rem 0 0; font-size: 0.8rem; color: var(--terracotta-deep); font-weight: 600; }

.b-actions { margin-top: 1.4rem; display: grid; gap: 0.6rem; }

/* ——— Lista de deseos ——— */
.b-search { display: flex; gap: 0.5rem; margin-bottom: 1.25rem; }

.b-search input {
    flex: 1;
    min-height: 44px;
    padding: 0 1rem;
    border-radius: 999px;
    border: 1px solid var(--line);
    font-family: var(--sans);
    font-size: 0.9rem;
    color: var(--terracotta-deep);
}

.b-search input:focus { outline: 2px solid var(--terracotta); outline-offset: 1px; }

.b-search button {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 0;
    background: var(--terracotta);
    color: var(--white);
    cursor: pointer;
    display: grid;
    place-items: center;
}

.b-section-title {
    margin: 1.8rem 0 0.8rem;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.28em;
    text-transform: uppercase;
}

.b-gifts { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.75rem; }

.b-gift {
    display: flex;
    overflow: hidden;
    border-radius: 18px;
    background: var(--white);
    border: 1px solid var(--line);
}

.b-gift--mine { border-color: var(--terracotta); background: var(--blush-soft); }
.b-gift--taken { opacity: 0.6; }

.b-gift-thumb {
    position: relative;
    width: 7.5rem;
    min-width: 7.5rem;
    min-height: 7.5rem;
    background: var(--blush);
}

.b-gift-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.b-gift-thumb .count {
    position: absolute;
    right: 6px;
    bottom: 6px;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(143, 69, 60, 0.85);
    color: var(--white);
    font-size: 10px;
    font-weight: 700;
}

.b-gift-thumb .empty { display: grid; place-items: center; height: 100%; font-size: 0.7rem; }

.b-gift-body {
    flex: 1;
    min-width: 0;
    padding: 0.85rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 0.6rem;
}

.b-gift-body p {
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.4;
    color: var(--terracotta-deep);
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.b-store { align-self: flex-start; font-size: 0.8rem; font-weight: 600; color: var(--terracotta-dark); text-underline-offset: 3px; }

.b-tag {
    align-self: flex-start;
    padding: 0.25rem 0.8rem;
    border-radius: 999px;
    background: var(--blush);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.05em;
}

.b-empty {
    padding: 2.5rem 1.5rem;
    border-radius: 18px;
    border: 1px dashed var(--line);
    text-align: center;
    font-size: 0.9rem;
}

/* Visor de fotos */
.b-gallery { display: flex; gap: 0.4rem; overflow-x: auto; margin-top: 0.2rem; }
.b-gallery img { width: 3.2rem; height: 3.2rem; border-radius: 8px; object-fit: cover; flex-shrink: 0; cursor: zoom-in; }

.b-lightbox {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: grid;
    place-items: center;
    padding: 1.5rem;
    background: rgba(60, 25, 20, 0.85);
    border: 0;
    width: 100%;
    cursor: zoom-out;
}

.b-lightbox img { max-height: 85dvh; border-radius: 12px; }

/* ——— Menú inferior ——— */
.b-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100;
    background: var(--white);
    border-top: 1px solid var(--line);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    box-shadow: 0 -4px 20px rgba(186, 106, 96, 0.08);
}

.b-nav-inner {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    max-width: 40rem;
    margin: 0 auto;
}

.b-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    padding: 0.6rem 0.25rem;
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    text-decoration: none;
    color: rgba(186, 106, 96, 0.55);
    -webkit-tap-highlight-color: transparent;
}

.b-nav a.active { color: var(--terracotta); }

.b-nav svg { width: 1.45rem; height: 1.45rem; stroke: currentColor; fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

.b-footer { margin-top: 2.5rem; text-align: center; font-size: 0.7rem; opacity: 0.6; }
.b-footer a { color: inherit; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Aportes en dinero (Wompi) */
.b-field input[type="text"], .b-field input[type="email"] {
    width: 100%;
    padding: 0.75rem 0.9rem;
    border-radius: 14px;
    border: 1px solid var(--line);
    font-family: var(--sans);
    font-size: 0.95rem;
    color: var(--terracotta-deep);
    background: var(--white);
}
.b-field input:focus { outline: 2px solid var(--terracotta); outline-offset: 1px; }
.b-amounts { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 0.6rem; }
.b-amounts button {
    padding: 0.5rem 0.9rem;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--white);
    color: var(--terracotta-deep);
    font: 600 0.85rem var(--sans);
    cursor: pointer;
}
.b-amounts button[aria-pressed="true"] { background: var(--terracotta); border-color: var(--terracotta); color: var(--white); }
.b-secure { margin: 0.8rem 0 0; font-size: 0.75rem; opacity: 0.75; text-align: center; }
