/* =====================================================================
   HANNIA HOME (S00032) — components.css
   Componentes reutilizables: botones, header/nav, cards, galería con lightbox, cabecera interior, barra móvil, footer, modal demo.
   Estándar WEB AranduCAD: main.css (tokens, base, layout) · components.css (componentes) · pages/*.css (por página).
   ===================================================================== */

/* ---------- Botones ---------- */
.btn {
  --btn-bg: var(--brass); --btn-fg: var(--brass-ink); --btn-bd: transparent;
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  min-height: 48px; padding: .8rem 1.5rem; border-radius: var(--radius-pill);
  background: var(--btn-bg); color: var(--btn-fg); border: 1px solid var(--btn-bd);
  font-weight: 700; font-size: .95rem; letter-spacing: .01em; white-space: nowrap;
  transition: transform .25s var(--ease), background .25s, color .25s, border-color .25s, box-shadow .25s;
}
.btn:hover { transform: translateY(-2px); background: var(--brass-2); box-shadow: 0 12px 30px -12px rgba(245, 100, 0, .6); }
.btn:active { transform: translateY(0); }
.btn--secondary { --btn-bg: transparent; --btn-fg: var(--bone); --btn-bd: rgba(251, 246, 239, .35); }
.btn--secondary:hover { background: rgba(251, 246, 239, .08); box-shadow: none; border-color: var(--bone); }
.theme-light .btn--secondary { --btn-fg: var(--ink); --btn-bd: rgba(23, 18, 15, .3); }
.theme-light .btn--secondary:hover { background: rgba(23, 18, 15, .06); border-color: var(--ink); }
.btn--ghost { --btn-bg: transparent; --btn-fg: var(--brass-2); padding-inline: .5rem; min-height: 40px; }
.btn--ghost:hover { background: transparent; box-shadow: none; transform: none; text-decoration: underline; text-underline-offset: 4px; }
.btn--wa { --btn-bg: #25d366; --btn-fg: #06301a; }
.btn--wa:hover { background: #3ee07a; box-shadow: 0 12px 30px -12px rgba(37, 211, 102, .6); }
.btn--sm { min-height: 40px; padding: .5rem 1.1rem; font-size: .88rem; }
.btn--block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; pointer-events: none; }
.btn .ico { width: 18px; height: 18px; flex: none; }
.link-arrow { display: inline-flex; align-items: center; gap: .4rem; font-weight: 700; color: var(--brass-2); }
.link-arrow::after { content: '→'; transition: transform .25s var(--ease); }
.link-arrow:hover::after { transform: translateX(4px); }
.theme-light .link-arrow { color: #b34700; }

/* ---------- Header / nav ---------- */
.header {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--nav-h);
  display: flex; align-items: center;
  background: linear-gradient(to bottom, rgba(23, 18, 15, .85), rgba(23, 18, 15, 0));
  transition: background .3s, backdrop-filter .3s, box-shadow .3s;
}
.header.is-solid { background: rgba(23, 18, 15, .88); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 1px 0 var(--line); }
.header__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.logo { display: inline-flex; align-items: center; }
.logo img { display: block; height: 28px; width: auto; }
.footer .logo img { height: 26px; }
.nav { display: none; }
.nav__list { display: flex; gap: .25rem; }
.nav__link { display: inline-block; padding: .55rem .9rem; border-radius: var(--radius-pill); font-weight: 600; font-size: .92rem; color: var(--bone-2); transition: background .2s, color .2s; }
.nav__link:hover { background: rgba(251, 246, 239, .08); color: var(--bone); }
.nav__link[aria-current="page"] { color: var(--brass-2); }
.header__cta { display: none; }
.burger { display: inline-flex; flex-direction: column; justify-content: center; gap: 5px; width: 44px; height: 44px; align-items: center; border-radius: var(--radius-pill); border: 1px solid var(--line); }
.burger span { width: 20px; height: 2px; background: var(--bone); border-radius: 2px; transition: transform .3s var(--ease), opacity .2s; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
@media (min-width: 900px) {
  .nav, .header__cta { display: block; }
  .burger { display: none; }
}

/* Drawer móvil */
.drawer { position: fixed; inset: 0; z-index: 49; background: rgba(15, 12, 10, .98); padding: calc(var(--nav-h) + 1rem) var(--gutter) 2rem; display: grid; align-content: space-between; transform: translateX(100%); transition: transform .4s var(--ease); }
.drawer.is-open { transform: none; }
.drawer__list { display: grid; gap: .25rem; }
.drawer__link { display: block; padding: .9rem 0; font-family: var(--font-display); font-size: 2rem; border-bottom: 1px solid var(--line); }
.drawer__link[aria-current="page"] { color: var(--brass-2); }
.drawer__foot { display: grid; gap: .75rem; }
body.drawer-open { overflow: hidden; }

/* ---------- Cards ---------- */
.card { background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform .35s var(--ease), border-color .3s, box-shadow .35s; }
.card:hover { transform: translateY(-4px); border-color: rgba(245, 100, 0, .45); box-shadow: var(--shadow); }
.card__body { padding: 1.25rem 1.35rem 1.4rem; display: grid; gap: .6rem; }
.theme-light .card { background: #fff; border-color: var(--line-dark); }

/* Chips */
.chip { display: inline-flex; align-items: center; gap: .4rem; padding: .35rem .75rem; border-radius: var(--radius-pill); border: 1px solid var(--line); font-size: .8rem; font-weight: 600; color: var(--bone-2); background: rgba(251, 246, 239, .04); }
.chip--brass { border-color: rgba(245, 100, 0, .5); color: var(--brass-2); background: rgba(245, 100, 0, .1); }
.theme-light .chip { border-color: var(--line-dark); color: var(--ink); background: rgba(23, 18, 15, .04); }
.chip-toggle { padding: .55rem 1rem; border-radius: var(--radius-pill); border: 1px solid var(--line); font-weight: 600; font-size: .9rem; color: var(--bone-2); transition: background .2s, color .2s, border-color .2s; }
.chip-toggle:hover { border-color: var(--bone-3); color: var(--bone); }
.chip-toggle[aria-pressed="true"], .chip-toggle.is-active { background: var(--brass); color: var(--brass-ink); border-color: var(--brass); }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 5.5rem; transform: translate(-50%, 20px); z-index: 80; background: var(--bone); color: var(--ink); padding: .8rem 1.2rem; border-radius: var(--radius-pill); font-weight: 700; font-size: .9rem; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: opacity .3s, transform .3s var(--ease); }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Barra móvil fija ---------- */
.mobile-bar { position: fixed; inset: auto 0 0 0; z-index: 45; display: grid; grid-template-columns: 1fr auto; gap: .6rem; padding: .7rem var(--gutter) calc(.7rem + env(safe-area-inset-bottom)); background: rgba(15, 12, 10, .92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid var(--line); transform: translateY(110%); transition: transform .35s var(--ease); }
.mobile-bar.is-visible { transform: none; }
.mobile-bar .btn--wa { padding-inline: .9rem; }
@media (min-width: 900px) { .mobile-bar { display: none; } }
body.has-mobile-bar { padding-bottom: 0; }

/* ---------- Footer ---------- */
.footer { background: #0f0c0a; border-top: 1px solid var(--line); padding: clamp(3rem, 6vw, 5rem) 0 calc(2rem + 76px); }
@media (min-width: 900px) { .footer { padding-bottom: 2rem; } }
.footer__grid { display: grid; gap: 2.5rem; }
@media (min-width: 760px) { .footer__grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.footer h4 { font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 1rem; }
.footer__list { display: grid; gap: .55rem; }
.footer__list a:hover { color: var(--brass-2); }
.footer__bottom { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: .75rem; font-size: .82rem; color: var(--muted); }
.footer__bottom a:hover { color: var(--bone); }

/* ---------- Modo demostración: simulación de acciones externas ---------- */
.demo-modal { position: fixed; inset: 0; z-index: 95; display: grid; place-items: center; padding: var(--gutter); background: rgba(15, 12, 10, .78); backdrop-filter: blur(6px); opacity: 0; pointer-events: none; transition: opacity .25s; }
.demo-modal.is-open { opacity: 1; pointer-events: auto; }
.demo-modal__card { width: min(560px, 100%); display: grid; gap: .9rem; padding: 1.6rem 1.5rem; border-radius: var(--radius); background: var(--ink-2); border: 1px solid var(--line); box-shadow: var(--shadow); color: var(--bone); transform: translateY(12px); transition: transform .3s var(--ease); }
.demo-modal.is-open .demo-modal__card { transform: none; }
.demo-modal__card h3 { font-size: 1.4rem; }
.demo-modal__lead { color: var(--bone-2); }
.demo-modal__detail { font-size: .85rem; }
.map-demo { position: absolute; inset: 0; z-index: 2; display: grid; place-content: center; justify-items: center; gap: .6rem; padding: 1.5rem; text-align: center; background: linear-gradient(rgba(23, 18, 15, .35), rgba(23, 18, 15, .75)); color: var(--bone-2); font-size: .95rem; }
.map-demo p { max-width: 32ch; }
.demo-modal [hidden] { display: none !important; }

/* ---------- GALERÍA ---------- */
.gallery-filters { display: flex; flex-wrap: wrap; gap: .5rem; }
.gallery { display: grid; gap: .75rem; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 700px) { .gallery { grid-template-columns: repeat(3, 1fr); gap: 1rem; } }
.gallery__item { position: relative; overflow: hidden; border-radius: var(--radius-sm); aspect-ratio: 4 / 3; background: var(--ink-3); cursor: zoom-in; transition: opacity .4s, transform .4s var(--ease); }
.gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.gallery__item:hover img { transform: scale(1.05); }
.gallery__item.is-hidden { display: none; }
.gallery__cap { position: absolute; inset: auto 0 0 0; padding: 2.5rem .9rem .8rem; background: linear-gradient(to top, rgba(15, 12, 10, .85), transparent); font-size: .8rem; font-weight: 600; opacity: 0; transform: translateY(6px); transition: opacity .3s, transform .3s var(--ease); }
.gallery__item:hover .gallery__cap, .gallery__item:focus-visible .gallery__cap { opacity: 1; transform: none; }
/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 90; background: rgba(15, 12, 10, .96); display: grid; grid-template-rows: auto 1fr auto; opacity: 0; pointer-events: none; transition: opacity .3s; }
.lightbox.is-open { opacity: 1; pointer-events: auto; }
.lightbox__bar { display: flex; justify-content: space-between; align-items: center; padding: 1rem var(--gutter); }
.lightbox__stage { display: grid; place-items: center; padding: 0 var(--gutter); min-height: 0; }
.lightbox__stage img { max-height: 100%; max-width: 100%; height: 72vh; width: auto; object-fit: contain; border-radius: var(--radius-sm); box-shadow: var(--shadow); }
.lightbox__foot { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem var(--gutter) calc(1rem + env(safe-area-inset-bottom)); }
.lightbox__cap { font-size: .9rem; color: var(--bone-2); }
.lightbox__nav { display: flex; gap: .5rem; }
.icon-btn { width: 44px; height: 44px; display: inline-grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); background: rgba(251, 246, 239, .05); transition: background .2s, border-color .2s; }
.icon-btn:hover { background: rgba(251, 246, 239, .12); border-color: var(--bone-3); }
.icon-btn svg { width: 20px; height: 20px; }
body.lightbox-open { overflow: hidden; }

/* ---------- PÁGINA: cabecera interior ---------- */
.page-head { padding: calc(var(--nav-h) + clamp(3rem, 8vw, 6rem)) 0 clamp(2rem, 5vw, 3.5rem); display: grid; gap: 1rem; }
.page-head .lead { max-width: 55ch; }

/* ---------- Barra móvil: un solo botón (WhatsApp) ---------- */
.mobile-bar { grid-template-columns: 1fr; }
.mobile-bar .btn--wa { padding-inline: 1.2rem; }

/* ---------- Tarjetas de rubro (inicio) ---------- */
.tiles { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .tiles { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .tiles { grid-template-columns: repeat(6, 1fr); } .tile { grid-column: span 2; } .tile:nth-child(4) { grid-column: 2 / span 2; } .tile:nth-child(5) { grid-column: 4 / span 2; } }
.tile { display: grid; grid-template-rows: auto 1fr; background: #fff; border: 1px solid var(--line-dark); border-radius: var(--radius); overflow: hidden; color: var(--ink); transition: transform .35s var(--ease), box-shadow .35s, border-color .3s; }
.tile:hover { transform: translateY(-4px); border-color: rgba(245, 100, 0, .5); box-shadow: 0 22px 40px -22px rgba(23, 18, 15, .45); }
.tile__media { aspect-ratio: 4 / 3; overflow: hidden; background: var(--bone-2); }
.tile__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.tile:hover .tile__media img { transform: scale(1.05); }
.tile__body { padding: 1.2rem 1.3rem 1.4rem; display: grid; gap: .5rem; align-content: start; }
.tile__body h3 { font-size: 1.25rem; }
.tile__body p { color: var(--muted-2); font-size: .95rem; }

/* ---------- Bloques de contenido (páginas interiores) ---------- */
.block { display: grid; gap: clamp(1.75rem, 4vw, 3rem); scroll-margin-top: calc(var(--nav-h) + 1.5rem); }
@media (min-width: 960px) { .block { grid-template-columns: 1fr 1.1fr; align-items: start; } .block--flip .block__text { order: 2; } }
.block__text { display: grid; gap: 1rem; align-content: start; }
.block__text p { max-width: 60ch; color: var(--muted); }
.theme-light .block__text p { color: var(--muted-2); }
.block__aside { display: grid; gap: .9rem; }
.block + .block { margin-top: clamp(3.5rem, 8vw, 6rem); }

.checks { display: grid; gap: .6rem; margin-top: .25rem; }
.checks li { position: relative; padding-left: 1.7rem; max-width: 60ch; }
.checks li::before { content: ''; position: absolute; left: 0; top: .55em; width: .8rem; height: .45rem; border-left: 2px solid var(--brass); border-bottom: 2px solid var(--brass); transform: rotate(-45deg); }

.figs { display: grid; gap: .75rem; grid-template-columns: repeat(2, 1fr); }
.figs--3 { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 700px) { .figs--3 { grid-template-columns: repeat(3, 1fr); } }
.figs figure { overflow: hidden; border-radius: var(--radius-sm); background: var(--bone-2); aspect-ratio: 4 / 3; }
.figs figure.is-wide { grid-column: span 2; aspect-ratio: 16 / 9; }
.figs img { width: 100%; height: 100%; object-fit: cover; }

/* Lista de productos: texto + foto */
.prods { display: grid; gap: 1.25rem; }
@media (min-width: 820px) { .prods { grid-template-columns: repeat(2, 1fr); } }
.prod { display: grid; grid-template-rows: auto 1fr; border-radius: var(--radius); overflow: hidden; background: var(--ink-2); border: 1px solid var(--line); }
.prod__media { aspect-ratio: 16 / 10; overflow: hidden; background: var(--ink-3); }
.prod__media img { width: 100%; height: 100%; object-fit: cover; }
.prod__body { padding: 1.3rem 1.4rem 1.5rem; display: grid; gap: .75rem; align-content: start; }
.prod__body p { color: var(--muted); font-size: .95rem; }
.prod__opts { display: flex; flex-wrap: wrap; gap: .45rem; }
.theme-light .prod { background: #fff; border-color: var(--line-dark); }
.theme-light .prod__body p { color: var(--muted-2); }

/* Cama, mesa y baño */
.home-items { display: grid; gap: 1rem; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 700px) { .home-items { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1000px) { .home-items { grid-template-columns: repeat(6, 1fr); } }
.home-item { display: grid; gap: .6rem; text-align: center; font-weight: 700; }
.home-item img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius-sm); background: #fff; border: 1px solid var(--line-dark); }

/* Contacto */
.contact-cards { display: grid; gap: 1.25rem; }
@media (min-width: 760px) { .contact-cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .contact-cards { grid-template-columns: repeat(4, 1fr); } }
.contact-card { display: grid; gap: .6rem; align-content: start; padding: 1.4rem 1.4rem 1.5rem; border-radius: var(--radius); background: #fff; border: 1px solid var(--line-dark); color: var(--ink); }
.contact-card h3 { font-size: 1.1rem; letter-spacing: -.01em; }
.contact-card p, .contact-card li { color: var(--muted-2); font-size: .97rem; }
.contact-card a { font-weight: 700; color: #b34700; }
.contact-card a:hover { text-decoration: underline; text-underline-offset: 3px; }
.contact-card ul { display: grid; gap: .35rem; }
.contact-card .btn { margin-top: .4rem; justify-self: start; }
.contact-card .btn--wa { color: #06301a; }
.map { position: relative; border-radius: var(--radius); overflow: hidden; min-height: 320px; background: var(--ink-3); border: 1px solid var(--line); }
.map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.history { display: grid; gap: clamp(2rem, 5vw, 4rem); }
@media (min-width: 960px) { .history { grid-template-columns: 1.1fr .9fr; align-items: start; } }
.history__text { display: grid; gap: 1.1rem; }
.history__text p { max-width: 62ch; color: var(--muted); }
.history__media { border-radius: var(--radius); overflow: hidden; }
.history__media img { width: 100%; height: auto; }

/* Banda final */
.cta-band { position: relative; overflow: hidden; border-radius: var(--radius); padding: clamp(2.5rem, 6vw, 4.5rem) clamp(1.5rem, 5vw, 4rem); background: var(--ink-2); border: 1px solid var(--line); display: grid; gap: 1.5rem; }
.cta-band::after { content: ''; position: absolute; right: -10%; top: -40%; width: 60%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(245, 100, 0, .2), transparent 65%); pointer-events: none; }
@media (min-width: 900px) { .cta-band { grid-template-columns: 1fr auto; align-items: center; } }
.cta-band .btn { position: relative; z-index: 1; }

/* Galería: fotos horizontales */
.gallery__item { aspect-ratio: 4 / 3; }
.gallery-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.gallery-head .muted { font-size: .9rem; }

/* Logo (PNG con transparencia, proporción casi cuadrada) */
.header .logo img { height: 52px; width: auto; }
.footer .logo img { height: 84px; width: auto; }
@media (min-width: 900px) { .header .logo img { height: 58px; } }
