:root {
  --red: #b92c32;
  --red-dark: #a4242b;
  --ink: #2f2e2e;
  --muted: #747474;
  --line: #ece7e2;
  --green: #04ad5d;
  --cream: #fff8f1;
}

* { box-sizing: border-box; }
html { background: #9d2727; }
body { margin: 0; color: var(--ink); background: #9d2727; font-family: Arial, Helvetica, sans-serif; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

.page-shell { width: min(100%, 680px); margin: 0 auto; background: #9d2727; min-height: 100vh; overflow: hidden; }
.hero { position: relative; height: 220px; overflow: hidden; background: #bcbcbc; }
.hero-image { width: 100%; height: 100%; object-fit: cover; object-position: 52% center; }
.top-logo-slot { position: relative; z-index: 2; height: 0; }
.hero-logo-wrap { position: absolute; top: 0; left: 50%; z-index: 2; width: 220px; transform: translate(-50%, -80%); }
.hero-logo { width: 100%; }
.intro { position: relative; padding: 34px 20px 18px; text-align: center; background: #373535; color: #fff; }
.intro-copy { position: relative; z-index: 1; }
.intro h1 { margin: 0; font-size: clamp(1.25rem, 4.6vw, 1.75rem); line-height: 1.12; }
.intro p { margin: 8px 0 0; color: #f2dede; font-size: .9rem; }
.red-panel { padding: 22px 20px 20px; background: var(--red); }
.section-kicker { margin: 0 0 14px; color: #fff; font-size: .75rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; opacity: .85; }
.flyer-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.flyer-card { position: relative; display: flex; min-height: 86px; align-items: center; gap: 12px; padding: 12px 13px; border: 2px solid rgba(255, 255, 255, .95); border-radius: 13px; color: #fff; transition: transform .15s ease, background .15s ease; }
.flyer-card:hover, .flyer-card:focus-visible { background: rgba(255,255,255,.1); transform: translateY(-1px); }
.flyer-card.is-empty { opacity: .75; }
.flyer-icon { display: grid; width: 48px; height: 48px; flex: 0 0 48px; place-items: center; }
.flyer-icon img { width: 100%; height: 100%; object-fit: contain; }
.icon-placeholder { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 50%; background: #aaa; color: #fff; font-size: 1.8rem; }
.flyer-name { max-width: 135px; font-size: clamp(.92rem, 3.9vw, 1.15rem); font-weight: 700; line-height: 1.05; }
.flyer-status { position: absolute; right: 10px; bottom: 7px; font-size: .58rem; text-transform: uppercase; letter-spacing: .05em; }
.app-promo { position: relative; display: flex; height: 190px; min-height: 190px; align-items: flex-end; margin-top: 22px; overflow: hidden; border-radius: 13px; background: var(--red); }
.app-promo-body { display: flex; width: 100%; height: 85%; align-items: center; margin-top: auto; border-radius: 13px; background: #fff; }
.phone-image { position: absolute; left: 0; bottom: 0; z-index: 2; width: 36%; height: 100%; max-height: none; object-fit: contain; object-position: left bottom; }
.app-copy { width: 64%; margin-left: 36%; padding: 8px 10px 8px 0; }
.app-copy p { margin: 5px 0; font-size: .82rem; line-height: 1.2; }
.app-copy .app-title { font-size: 1rem; }
.app-title strong { color: var(--red); font-size: 1.22rem; }
.store-links { display: flex; flex-direction: row; align-items: center; flex-wrap: nowrap; gap: 6px; margin-top: 8px; }
.store-badge-link { display: block; flex: 1 1 0; width: min(100%, 118px); max-width: 118px; }
.store-badge-link img { width: 100%; height: auto; }
.stores-section { padding: 22px 20px 17px; background: #fff; }
.eyebrow { margin: 0; color: var(--red); font-size: .68rem; font-weight: 800; letter-spacing: .1em; }
.stores-section h2 { margin: 2px 0 13px; font-size: 1.36rem; }
.store-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.store-card { display: block; width: 100%; margin: 0; padding: 0; overflow: hidden; border: 0; border-radius: 10px; appearance: none; background: var(--red); color: #fff; cursor: pointer; font: inherit; line-height: normal; text-align: left; }
.store-card:focus-visible { outline: 3px solid #1d1d1d; outline-offset: 2px; }
.store-card img, .store-photo-placeholder { display: block; width: 100%; height: 58px; object-fit: cover; background: #bdbdbd; }
.store-card-info { display: flex; min-height: 43px; flex-direction: column; justify-content: center; padding: 5px 6px; }
.store-card-info strong { font-size: .63rem; line-height: 1.1; }
.store-card-info small { margin-top: 2px; font-size: .51rem; }
.store-modal { width: min(90vw, 390px); max-height: 88vh; padding: 0; overflow: hidden; border: 0; border-radius: 16px; color: var(--ink); background: #fff; box-shadow: 0 18px 60px rgba(0,0,0,.32); }
.store-modal::backdrop { background: rgba(0,0,0,.58); }
.store-modal-panel { display: flex; max-height: 88vh; flex-direction: column; background: #fff; }
.store-modal-header { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 108px; gap: 12px; min-height: 130px; padding: 18px 20px 14px; }
.store-modal-heading { min-width: 0; padding-top: 3px; }
.store-modal-close-form { position: absolute; top: 12px; right: 12px; z-index: 2; }
.store-modal-close { display: grid; width: 32px; height: 32px; place-items: center; border: 0; border-radius: 50%; background: #f1eeee; color: var(--ink); cursor: pointer; font-size: 1.4rem; line-height: 1; }
.store-modal-image { grid-column: 2; grid-row: 1; width: 108px; min-height: 98px; overflow: hidden; align-self: stretch; border-radius: 10px; background: #bdbdbd; }
.store-modal-image img, .store-modal-image .store-photo-placeholder { display: block; width: 100%; height: 100%; object-fit: cover; }
.store-modal h3 { margin: 0 0 8px; padding-right: 38px; color: var(--red); font-size: 1.45rem; line-height: 1.08; }
.store-modal-city { margin: 0 0 8px; font-size: .76rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.store-modal-address { margin: 0; color: var(--muted); font-size: .86rem; line-height: 1.3; }
.store-modal-body { overflow-y: auto; padding: 0 20px 18px; }
.store-modal-phones { display: grid; gap: 9px; margin: 0; padding: 0; list-style: none; }
.store-modal-phones li { display: flex; align-items: center; gap: 8px; min-height: 24px; font-size: .88rem; }
.store-modal-phone-icon, .store-modal-map-icon { display: inline-grid; width: 22px; height: 22px; flex: 0 0 22px; place-items: center; border-radius: 50%; background: var(--red); color: #fff; font-size: .78rem; }
.store-modal-phone-label { color: var(--muted); font-size: .74rem; }
.store-modal-phones a { color: var(--ink); font-weight: 700; }
.store-modal-divider { margin: 18px 0; border: 0; border-top: 1px solid var(--line); }
.store-modal-hours-section h4 { margin: 0 0 8px; color: var(--red); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; }
.store-modal-hours { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; font-size: .84rem; line-height: 1.35; }
.store-modal-hours li { display: grid; grid-template-columns: minmax(0, 1fr) 122px; gap: 20px; align-items: center; }
.store-modal-hours li span { color: var(--muted); }
.store-modal-hours li strong { color: var(--ink); font-size: .82rem; font-weight: 700; text-align: left; white-space: nowrap; }
.store-modal-footer { display: flex; justify-content: center; padding: 14px 20px 20px; border-top: 1px solid var(--line); background: #fff; }
.store-modal-map { display: inline-flex; min-height: 40px; align-items: center; justify-content: center; gap: 8px; padding: 0 16px; border-radius: 6px; background: var(--red); color: #fff; font-size: .78rem; font-weight: 700; }
.store-modal-map-icon { width: 22px; height: 22px; flex-basis: 22px; border-radius: 0; background: transparent; object-fit: contain; }
.offers-section { padding: 20px; background: #fff; }
.offers-banner { display: flex; min-height: 70px; align-items: center; gap: 9px; margin: 0; padding: 10px 11px; border-radius: 4px; background: var(--green); color: #fff; }
.whatsapp-mark { display: grid; width: 48px; height: 48px; flex: 0 0 48px; place-items: center; border: 3px solid #fff; border-radius: 50%; }
.whatsapp-mark img { width: 75%; height: 75%; object-fit: contain; }
.offers-banner span:nth-child(2) { display: flex; min-width: 0; flex: 1; flex-direction: column; }
.offers-banner strong { font-size: .83rem; line-height: 1.1; }
.offers-banner small { margin-top: 3px; font-size: .63rem; line-height: 1.1; }
.offers-action { padding: 7px 8px; border: 1px solid #fff; border-radius: 4px; font-size: .63rem; font-weight: 700; white-space: nowrap; }
.footer-brand { display: grid; grid-template-columns: 1fr 1.7fr; grid-template-rows: minmax(0, 1fr); height: 130px; min-height: 130px; max-height: 130px; overflow: hidden; background: var(--red); color: #fff; }
.footer-brand > img { width: 100%; height: 100%; min-width: 0; min-height: 0; object-fit: cover; object-position: center; background: var(--red); }
.footer-copy { display: flex; min-width: 0; min-height: 0; flex-direction: column; justify-content: center; align-items: center; gap: 6px; overflow: hidden; padding: 10px; text-align: center; }
.footer-copy img { width: 105px; height: auto; }
.footer-copy strong { color: #fff; font-size: .65rem; }

.viewer-page { background: #1d1d1d; }
.viewer-shell { width: min(100%, 900px); min-height: 100vh; margin: 0 auto; background: #fff; }
.viewer-header, .simple-header { display: flex; min-height: 74px; align-items: center; gap: 16px; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.viewer-header > div { min-width: 0; flex: 1; }
.viewer-header h1, .simple-header h1 { margin: 3px 0 0; overflow: hidden; font-size: 1.05rem; text-overflow: ellipsis; white-space: nowrap; }
.viewer-category { color: var(--red); font-size: .66rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.back-link { color: var(--red); font-size: .78rem; font-weight: 700; white-space: nowrap; }
.download-button, .mobile-download { display: inline-flex; align-items: center; justify-content: center; border-radius: 6px; background: var(--red); color: #fff; font-size: .72rem; font-weight: 700; white-space: nowrap; }
.download-button { min-height: 36px; padding: 0 11px; }
.pdf-frame { height: calc(100vh - 74px); min-height: 520px; background: #444; }
.pdf-frame iframe { width: 100%; height: 100%; border: 0; }
.mobile-download { display: none; margin: 14px 18px 18px; min-height: 43px; }
.category-shell { min-height: 100vh; }
.simple-header { justify-content: flex-start; }
.simple-header h1 { flex: 1; }
.flyer-list { padding: 22px 18px; }
.flyer-list > p { margin: 0 0 14px; color: var(--muted); font-size: .9rem; }
.flyer-list-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; padding: 15px; border: 1px solid var(--line); border-radius: 10px; }
.flyer-list-item span:first-child { display: flex; flex-direction: column; gap: 4px; }
.flyer-list-item small { color: var(--muted); font-size: .75rem; }
.list-arrow { color: var(--red); font-size: 1.25rem; }
.empty-state { padding: 60px 16px; text-align: center; }
.empty-state > span { font-size: 2.8rem; }
.empty-state h2 { margin: 14px 0 5px; font-size: 1.1rem; }
.empty-state p { margin: 0; color: var(--muted); font-size: .85rem; }

@media (min-width: 700px) {
  .page-shell { margin: 24px auto; border-radius: 8px; box-shadow: 0 10px 40px rgba(0,0,0,.1); }
  .hero { height: 270px; }
  .hero-logo-wrap { width: 250px; }
  .intro { padding-top: 36px; }
  .viewer-shell { margin: 0 auto; }
  .viewer-page .viewer-shell { box-shadow: 0 0 35px rgba(0,0,0,.35); }
}

@media (max-width: 440px) {
  .flyer-grid { gap: 8px; }
  .flyer-card { min-height: 80px; gap: 8px; padding: 9px; }
  .flyer-icon { width: 42px; height: 42px; flex-basis: 42px; }
  .flyer-name { font-size: .88rem; }
  .app-promo { height: 175px; min-height: 175px; }
  .phone-image { width: 36%; }
  .app-copy { width: 64%; margin-left: 36%; }
  .app-copy p { font-size: .74rem; }
  .app-copy .app-title { font-size: .9rem; }
  .app-title strong { font-size: 1.04rem; }
  .store-badge-link { width: min(100%, 96px); max-width: 96px; }
  .offers-section { padding: 12px; }
  .stores-section { padding-right: 12px; padding-left: 12px; }
  .red-panel { padding-right: 12px; padding-left: 12px; }
  .download-button { display: none; }
  .mobile-download { display: flex; }
  .pdf-frame { height: calc(100vh - 74px); min-height: 430px; }
}
