/* Sale Forms (sale.php + homepage cards). Colors come from the cover.css variables, so the
   seasonal theme picked for each form (SeasonalTheme::force) restyles the page automatically. */

.sale-page { padding-bottom: 5rem; }
.sale-hero { text-align: center; padding: 2.25rem 1.25rem 1rem; max-width: 820px; margin: 0 auto; }
.sale-title { font-family: 'Dancing Script', cursive; font-size: clamp(2.2rem, 7vw, 3.4rem); color: var(--green); margin: 0.2rem 0 0.6rem; line-height: 1.1; }
.sale-intro { color: var(--text-dark); font-size: 1rem; line-height: 1.55; margin: 0 auto 1rem; max-width: 640px; }
.sale-facts { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; }
.sale-chip { background: #fff; border: 1px solid var(--pink-border); color: var(--pink-deep); border-radius: 999px; padding: 0.4rem 0.85rem; font-size: 0.82rem; font-weight: 700; }
.sale-chip i { margin-right: 0.3rem; color: var(--pink-accent); }
.sale-chip-hot { background: var(--pink-accent); border-color: var(--pink-accent); color: #fff; }
.sale-chip-hot i { color: #fff; }

.sale-errors { max-width: 700px; margin: 0.5rem auto 1rem; background: #fde8ee; border: 1.5px solid #c0496a; color: #8c1d3a; border-radius: 12px; padding: 0.9rem 1.2rem; }
.sale-errors ul { margin: 0.3rem 0 0; padding-left: 1.2rem; }

.sale-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1.1rem; max-width: 1100px; margin: 1rem auto 0; padding: 0 1.25rem; }
.sale-item { background: #fff; border: 1px solid var(--pink-border); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .15s, border-color .15s, transform .15s; }
.sale-item.is-picked { border-color: var(--pink-accent); box-shadow: 0 0 0 2px var(--pink-accent) inset, 0 6px 18px rgba(0,0,0,.06); }
.sale-item.is-soldout { opacity: .6; }
.si-photo { position: relative; aspect-ratio: 1 / 1; background: var(--pink-mid); display: flex; align-items: center; justify-content: center; }
.si-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.si-nophoto { font-size: 3rem; }
.si-badge { position: absolute; top: 10px; left: 10px; background: var(--pink-accent); color: #fff; font-size: .75rem; font-weight: 700; padding: .25rem .6rem; border-radius: 999px; }
.si-badge-out { background: #555; }
.si-body { padding: .9rem 1rem 1rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.si-head { display: flex; justify-content: space-between; align-items: baseline; gap: .75rem; }
.si-head h3 { margin: 0; font-size: 1.05rem; color: var(--text-dark); }
.si-price { font-weight: 700; color: var(--pink-deep); white-space: nowrap; font-size: 1.05rem; }
.si-desc { margin: 0; font-size: .86rem; color: var(--text-muted); line-height: 1.45; flex: 1; }
.si-qty { display: flex; align-items: center; gap: .4rem; margin-top: .25rem; }
.si-qty input { width: 3.6rem; text-align: center; font-size: 1.05rem; font-weight: 700; padding: .45rem .2rem; border: 1px solid var(--pink-border); border-radius: 10px; background: #fff9fb; color: var(--text-dark); -moz-appearance: textfield; }
.si-qty input::-webkit-outer-spin-button, .si-qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty-btn { width: 2.6rem; height: 2.6rem; border-radius: 50%; border: 1.5px solid var(--pink-accent); background: #fff; color: var(--pink-accent); font-size: 1.35rem; line-height: 1; cursor: pointer; font-weight: 700; }
.qty-btn:active { background: var(--pink-mid); }

.sale-details .order-card h2 { margin-bottom: .2rem; }
.opt { font-weight: 400; color: var(--text-muted); }
.pickup-options { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 1rem; }
.pickup-opt { flex: 1 1 140px; position: relative; cursor: pointer; }
.pickup-opt input { position: absolute; opacity: 0; pointer-events: none; }
.pickup-opt span { display: flex; flex-direction: column; align-items: center; border: 1.5px solid var(--pink-border); background: #fff9fb; border-radius: 12px; padding: .65rem .5rem; font-size: .85rem; color: var(--text-muted); }
.pickup-opt span strong { color: var(--green); font-size: .95rem; }
.pickup-opt input:checked + span { border-color: var(--pink-accent); background: var(--pink-mid); box-shadow: 0 0 0 1px var(--pink-accent) inset; }
.pickup-opt input:focus-visible + span { outline: 3px solid rgba(0,0,0,.2); }
.pickup-opt.is-blocked { cursor: not-allowed; }
.pickup-opt.is-blocked span { background: #f1f1f1; border-color: #ddd; color: #aaa; }
.pickup-opt.is-blocked span strong { color: #aaa; }
.pickup-opt .pickup-unavail { font-style: normal; font-size: .72rem; text-decoration: none; display: inline-block; }
.pickup-opt.is-blocked span { gap: 0; }
.sale-policy { background: var(--pink-light); border: 1px solid var(--pink-border); border-radius: 10px; padding: .75rem 1rem; font-size: .82rem; margin: .25rem 0 1rem; }
.sale-totals { border-top: 1px dashed var(--pink-border); margin: .5rem 0 1rem; padding-top: .75rem; display: grid; gap: .3rem; }
.sale-totals div { display: flex; justify-content: space-between; font-size: .95rem; }
.sale-totals strong { color: var(--pink-deep); font-size: 1.1rem; }

.sale-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; background: #fff; border-top: 1px solid var(--pink-border); box-shadow: 0 -6px 18px rgba(0,0,0,.08); padding: .65rem 1rem calc(.65rem + env(safe-area-inset-bottom)); display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.sale-bar[hidden] { display: none; }
.sale-bar div { display: flex; flex-direction: column; line-height: 1.2; font-size: .8rem; color: var(--text-muted); }
.sale-bar strong { font-size: 1.15rem; color: var(--text-dark); }
.sale-bar-btn { background: var(--pink-accent); color: #fff; text-decoration: none; font-weight: 700; padding: .7rem 1.3rem; border-radius: 999px; }

.sale-thanks { text-align: center; }
.sale-thanks-ic { width: 56px; height: 56px; margin: 0 auto .5rem; border-radius: 50%; background: var(--green); color: #fff; font-size: 2rem; line-height: 56px; }
.sale-summary { text-align: left; max-width: 440px; margin: 0 auto 1.5rem; border: 1px solid var(--pink-border); border-radius: 12px; padding: .5rem 1rem; }
.ss-row { display: flex; justify-content: space-between; gap: 1rem; padding: .4rem 0; border-bottom: 1px solid var(--pink-mid); font-size: .9rem; }
.ss-row:last-child { border-bottom: 0; }
.ss-total { font-size: 1rem; }

@media (max-width: 560px) {
  .sale-items { grid-template-columns: 1fr; padding: 0 .85rem; gap: .85rem; }
  .sale-item { flex-direction: row; }
  .si-photo { width: 118px; min-width: 118px; aspect-ratio: auto; }
  .si-body { padding: .75rem .8rem; }
  .si-head { flex-direction: column; gap: .1rem; }
  .si-desc { font-size: .8rem; }
  .order-card { padding: 1.4rem 1.1rem; }
  .sale-hero { padding-top: 1.5rem; }
}

/* Homepage "Now taking orders" cards */
.sale-feature { padding: 1.5rem 1.5rem 0.5rem; text-align: center; }
.sale-feature-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; margin-top: 1rem; }
.sale-feature-card { display: flex; align-items: stretch; background: #fff; border: 1.5px solid var(--pink-accent); border-radius: 16px; overflow: hidden; text-decoration: none; color: var(--text-dark); max-width: 460px; flex: 1 1 300px; text-align: left; }
.sale-feature-card img { width: 120px; object-fit: cover; }
.sfc-body { display: flex; flex-direction: column; gap: .25rem; padding: 1rem 1.1rem; }
.sfc-title { font-family: 'Dancing Script', cursive; font-size: 1.6rem; color: var(--green); line-height: 1.1; }
.sfc-meta { font-size: .8rem; color: var(--text-muted); }
.sfc-btn { margin-top: .35rem; font-weight: 700; color: var(--pink-accent); }

/* Any-day pickup calendar (same pattern as the custom order form; blocked dates are grayed out) */
.sale-cal-wrap { margin-bottom: 1rem; max-width: 340px; }
.pk-trigger { text-align: left; cursor: pointer; color: #777; background: #fff; }
.pk-trigger.pk-chosen { color: inherit; }
.pk-cal { margin-top: .4rem; border: 1px solid var(--pink-border); border-radius: 12px; background: #fff; padding: .6rem; box-shadow: 0 8px 24px rgba(0,0,0,.08); }
.pk-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .4rem; }
.pk-title { font-weight: 600; }
.pk-nav { border: 0; background: #fbe9ef; border-radius: 8px; width: 36px; height: 36px; font-size: 1.2rem; cursor: pointer; }
.pk-nav:disabled { opacity: .3; cursor: default; }
.pk-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.pk-dow { text-align: center; font-size: .72rem; color: #999; padding: 2px 0; }
.pk-day { border: 0; border-radius: 8px; min-height: 38px; font-size: .9rem; background: transparent; color: #ccc; }
.pk-day.pk-ok { background: #fbe9ef; color: #7a2846; font-weight: 600; cursor: pointer; }
.pk-day.pk-ok:hover, .pk-day.pk-sel { background: #d9668f; color: #fff; }
.pk-day.pk-blocked { background: #e6e6e6; color: #a5a5a5; text-decoration: line-through; cursor: not-allowed; }
.pk-day:disabled { cursor: not-allowed; }
.pk-day:focus-visible, .pk-nav:focus-visible { outline: 3px solid #7a2846; outline-offset: 1px; }
.pk-legend { font-size: .72rem; color: #888; margin: .4rem 0 0; }
.pk-key { display: inline-block; width: 10px; height: 10px; border-radius: 3px; vertical-align: middle; }
.pk-key-ok { background: #fbe9ef; border: 1px solid #d9668f; } .pk-key-blocked { background: #e6e6e6; }

.loc-opt { flex: 1 1 180px; }
.loc-opt span { align-items: flex-start; text-align: left; gap: .2rem; }
.loc-opt span em { font-style: normal; font-size: .8rem; color: var(--text-muted); }
.loc-opt span .loc-note { font-size: .75rem; }

.si-pers { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.si-pers[hidden] { display: none; }
.si-pers-row { display: flex; flex-direction: column; gap: 4px; }
.si-pers-row span { font-size: 13px; font-weight: 600; color: #444; }
.si-pers-row span em { font-weight: 400; color: #666; font-style: normal; }
.si-pers-row .form-control { font-size: 16px; }
.loc-only { margin: 0 0 14px; padding: 10px 12px; border: 1px solid #e9ecef; border-radius: 8px; background: #fafafa; }
.loc-only em { display: block; font-style: normal; color: #555; font-size: 14px; margin-top: 2px; }
.ss-pers { display: block; font-style: normal; font-size: 13px; color: #555; font-weight: 400; }

.sale-preview-banner {
  position: sticky;
  top: 0;
  z-index: 40;
  background: #3a6b47;
  color: #fff;
  padding: 12px 16px;
  text-align: center;
  font-weight: 700;
  font-size: 15px;
  line-height: 1.35;
}
.sale-preview-submit {
  margin: 14px 0 0;
  padding: 14px 16px;
  border-radius: 10px;
  background: #fff4dc;
  color: #8a5300;
  font-weight: 700;
  text-align: center;
  font-size: 16px;
}
@media (max-width: 640px) {
  .sale-preview-banner { font-size: 14px; padding: 10px 12px; }
}
