/* Product navigation and contact fields, scoped to Shop. */
#view-shop .shop-coupon-dialog {
  position: fixed;
  width: min(480px, calc(100% - 28px));
  max-height: calc(100dvh - 28px);
  margin: auto;
  box-sizing: border-box;
  padding: 20px clamp(18px, 4vw, 32px) 26px;
  border: 1px solid #a58954;
  border-radius: 14px;
  background: #f2e7cd;
  color: #29362d;
  overscroll-behavior: contain;
}
#view-shop .shop-coupon-dialog::backdrop { background: #201608a6; backdrop-filter: blur(4px); }
#view-shop .shop-coupon-close { display: flex; justify-content: flex-end; }
#view-shop .shop-coupon-close button {
  width: 44px;
  height: 44px;
  border: 1px solid #a5895480;
  border-radius: 50%;
  background: #fcf4e0;
  color: inherit;
  font-size: 22px;
  cursor: pointer;
}
#view-shop .shop-coupon-dialog h2 { margin: 0 0 10px; font: 500 clamp(26px, 5vw, 37px)/1.1 var(--pjb-editorial, Georgia, serif); }
#view-shop .shop-coupon-dialog p { margin: 0 0 18px; font: 500 15px/1.45 var(--pjb-reading, Arial, sans-serif); }
#view-shop .shop-coupon-options { display: grid; gap: 8px; }
#view-shop .shop-coupon-options a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 3px 12px;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid #a5895480;
  border-radius: 6px;
  background: #fcf4e0;
  color: inherit;
  font: 650 14px/1.3 var(--pjb-reading, Arial, sans-serif);
  text-decoration: none;
}
#view-shop .shop-coupon-options small { font: 500 12px/1.3 var(--pjb-reading, Arial, sans-serif); }
#view-shop .shop-coupon-options a:hover { background: #e8d5a9; }
#view-shop .shop-coupon-dialog :focus-visible { outline: 2px solid #7a2f3a; outline-offset: 2px; }
body:has(.shop-coupon-dialog[open]) { overflow: hidden; }

#view-shop.shop-ritual .shop-reading-toolbar {
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
}

#view-shop.shop-ritual .shop-product-arrows {
  grid-column: 2;
  grid-row: 1;
  display: grid;
  grid-template-columns: 44px minmax(52px, auto) 44px;
  align-items: center;
  justify-self: center;
  gap: 7px;
}

#view-shop.shop-ritual .shop-reading-toolbar .shop-reading-close {
  grid-column: 3;
  align-self: center;
}

#view-shop .shop-product-position {
  color: #59462f;
  font: 500 12px/1.2 'Work Sans', sans-serif;
  font-variant-numeric: tabular-nums;
  text-align: center;
  white-space: nowrap;
}

#view-shop .shop-product-step {
  display: grid;
  place-items: center;
  box-sizing: border-box;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid #aa9169;
  border-radius: 50%;
  background: #fbf0da;
  color: #453622;
  cursor: pointer;
  touch-action: manipulation;
  transition: background-color 160ms ease, transform 160ms ease;
}

#view-shop .shop-product-step span {
  font: 400 32px/.8 Georgia, serif;
  translate: 0 -2px;
}

@media (hover:hover) {
  #view-shop .shop-product-step:hover { background: #ebdbba; }
}
#view-shop .shop-product-step:active { transform: scale(.93); }

#view-shop #shop-reading-title:focus { outline: none; }

#view-shop .shop-reading .shop-booking .shop-modality { margin-block-end: 18px; }

#view-shop .shop-reading .shop-contact-fields {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

#view-shop .shop-reading .shop-booking .shop-contact-fields .shop-float-field {
  display: block;
  position: relative;
  min-width: 0;
}

#view-shop .shop-reading .shop-booking .shop-contact-fields .shop-float-field > input {
  box-sizing: border-box;
  width: 100%;
  min-height: 56px;
  padding: 22px 14px 7px;
  border: 1px solid #a99270;
  border-radius: 8px;
  background: #fcf6e9;
  color: #28231c;
  font: 400 16px/1.3 'Work Sans', sans-serif;
  scroll-margin-block: 18px;
  transition: background-color 180ms ease-out, border-color 180ms ease-out, box-shadow 180ms ease-out;
}

#view-shop .shop-reading .shop-booking .shop-contact-fields .shop-float-field > input:focus {
  outline: 0;
  border-color: #365641;
  background: #fffaf0;
  box-shadow: 0 0 0 2px #36564150;
}

#view-shop .shop-float-label {
  position: absolute;
  inset-inline-start: 14px;
  top: 50%;
  color: #5e503e;
  font: 400 16px/1.2 'Work Sans', sans-serif;
  transform: translateY(-50%);
  transform-origin: left center;
  transition: transform 220ms cubic-bezier(.2,.75,.28,1), color 160ms ease-out;
  pointer-events: none;
}

#view-shop .shop-float-field input:is(:focus,:not(:placeholder-shown),:autofill) + .shop-float-label {
  color: #38533e;
  transform: translateY(calc(-50% - 13px)) scale(.75);
}

#view-shop .shop-reading .shop-booking .shop-float-field input[aria-invalid='true'] { border-color: #8c3c25; }

#view-shop .shop-field-help {
  margin: 0 2px;
  color: #5e503e;
  font: 400 12px/1.45 'Work Sans', sans-serif;
}

#view-shop .shop-float-field:has(input[aria-invalid='true']) + .shop-field-help { color: #813322; }

#view-shop .shop-reading[data-product="libro"] .shop-book-features {
  margin: 0 0 18px;
  padding-inline-start: 1.3em;
  list-style: disc;
  font: 400 16px/1.45 var(--pjb-reading, Manrope, Arial, sans-serif);
}
#view-shop .shop-book-features li + li { margin-block-start: 5px; }

#view-shop .shop-reading .shop-tarot-map {
  display: flex;
  width: fit-content;
  max-width: 100%;
  min-height: 44px;
  margin: -8px 0 12px;
  gap: 7px;
  align-items: center;
  color: #365641;
  font: 600 14px/1.3 var(--pjb-reading, Manrope, Arial, sans-serif);
  text-underline-offset: .2em;
}
#view-shop .shop-tarot-map svg { flex: 0 0 auto; }

#view-shop .shop-donation-checkout:not([hidden]) {
  display: grid;
  justify-items: start;
  gap: 12px;
  margin-top: 14px;
}
#view-shop .shop-donation-qr:not([hidden]) {
  display: block;
  width: min(100%, 310px);
  height: auto;
  border-radius: 12px;
}
#view-shop .shop-donation-link {
  display: inline-flex;
  min-height: 44px;
  padding: 8px 17px;
  align-items: center;
  gap: 8px;
  border-radius: var(--shop-ui-pill, 999px);
  background: var(--shop-ui-ink, #28231c);
  color: var(--shop-ui-paper, #fdf7ed);
  font: 600 14px/1.3 var(--pjb-reading, Manrope, Arial, sans-serif);
  text-decoration: none;
}
#view-shop .shop-donation-link:hover { background: var(--shop-ui-accent, #365641); }
#view-shop :is(.shop-donation-link, .shop-tarot-map):focus-visible {
  outline: 2px solid #365641;
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  #view-shop .shop-product-step,
  #view-shop .shop-reading .shop-booking .shop-contact-fields .shop-float-field > input,
  #view-shop .shop-float-label { transition: none; }
  #view-shop .shop-product-step:active { transform: none; }
}
