.shop-home, .shop-catalog-top, .shop-catalog, .shop-catalog-page .shop-search-dock, .shop-order-status {
  --shop-ink: #122035;
  --shop-muted: #45556b;
  --shop-border: #dbe2ea;
  --shop-accent: #9a3412;
  color: var(--shop-ink);
}
.shop-home { max-width: 1180px; margin: 24px auto 34px; padding-inline: 16px; }
.shop-catalog-top { margin: 15px 0 8px; }
.shop-topline { display: flex; flex-wrap: wrap; gap: 4px 18px; align-items: center; justify-content: space-between; }
.shop-topline h1 { margin: 0; font: 780 clamp(29px,5vw,43px)/1.12 system-ui,sans-serif; letter-spacing: -.04em; }
.shop-shortcuts, .shop-categories { display: flex; gap: 7px; align-items: center; }
.shop-shortcuts a, .shop-categories a, .shop-featured-heading a, .shop-offer a, .shop-order-status a {
  display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; color: var(--shop-accent); text-decoration: underline; text-underline-offset: 3px;
}
.shop-shortcuts a { padding-inline: 5px; font-size: 14px; }
.shop-cart { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; font-weight: 750;  background: var(--shop-ink); color: white; border-radius: 9px; padding-inline: 9px; gap: 7px; text-decoration: none; }
.shop-cart span { background: #fff; color: var(--shop-ink); padding: 1px 6px; border-radius: 12px; font-variant-numeric: tabular-nums; }
.shop-search { margin: 10px 0 6px; }
.shop-search > label { display: block; margin-bottom: 4px; font-weight: 730; font-size: 14px; }
.shop-search > div { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 7px; }
.shop-search input, .shop-search button { min-height: 46px; border-radius: 9px; font: 16px system-ui,sans-serif; }
.shop-search input { padding: 8px 12px; border: 1px solid #8290a1; width: 100%; color: var(--shop-ink); background: #fff; }
.shop-search button { color: #fff; background: var(--shop-accent); border: 0; font-weight: 700; padding: 0 14px; cursor: pointer; }
.shop-categories { overflow-x: auto; padding: 3px 0; }
.shop-categories a { white-space: nowrap; padding: 0 10px; border: 1px solid var(--shop-border); border-radius: 18px; color: var(--shop-ink); text-decoration: none; font-size: 13px; }
.shop-offer { margin: 8px 0; padding: 1px 11px; background: #fff4e9; border: 1px solid #f3d4b8; border-radius: 10px; display: flex; align-items: center; gap: 5px 14px; justify-content: space-between; font-size: 13px; }
.shop-offer a { flex-shrink: 0; }
.shop-featured { margin: 11px 0; }
.shop-featured-heading { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; column-gap: 10px; }
.shop-featured-heading h2 { margin: 0; font: 750 19px/1.25 system-ui,sans-serif; }
.shop-featured-heading a { font-size: 13px; min-height: 44px; }
.shop-picks { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; }
.shop-pick { min-height: 67px; display: flex; align-items: center; gap: 7px; padding: 7px; border: 1px solid var(--shop-border); border-radius: 10px; color: var(--shop-ink); background: white; text-decoration: none; }
.shop-pick:hover { border-color: #ab6c46; }
.shop-pick img { width: 40px; height: 30px; object-fit: contain; }
.shop-pick span { display: grid; gap: 3px; min-width: 0; }
.shop-pick small { color: var(--shop-muted); font-size: 12px; line-height: 1.25; }
.shop-trust { margin: 9px 0; color: var(--shop-muted); font-size: 13px; line-height: 1.55; }
.shop-trust a { color: var(--shop-accent); text-decoration: underline; }
html:has(.shop-catalog) { scroll-padding-top: 88px; }
.shop-catalog { padding-top: 0; margin-top: 0; scroll-margin-top: 10px; }
.shop-search-dock { position: sticky; top: 0; z-index: 8; display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: end; gap: 0 7px; padding: 5px 0; background: #fff; border-bottom: 1px solid var(--shop-border); }
.shop-search-dock .shop-search { margin: 0; }
.shop-search-dock .shop-cart { min-height: 46px; }
.shop-search-dock .shop-suggestions { grid-column: 1 / -1; margin-top: 4px; }
.shop-catalog-controls { padding-bottom: 7px; border-bottom: 1px solid var(--shop-border); }
.shop-catalog-controls .market-filters { flex-wrap: nowrap; overflow-x: auto; margin: 4px 0; padding: 2px 2px; scrollbar-width: thin; }
.shop-catalog-controls .market-filters button { white-space: nowrap; min-height: 44px; }
.shop-refine { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.shop-refine label { display: flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 650; }
.shop-refine select { min-height: 44px; max-width: 100%; padding: 3px; color: var(--shop-ink); background: #fff; border-radius: 7px; border: 1px solid #8290a1; font: 16px system-ui,sans-serif; }
.shop-suggestions { display: flex; flex-wrap: wrap; gap: 4px; }
.shop-suggestions button { min-height: 44px; padding: 0 8px; border: 1px solid var(--shop-border); color: var(--shop-ink); background: #f6f8fb; border-radius: 8px; font: 650 13px system-ui,sans-serif; cursor: pointer; }
.shop-catalog [hidden], .shop-order-status [hidden] { display: none !important; }
.shop-catalog .market-art { height: 72px; min-height: 0; background: #f5f7fa; }
.shop-catalog .market-art img { max-width: 75%; max-height: 46px; object-fit: contain; }
.shop-catalog .market-art-orb, .shop-catalog .market-art-mark { display: none; }
.shop-catalog .market-card-content { padding: 10px; }
.shop-catalog .market-card .shop-brand-name { margin: 6px 0 4px; font: 750 15px/1.23 system-ui,sans-serif; overflow-wrap: anywhere; }
.shop-catalog .market-saving { color: #096342; background: #e7f6ef; white-space: nowrap; }
.shop-catalog .market-category { overflow-wrap: anywhere; font-size: 11px; }
.shop-catalog .market-purchase-price { font-size: 15px; }
.shop-catalog .market-add-cart { background: white; color: var(--shop-ink); }
.shop-catalog .market-buy-now { background: var(--shop-accent); border-color: var(--shop-accent); color: white; }
.shop-catalog .market-buy-now:hover { background: #7c2d12; color: white; }
.shop-catalog .market-add-cart:hover { background: #f2f5f9; }
.shop-sr { position: absolute; width: 1px; height: 1px; padding: 0; clip-path: inset(50%); overflow: hidden; }
.shop-order-status a { margin-inline-end: 13px; }
:is(.shop-home,.shop-catalog-top,.shop-catalog,.shop-search-dock,.shop-order-status) :is(a,button,input,select):focus-visible {
  outline: 3px solid #174d9a; outline-offset: 2px;
}
@media (min-width: 650px) {
  .shop-picks { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .shop-pick { padding: 9px; }
  .shop-pick img { width: 54px; height: 32px; }
}
@media (max-width: 480px) {
  .shop-search-dock .shop-search button { padding: 0 7px; font-size: 14px; }
  .shop-search-dock .shop-search input { padding-inline: 6px; }
  .shop-search-dock .shop-cart { padding-inline: 6px; gap: 4px; }
  .shop-catalog .market-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .shop-catalog .market-card-actions { grid-template-columns: 1fr; }
}
@media (max-height: 480px) {
  .shop-search-dock { position: static; }
}

/* Homepage masthead. The offer lives below navigation, before the search hero. */
.shop-home-page .xm-ribbon { display: none !important; }
.shop-home-banner {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 7px 12px;
  background: #122035;
  color: white;
  font: 750 14px/1.35 system-ui, sans-serif;
  text-align: center;
  text-decoration: none;
}
.shop-home-banner:hover { background: #203451; }
.shop-home-banner:focus-visible { outline: 3px solid #fbbf76; outline-offset: -4px; }
.shop-home-page .shop-home { margin-top: 12px; }
.shop-home-hero {
  padding: clamp(16px, 3vw, 35px);
  background: linear-gradient(118deg, #fff5e9 10%, #ffead7 68%, #ffd4af 100%);
  border: 1px solid #f1cba9;
  border-radius: 17px;
}
.shop-home-hero h1 {
  max-width: 21ch;
  margin: 0 0 12px;
  font: 800 clamp(32px, 5.7vw, 57px)/1.04 system-ui, sans-serif;
  letter-spacing: -.045em;
}
.shop-home-hero .shop-search { max-width: 570px; margin: 0; }
.shop-home-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  margin-top: 10px;
  padding: 5px 17px;
  border-radius: 9px;
  color: white;
  background: #122035;
  font: 750 15px/1.25 system-ui, sans-serif;
  text-decoration: none;
}
.shop-home-primary:hover { background: #203451; }
.shop-home-page .shop-featured { margin-top: 9px; }
@media (max-width: 520px) {
  .shop-home-banner { font-size: 13px; }
  .shop-home-page .shop-home { padding-inline: 12px; margin-top: 10px; }
  .shop-home-hero { padding: 14px; }
  .shop-home-hero h1 { font-size: clamp(29px, 7.4vw, 39px); margin-bottom: 8px; }
  .shop-home-primary { width: 100%; }
}

/* Gift-card catalogue: primary search sits before the department tiles. */
.shop-catalog-page .cp-mallbar > .cp-search { display: none; }
.shop-catalog-page .cp-mallbar { min-height: 0; }
.shop-catalog-page .shop-search-dock { z-index: 20; margin: 0 0 10px; }
.shop-catalog-page .shop-search-dock :is(input, button, .shop-cart) { min-height: 46px; margin-block: 0; }
@media (max-width: 760px) {
  .shop-catalog-page .cp-mallbar.cp-no-depts { display: none; }
}
@media (max-width: 520px) {
  .shop-catalog-page .shop-search-dock { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .shop-catalog-page .shop-search-dock .shop-cart { justify-self: start; }
}

/* Keep browsing departments out of the active search path. */
.shop-catalog-page[data-catalog-search-active] .cp-mall { display: none; }
.shop-catalog-page[data-catalog-search-active] .shop-catalog {
  display: flex;
  flex-direction: column;
}
.shop-catalog-page[data-catalog-search-active] .shop-catalog > .shop-trust { order: 1; }
.shop-catalog-page[data-catalog-search-active] .shop-catalog-controls { scroll-margin-top: var(--catalog-header-offset, 0px); }
.shop-catalog-page[data-catalog-search-active] .market-result-line { padding-block: 9px; }
.shop-catalog-page[data-catalog-search-active] .market-card:not([hidden]) .market-art { height: 68px; }
.shop-catalog-page[data-catalog-search-active] .market-purchase { padding-top: 7px; }
.shop-catalog-page[data-catalog-search-active] .market-card h3 { min-height: 0; }
@media (max-width: 520px) {
  .shop-catalog-page[data-catalog-search-active] .shop-search-dock {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .shop-catalog-page[data-catalog-search-active] .shop-refine { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shop-catalog-page[data-catalog-search-active] .shop-refine label { min-width: 0; flex-wrap: wrap; gap: 2px; }
  .shop-catalog-page[data-catalog-search-active] .shop-refine select { width: 100%; margin: 0; }
  .shop-catalog-page[data-catalog-search-active] .market-grid { grid-template-columns: minmax(0, 1fr); }
  .shop-catalog-page[data-catalog-search-active] .market-card-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.shop-catalog-page[data-catalog-search-active] .shop-search-dock { z-index: 32; top: var(--catalog-header-offset, 0px); }
html body.shop-catalog-page[data-catalog-search-active] .market-filters { padding-block: 2px; }
@media (max-height: 480px) {
  .shop-catalog-page[data-catalog-search-active] .shop-search-dock { position: relative; }
}
@media (min-width: 521px) {
  .shop-catalog-page[data-catalog-search-active] .market-grid {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  }
}

/* Align a single search result and its status on a shared, centered column. */
.shop-catalog-page .market-result-line:focus { outline: none; }
.shop-catalog-page[data-catalog-single-result] .market-result-line,
.shop-catalog-page[data-catalog-single-result] #market-grid {
  box-sizing: border-box;
  width: 100%;
  max-width: 36rem;
  margin-inline: auto;
}
.shop-catalog-page[data-catalog-single-result] #market-grid {
  grid-template-columns: minmax(0, 1fr);
}
