/* The domain shop: a dark banner, a search band, the results under it; the cart and the checkout. */
body[data-page="shop"], body[data-page="cart"], body[data-page="checkout"] {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Dark top banner on the shop pages only; header.bar itself is shared with the portal. */
body[data-page="shop"] header.bar, body[data-page="cart"] header.bar, body[data-page="checkout"] header.bar {
  flex-wrap: nowrap;
  padding: 14px 24px;
  background: #1c1f26;
  border-bottom: 0;
  color: #ffffff;
}
body[data-page] header.bar .brand { color: #ffffff; font-size: 20px; white-space: nowrap; }
body[data-page] header.bar a:focus-visible { outline: 3px solid #f5b301; outline-offset: 3px; border-radius: 2px; }

nav.shop-nav { display: flex; gap: 20px; align-items: center; white-space: nowrap; }
nav.shop-nav a { color: #ffffff; text-decoration: none; }
nav.shop-nav a:hover { color: #c9d8ff; text-decoration: underline; }
nav.shop-nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 4px; }

main.shop { max-width: 720px; width: 100%; flex: 1 0 auto; }
main.shop.wide-shop { max-width: 1040px; }

/* Shop home: a full-width band with the search box, the results in the centred column under it. */
main.shop.shop-home { max-width: none; margin: 0; padding: 0; }
.search-band { background: #e6e9ef; border-bottom: 1px solid var(--border); padding: 40px 16px; }
.search-inner { max-width: 1040px; margin: 0 auto; }
.shop-column { max-width: 720px; margin: 16px auto 32px; padding: 0 16px; }

form.search {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 64px;
  margin: 0;
  padding: 0 8px 0 20px;
  background: #ffffff;
  color: #5a6475;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(16, 24, 40, 0.08), 0 8px 24px rgba(16, 24, 40, 0.10);
}
form.search:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
form.search .search-icon { flex: 0 0 auto; }
form.search input[type=text] {
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
  padding: 0 4px;
  font-size: 20px;
  color: #1c2230;
  background: transparent;
  border: 0;
  border-radius: 0;
  outline: none;
}
form.search input[type=text]::placeholder { color: #6b7385; opacity: 1; }
form.search button {
  flex: 0 0 auto;
  margin: 0;
  height: 48px;
  padding: 0 24px;
  font-size: 17px;
  border-radius: 8px;
  white-space: nowrap;
}

@media (prefers-color-scheme: dark) {
  .search-band { background: #1b2029; }
}

table.results { width: 100%; border-collapse: collapse; margin-top: 8px; }
table.results td { padding: 10px 8px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.results tr.exact td { font-size: 18px; font-weight: 600; }
table.results tr.group th { text-align: left; color: var(--muted); font-weight: 600; font-size: 14px; padding: 16px 8px 4px; }
table.results td.name { overflow-wrap: anywhere; }
table.results td.price { white-space: nowrap; }
table.results td.action { text-align: right; width: 1%; white-space: nowrap; }
table.results td.action button { margin: 0; }
.first-year { display: block; }
.renewal { display: block; color: var(--muted); font-size: 13px; font-weight: normal; }
.status { color: var(--muted); font-weight: normal; }

table.cart td, table.cart th { vertical-align: middle; }
table.cart .num { text-align: right; white-space: nowrap; }
table.cart td.name { overflow-wrap: anywhere; }
table.cart select { padding: 6px 8px; }
table.cart tfoot th, table.cart tfoot td { border-bottom: none; font-weight: 700; color: var(--text); }

.checkout-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.checkout-summary { position: sticky; top: 16px; }
ul.summary { list-style: none; padding: 0; margin: 0 0 8px; }
ul.summary li { padding: 4px 0; border-bottom: 1px solid var(--border); overflow-wrap: anywhere; }
.summary-total { font-weight: 700; display: flex; justify-content: space-between; }
.billing-text { white-space: pre-line; margin: 8px 0; }
.notice { padding: 10px 12px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg); margin: 0; }
#billing-fields select { width: 100%; }
input.missing, select.missing { border-color: var(--danger); }
#order-form > label.check { margin-top: 8px; }

footer.shop-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  padding: 16px;
  color: var(--muted);
  font-size: 13px;
}
footer.shop-foot a { color: var(--muted); }

@media (max-width: 720px) {
  .checkout-grid { grid-template-columns: minmax(0, 1fr); }
  .checkout-summary { position: static; order: -1; }
  .search-band { padding: 24px 16px; }
}

@media (max-width: 480px) {
  body[data-page="shop"] header.bar, body[data-page="cart"] header.bar, body[data-page="checkout"] header.bar {
    padding: 12px 16px;
  }
  body[data-page] header.bar .brand { font-size: 18px; }
  nav.shop-nav { gap: 14px; font-size: 15px; }
  form.search { height: 56px; padding: 0 6px 0 14px; gap: 6px; }
  form.search .search-icon { display: none; }
  form.search input[type=text] { font-size: 17px; }
  form.search button { height: 44px; padding: 0 12px; font-size: 15px; }
}
