/* anuncios.dashestate.mx — catálogo y ficha, sobre style.css del sitio */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.an { padding: 120px var(--gutter) 0; max-width: 1360px; margin: 0 auto; }
.an-loading, .an-empty { list-style: none; padding: 80px 0; text-align: center; color: var(--tezontle-soft); grid-column: 1 / -1; }

/* Encabezado del catálogo */
.an-hero { max-width: 40rem; padding: 4vh 0 5vh; }
.an-eyebrow { font-size: .8rem; letter-spacing: .18em; text-transform: uppercase; color: var(--laton); margin-bottom: 1rem; }
.an-hero h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); line-height: 1.04; }
.an-hero p:last-child { margin-top: 1.2rem; color: var(--tezontle-soft); max-width: var(--measure); }

/* Filtros */
.an-filters { display: flex; flex-wrap: wrap; gap: 14px 20px; align-items: center; justify-content: space-between; padding: 18px 0; border-top: 1px solid var(--cal-deep); border-bottom: 1px solid var(--cal-deep); margin-bottom: 48px; }
.an-chips { display: flex; gap: 8px; }
.an-chips button { font: inherit; font-size: .92rem; color: inherit; background: none; border: 1px solid rgba(59, 42, 40, .25); border-radius: 999px; padding: .5em 1.2em; cursor: pointer; transition: background-color .3s, color .3s; }
.an-chips button[aria-pressed="true"] { background: var(--tezontle); border-color: var(--tezontle); color: var(--cal); }
.an-select select { font: inherit; font-size: .92rem; color: inherit; background: transparent; border: 0; border-bottom: 1px solid var(--laton); padding: .4em 1.6em .4em 0; cursor: pointer; appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(-45deg, transparent 50%, currentColor 50%);
  background-position: right 6px center, right 1px center; background-size: 5px 5px; background-repeat: no-repeat; }

/* Tarjetas: la foto bajo un arco, como la fachada */
.an-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 56px clamp(20px, 3vw, 40px); }
.an-card { display: block; text-decoration: none; }
.an-card figure { position: relative; aspect-ratio: 4 / 5; overflow: hidden; border-radius: 50% 50% 0 0 / 30% 30% 0 0; background: var(--cal-deep); }
.an-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.an-card:hover img { transform: scale(1.04); }
.an-flag { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); background: var(--cal); color: var(--tezontle); font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; padding: .5em 1.1em; border-radius: 999px; }
.an-meta { margin-top: 1.1rem; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--laton); }
.an-card h2 { margin-top: .45rem; font-size: 1.6rem; line-height: 1.15; }
.an-specs { margin-top: .5rem; font-size: .92rem; color: var(--tezontle-soft); display: flex; flex-wrap: wrap; align-items: center; gap: 0 .7em; }
.an-specs i { width: 3px; height: 3px; border-radius: 50%; background: var(--laton); }
.an-price { margin-top: .6rem; font-family: var(--serif); font-size: 1.2rem; }

.an-cta { text-align: center; padding: 18vh 0 16vh; }
.an-cta h2 { font-size: clamp(2rem, 4.5vw, 3.2rem); }
.an-cta p { margin: 1rem auto 2rem; color: var(--tezontle-soft); max-width: var(--measure); }

/* ---------- Ficha ---------- */
.an-back { margin: 0 0 24px; font-size: .95rem; }
.an-gallery { position: relative; display: grid; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: repeat(2, minmax(0, 1fr)); gap: 10px; height: min(72vh, 680px); }
.an-gallery button { padding: 0; border: 0; background: var(--cal-deep); cursor: zoom-in; overflow: hidden; min-height: 0; }
.an-gallery button:first-child { grid-row: 1 / 3; border-radius: 50% 50% 0 0 / 22% 22% 0 0; }
.an-gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.an-gallery button:hover img { transform: scale(1.03); }
.an-gallery.is-few { grid-template-columns: 2fr 1fr; }
.an-gallery.is-few button:only-child { grid-column: 1 / -1; }
.an-more { position: absolute; right: 14px; bottom: 14px; background: var(--cal); padding: .5em 1em; border-radius: 999px; font-size: .88rem; cursor: pointer; }

.an-body { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: clamp(40px, 6vw, 96px); padding: 56px 0 14vh; }
.an-main h1 { margin-top: .5rem; font-size: clamp(2.4rem, 5vw, 4rem); line-height: 1.05; }
.an-lead { margin-top: 1.2rem; font-size: 1.2rem; max-width: 36rem; }
.an-facts { list-style: none; padding: 22px 0; margin: 32px 0; display: flex; flex-wrap: wrap; gap: 12px 36px; border-top: 1px solid var(--cal-deep); border-bottom: 1px solid var(--cal-deep); }
.an-facts li { font-family: var(--serif); font-size: 1.15rem; }
.an-text { max-width: var(--measure); }
.an-text p + p { margin-top: 1.1em; }
.an-main h2 { margin: 48px 0 18px; font-size: 1.7rem; }
.an-amen { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px 28px; }
.an-amen li { display: flex; gap: 12px; align-items: baseline; }
.an-amen li::before { content: ""; flex: none; width: 7px; height: 7px; transform: rotate(45deg) translateY(-2px); background: var(--laton); }
.an-side { position: sticky; top: 110px; align-self: start; display: grid; gap: 12px; padding: 32px 28px; background: var(--cal-deep); border-radius: 170px 170px 0 0 / 70px 70px 0 0; text-align: center; }
.an-side .an-price { margin: 0 0 12px; font-size: 1.7rem; }
.an-side .button { text-align: center; }
.an-note { margin-top: 6px; font-size: .88rem; color: var(--tezontle-soft); }
.an-flag--inline { position: static; transform: none; justify-self: center; background: var(--tezontle); color: var(--cal); }

/* Visor */
.an-lightbox { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(28, 20, 19, .96); color: var(--cal); }
.an-lightbox[open] { display: grid; place-items: center; }
.an-lightbox::backdrop { background: rgba(28, 20, 19, .96); }
.an-lightbox img { max-width: min(92vw, 1600px); max-height: 84dvh; object-fit: contain; }
.an-lightbox button { position: absolute; background: none; border: 0; color: inherit; font-size: 2.6rem; line-height: 1; width: 56px; height: 56px; cursor: pointer; }
.an-lb-close { top: 12px; right: 12px; }
.an-lb-prev { left: 8px; top: 50%; transform: translateY(-50%); }
.an-lb-next { right: 8px; top: 50%; transform: translateY(-50%); }
.an-sticky { display: none; }
.an-lb-count { position: absolute; bottom: 18px; left: 0; right: 0; text-align: center; font-size: .9rem; opacity: .7; }

@media (max-width: 860px) {
  .an { padding-top: 96px; }
  .an-filters { position: sticky; top: 72px; z-index: 5; background: var(--cal); margin: 0 calc(-1 * var(--gutter)) 36px; padding: 12px var(--gutter); }
  .an-gallery { display: flex; height: auto; margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .an-gallery button { flex: 0 0 84%; aspect-ratio: 4 / 5; scroll-snap-align: center; }
  .an-gallery button:first-child { border-radius: 50% 50% 0 0 / 30% 30% 0 0; }
  .an-gallery.is-few button:only-child { flex-basis: 100%; }
  .an-more { position: static; flex: none; align-self: center; margin-left: 4px; }
  .an-body { grid-template-columns: 1fr; padding-top: 32px; }
  .an-side { position: static; }
  .an-item { padding-bottom: 76px; }
  .an-sticky { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom)); background: rgba(243, 239, 236, .95); backdrop-filter: blur(8px); border-top: 1px solid var(--cal-deep); }
  .an-sticky span { font-family: var(--serif); font-size: 1.1rem; }
  .an-sticky .button { padding: .85em 1.5em; }
}
