/* Baltimore Fire Alerts — Sticker Store (cream theme, Redesign B).
   Header/footer come from ../assets/style.css; this styles the store's hero,
   catalog, cart drawer, and product modal. Legacy var aliases below map the
   store's original tokens onto the cream palette so the cart CSS stays intact. */

:root {
  --storew: 1180px;
  --card-gold: #f6a01a;
  /* aliases → cream palette (were the old Firehouse tokens) */
  --red-deep: var(--red);
  --on-gold: var(--dark);
  --card-border: var(--line);
  --brown-body: var(--brown);
}

body { background: var(--cream); }

.wrap { max-width: var(--storew); margin: 0 auto; padding: 0 24px; }

/* cart button lives in the shared header nav */
.cart-btn {
  display: inline-flex; align-items: center; gap: 8px;
  border: 0; background: var(--red); color: var(--cream);
  font: 700 12px 'Oswald', sans-serif; letter-spacing: .06em; text-transform: uppercase;
  padding: 9px 15px; border-radius: 8px; cursor: pointer;
}
.cart-btn:hover { background: var(--red-lt); }
.cart-count { background: var(--gold); color: var(--dark); border-radius: 20px; padding: 1px 8px; font-size: 11px; }

/* ---------- Hero ---------- */
.store-hero {
  background: radial-gradient(75% 90% at 80% 10%, var(--cream-hi) 0%, var(--cream) 60%);
  border-bottom: 2px solid var(--red);
  overflow: hidden;
}
.store-hero .wrap { display: flex; align-items: center; gap: 24px; padding-top: clamp(40px, 6vw, 72px); padding-bottom: clamp(24px, 4vw, 40px); position: relative; }
.store-hero .copy { flex: 1; min-width: 0; }
.store-hero .eyebrow { font: 700 13px 'Barlow', sans-serif; letter-spacing: .16em; text-transform: uppercase; color: var(--red-lt); margin: 0 0 12px; }
.store-hero h1 { font: 600 clamp(44px, 6vw, 76px)/0.96 'Oswald', sans-serif; text-transform: uppercase; color: var(--red); margin: 0 0 14px; text-wrap: balance; }
.store-hero .lead { font-size: clamp(16px, 1.5vw, 18px); line-height: 1.55; max-width: 440px; color: var(--brown); margin: 0; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.btn-gold, .btn-outline {
  text-decoration: none; font: 700 13px 'Oswald', sans-serif; letter-spacing: .08em; text-transform: uppercase;
  padding: 14px 24px; border-radius: 9px;
}
.btn-gold { background: var(--gold); color: var(--dark); }
.btn-gold:hover { background: #ffbd4d; color: var(--dark); }
.btn-outline { border: 2px solid var(--red); color: var(--red); }
.btn-outline:hover { background: var(--red); color: var(--cream); }
.hero-art { width: 300px; max-width: 40%; height: auto; align-self: flex-end; margin-bottom: -30px; filter: drop-shadow(0 12px 24px rgba(58,17,8,.3)); }

/* ---------- Catalog ---------- */
.store-main { max-width: var(--storew); margin: 0 auto; padding: clamp(40px, 6vw, 64px) 24px 44px; }
.catalog-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 24px; flex-wrap: wrap; gap: 6px; }
.catalog-head h2 { font: 600 clamp(28px, 3.5vw, 40px) 'Oswald', sans-serif; color: var(--red); text-transform: uppercase; margin: 0; padding: 0; border: 0; }
.catalog-head .sub { font: 500 13px 'Barlow', sans-serif; color: var(--brown-2); margin: 0; }
.catalog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.catalog-grid .loading { grid-column: 1 / -1; text-align: center; color: var(--brown); font: 500 14px 'Barlow', sans-serif; padding: 40px; }

.product {
  background: var(--cream-hi); border: 2px solid var(--red); border-radius: 14px;
  box-shadow: 5px 5px 0 var(--gold);
  overflow: hidden; display: flex; flex-direction: column;
}
.product .well {
  height: 190px; background: radial-gradient(120% 120% at 50% 22%, #fdf8ec, #f4e8ce);
  border-bottom: 2px solid var(--red);
  display: flex; align-items: center; justify-content: center; cursor: pointer; position: relative;
}
.product .well img { height: 168px; width: auto; filter: drop-shadow(0 5px 12px rgba(0,0,0,.22)); }
.product .well .ptag {
  position: absolute; top: 10px; left: 10px;
  font: 700 9.5px 'Oswald', sans-serif; letter-spacing: .08em; text-transform: uppercase;
  background: var(--red); color: var(--cream); padding: 3px 8px; border-radius: 5px;
}
.product .pbody { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.product .pname { font: 600 16px 'Oswald', sans-serif; text-transform: uppercase; color: var(--ink); letter-spacing: .01em; }
.product .psub { font: 500 12px 'Barlow', sans-serif; color: var(--brown); margin: 3px 0 14px; }
.product .prow { margin-top: auto; display: flex; align-items: center; justify-content: space-between; }
.product .pprice { font: 700 21px 'Oswald', sans-serif; color: var(--red); }
.product .padd {
  border: 0; background: var(--red); color: var(--cream);
  font: 700 11.5px 'Oswald', sans-serif; letter-spacing: .08em; text-transform: uppercase;
  padding: 10px 16px; border-radius: 8px; cursor: pointer;
}
.product .padd:hover { background: var(--red-lt); }

/* ---------- FAQ ---------- */
.store-faq { background: var(--red); color: var(--cream); }
.store-faq .wrap { padding-top: clamp(44px, 6vw, 68px); padding-bottom: clamp(48px, 7vw, 72px); }
.store-faq h2 { font: 600 clamp(26px, 3.2vw, 36px) 'Oswald', sans-serif; color: var(--cream); text-transform: uppercase; margin: 0 0 22px; padding: 0; border: 0; }
.faq-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 26px 40px; }
.faq-item { border-left: 3px solid var(--gold); padding-left: 16px; }
.faq-item .fq { font: 600 15px 'Oswald', sans-serif; text-transform: uppercase; color: var(--cream); margin: 0 0 5px; }
.faq-item .fa { font: 400 13.5px/1.55 'Barlow', sans-serif; color: rgba(246,231,200,.82); margin: 0; }

/* ---------- Product modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 50;
  display: flex; align-items: center; justify-content: center; padding: 24px;
  background: rgba(20,8,5,.6); animation: bfaFade .2s ease;
}
.modal-backdrop[hidden] { display: none; }
.modal-card {
  width: 720px; max-width: 100%; background: var(--cream); border-radius: 16px; overflow: hidden;
  display: flex; box-shadow: 0 24px 60px rgba(0,0,0,.4); animation: bfaFade .25s ease;
}
.modal-art { width: 320px; flex: none; background: radial-gradient(120% 120% at 50% 30%, #fdf8ec, #f4e8ce); display: flex; align-items: center; justify-content: center; padding: 26px; }
.modal-art img { width: 100%; height: auto; filter: drop-shadow(0 8px 18px rgba(0,0,0,.25)); }
.modal-body { flex: 1; padding: 30px; position: relative; }
.modal-close { position: absolute; top: 14px; right: 16px; border: 0; background: transparent; font-size: 26px; line-height: 1; cursor: pointer; color: var(--red-deep); }
.modal-tag { font: 700 10px 'Oswald', sans-serif; letter-spacing: .1em; text-transform: uppercase; color: #c0392b; }
.modal-body h3 { font: 700 30px 'Oswald', sans-serif; color: var(--red-deep); text-transform: uppercase; line-height: 1.02; margin: 6px 0; }
.modal-price { font: 700 24px 'Oswald', sans-serif; color: var(--on-gold); margin-bottom: 14px; }
.modal-desc { font: 400 14px/1.6 'Barlow', sans-serif; color: var(--brown-body); margin: 0 0 18px; }
.modal-feats { font: 500 12.5px 'Barlow', sans-serif; color: var(--brown); margin: 0 0 22px; }
.btn-add-lg {
  width: 100%; border: 0; background: var(--red-deep); color: var(--cream);
  font: 700 14px 'Oswald', sans-serif; letter-spacing: .08em; text-transform: uppercase;
  padding: 15px; border-radius: 9px; cursor: pointer;
}
.btn-add-lg:hover { filter: brightness(1.12); }

/* ---------- Cart drawer ---------- */
.drawer-backdrop { position: fixed; inset: 0; z-index: 60; background: rgba(20,8,5,.55); animation: bfaFade .2s ease; }
.drawer-backdrop[hidden] { display: none; }
.drawer {
  position: absolute; top: 0; right: 0; bottom: 0; width: 400px; max-width: 92vw;
  background: var(--cream); box-shadow: -14px 0 40px rgba(0,0,0,.35);
  display: flex; flex-direction: column; animation: bfaSlide .28s cubic-bezier(.2,.8,.2,1);
}
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; background: var(--red-deep); color: var(--cream); font: 700 17px 'Oswald', sans-serif; letter-spacing: .05em; text-transform: uppercase; }
.drawer-close { border: 0; background: transparent; color: var(--cream); font-size: 22px; line-height: 1; cursor: pointer; }
.drawer-body { flex: 1; overflow: auto; padding: 8px 18px; }
.cart-empty { text-align: center; color: var(--brown); font: 500 14px 'Barlow', sans-serif; padding: 60px 20px; }
.cart-line { display: flex; gap: 12px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--card-border); }
.cart-line .thumb { width: 58px; height: 58px; background: #fff; border: 1px solid var(--card-border); border-radius: 9px; display: flex; align-items: center; justify-content: center; flex: none; }
.cart-line .thumb img { height: 48px; width: auto; }
.cart-line .info { flex: 1; min-width: 0; }
.cart-line .cn { font: 600 13.5px 'Barlow', sans-serif; color: var(--ink); }
.cart-line .cp { font: 700 13px 'Oswald', sans-serif; color: var(--red-deep); }
.cart-line .step { display: flex; align-items: center; gap: 8px; }
.cart-line .step button { width: 26px; height: 26px; border: 1px solid #c9a870; background: #fff; border-radius: 6px; font-size: 15px; cursor: pointer; color: var(--red-deep); line-height: 1; }
.cart-line .step .qty { font: 700 13px 'Barlow', sans-serif; min-width: 14px; text-align: center; }
.drawer-foot { padding: 18px 22px; background: #fff; border-top: 2px solid var(--gold); }
.subtotal-row { display: flex; justify-content: space-between; font: 600 14px 'Barlow', sans-serif; color: var(--brown-body); margin-bottom: 4px; }
.ship-note { font: 400 11.5px 'Barlow', sans-serif; color: var(--brown); margin: 0 0 14px; }
.btn-checkout { width: 100%; border: 0; background: #635BFF; color: #fff; font: 700 14px 'Barlow', sans-serif; padding: 15px; border-radius: 9px; cursor: pointer; }
.btn-checkout:disabled { opacity: .5; cursor: not-allowed; }
.checkout-note { text-align: center; font: 400 10.5px 'Barlow', sans-serif; color: #b0a08a; margin: 9px 0 0; }

@keyframes bfaSlide { from { transform: translateX(100%) } to { transform: translateX(0) } }
@keyframes bfaFade { from { opacity: 0 } to { opacity: 1 } }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .store-hero h1 { font-size: 44px; }
  .catalog-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .store-nav { display: none; }
  .store-hero .wrap { flex-direction: column; align-items: flex-start; }
  .store-hero h1 { font-size: 38px; }
  .hero-art { align-self: center; max-width: 70%; margin-bottom: -20px; }
  .catalog-grid { grid-template-columns: 1fr; }
  .faq-grid { grid-template-columns: 1fr; }
  .modal-card { flex-direction: column; }
  .modal-art { width: 100%; height: 200px; }
}
