/* =========================================================
   Tienda Heráldica México — hoja de estilo
   Paleta heráldica: pergamino, borgoña y oro.
   ========================================================= */

:root {
    --ink:        #1c1a17;
    --ink-soft:   #4a453e;
    --paper:      #fbf7ef;
    --paper-2:    #f4ecdd;
    --line:       #e3d8c3;
    --burgundy:   #6e1423;
    --burgundy-d: #4f0d18;
    --gold:       #b08d35;
    --gold-d:     #8a6d24;
    --paypal:     #ffc439;
    --paypal-ink: #253b80;
    --ok:         #2f7d32;
    --warn:       #b45309;

    --font-title: 'Noto Serif', Georgia, 'Times New Roman', serif;
    --font-body:  'Noto Serif', Georgia, serif;

    --wrap: 1140px;
    --radius: 6px;
    --shadow: 0 6px 24px rgba(28, 26, 23, .09);
    --shadow-sm: 0 2px 8px rgba(28, 26, 23, .07);
}

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

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 19px;
    line-height: 1.6;
    color: var(--ink);
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--font-title); line-height: 1.18; font-weight: 700; color: var(--ink); }
h1 { font-size: clamp(2rem, 4vw, 3rem); margin: 0 0 .4em; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }
a { color: var(--burgundy); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }

.container { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.container--narrow { max-width: 780px; }

.visually-hidden, .skip-link {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link:focus {
    position: fixed; top: 8px; left: 8px; width: auto; height: auto; clip: auto;
    background: var(--ink); color: #fff; padding: 10px 16px; z-index: 1000; border-radius: 4px;
}

/* ---------- Botones ---------- */
.btn {
    display: inline-block; font-family: var(--font-body); font-size: 1rem; font-weight: 600;
    letter-spacing: .02em; padding: .7em 1.5em; border-radius: var(--radius); border: 2px solid transparent;
    cursor: pointer; text-align: center; transition: transform .06s ease, background .15s ease, color .15s ease;
    text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn--gold { background: var(--gold); color: #fff; border-color: var(--gold); }
.btn--gold:hover { background: var(--gold-d); border-color: var(--gold-d); color: #fff; }
.btn--outline { background: transparent; color: var(--burgundy); border-color: var(--burgundy); }
.btn--outline:hover { background: var(--burgundy); color: #fff; }
.btn--paypal { background: var(--paypal); color: var(--paypal-ink); border-color: var(--paypal); }
.btn--paypal:hover { filter: brightness(.95); color: var(--paypal-ink); }
.btn--block { display: block; width: 100%; }

/* ---------- Cabecera ---------- */
.site-header { background: var(--paper); border-bottom: 1px solid var(--line); }
.topbar { background: var(--burgundy); color: #f3e7d8; font-size: .85rem; }
.topbar__inner { display: flex; justify-content: flex-end; gap: 24px; padding: 7px 20px; }
.topbar__link { color: #f3e7d8; }
.topbar__link:hover { color: #fff; text-decoration: underline; }

.header__main {
    display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 24px; padding: 18px 20px;
}
.brand { display: flex; flex-direction: column; gap: 2px; }
.brand:hover { text-decoration: none; }
.brand__logo { width: auto; height: 40px; }
.brand__tagline { font-size: .8rem; color: var(--ink-soft); letter-spacing: .04em; }

.header-search { display: flex; max-width: 420px; width: 100%; margin: 0 auto; }
.header-search input {
    flex: 1; border: 1px solid var(--line); border-right: 0; border-radius: var(--radius) 0 0 var(--radius);
    padding: .55em .9em; font-family: var(--font-body); font-size: 1rem; background: #fff; min-width: 0;
}
.header-search button {
    background: var(--burgundy); color: #fff; border: 0; border-radius: 0 var(--radius) var(--radius) 0;
    padding: 0 16px; cursor: pointer; display: flex; align-items: center;
}
.header-search button:hover { background: var(--burgundy-d); }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; width: 44px; height: 40px; flex-direction: column; gap: 5px; justify-content: center; }
.nav-toggle span { display: block; height: 2px; background: var(--ink); border-radius: 2px; }

.nav-primary { background: var(--burgundy); border-top: 3px solid var(--gold); box-shadow: var(--shadow-sm); }
.nav-primary ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.nav-primary a {
    display: block; padding: 13px 18px; color: #f3e7d8; font-weight: 600; letter-spacing: .02em; font-size: 1.02rem;
    border-bottom: 3px solid transparent;
}
.nav-primary a:hover { text-decoration: none; color: #fff; }
.nav-primary a[aria-current="page"] { border-bottom-color: var(--gold); color: #fff; }
.nav-primary__ext { margin-left: auto; }
.nav-primary__ext a { color: #e7d6bd; }
.nav-primary__ext a:hover { color: #fff; }

/* ---------- Aviso de mantenimiento ---------- */
.maintenance-band { background: var(--gold); color: #2a2205; border-bottom: 2px solid var(--gold-d); }
.maintenance-band__inner { display: flex; align-items: center; gap: 14px; padding: 13px 20px; }
.maintenance-band__badge { font-size: 1.4rem; line-height: 1; flex: 0 0 auto; }
.maintenance-band p { margin: 0; font-size: 1rem; }
.maintenance-band a { color: var(--burgundy-d); font-weight: 700; text-decoration: underline; }

/* ---------- Hero ---------- */
.hero { background: linear-gradient(180deg, var(--paper) 0%, var(--paper-2) 100%); border-bottom: 1px solid var(--line); }
.hero__inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; padding: 64px 20px; }
.eyebrow { text-transform: uppercase; letter-spacing: .18em; font-size: .8rem; color: var(--gold-d); font-weight: 700; margin-bottom: .6em; }
.hero__text h1 { margin-bottom: .3em; }
.lead { font-size: 1.2rem; color: var(--ink-soft); }
.hero__search { display: flex; gap: 10px; margin: 1.6em 0 1em; flex-wrap: wrap; }
.hero__search input {
    flex: 1; min-width: 220px; border: 1px solid var(--line); border-radius: var(--radius);
    padding: .8em 1em; font-family: var(--font-body); font-size: 1.05rem; background: #fff;
}
.hero__search button { white-space: nowrap; background: var(--burgundy); color: #fff; border: 0; border-radius: var(--radius); padding: 0 1.4em; font-weight: 600; cursor: pointer; }
.hero__search button:hover { background: var(--burgundy-d); }
.hero__hint { font-size: .95rem; color: var(--ink-soft); }
.hero__media img { border-radius: var(--radius); box-shadow: var(--shadow); border: 6px solid #fff; }

/* Hero con imagen de fondo (cabecera de .com) y texto encima a la izquierda */
.hero--bg {
    background:
        linear-gradient(90deg, rgba(251,247,239,.97) 0%, rgba(251,247,239,.86) 36%, rgba(251,247,239,.40) 60%, rgba(251,247,239,.04) 100%),
        #eee url('/assets/img/hero-portada.webp') no-repeat right center;
    background-size: auto, cover;
    border-bottom: 1px solid var(--line);
}
.hero--bg .hero__inner { display: block; padding: 76px 20px; }
.hero--bg .hero__text { max-width: 620px; }
@media (max-width: 700px) {
    .hero--bg {
        background:
            linear-gradient(180deg, rgba(251,247,239,.93) 0%, rgba(251,247,239,.72) 100%),
            #eee url('/assets/img/hero-portada-mobile.webp') no-repeat center center;
        background-size: auto, cover;
    }
    .hero--bg .hero__inner { padding: 44px 20px; }
}

/* ---------- Secciones ---------- */
.section { padding: 56px 0; }
.section--muted { background: var(--paper-2); }
.section__title { text-align: center; margin-bottom: 1.2em; position: relative; }
.section__title::after { content: ""; display: block; width: 60px; height: 3px; background: var(--gold); margin: .4em auto 0; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.feature { text-align: center; padding: 8px; }
.feature__icon {
    width: 76px; height: 76px; margin: 0 auto 18px; display: flex; align-items: center; justify-content: center;
    color: var(--burgundy); background: var(--paper-2); border: 2px solid var(--gold); border-radius: 50%;
    box-shadow: var(--shadow-sm);
}
.feature__icon svg { width: 36px; height: 36px; }
.feature h3 { color: var(--burgundy); }

/* ---------- Productos ---------- */
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.product-grid--lg { grid-template-columns: repeat(2, 1fr); gap: 32px; }
.product-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); transition: box-shadow .15s ease, transform .1s ease; }
.product-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.product-card__link { display: block; padding: 0 0 18px; color: var(--ink); }
.product-card__link:hover { text-decoration: none; }
.product-card img { width: 100%; aspect-ratio: 4/3; object-fit: cover; background: var(--paper-2); }
.product-card h2, .product-card h3 { margin: 14px 18px 4px; }
.product-card__tagline { margin: 0 18px 8px; color: var(--ink-soft); font-size: .98rem; }
.product-card__meta { list-style: none; display: flex; gap: 10px; margin: 0 18px 8px; padding: 0; font-size: .82rem; }
.product-card__meta li { background: var(--paper-2); padding: 2px 9px; border-radius: 20px; color: var(--ink-soft); }
.product-card__price { margin: 6px 18px 12px; font-weight: 700; color: var(--burgundy); font-size: 1.1rem; }
.product-card .btn { margin: 0 18px; }

/* ---------- Ficha de producto ---------- */
.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.product-detail__media img { border-radius: var(--radius); border: 6px solid #fff; box-shadow: var(--shadow); width: 100%; aspect-ratio: 4/3; object-fit: cover; background: var(--paper-2); }
.product-detail__note { font-size: .85rem; color: var(--ink-soft); margin-top: 10px; text-align: center; }
.product-detail__desc { font-size: 1.1rem; color: var(--ink-soft); }

.config-group { border: 0; padding: 0; margin: 0 0 22px; }
.config-group legend { font-family: var(--font-title); font-size: 1.2rem; font-weight: 600; margin-bottom: 10px; padding: 0; }
.pills { display: flex; flex-wrap: wrap; gap: 10px; }
.pills--wide .pill { flex: 1; min-width: 200px; }
.pill { position: relative; }
.pill input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.pill span { display: block; text-align: center; padding: .55em 1.1em; border: 1.5px solid var(--line); border-radius: var(--radius); background: #fff; font-weight: 600; transition: all .12s ease; }
.pill input:checked + span { border-color: var(--burgundy); background: var(--burgundy); color: #fff; }
.pill input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }

.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 600; margin-bottom: 5px; }
.field input, .field textarea, .search-panel input {
    width: 100%; border: 1.5px solid var(--line); border-radius: var(--radius); padding: .6em .8em;
    font-family: var(--font-body); font-size: 1rem; background: #fff;
}
.field input:focus, .field textarea:focus { outline: 2px solid var(--gold); border-color: var(--gold); }
.field--hp { position: absolute; left: -9999px; }

.price-row { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px solid var(--line); padding-top: 16px; margin: 8px 0 18px; }
.price-row__amount { font-size: 1.6rem; color: var(--burgundy); font-family: var(--font-title); }
.pay-buttons { display: grid; gap: 12px; }
.pay-note { text-align: center; font-size: .85rem; color: var(--ink-soft); margin-top: 12px; }

/* ---------- Cabeceras de página ---------- */
.page-header { background: var(--paper-2); border-bottom: 1px solid var(--line); padding: 40px 0; }
.page-header--slim { padding: 18px 0; }
.page-header__lead { font-size: 1.15rem; color: var(--ink-soft); max-width: 720px; }
.breadcrumb { font-size: .9rem; color: var(--ink-soft); margin-bottom: 12px; }
.breadcrumb span[aria-hidden] { margin: 0 6px; color: var(--line); }

/* ---------- Buscador ---------- */
.search-panel { display: flex; gap: 12px; margin-bottom: 24px; flex-wrap: wrap; }
.search-panel input { flex: 1; min-width: 240px; font-size: 1.1rem; padding: .8em 1em; }
.search-msg { background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--gold); padding: 14px 18px; border-radius: var(--radius); }
.search-help { margin-top: 32px; }

/* ---------- Contacto ---------- */
.contact-layout { display: grid; grid-template-columns: 1fr 1.2fr; gap: 40px; align-items: start; }
.contact-methods { display: grid; gap: 16px; }
.contact-card { display: block; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm); color: var(--ink); }
.contact-card:hover { text-decoration: none; box-shadow: var(--shadow); border-color: var(--gold); }
.contact-card h2 { margin: 0 0 4px; color: var(--burgundy); }
.contact-card__cta { color: var(--gold-d); font-weight: 600; }
.contact-form-wrap { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.form-success { background: #eaf5ea; border-left: 4px solid var(--ok); padding: 14px 18px; border-radius: var(--radius); }
.form-error { background: #fdeede; border-left: 4px solid var(--warn); padding: 14px 18px; border-radius: var(--radius); }

/* ---------- Bandas / info ---------- */
.cta-band { background: var(--burgundy); color: #fff; }
.cta-band__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 40px 20px; flex-wrap: wrap; }
.cta-band h2 { color: #fff; margin: 0 0 .2em; }
.cta-band p { margin: 0; color: #f0e2d5; }

/* CTA a dos columnas: foto a sangre a la izquierda (altura completa), texto + botón a la derecha */
.cta-band--split { position: relative; overflow: hidden; }
.cta-band--split .cta-band__inner { display: block; padding-top: 0; padding-bottom: 0; min-height: 360px; }
.cta-band--split .cta-band__media { position: absolute; top: 0; bottom: 0; left: 0; width: 46%; margin: 0; }
.cta-band--split .cta-band__media img {
    width: 100%; height: 100%; object-fit: cover;
    border: 0; border-radius: 0; box-shadow: none; background: none;
}
.cta-band--split .cta-band__text { max-width: 520px; margin-left: auto; padding: 56px 0; }
.cta-band__text h2 { margin: 0 0 .3em; }
.cta-band__text p { margin: 0 0 1.3em; }
@media (max-width: 760px) {
    .cta-band--split .cta-band__inner { min-height: 0; }
    .cta-band--split .cta-band__media { position: static; width: auto; height: 220px; margin: 0 calc(50% - 50vw); }
    .cta-band--split .cta-band__text { max-width: none; margin: 0; padding: 32px 0; }
}
.info-strip { background: var(--paper-2); padding: 22px 0; text-align: center; color: var(--ink-soft); }

/* ---------- Prosa (legales, quiénes somos) ---------- */
.prose h2 { margin-top: 1.4em; color: var(--burgundy); }
.prose__cta { margin-top: 2em; }
.legal-draft { background: #fdeede; border-left: 4px solid var(--warn); padding: 12px 16px; border-radius: var(--radius); font-size: .95rem; }

/* ---------- Estados ---------- */
.status-page { text-align: center; }
.status-icon { width: 84px; height: 84px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 2.2rem; font-weight: 700; margin: 0 auto 20px; font-family: var(--font-title); }
.status-icon--ok { background: #eaf5ea; color: var(--ok); }
.status-icon--warn { background: #fdeede; color: var(--warn); font-size: 1.4rem; }
.status-page__actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.order-summary { background: var(--paper-2); border-radius: var(--radius); padding: 20px; margin: 24px 0; text-align: left; }
.error-list { text-align: left; display: inline-block; }
.muted { color: var(--ink-soft); }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #cdc6bb; margin-top: 40px; }
.site-footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; padding: 48px 20px 32px; }
.site-footer h3 { color: #fff; font-size: 1.1rem; margin: 0 0 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { color: #cdc6bb; }
.site-footer a:hover { color: #fff; }
.site-footer__logo { filter: brightness(0) invert(1); opacity: .92; margin-bottom: 14px; height: 30px; width: auto; }
.site-footer__about { font-size: .95rem; }
.site-footer__note { font-size: .82rem; color: #948d81; margin-top: 12px; }
.site-footer__bottom { border-top: 1px solid #33302b; font-size: .85rem; }
.site-footer__bottom p { margin: 0; padding: 16px 20px; text-align: center; color: #948d81; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .header__main { grid-template-columns: auto 1fr auto; }
    .header-search { order: 3; grid-column: 1 / -1; max-width: none; margin-top: 12px; }
    .nav-toggle { display: flex; }
    .nav-primary { display: none; }
    .nav-primary.is-open { display: block; }
    .nav-primary ul { flex-direction: column; }
    .nav-primary__ext { margin-left: 0; }
    .hero__inner { grid-template-columns: 1fr; gap: 28px; padding: 40px 20px; }
    .hero__media { order: -1; }
    .features, .product-grid, .product-grid--lg { grid-template-columns: 1fr 1fr; }
    .product-detail { grid-template-columns: 1fr; }
    .contact-layout { grid-template-columns: 1fr; }
    .site-footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
    body { font-size: 18px; }
    .features, .product-grid, .product-grid--lg { grid-template-columns: 1fr; }
    .site-footer__grid { grid-template-columns: 1fr; }
    .topbar__inner { justify-content: center; gap: 16px; }
}
