.shop-app {
  padding-bottom: 5.5rem;
  background: var(--av-anti-flash);
}

.shop-app-top {
  padding: calc(var(--header-h) + 3rem) 0 2rem;
  background: var(--av-paper);
  border-bottom: 1px solid var(--av-line);
}

.shop-app-top-inner {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1.5rem;
}

.shop-app-title h1,
.shop-app-detail-title {
  max-width: 22ch;
  margin: 0;
  color: var(--type-color-title);
  font-size: var(--type-title);
  font-weight: var(--font-weight-title);
}

.shop-app-top-actions {
  display: flex;
  align-items: center;
  gap: .75rem;
}

.shop-app-search { min-width: min(28rem, 38vw); }

.shop-app-search input {
  border-width: 0 0 1px;
  background: transparent;
}

.shop-app-cart-link {
  min-height: 3rem;
  white-space: nowrap;
}

.shop-app-body { padding-block: clamp(2rem, 5vw, 4.5rem); }

.shop-chips {
  display: flex;
  gap: .5rem;
  padding-bottom: 1rem;
  margin-bottom: 1rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.shop-chips::-webkit-scrollbar { display: none; }

.shop-chips--sub {
  padding-top: .75rem;
  border-top: 1px solid var(--av-line);
}

.shop-chip {
  flex: 0 0 auto;
  padding: .65rem 1rem;
  border: 1px solid var(--av-line);
  color: var(--av-ink-soft);
  font-size: .72rem;
  font-weight: 650;
  text-decoration: none;
}

.shop-chip:hover,
.shop-chip.is-active {
  border-color: var(--av-forest);
  background: var(--av-forest);
  color: var(--av-white);
}

.shop-feed-head,
.shop-rail-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin: 2rem 0 1.25rem;
}

.shop-feed-head h2,
.shop-rail-head h2 {
  margin: 0;
  font-family: var(--font-subtitle);
  font-size: var(--type-subtitle);
  font-weight: var(--font-weight-subtitle);
  line-height: var(--type-subtitle-leading);
  color: var(--type-color-subtitle);
}

.shop-feed,
.shop-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(.75rem, 2vw, 1.5rem);
}

.shop-rail {
  display: grid;
  grid-auto-columns: minmax(15rem, 24%);
  grid-auto-flow: column;
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: 1rem;
  scrollbar-width: none;
}

.shop-rail::-webkit-scrollbar { display: none; }

.shop-tile,
.shop-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--av-line);
  background: var(--av-white);
  transition: box-shadow var(--duration), transform var(--duration);
}

.shop-tile:hover,
.shop-card:hover {
  box-shadow: var(--av-shadow-md);
  transform: translateY(-5px);
}

.shop-tile-link,
.shop-card {
  display: block;
  color: inherit;
  text-decoration: none;
}

.shop-tile-media,
.shop-card-media {
  position: relative;
  aspect-ratio: 4 / 5;
  background: var(--av-sage-pale) center / cover no-repeat;
}

.shop-tile-media--empty::after,
.shop-card-media--empty::after,
.shop-product-hero--empty::after {
  position: absolute;
  color: var(--av-sage);
  content: "AVALON";
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .2em;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
}

.shop-tile-body,
.shop-card-body { padding: 1rem; }

.shop-tile-body h3,
.shop-card-body h2 {
  margin: 0 0 .6rem;
  font-family: var(--font-body);
  font-size: var(--type-body);
  font-weight: var(--font-weight-emphasis);
  line-height: var(--type-body-leading);
  color: var(--type-color-body);
}

.shop-price {
  display: flex;
  align-items: baseline;
  gap: .55rem;
  margin: 0;
}

.shop-price strong { color: var(--av-forest); }
.shop-price s { color: var(--av-ink-faint); font-size: .75rem; }
.shop-price--lg { font-size: var(--step-1); }

.shop-badge,
.shop-tile-oos {
  position: absolute;
  z-index: 2;
  top: .65rem;
  left: .65rem;
  padding: .35rem .55rem;
  background: var(--av-brass);
  color: var(--av-forest-deep);
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.shop-badge--kind { right: .65rem; left: auto; background: var(--av-forest); color: var(--av-white); }
.shop-tile-oos { right: .65rem; left: auto; background: var(--av-ink); color: white; }

.shop-tile-add {
  position: absolute;
  right: .75rem;
  bottom: .75rem;
}

.shop-tile-add button {
  display: grid;
  width: 2.5rem;
  height: 2.5rem;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--av-forest);
  color: white;
  cursor: pointer;
  font-size: 1.2rem;
}

.shop-back,
.shop-crumb a {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  color: var(--av-onyx);
  font-size: .82rem;
  font-weight: 500;
  letter-spacing: .04em;
  text-decoration: none;
  text-transform: none;
}

.shop-back:hover,
.shop-back:focus-visible,
.shop-crumb a:hover,
.shop-crumb a:focus-visible {
  color: var(--av-onyx);
  text-decoration: underline;
  text-underline-offset: .18em;
}

.shop-product-app .container {
  display: grid;
  align-items: start;
  grid-template-columns: minmax(0, 1.2fr) minmax(20rem, .8fr);
  gap: clamp(2rem, 6vw, 6rem);
}

.shop-product-app .flash,
.shop-product-app .lede { grid-column: 1 / -1; }

.shop-product-hero {
  position: relative;
  min-height: 42rem;
  background: var(--av-sage-pale);
}

.shop-product-hero img {
  width: 100%;
  height: 100%;
  min-height: 42rem;
  object-fit: cover;
}

.shop-product-meta { padding-top: 2rem; }
.shop-product-meta h2 {
  margin-bottom: 1rem;
  font-family: var(--font-subtitle);
  font-size: var(--type-subtitle);
  font-weight: var(--font-weight-subtitle);
  line-height: var(--type-subtitle-leading);
  color: var(--type-color-subtitle);
}

.shop-add-form {
  grid-column: 2;
  padding: 1.5rem;
  border: 1px solid var(--av-line);
  background: var(--av-white);
}

.shop-qty-row {
  display: grid;
  margin-top: 1rem;
  grid-template-columns: 3rem 4rem 3rem;
}

.shop-qty-row input {
  min-height: 3rem;
  padding: .5rem;
  text-align: center;
}

.shop-qty-btn {
  border: 1px solid var(--av-line);
  background: transparent;
  cursor: pointer;
}

.shop-cart-wrap { max-width: 70rem; }

.shop-cart-list,
.shop-checkout-lines {
  padding: 0;
  margin: 0;
  list-style: none;
}

.shop-cart-card {
  display: grid;
  padding: 1rem 0;
  border-bottom: 1px solid var(--av-line);
  grid-template-columns: 8rem 1fr;
  gap: 1rem;
}

.shop-cart-thumb {
  aspect-ratio: 1;
  background: var(--av-sage-pale) center / cover no-repeat;
}

.shop-cart-info-top,
.shop-cart-info-bottom,
.shop-cart-total-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.shop-cart-info h2 { margin: 0; font-family: var(--font-body); font-size: 1rem; font-weight: 600; }
.shop-cart-unit { color: var(--av-ink-faint); font-size: .78rem; }

.shop-cart-remove {
  border: 0;
  background: transparent;
  color: var(--av-burnt-sienna);
  cursor: pointer;
  font-size: .7rem;
  text-decoration: underline;
}

.shop-cart-stepper {
  display: flex;
  align-items: center;
  gap: .5rem;
}

.shop-cart-stepper button {
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--av-line);
  background: transparent;
  cursor: pointer;
}

.shop-cart-aside,
.shop-pay-online,
.shop-pay-success {
  padding: clamp(1.5rem, 4vw, 3rem);
  margin-top: 2rem;
  border: 1px solid var(--av-line);
  background: var(--av-white);
  box-shadow: var(--av-shadow-sm);
}

.shop-cart-totals {
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--av-line);
}

.shop-cart-total-row strong { font-size: var(--step-1); }
.shop-pay-title { margin: 2rem 0 1rem; font-size: var(--step-2); }
.shop-pay-user { color: var(--av-ink-soft); font-size: .85rem; }

.shop-pay-methods { display: grid; gap: .65rem; }

.shop-pay-method {
  display: flex;
  align-items: start;
  padding: 1rem;
  border: 1px solid var(--av-line);
  gap: .8rem;
  cursor: pointer;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

.shop-pay-method.is-selected {
  border-color: var(--av-forest);
  background: var(--av-sage-pale);
}

.shop-pay-method-body { display: grid; }
.shop-pay-method-body small { color: var(--av-ink-faint); }
.shop-pay-group-label { margin: 1rem 0 .25rem; color: var(--av-ink-faint); font-size: .7rem; text-transform: uppercase; }

.shop-pay-submit,
.shop-cart-empty-cta {
  display: inline-flex;
  min-height: 3.35rem;
  align-items: center;
  justify-content: center;
  padding: .85rem 1.4rem;
  border: 1px solid var(--av-forest);
  background: var(--av-forest);
  color: white;
  cursor: pointer;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-decoration: none;
  text-transform: uppercase;
}

.shop-pay-submit { width: 100%; margin-top: 1rem; }
.shop-pay-submit--secondary { background: transparent; color: var(--av-forest); }
.shop-pay-cancel-btn { border: 0; background: transparent; color: var(--av-burnt-sienna); cursor: pointer; text-decoration: underline; }

.shop-cart-empty {
  padding: var(--space-7);
  border: 1px solid var(--av-line);
  background: var(--av-white);
  text-align: center;
}

.shop-pay-online { max-width: 38rem; margin-inline: auto; text-align: center; }
.shop-pay-online-amount { font-family: var(--font-display); font-size: var(--step-3); }
.shop-pay-online-actions { display: grid; }
.shop-pay-online-qr img { width: 14rem; margin: 1.5rem auto; }
.shop-pay-online-status { padding: 1rem; background: var(--av-paper-deep); }

.shop-buy-bar,
.shop-dock {
  position: fixed;
  z-index: 900;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  min-height: 4.75rem;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  padding: .75rem max(1rem, env(safe-area-inset-right)) calc(.75rem + env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
  border-top: 1px solid var(--av-line);
  background: rgba(255, 253, 248, .96);
  box-shadow: 0 -10px 35px rgba(18, 28, 23, .08);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.shop-buy-bar-cart,
.shop-dock a {
  padding: .75rem 1rem;
  color: var(--av-forest);
  font-size: .75rem;
  font-weight: 700;
  text-decoration: none;
  text-transform: uppercase;
}

.shop-dock-badge {
  display: inline-grid;
  min-width: 1.35rem;
  height: 1.35rem;
  place-items: center;
  border-radius: 50%;
  background: var(--av-brass);
  color: var(--av-forest-deep);
}

@media (max-width: 1000px) {
  .shop-feed,
  .shop-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 760px) {
  .shop-app-top-inner { align-items: stretch; flex-direction: column; }
  .shop-app-top-actions { width: 100%; }
  .shop-app-search { min-width: 0; flex: 1; }
  .shop-feed,
  .shop-grid { grid-template-columns: repeat(2, 1fr); }
  .shop-product-app .container { grid-template-columns: 1fr; }
  .shop-product-hero { min-height: 0; }
  .shop-product-hero img { min-height: 0; aspect-ratio: 4 / 5; }
  .shop-add-form { grid-column: auto; }
}

@media (max-width: 460px) {
  .shop-feed,
  .shop-grid { gap: .55rem; }
  .shop-tile-body { padding: .75rem; }
  .shop-tile-body h3 { font-size: .82rem; }
  .shop-cart-card { grid-template-columns: 5.5rem 1fr; }
  .shop-cart-info-bottom { align-items: flex-start; flex-direction: column; }
}
