/* Components use only --td-* tokens (theme contract, apps/storefront/README.md); shades are
   mixed from them with color-mix(), never written as literal colours.
   The look follows the tenant's own drafts (for Ongastro: the WordPress draft and the vision
   prototype): flat white cards on a light page, no gradients, display font for headings, nav
   and buttons, brand colour for actions and section titles. */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 88px;
}
body {
  margin: 0;
  background: var(--td-color-bg);
  color: var(--td-color-text);
  font-family: var(--td-font-body);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
::selection {
  background: var(--td-color-brand-soft);
  color: var(--td-color-text-strong);
}

h1,
h2,
h3,
.td-nav,
.td-button,
.td-chip,
.td-label,
.td-eyebrow {
  font-family: var(--td-font-display);
  color: var(--td-color-text-strong);
}
h1,
h2,
h3 {
  text-wrap: balance;
  line-height: 1.2;
}
h1 {
  font-size: clamp(1.75rem, 3.6vw, 2.5rem);
  font-weight: 700;
  margin: 0 0 16px;
}
h2 {
  font-size: 1.3rem;
  font-weight: 700;
  margin: 0 0 12px;
}
h3 {
  font-weight: 700;
}
p {
  margin: 0 0 0.75em;
}
p:last-child {
  margin-bottom: 0;
}
a {
  color: var(--td-color-brand);
  text-underline-offset: 0.18em;
}
a:hover {
  color: var(--td-color-brand-strong);
}
img {
  max-width: 100%;
}
:focus-visible {
  outline: 2px solid var(--td-color-brand);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Skip link: first focusable element on every page. */
.td-skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 50;
  background: var(--td-color-brand);
  color: var(--td-color-surface);
  font: 700 0.92rem var(--td-font-display);
  padding: 10px 16px;
  border-radius: var(--td-radius);
  text-decoration: none;
}
.td-skip:focus {
  top: 12px;
  color: var(--td-color-surface);
}

.td-muted {
  color: var(--td-color-text-muted);
}
.td-small {
  font-size: 0.85rem;
}
.td-mono {
  font-family: var(--td-font-mono);
  font-size: 0.88em;
  letter-spacing: -0.01em;
}
.td-ok {
  color: var(--td-color-accent);
}
.td-error {
  color: var(--td-color-brand-strong);
  background: var(--td-color-brand-soft);
  border-left: 3px solid var(--td-color-brand);
  border-radius: 6px;
  padding: 8px 12px;
  font-weight: 500;
  font-size: 0.92rem;
  margin: 0;
}
.td-strong {
  font-weight: 700;
  color: var(--td-color-text-strong);
}
.td-eyebrow {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--td-color-brand);
}

/* Header: white bar, logo left, Quicksand 700 nav with the current page in brand red (draft). */
.td-header {
  background: var(--td-color-surface);
  box-shadow: 0 1px 0 var(--td-color-border), 0 6px 18px -14px color-mix(in srgb, var(--td-color-text-strong) 40%, transparent);
  position: sticky;
  top: -37px; /* the top strip scrolls away, the main bar stays */
  z-index: 15;
}
.td-header-in {
  max-width: 1212px;
  margin: 0 auto;
  padding: 10px 16px;
  min-height: 68px;
  display: flex;
  align-items: center;
  gap: 12px 28px;
}
.td-logo {
  flex: none;
  border-radius: 6px;
}
.td-logo img {
  display: block;
  height: 40px;
  width: auto;
}
.td-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  font-weight: 700;
  font-size: 0.97rem;
  min-width: 0;
}
.td-nav a {
  position: relative;
  color: var(--td-color-text);
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 8px;
  white-space: nowrap;
}
.td-nav a:hover {
  color: var(--td-color-brand);
}
.td-nav a[aria-current="page"] {
  color: var(--td-color-brand);
}
.td-nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 2px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}
.td-head-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
}
.td-head-locales {
  display: none;
}

/* Top strip: contact on the left, company account, sign-out and language on the right. */
.td-topbar {
  background: var(--td-color-bg);
  border-bottom: 1px solid var(--td-color-border);
  font-size: 0.8rem;
}
.td-topbar-in {
  max-width: 1212px;
  margin: 0 auto;
  padding: 0 16px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.td-topbar-contact {
  display: flex;
  gap: 18px;
}
.td-topbar a {
  color: var(--td-color-text);
  text-decoration: none;
}
.td-topbar a:hover {
  color: var(--td-color-brand);
}
.td-topbar-right {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.td-who {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  font-family: var(--td-font-display);
  font-weight: 600;
  text-decoration: none;
}
.td-who b {
  color: var(--td-color-text-strong);
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.td-who span {
  color: var(--td-color-accent);
}
.td-who span::before {
  content: "·";
  margin-right: 6px;
  color: var(--td-color-text-muted);
}
.td-who:hover b {
  color: var(--td-color-brand);
}
.td-link-btn {
  border: 0;
  background: none;
  padding: 2px 0;
  font: 600 0.8rem var(--td-font-display);
  color: var(--td-color-text-muted);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}
.td-link-btn:hover {
  color: var(--td-color-brand);
}
.td-topbar .td-locales {
  border: 0;
  background: none;
  padding: 0;
}
.td-topbar .td-locales a {
  padding: 3px 6px;
}
.td-icon-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  border: 1px solid var(--td-color-border);
  background: var(--td-color-surface);
  border-radius: var(--td-radius);
  padding: 7px 13px;
  font: 700 0.9rem var(--td-font-display);
  color: var(--td-color-text);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color 0.15s, color 0.15s, background-color 0.15s;
}
.td-icon-btn:hover {
  border-color: var(--td-color-brand);
  color: var(--td-color-brand);
}
.td-icon-btn:focus-visible {
  border-radius: var(--td-radius);
}
.td-cart-btn {
  background: var(--td-color-brand);
  border-color: var(--td-color-brand);
  color: var(--td-color-surface);
}
.td-cart-btn:hover {
  background: var(--td-color-brand-strong);
  border-color: var(--td-color-brand-strong);
  color: var(--td-color-surface);
}
.td-count {
  font-family: var(--td-font-body);
  font-weight: 700;
  font-size: 0.75rem;
  line-height: 1.5;
  min-width: 1.6em;
  text-align: center;
  background: color-mix(in srgb, var(--td-color-surface) 24%, transparent);
  border-radius: 20px;
  padding: 0 6px;
  font-variant-numeric: tabular-nums;
}
.td-locales {
  display: inline-flex;
  border: 1px solid var(--td-color-border);
  border-radius: var(--td-radius);
  padding: 2px;
  gap: 2px;
  font: 700 0.76rem var(--td-font-display);
  background: var(--td-color-surface);
}
.td-locales a {
  text-decoration: none;
  color: var(--td-color-text-muted);
  padding: 5px 7px;
  border-radius: 7px;
  line-height: 1.2;
}
.td-locales a:hover {
  color: var(--td-color-brand);
  background: var(--td-color-brand-soft);
}
.td-locales a[aria-current="true"] {
  color: var(--td-color-surface);
  background: var(--td-color-brand);
}

/* Bottom tab bar on phones (draft: fixed icon bar with labels). Hidden on wide screens. */
.td-tabbar {
  display: none;
}
@media (max-width: 959px) {
  .td-header {
    top: 0;
  }
  .td-header-in {
    flex-wrap: wrap;
    gap: 6px 12px;
    min-height: 0;
    padding: 8px 16px 0;
  }
  .td-logo img {
    height: 34px;
  }
  .td-nav {
    order: 3;
    flex: 1 0 100%;
    overflow-x: auto;
    scrollbar-width: none;
    margin: 0 -16px;
    padding: 0 10px 4px;
    font-size: 0.92rem;
    scroll-snap-type: x proximity;
  }
  .td-nav::-webkit-scrollbar {
    display: none;
  }
  .td-nav a {
    scroll-snap-align: start;
    padding: 8px 8px 10px;
  }
  .td-nav a[aria-current="page"]::after {
    left: 8px;
    right: 8px;
    bottom: 3px;
  }
  .td-topbar,
  .td-head-signin,
  .td-cart-label {
    display: none;
  }
  .td-head-locales {
    display: inline-flex;
  }
  .td-head-right {
    gap: 8px;
  }
  .td-cart-btn {
    padding: 7px 10px;
  }
  .td-tabbar {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 15;
    background: var(--td-color-surface);
    border-top: 1px solid var(--td-color-border);
    padding: 4px 4px max(4px, env(safe-area-inset-bottom));
  }
  .td-tabbar a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 6px 2px 4px;
    font: 700 0.7rem/1.2 var(--td-font-display);
    color: var(--td-color-text-muted);
    text-decoration: none;
    border-radius: 8px;
  }
  .td-tabbar a span {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .td-tabbar a[aria-current="page"] {
    color: var(--td-color-brand);
  }
  .td-tabbar a:focus-visible {
    outline-offset: -2px;
  }
  .td-tab-icon {
    position: relative;
    display: inline-flex;
    overflow: visible !important;
  }
  .td-tab-count {
    position: absolute;
    top: -6px;
    right: -11px;
    min-width: 17px;
    padding: 0 4px;
    border-radius: 10px;
    background: var(--td-color-brand);
    color: var(--td-color-surface);
    font: 700 0.66rem/17px var(--td-font-body);
    text-align: center;
  }
  body {
    padding-bottom: calc(62px + env(safe-area-inset-bottom));
  }
}

/* Page */
.td-main {
  flex: 1 0 auto;
  width: 100%;
  max-width: 1212px;
  margin: 0 auto;
  padding: 28px 16px 72px;
}
.td-main:focus {
  outline: none;
}
.td-page {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.td-page > h1 {
  margin-bottom: 4px;
}
.td-narrow {
  width: 100%;
  max-width: 640px;
  margin-inline: auto;
}
.td-back {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  font: 700 0.9rem var(--td-font-display);
}
.td-back:hover {
  text-decoration: underline;
}
.td-panel {
  background: var(--td-color-surface);
  border-radius: var(--td-radius-lg, var(--td-radius));
  padding: 24px;
}
.td-panel > h2:first-child {
  color: var(--td-color-brand);
}
.td-hero {
  padding: 40px;
  background: var(--td-color-surface);
  border-radius: var(--td-radius-lg, var(--td-radius));
}

/* Buttons and controls (sizes from the draft: Quicksand 700, 10px radius, outline or filled) */
.td-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.2;
  border-radius: var(--td-radius);
  padding: 10px 18px 11px;
  min-height: 42px;
  cursor: pointer;
  border: 1px solid var(--td-color-brand);
  background: var(--td-color-brand);
  color: var(--td-color-surface);
  text-decoration: none;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.td-button:hover {
  background: var(--td-color-brand-strong);
  border-color: var(--td-color-brand-strong);
  color: var(--td-color-surface);
}
.td-button:focus-visible {
  outline-offset: 3px;
  border-radius: var(--td-radius);
}
.td-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.td-button:disabled:hover {
  background: var(--td-color-brand);
  border-color: var(--td-color-brand);
}
.td-ghost {
  background: var(--td-color-surface);
  color: var(--td-color-brand);
}
.td-ghost:hover {
  background: var(--td-color-brand-soft);
  border-color: var(--td-color-brand);
  color: var(--td-color-brand-strong);
}
.td-ghost:disabled:hover {
  background: var(--td-color-surface);
}
.td-wide {
  width: 100%;
}
.td-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.td-chip {
  display: inline-flex;
  align-items: center;
  font-weight: 600;
  font-size: 0.88rem;
  border: 1px solid var(--td-color-border);
  background: var(--td-color-surface);
  color: var(--td-color-text);
  border-radius: 999px;
  padding: 7px 15px;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color 0.15s, color 0.15s, background-color 0.15s;
}
.td-chip:hover {
  border-color: var(--td-color-brand);
  color: var(--td-color-brand);
}
.td-chip:focus-visible {
  border-radius: 999px;
}
.td-chip[aria-current="page"],
.td-chip[aria-checked="true"],
.td-chip[aria-pressed="true"] {
  border-color: var(--td-color-brand);
  color: var(--td-color-brand);
  background: var(--td-color-brand-soft);
}
.td-qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--td-color-border);
  border-radius: var(--td-radius);
  overflow: hidden;
  background: var(--td-color-surface);
}
.td-qty button {
  border: 0;
  background: transparent;
  width: 40px;
  height: 42px;
  cursor: pointer;
  font: 700 1.05rem var(--td-font-display);
  color: var(--td-color-text);
}
.td-qty button:hover {
  background: var(--td-color-brand-soft);
  color: var(--td-color-brand);
}
.td-qty button:focus-visible {
  outline-offset: -2px;
}
.td-qty button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.td-qty span {
  min-width: 34px;
  text-align: center;
  font: 700 0.98rem var(--td-font-display);
  font-variant-numeric: tabular-nums;
  color: var(--td-color-text-strong);
}
.td-qty-small button {
  width: 32px;
  height: 32px;
}
.td-qty-small span {
  min-width: 26px;
  font-size: 0.88rem;
}
.td-label {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--td-color-text-muted);
}
.td-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.td-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

/* Catalog */
.td-shop {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.td-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}
.td-count-line {
  margin-top: -4px;
}
.td-notice {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  align-items: center;
  justify-content: space-between;
  background: var(--td-color-surface);
  border: 1px dashed var(--td-color-brand);
  border-radius: var(--td-radius);
  padding: 14px 18px;
}
.td-notice > span {
  flex: 1 1 320px;
}
.td-notice b {
  font-family: var(--td-font-display);
  color: var(--td-color-brand);
}
.td-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(232px, 1fr));
  gap: 16px;
}
.td-card {
  background: var(--td-color-surface);
  border-radius: var(--td-radius-lg, var(--td-radius));
  border: 1px solid transparent;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: border-color 0.15s;
}
.td-card:hover {
  border-color: var(--td-color-border);
}
.td-card-img {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 190px;
  padding: 16px 16px 8px;
  color: var(--td-color-border);
}
.td-card-img:focus-visible {
  outline-offset: -4px;
  border-radius: var(--td-radius-lg, var(--td-radius));
}
.td-card-img img {
  max-height: 100%;
  width: auto;
  max-width: 100%;
  min-height: 0;
  object-fit: contain;
  transition: transform 0.25s ease;
}
.td-card:hover .td-card-img img {
  transform: scale(1.03);
}
/* Product placeholder (theme placeholder.svg, DECISIONS 86): just the logo, laid out exactly like a
   photo (same box, object-fit: contain), slightly faded so it reads as "no photo yet". */
img.td-placeholder {
  opacity: 0.32;
}
.td-card:hover .td-card-img img.td-placeholder {
  transform: none;
}
.td-card-info {
  padding: 4px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.td-card-name {
  font: 700 1.06rem/1.25 var(--td-font-display);
  color: var(--td-color-brand);
  text-decoration: none;
}
.td-card-name:hover {
  text-decoration: underline;
}
.td-card-meta {
  font-size: 0.8rem;
  color: var(--td-color-text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 2px 10px;
}
.td-card .td-button {
  margin-top: auto;
}
.td-card .td-price,
.td-card .td-locked {
  margin-bottom: 6px;
}

/* Catalog search: input with a leading icon, submit as an outline button. */
.td-search {
  position: relative;
  display: flex;
  gap: 8px;
  flex: 1 1 280px;
  max-width: 440px;
}
.td-search > svg {
  position: absolute;
  left: 12px;
  top: 12px;
  color: var(--td-color-text-muted);
  pointer-events: none;
}
.td-search > input[type="search"] {
  flex: 1;
  padding-left: 38px;
}

@media (max-width: 639px) {
  /* Category chips scroll sideways in one row instead of wrapping into a block. */
  .td-chips-scroll {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    margin: 0 -16px;
    padding: 2px 16px;
    width: calc(100% + 32px);
  }
  .td-chips-scroll::-webkit-scrollbar {
    display: none;
  }
  .td-search {
    max-width: none;
    flex-basis: 100%;
  }
  .td-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .td-card-img {
    height: 128px;
    padding: 12px 10px 4px;
  }
  .td-card-info {
    padding: 2px 12px 12px;
    gap: 6px;
  }
  .td-card-name {
    font-size: 0.95rem;
  }
  .td-card-meta {
    font-size: 0.72rem;
  }
  .td-card .td-button {
    font-size: 0.85rem;
    padding: 8px 10px;
    min-height: 38px;
  }
  .td-card .td-price-now {
    font-size: 1.05rem;
  }
  .td-card .td-tag {
    font-size: 0.62rem;
    white-space: normal;
  }
}

/* Empty states and loading skeletons */
.td-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
  background: var(--td-color-surface);
  border-radius: var(--td-radius-lg, var(--td-radius));
  padding: 40px 20px;
  color: var(--td-color-text-muted);
}
.td-empty > svg {
  color: var(--td-color-brand);
  opacity: 0.7;
}
.td-empty p {
  margin: 0;
  max-width: 46ch;
  font-size: 1.02rem;
}
.td-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.td-skeleton {
  display: block;
  border-radius: 6px;
  background: linear-gradient(
    90deg,
    var(--td-color-bg) 0%,
    color-mix(in srgb, var(--td-color-border) 70%, var(--td-color-bg)) 50%,
    var(--td-color-bg) 100%
  );
  background-size: 200% 100%;
  animation: td-shimmer 1.3s ease-in-out infinite;
}
@keyframes td-shimmer {
  from {
    background-position: 100% 0;
  }
  to {
    background-position: -100% 0;
  }
}
.td-skeleton-card {
  padding: 16px 18px 18px;
  gap: 12px;
}
.td-skeleton-img {
  height: 160px;
  border-radius: var(--td-radius);
}
.td-skeleton-line {
  height: 14px;
}
.td-skeleton-short {
  width: 55%;
}
.td-skeleton-title {
  height: 30px;
  width: 70%;
}
.td-skeleton-btn {
  height: 42px;
  border-radius: var(--td-radius);
  margin-top: 6px;
}
.td-skeleton-detail-img {
  min-height: 280px;
  border-radius: var(--td-radius-lg, var(--td-radius));
}
@media (prefers-reduced-motion: reduce) {
  .td-skeleton {
    animation: none;
  }
}

/* Prices */
.td-price {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-height: 3.2em;
}
.td-price-now {
  font: 700 1.2rem var(--td-font-display);
  color: var(--td-color-text-strong);
  font-variant-numeric: tabular-nums;
}
.td-price-large .td-price-now {
  font-size: 1.45rem;
}
.td-price-now small {
  font: 500 0.78rem var(--td-font-body);
  color: var(--td-color-text-muted);
}
.td-price-was {
  font-size: 0.82rem;
  color: var(--td-color-text-muted);
}
.td-price-estimate {
  font-size: 0.85rem;
  color: var(--td-color-text);
}
.td-locked {
  font: 600 0.9rem var(--td-font-display);
  color: var(--td-color-text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 3.2em;
}
.td-tag {
  align-self: flex-start;
  font: 700 0.7rem var(--td-font-display);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 5px;
  padding: 2px 7px;
}
.td-tag-company,
.td-tag-quote {
  background: var(--td-color-accent-soft);
  color: var(--td-color-accent);
}
.td-tag-tier,
.td-tag-campaign {
  background: var(--td-color-brand-soft);
  color: var(--td-color-brand-strong);
}
/* A stand-in price from an import (DECISIONS 117). */
.td-tag-placeholder {
  background: var(--td-color-warning-soft, #fff1d6);
  color: var(--td-color-warning, #8a5a00);
}

/* Product detail (page and popup): image left, then title, order box, food information. */
.td-detail {
  display: grid;
  grid-template-columns: minmax(0, 360px) minmax(0, 1fr);
  gap: 32px;
}
.td-detail-img {
  position: sticky;
  top: 0;
  background: var(--td-color-bg);
  border-radius: var(--td-radius-lg, var(--td-radius));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  aspect-ratio: 1 / 1.05;
  align-self: start;
}
.td-page .td-detail-img {
  top: 92px;
}
.td-detail-img img {
  max-height: 100%;
  min-height: 0;
  max-width: 100%;
  width: auto;
  object-fit: contain;
}
.td-detail-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}
.td-detail-title {
  color: var(--td-color-brand);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin: 4px 0 2px;
}
.td-detail-body p {
  margin: 0;
}
.td-detail-body > p {
  max-width: 64ch;
}
.td-buy {
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--td-color-bg);
  border-radius: var(--td-radius-lg, var(--td-radius));
  padding: 18px;
}
.td-buy .td-actions {
  gap: 10px 14px;
}
.td-specs {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 6px 16px;
  font-size: 0.92rem;
  margin: 0;
}
.td-specs dt {
  color: var(--td-color-text-muted);
}
.td-specs dd {
  margin: 0;
  color: var(--td-color-text-strong);
  overflow-wrap: anywhere;
}
.td-food {
  border-top: 1px solid var(--td-color-border);
  padding-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.td-food h2 {
  font-size: 1.1rem;
  color: var(--td-color-brand);
  margin: 0;
}

/* Composition: label and share above a bar, like the progress bars on the draft's Kebab page. */
.td-comp {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.td-comp > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 12px;
  align-items: baseline;
  font-size: 0.86rem;
}
.td-comp > div > span:first-child {
  color: var(--td-color-text-strong);
}
.td-bar {
  grid-column: 1 / -1;
  grid-row: 2;
  height: 10px;
  background: color-mix(in srgb, var(--td-color-border) 70%, var(--td-color-bg));
  border-radius: 3px;
  overflow: hidden;
}
.td-bar i {
  display: block;
  height: 100%;
  background: var(--td-color-brand);
  border-radius: 3px;
}
.td-comp b {
  grid-column: 2;
  grid-row: 1;
  text-align: right;
  font: 700 0.86rem var(--td-font-display);
  color: var(--td-color-brand);
  font-variant-numeric: tabular-nums;
}

/* Modal (product popup over the catalog) */
.td-scrim {
  position: fixed;
  inset: 0;
  background: color-mix(in srgb, var(--td-color-text-strong) 50%, transparent);
  z-index: 30;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 48px 16px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.td-modal {
  position: relative;
  width: min(940px, 100%);
  background: var(--td-color-surface);
  border-radius: var(--td-radius-lg, var(--td-radius));
  padding: 32px;
  box-shadow: 0 30px 60px -24px color-mix(in srgb, var(--td-color-text-strong) 45%, transparent);
}
.td-modal:focus {
  outline: none;
}
.td-modal .td-detail-img {
  top: 0;
}
.td-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--td-color-border);
  background: var(--td-color-surface);
  cursor: pointer;
  font: 600 1.35rem/1 var(--td-font-display);
  color: var(--td-color-text);
}
.td-close:hover {
  border-color: var(--td-color-brand);
  color: var(--td-color-brand);
}
.td-close:focus-visible {
  border-radius: 50%;
}
@media (max-width: 760px) {
  .td-detail {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }
  .td-detail-img {
    position: static;
    aspect-ratio: auto;
    height: 240px;
  }
  /* The popup becomes a full-height sheet on phones. */
  .td-scrim {
    padding: 0;
    align-items: stretch;
  }
  .td-modal {
    min-height: 100%;
    border-radius: 0;
    padding: 60px 16px 28px;
    box-shadow: none;
  }
  .td-close {
    position: fixed;
    top: 10px;
    right: 12px;
  }
  .td-buy {
    padding: 14px;
  }
}

/* Cart and checkout (styling only; the flow belongs to the checkout work). */
.td-cart {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 18px;
  align-items: start;
}
.td-lines {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding-block: 8px;
}
.td-line {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px 0;
}
.td-line + .td-line {
  border-top: 1px solid var(--td-color-border);
}
.td-line img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  background: var(--td-color-bg);
  border-radius: var(--td-radius);
  padding: 4px;
}
.td-line-title {
  font: 700 0.98rem/1.3 var(--td-font-display);
  color: var(--td-color-text-strong);
}
.td-line-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  font: 700 1rem var(--td-font-display);
  color: var(--td-color-text-strong);
  font-variant-numeric: tabular-nums;
}
.td-lines > p {
  padding-top: 10px;
  border-top: 1px solid var(--td-color-border);
}
/* A checkbox with a sentence (consumer terms, DECISIONS 87). */
.td-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.9rem;
}
.td-check input {
  margin-top: 3px;
}
/* Business or private sign-up (DECISIONS 87). */
.td-segment {
  display: flex;
  gap: 8px;
  margin: 0 0 16px;
}

.td-checkout {
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: sticky;
  top: 88px;
}
.td-opt {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 10px;
  border: 1px solid var(--td-color-border);
  border-radius: var(--td-radius);
  padding: 12px 14px;
  cursor: pointer;
  font-size: 0.92rem;
  transition: border-color 0.15s, background-color 0.15s;
}
.td-opt:hover {
  border-color: var(--td-color-brand);
}
.td-opt input {
  margin: 3px 0 0;
  accent-color: var(--td-color-brand);
}
.td-opt b {
  font-family: var(--td-font-display);
  color: var(--td-color-text-strong);
}
.td-opt small {
  display: block;
  color: var(--td-color-text-muted);
  font-size: 0.82rem;
}
.td-opt:has(input:checked) {
  border-color: var(--td-color-brand);
  background: color-mix(in srgb, var(--td-color-brand-soft) 45%, var(--td-color-surface));
}
.td-opt:has(input:focus-visible) {
  outline: 2px solid var(--td-color-brand);
  outline-offset: 2px;
}
.td-days {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.td-day {
  font: 700 0.84rem/1.2 var(--td-font-display);
  border: 1px solid var(--td-color-border);
  background: var(--td-color-surface);
  border-radius: 8px;
  padding: 7px 11px;
  min-width: 58px;
  cursor: pointer;
  text-align: center;
  color: var(--td-color-text);
}
.td-day:hover {
  border-color: var(--td-color-brand);
}
.td-day small {
  display: block;
  font-weight: 600;
  color: var(--td-color-text-muted);
}
.td-day[aria-pressed="true"] {
  border-color: var(--td-color-brand);
  color: var(--td-color-brand);
  background: var(--td-color-brand-soft);
}
.td-day:disabled {
  text-decoration: line-through;
  opacity: 0.5;
  cursor: not-allowed;
}
.td-totals {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 12px;
  margin: 0;
  padding-top: 14px;
  border-top: 1px solid var(--td-color-border);
  font-variant-numeric: tabular-nums;
}
.td-totals dt {
  color: var(--td-color-text-muted);
}
.td-totals dd {
  margin: 0;
  text-align: right;
}
.td-totals .td-strong {
  font: 700 1.15rem var(--td-font-display);
  color: var(--td-color-text-strong);
  padding-top: 6px;
}
@media (max-width: 960px) {
  .td-cart {
    grid-template-columns: minmax(0, 1fr);
  }
  .td-checkout {
    position: static;
  }
}
@media (max-width: 479px) {
  .td-line {
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 4px 12px;
  }
  .td-line img {
    width: 52px;
    height: 52px;
    grid-row: span 2;
  }
  .td-line-right {
    grid-column: 2;
    flex-direction: row-reverse;
    justify-content: space-between;
    align-items: center;
  }
}

/* Forms */
.td-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.td-form fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}
.td-form fieldset + fieldset {
  border-top: 1px solid var(--td-color-border);
  padding-top: 16px;
}
.td-form legend {
  font: 700 1.02rem var(--td-font-display);
  color: var(--td-color-brand);
  margin-bottom: 6px;
  padding: 0;
}
.td-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}
.td-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font: 600 0.84rem var(--td-font-display);
  color: var(--td-color-text);
}
.td-field input,
.td-field select,
.td-field textarea,
.td-inline-form input,
.td-qty-input,
.td-note-input,
.td-search input {
  font: 400 1rem var(--td-font-body);
  border: 1px solid var(--td-color-border);
  border-radius: var(--td-radius);
  padding: 10px 12px;
  min-height: 42px;
  color: var(--td-color-text-strong);
  background: var(--td-color-surface);
  min-width: 0;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.td-field input:hover,
.td-field select:hover,
.td-field textarea:hover,
.td-inline-form input:hover,
.td-qty-input:hover,
.td-note-input:hover,
.td-search input:hover {
  border-color: color-mix(in srgb, var(--td-color-text-muted) 55%, var(--td-color-border));
}
.td-field input:focus,
.td-field select:focus,
.td-field textarea:focus,
.td-inline-form input:focus,
.td-qty-input:focus,
.td-note-input:focus,
.td-search input:focus {
  outline: none;
  border-color: var(--td-color-brand);
  box-shadow: 0 0 0 3px var(--td-color-brand-soft);
}
.td-field input::placeholder,
.td-search input::placeholder {
  color: var(--td-color-text-muted);
}

/* Account, orders and other tables */
.td-done {
  border: 1px solid var(--td-color-accent);
  border-left-width: 5px;
}
.td-done > h2:first-child {
  color: var(--td-color-accent);
}
.td-account-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.td-account-head p {
  margin: 0;
}
.td-panel.td-toolbar h2 {
  margin-bottom: 2px;
  color: var(--td-color-brand);
}
.td-panel > .td-muted:only-child,
.td-panel > h2 + .td-muted:last-child {
  text-align: center;
  padding: 18px 0 8px;
}
.td-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
.td-table th {
  text-align: left;
  font: 700 0.72rem var(--td-font-display);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--td-color-text-muted);
  padding: 6px 10px 8px;
  white-space: nowrap;
}
.td-table td {
  border-top: 1px solid var(--td-color-border);
  padding: 12px 10px;
  vertical-align: middle;
}
.td-table th:first-child,
.td-table td:first-child {
  padding-left: 0;
}
.td-table th:last-child,
.td-table td:last-child {
  padding-right: 0;
}
.td-table tbody tr:hover td {
  background: color-mix(in srgb, var(--td-color-bg) 60%, var(--td-color-surface));
}
.td-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.td-table th.td-num {
  text-align: right;
}

@media (max-width: 760px) {
  .td-panel {
    padding: 18px 16px;
  }
  .td-hero {
    padding: 28px 20px;
  }
  .td-table {
    font-size: 0.85rem;
  }
  /* Wide tables (orders) scroll sideways inside their panel instead of widening the page. */
  .td-table:not(.td-list-table) {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}

/* Shopping lists (plugins/shopping-lists) */
.td-picker {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.td-picker-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  border: 1px solid var(--td-color-border);
  border-radius: var(--td-radius);
  background: var(--td-color-surface);
  padding: 12px;
}
.td-picker-panel ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.td-list-opt {
  width: 100%;
  text-align: left;
  display: flex;
  gap: 8px;
  align-items: center;
  font: 500 0.92rem var(--td-font-body);
  color: var(--td-color-text-strong);
  background: var(--td-color-bg);
  border: 1px solid var(--td-color-border);
  border-radius: var(--td-radius);
  padding: 10px 12px;
  cursor: pointer;
}
.td-list-opt span {
  color: var(--td-color-brand);
}
.td-list-opt:hover {
  border-color: var(--td-color-brand);
}
.td-inline-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.td-inline-form input {
  flex: 1 1 180px;
}
.td-qty-input {
  width: 5.5em;
}
.td-note-input {
  width: 100%;
  min-width: 8em;
}
.td-x {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--td-color-border);
  background: var(--td-color-surface);
  color: var(--td-color-text-muted);
  cursor: pointer;
  font: 600 1rem var(--td-font-display);
}
.td-x:hover {
  color: var(--td-color-brand);
  border-color: var(--td-color-brand);
}
.td-changes {
  margin: 0;
  padding-left: 1.2em;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.td-small-btn {
  padding: 6px 12px;
  font-size: 0.84rem;
  min-height: 34px;
}
.td-popover {
  position: fixed;
  right: 16px;
  bottom: 16px;
  width: min(380px, calc(100vw - 32px));
  z-index: 40;
  box-shadow: 0 16px 40px -12px color-mix(in srgb, var(--td-color-text-strong) 35%, transparent);
  border-radius: var(--td-radius-lg, var(--td-radius));
}
.td-popover > .td-x {
  position: absolute;
  top: 10px;
  right: 10px;
}
.td-popover > .td-panel {
  margin: 0;
}
.td-list-table td {
  vertical-align: top;
}
.td-lists {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.td-lists a {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-decoration: none;
  border: 1px solid var(--td-color-border);
  border-radius: var(--td-radius);
  background: var(--td-color-surface);
  padding: 16px;
  color: var(--td-color-text);
  transition: border-color 0.15s, background-color 0.15s;
}
.td-lists a:hover {
  border-color: var(--td-color-brand);
  background: color-mix(in srgb, var(--td-color-brand-soft) 35%, var(--td-color-surface));
}
.td-lists b {
  font-family: var(--td-font-display);
  font-size: 1.02rem;
  color: var(--td-color-brand);
}
@media (max-width: 640px) {
  .td-list-table thead {
    display: none;
  }
  .td-list-table tr {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 6px;
    padding: 10px 0;
    border-bottom: 1px solid var(--td-color-border);
  }
  .td-list-table td {
    border: 0;
    padding: 0;
  }
}
.td-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  margin-top: 14px;
}
.td-stack > .td-panel {
  align-self: stretch;
}

/* Quotes (plugins/quotes) */
.td-pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.td-field textarea,
textarea.td-note-input {
  resize: vertical;
  min-height: 84px;
}
.td-thread {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.td-msg {
  max-width: 85%;
  border: 1px solid var(--td-color-border);
  border-radius: var(--td-radius);
  background: var(--td-color-bg);
  padding: 10px 12px;
}
.td-msg p {
  margin: 4px 0 0;
}
.td-msg-own {
  align-self: flex-end;
  background: var(--td-color-brand-soft);
  border-color: var(--td-color-brand-soft);
}

/* Content blocks (plugins/content). Section titles in brand red as on the draft. */
.td-content {
  display: flex;
  flex-direction: column;
  gap: 36px;
}
.td-block > h2,
.td-block-head h2,
.td-prose > h2,
.td-block > h1 {
  font-size: clamp(1.45rem, 2.6vw, 2rem);
  font-weight: 700;
  color: var(--td-color-brand);
  margin: 0 0 14px;
}
.td-block-head {
  max-width: 72ch;
  margin-bottom: 18px;
}
.td-block-head h2 {
  margin-bottom: 8px;
}
.td-prose p {
  line-height: 1.65;
  max-width: 72ch;
}
.td-prose img {
  max-width: 100%;
  border-radius: var(--td-radius-lg, var(--td-radius));
}

/* Hero. Without an image: a white card. With one: photo, dark scrim, white type. */
.td-hero.td-block {
  position: relative;
  overflow: hidden;
  padding: clamp(28px, 5vw, 56px);
}
.td-hero h1,
.td-hero h2 {
  font-size: clamp(1.9rem, 4.4vw, 3.1rem);
  font-weight: 700;
  color: var(--td-color-text-strong);
  max-width: 22ch;
  margin: 0 0 14px;
}
.td-hero-text {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
}
.td-hero-text > h1,
.td-hero-text > h2 {
  margin: 0;
}
.td-hero-lead {
  font-size: 1.08rem;
  max-width: 62ch;
}
.td-hero-lead p {
  margin-bottom: 6px;
}
/* Without a photo (also a split hero whose image is missing): one text column, eyebrow →
   headline → lead → buttons, left-aligned, so no half of the card is left empty. */
.td-hero:not(.td-hero-photo):not(.td-hero-split) .td-hero-text {
  max-width: 720px;
}
.td-hero-photo {
  min-height: clamp(320px, 42vw, 460px);
  display: flex;
  align-items: flex-end;
  background: var(--td-color-text-strong);
}
.td-hero-photo .td-hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
}
.td-hero-photo::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to top,
    color-mix(in srgb, var(--td-color-text-strong) 82%, transparent),
    color-mix(in srgb, var(--td-color-text-strong) 25%, transparent) 75%
  );
}
.td-hero-photo .td-hero-text {
  z-index: 2;
}
.td-hero-photo h1,
.td-hero-photo h2,
.td-hero-photo .td-hero-lead {
  color: var(--td-color-surface);
}
.td-hero-photo :focus-visible {
  outline-color: var(--td-color-surface);
}

.td-image-text {
  display: grid;
  gap: 24px 40px;
  align-items: center;
}
.td-image-text img {
  width: 100%;
  border-radius: var(--td-radius-lg, var(--td-radius));
  object-fit: cover;
  aspect-ratio: 4 / 3;
}
@media (min-width: 800px) {
  .td-image-text {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .td-image-left img {
    order: -1;
  }
}

/* Variant cards (home and Kebab page, DECISIONS 90): photo on top, name, weights, price, button. */
.td-variant-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 24px;
}
.td-variant-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--td-color-surface);
  border-radius: var(--td-radius-lg, var(--td-radius));
  padding: 18px;
  border: 1px solid transparent;
  transition: border-color 0.15s;
}
.td-variant-card:hover {
  border-color: var(--td-color-border);
}
.td-variant-img {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 230px;
  overflow: hidden;
  border-radius: var(--td-radius);
}
.td-variant-img img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}
.td-variant-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.td-variant-body p {
  margin: 0;
}
.td-variant-card h3 {
  margin: 0;
  font-size: 1.25rem;
}
.td-variant-card h3 a {
  color: var(--td-color-brand);
  text-decoration: none;
}
.td-variant-card h3 a:hover {
  text-decoration: underline;
}
.td-variant-body .td-button {
  margin-top: auto;
}
.td-weight-chips {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.td-weight-chips li {
  font: 600 0.82rem var(--td-font-display);
  border: 1px solid var(--td-color-border);
  border-radius: 30px;
  padding: 3px 11px;
}
.td-weight-chips .td-more {
  border-color: transparent;
  color: var(--td-color-text-muted);
  padding: 3px 4px;
}
@media (max-width: 479px) {
  .td-variant-img {
    height: 180px;
  }
}

/* Process steps: numbered cards, number in an outlined circle (vision prototype). */
.td-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 16px;
  counter-reset: none;
}
.td-step {
  background: var(--td-color-surface);
  border-radius: var(--td-radius-lg, var(--td-radius));
  padding: 22px 22px 24px;
}
/* "How to order": numbered columns inside one white panel (process_steps, variant text). */
.td-panel .td-steps {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 24px;
}
.td-panel .td-step {
  padding: 0;
}
.td-panel .td-steps h3 {
  color: var(--td-color-text-strong);
}
.td-panel .td-step p {
  margin: 0;
}
.td-steps h3 {
  margin: 14px 0 6px;
  font-size: 1.1rem;
  color: var(--td-color-brand);
}
.td-step-no {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--td-color-brand);
  color: var(--td-color-brand);
  font: 700 1rem var(--td-font-display);
}

/* Process with photos (DECISIONS 90): numbered cards, 4 / 2 / 1 columns, the number badge
   overlapping the photo's lower edge; a step without a photo shows the faded logo. */
.td-photo-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
}
.td-photo-steps li {
  background: var(--td-color-surface);
  border-radius: var(--td-radius-lg, var(--td-radius));
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-bottom: 22px;
}
.td-photo-step-img {
  width: 100%;
  height: 190px;
  display: grid;
  place-items: center;
  border-bottom: 1px solid var(--td-color-border);
}
.td-photo-step-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.td-photo-step-img img.td-placeholder {
  width: 46%;
  height: auto;
  object-fit: contain;
}
.td-photo-steps .td-step-no {
  margin-top: -19px;
  background: var(--td-color-brand);
  color: var(--td-color-surface);
  border: 3px solid var(--td-color-surface);
  width: 38px;
  height: 38px;
}
.td-photo-steps h3 {
  margin: 10px 20px 0;
  font-size: 1.05rem;
}
.td-photo-steps p {
  margin: 10px 20px 0;
  font-size: 0.95rem;
  line-height: 1.5;
}
@media (max-width: 980px) {
  .td-photo-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 560px) {
  .td-photo-steps {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Hero split (home): text beside the photo, two buttons, a badge on the photo. */
.td-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.td-hero-split.td-block {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 48px;
  align-items: center;
  background: none;
  padding: 24px 0 8px;
  overflow: visible;
}
.td-hero-split .td-hero-text {
  display: flex;
}
.td-hero-split h1,
.td-hero-split h2 {
  font-size: clamp(2.1rem, 4.6vw, 3.5rem);
  line-height: 1.08;
  max-width: none;
  text-wrap: balance;
}
.td-hero-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 0.9rem;
  color: var(--td-color-text-muted);
}
.td-hero-photo .td-hero-note {
  color: inherit;
}
.td-hero-media {
  position: relative;
}
.td-hero-media > img {
  display: block;
  width: 100%;
  height: clamp(280px, 38vw, 500px);
  object-fit: cover;
  border-radius: var(--td-radius-lg, var(--td-radius));
}
.td-hero-badge {
  position: absolute;
  left: 20px;
  bottom: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--td-color-surface);
  border-radius: 14px;
  padding: 14px 18px;
  box-shadow: 0 12px 30px -16px rgba(35, 31, 29, 0.45);
}
.td-hero-badge b {
  font: 700 1.6rem var(--td-font-display);
  color: var(--td-color-brand);
}
.td-hero-badge p {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.35;
  color: var(--td-color-text-strong);
}
@media (max-width: 980px) {
  .td-hero-split.td-block {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }
}

/* A section on the soft brand colour (variant cards on the home page). */
.td-band {
  background: var(--td-color-brand-soft);
  border-radius: var(--td-radius-lg, var(--td-radius));
  padding: clamp(24px, 5vw, 56px);
}
.td-band-link {
  margin: 24px 0 0;
  text-align: center;
  font: 700 1rem var(--td-font-display);
}
.td-head-row {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  flex-wrap: wrap;
  max-width: none;
}
.td-head-row a {
  font: 700 1rem var(--td-font-display);
  text-decoration: none;
}

/* Category tiles: the category's photo (or the faded logo) and its name. */
/* Columns follow the number of tiles (`--td-cols`, lib/grid: never a lone tile in a row). */
.td-tiles {
  display: grid;
  grid-template-columns: repeat(var(--td-cols, 4), minmax(0, 1fr));
  gap: 20px;
}
.td-tile {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--td-color-surface);
  border-radius: var(--td-radius-lg, var(--td-radius));
  padding: 18px;
  text-decoration: none;
  border: 1px solid transparent;
  transition: border-color 0.15s;
}
.td-tile:hover {
  border-color: var(--td-color-border);
}
.td-tile img {
  width: 100%;
  height: 170px;
  object-fit: contain;
}
.td-tile span {
  font: 700 1.1rem var(--td-font-display);
  color: var(--td-color-text-strong);
}
@media (max-width: 980px) {
  .td-tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }
  /* An odd last tile spans the row on two columns. */
  .td-tiles > :last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
  .td-tile img {
    height: 130px;
  }
}

/* Delivery and pickup cards. */
/* One column per card up to four (`--td-cols`, lib/grid), stacked on phones. */
.td-info-cards {
  display: grid;
  grid-template-columns: repeat(var(--td-cols, 2), minmax(0, 1fr));
  gap: 24px;
}
@media (max-width: 760px) {
  .td-info-cards {
    grid-template-columns: 1fr;
  }
}
.td-info-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  color: var(--td-color-brand);
}
.td-info-card h3 {
  margin: 0;
  font-size: 1.35rem;
  color: var(--td-color-text-strong);
}
.td-info-card p {
  margin: 0;
  color: var(--td-color-text);
}

/* Brands as text, never logos (DECISIONS 90). */
.td-brands {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 18px 44px;
  font: 700 1.25rem var(--td-font-display);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--td-color-text-muted);
}
.td-brands ul {
  display: contents;
  list-style: none;
}
.td-brands-label {
  font-size: 0.8rem;
  letter-spacing: 0.12em;
}

/* Call-to-action band. */
.td-cta-band {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  background: var(--td-color-brand);
  color: var(--td-color-surface);
  border-radius: var(--td-radius-lg, var(--td-radius));
  padding: clamp(28px, 5vw, 48px);
}
.td-cta-band > div {
  max-width: 640px;
}
.td-cta-band h2,
.td-cta-band.td-block > div > h2 {
  color: var(--td-color-surface);
  margin: 0 0 8px;
}
.td-cta-band p {
  margin: 0;
  color: var(--td-color-brand-soft);
}

/* FAQ: native disclosure, keyboard and screen-reader friendly. */
.td-faq details {
  border-top: 1px solid var(--td-color-border);
  padding: 14px 0;
}
.td-faq details:last-child {
  border-bottom: 1px solid var(--td-color-border);
}
.td-faq summary {
  cursor: pointer;
  font: 700 1.05rem var(--td-font-display);
  color: var(--td-color-text-strong);
}
.td-faq details p {
  margin: 10px 0 0;
}

/* Full-bleed bands inside the page container: the background reaches the screen edges without
   widening the page (an outset border-image paints outside the box; no horizontal scroll). */
.td-bleed-dark,
.td-line-hero {
  background: var(--td-color-dark, var(--td-color-text-strong));
  border-image: conic-gradient(var(--td-color-dark, var(--td-color-text-strong)) 0 0) fill 0 // 0 100vmax;
}

/* Product line hero (Kebab page, DECISIONS 92): dark band, huge title, cones over an arch. */
.td-line-hero.td-block {
  color: var(--td-color-dark-text, var(--td-color-surface));
  padding: 72px 0 0;
  margin-top: -24px;
}
.td-line-hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 40px;
  align-items: end;
}
.td-line-hero-text {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-bottom: 56px;
}
.td-line-hero .td-eyebrow {
  color: var(--td-color-dark-accent, var(--td-color-brand-soft));
}
.td-line-hero .td-line-hero-title,
.td-line-hero.td-block > div h1 {
  margin: 0;
  font: 700 clamp(4.5rem, 10vw, 7.5rem) / 0.92 var(--td-font-display);
  letter-spacing: -0.02em;
  color: var(--td-color-surface);
}
.td-line-hero-text p {
  margin: 0;
  font-size: 1.19rem;
  line-height: 1.55;
  max-width: 470px;
  color: var(--td-color-dark-text, var(--td-color-border));
}
.td-line-hero .td-ghost {
  background: transparent;
  color: var(--td-color-surface);
  border-color: var(--td-color-dark-muted, var(--td-color-text-muted));
}
.td-line-hero-media {
  position: relative;
  display: flex;
  justify-content: center;
}
.td-line-hero-arch {
  position: absolute;
  left: 6%;
  right: 6%;
  bottom: 0;
  height: 64%;
  background: var(--td-color-dark-raised, var(--td-color-text));
  border-radius: 300px 300px 0 0;
}
.td-cones {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  width: 100%;
}
.td-cone {
  margin: 0 -18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.td-cone img {
  height: 300px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}
.td-cone-main {
  position: relative;
  z-index: 1;
}
.td-cone-main img {
  height: 380px;
}
.td-cone img.td-placeholder {
  width: 160px;
  height: auto;
  opacity: 0.25;
  filter: grayscale(1) brightness(2);
}
.td-cone figcaption {
  font: 0.75rem var(--td-font-mono);
  color: var(--td-color-dark-muted, var(--td-color-text-muted));
  padding-bottom: 18px;
}
.td-specs-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: 0;
  padding: 22px 0;
  border-top: 1px solid var(--td-color-dark-line, var(--td-color-text));
  background: var(--td-color-dark-deep, var(--td-color-text-strong));
  border-image: conic-gradient(var(--td-color-dark-deep, var(--td-color-text-strong)) 0 0) fill 0 // 0 100vmax;
}
.td-specs-strip div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-right: 16px;
}
.td-specs-strip dt {
  font-size: 0.75rem;
  color: var(--td-color-dark-muted, var(--td-color-text-muted));
}
.td-specs-strip dd {
  margin: 0;
  font: 0.94rem var(--td-font-mono);
  color: var(--td-color-surface);
}
@media (max-width: 980px) {
  .td-line-hero-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }
  .td-line-hero-text {
    padding-bottom: 0;
  }
  .td-specs-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 18px;
  }
}
@media (max-width: 560px) {
  .td-cone img {
    height: 170px;
  }
  .td-cone-main img {
    height: 220px;
  }
  .td-cone {
    margin: 0 -10px;
  }
}

/* Product table: chips filter, the table scrolls in its own box on small screens. */
.td-table-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.td-table-head p {
  margin: 0;
}
.td-table-box {
  /* The table scrolls in here. Positioned, so the visually hidden headers (absolute) stay inside
     the scroll box instead of widening the page. */
  position: relative;
  overflow-x: auto;
  background: var(--td-color-surface);
  border-radius: var(--td-radius-lg, var(--td-radius));
}
.td-product-table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
  font-size: 0.94rem;
}
.td-product-table th {
  text-align: left;
  padding: 16px 12px 12px;
  font: 700 0.75rem var(--td-font-display);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--td-color-text-muted);
}
.td-product-table td {
  padding: 10px 12px;
  border-top: 1px solid var(--td-color-border);
  vertical-align: middle;
}
.td-product-table th:first-child,
.td-product-table td:first-child {
  padding-left: 24px;
}
.td-product-table th:last-child,
.td-product-table td:last-child {
  padding-right: 24px;
}
.td-table-thumb img {
  width: 44px;
  height: 56px;
  object-fit: contain;
  display: block;
}
.td-table-name {
  font: 700 1rem var(--td-font-display);
  color: var(--td-color-text-strong);
}
.td-block-line {
  display: block;
}
.td-table-action {
  text-align: right;
  white-space: nowrap;
}
.td-table-note {
  margin-top: 14px;
}

/* Production timeline: numbered nodes on a line, vertical on phones. */
.td-timeline-band {
  background: var(--td-color-surface);
  border-image: conic-gradient(var(--td-color-surface) 0 0) fill 0 // 0 100vmax;
  padding: 64px 0;
}
.td-timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  position: relative;
}
.td-timeline::before {
  content: "";
  position: absolute;
  left: 6%;
  right: 6%;
  top: 21px;
  height: 2px;
  background: var(--td-color-border);
}
.td-timeline li {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  padding: 0 8px;
}
.td-timeline .td-step-no {
  width: 44px;
  height: 44px;
  background: var(--td-color-surface);
}
.td-timeline h3 {
  margin: 0;
  font-size: 1rem;
  color: var(--td-color-text-strong);
}
.td-timeline p {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--td-color-text-muted);
}
@media (max-width: 980px) {
  .td-timeline {
    grid-template-columns: minmax(0, 1fr);
  }
  .td-timeline::before {
    left: 21px;
    right: auto;
    top: 0;
    bottom: 0;
    width: 2px;
    height: auto;
  }
  .td-timeline li {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    column-gap: 16px;
    row-gap: 2px;
    text-align: left;
    align-items: start;
    padding: 0 0 22px;
  }
  .td-timeline .td-step-no {
    grid-row: span 2;
  }
}

/* FAQ in two columns: title and contact left, the questions right. */
.td-faq-split {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 48px;
}
.td-faq-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.td-faq-split details {
  background: var(--td-color-surface);
  border-radius: 14px;
  padding: 0 22px;
  border: 0;
}
.td-faq-split details:last-child {
  border: 0;
}
.td-faq summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  min-height: 60px;
  list-style: none;
}
.td-faq summary::-webkit-details-marker {
  display: none;
}
.td-faq-plus {
  font-size: 1.5rem;
  line-height: 1;
  color: var(--td-color-brand);
  transition: transform 0.15s;
}
.td-faq details[open] .td-faq-plus {
  transform: rotate(45deg);
}
@media (max-width: 980px) {
  .td-faq-split {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }
}

/* Dark quote band. */
.td-cta-dark {
  border-radius: 0;
  background: var(--td-color-dark, var(--td-color-text-strong));
  border-image: conic-gradient(var(--td-color-dark, var(--td-color-text-strong)) 0 0) fill 0 // 0 100vmax;
  color: var(--td-color-dark-text, var(--td-color-surface));
}
.td-cta-dark p {
  color: var(--td-color-dark-text, var(--td-color-border));
}
/* A page ending in a dark band meets the footer without a gap (Kebab page design). */
body:has(.td-content > .td-cta-dark:last-child) .td-main {
  padding-bottom: 0;
}
body:has(.td-content > .td-cta-dark:last-child) .td-footer {
  margin-top: 0;
}

/* Key figures: one white band, figures in brand red. */
.td-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  background: var(--td-color-surface);
  border-radius: var(--td-radius-lg, var(--td-radius));
  padding: 8px 0;
}
.td-stats div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 16px 24px;
}
.td-stats div + div {
  border-left: 1px solid var(--td-color-border);
}
.td-stats b {
  font: 700 clamp(1.5rem, 2.6vw, 1.9rem) / 1.15 var(--td-font-display);
  color: var(--td-color-brand);
  font-variant-numeric: tabular-nums;
}
.td-stats span {
  color: var(--td-color-text-muted);
}
@media (max-width: 639px) {
  .td-stats div + div {
    border-left: 0;
    border-top: 1px solid var(--td-color-border);
  }
}

.td-contact .td-specs {
  font-size: 0.97rem;
  gap: 8px 20px;
}

/* News */
.td-news {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 16px;
}
.td-news > article {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.td-news img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--td-radius);
}
.td-news h2 {
  font-size: 1.15rem;
  margin: 0;
}
.td-news h2 a {
  color: var(--td-color-text-strong);
  text-decoration: none;
}
.td-news h2 a:hover {
  color: var(--td-color-brand);
}
.td-news p {
  margin: 0;
}
.td-news article > a:last-child {
  margin-top: auto;
  font: 700 0.9rem var(--td-font-display);
  text-decoration: none;
}

/* Footer: white band, company block first (LEGAL), then contact, pages and legal links. */
.td-footer {
  margin-top: 56px;
  background: var(--td-color-surface);
  border-top: 1px solid var(--td-color-border);
  color: var(--td-color-text);
  font-size: 0.94rem;
}
.td-footer-in {
  max-width: 1212px;
  margin: 0 auto;
  padding: 40px 16px 28px;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
  gap: 28px 32px;
}
.td-footer-logo {
  display: inline-block;
  margin-bottom: 14px;
  border-radius: 6px;
}
.td-footer-logo img {
  display: block;
  height: 36px;
  width: auto;
}
.td-footer b {
  font-family: var(--td-font-display);
  color: var(--td-color-text-strong);
}
.td-footer h2 {
  font: 700 0.78rem var(--td-font-display);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--td-color-brand);
  margin: 6px 0 12px;
}
.td-footer ul {
  list-style: none;
  margin: 0 0 10px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.td-footer a {
  color: var(--td-color-text);
  text-decoration: none;
}
.td-footer a:hover {
  color: var(--td-color-brand);
  text-decoration: underline;
}
.td-footer-base {
  width: calc(100% - 32px);
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px 0 18px;
  border-top: 1px solid var(--td-color-border);
  font-size: 0.82rem;
  color: var(--td-color-text-muted);
}
@media (max-width: 959px) {
  .td-footer-in {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .td-footer-company {
    grid-column: 1 / -1;
  }
}
@media (max-width: 479px) {
  .td-footer {
    margin-top: 40px;
  }
  .td-footer-in {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
    padding-top: 32px;
  }
  .td-footer ul {
    gap: 4px;
  }
  .td-footer ul a {
    display: inline-block;
    padding: 4px 0;
  }
}

/* Payment add-on (components/payment.tsx): an unavailable method, the PAY by square code. */
.td-opt:has(input:disabled) { opacity: 0.55; }
.td-qr { margin: 0; text-align: center; }

/* ------------------------------------------------------------------------------------------
   PHP engine additions. Everything above is the Node storefront's globals.css, copied 1:1 so the
   default theme (Blade, resources/views) keeps the same class names and look. Below: the parts
   the Blade views need that the React components did with state (native <dialog>, steppers with
   an input, variant and photo choice with radios, toast, pager).
   ------------------------------------------------------------------------------------------ */

/* Product popup: shop.js opens <dialog class="td-dialog"> with the dialog view inside. */
dialog.td-dialog {
  border: 0;
  padding: 48px 16px;
  margin: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  background: transparent;
  overflow-y: auto;
  overscroll-behavior: contain;
}
dialog.td-dialog::backdrop {
  background: color-mix(in srgb, var(--td-color-text-strong) 50%, transparent);
}
dialog.td-dialog .td-modal {
  margin: 0 auto;
}
/* Phones: a full-height sheet, as the Node popup (.td-modal rules above). */
@media (max-width: 760px) {
  dialog.td-dialog {
    padding: 0;
  }
}
body:has(dialog.td-dialog[open]) {
  overflow: hidden;
}

/* Quantity stepper with a real input (shop.js [data-td-qty]). */
.td-qty input {
  width: 3.4em;
  min-width: 34px;
  border: 0;
  border-inline: 1px solid var(--td-color-border);
  height: 42px;
  text-align: center;
  font: 700 0.98rem var(--td-font-display);
  font-variant-numeric: tabular-nums;
  color: var(--td-color-text-strong);
  background: transparent;
  -moz-appearance: textfield;
  appearance: textfield;
}
.td-qty input::-webkit-outer-spin-button,
.td-qty input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.td-qty input:focus-visible {
  outline: 2px solid var(--td-color-brand);
  outline-offset: -2px;
}
.td-qty-small input {
  height: 32px;
  font-size: 0.88rem;
}

/* Variant and photo choice: radios kept in the tab order, drawn as chips and thumbnails. */
.td-radio-chip {
  position: relative;
}
.td-radio-chip input,
.td-thumbs input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}
.td-radio-chip:has(input:checked) {
  border-color: var(--td-color-brand);
  color: var(--td-color-brand);
  background: var(--td-color-brand-soft);
}
.td-radio-chip:has(input:focus-visible),
.td-thumbs label:has(input:focus-visible) {
  outline: 2px solid var(--td-color-brand);
  outline-offset: 2px;
}
.td-variant-panel {
  display: none;
  flex-direction: column;
  gap: 14px;
}
.td-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.td-thumbs label {
  width: 64px;
  height: 64px;
  border: 1px solid var(--td-color-border);
  border-radius: var(--td-radius);
  overflow: hidden;
  cursor: pointer;
  background: var(--td-color-surface);
  position: relative;
}
.td-thumbs label:has(input:checked) {
  border-color: var(--td-color-brand);
}
.td-thumbs img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.td-gallery-img {
  display: none;
}
.td-gallery-img:first-child {
  display: block;
}

/* Quantity prices in the buy box. */
.td-breaks {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.td-breaks th,
.td-breaks td {
  text-align: left;
  padding: 6px 8px;
  border-bottom: 1px solid var(--td-color-border);
}
.td-breaks td:last-child,
.td-breaks th:last-child {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.td-breaks tr[aria-current="true"] td {
  color: var(--td-color-brand);
  font-weight: 700;
}

/* Product table chips filter without script: one radio per group. */
.td-table-filter input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

/* Toast for td:cart / td:cart-error (layout script). */
.td-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 60;
  background: var(--td-color-text-strong);
  color: var(--td-color-surface);
  padding: 10px 18px;
  border-radius: var(--td-radius);
  font: 600 0.92rem var(--td-font-display);
  box-shadow: 0 12px 30px -12px color-mix(in srgb, var(--td-color-text-strong) 60%, transparent);
  max-width: calc(100vw - 32px);
}
.td-toast[hidden] {
  display: none;
}
.td-toast a {
  color: inherit;
  margin-left: 10px;
}
@media (max-width: 960px) {
  .td-toast {
    bottom: 84px;
  }
}

/* Small pieces. */
.td-pager {
  justify-content: center;
  margin-top: 24px;
}
.td-inline {
  display: inline;
}
.td-link-btn {
  font: inherit;
}
.td-field-error {
  color: var(--td-color-brand);
  font-size: 0.86rem;
}
.td-index {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}
.td-index a {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 16px 18px;
  background: var(--td-color-surface);
  border: 1px solid var(--td-color-border);
  border-radius: var(--td-radius);
  text-decoration: none;
  color: var(--td-color-text-strong);
  font: 700 1rem var(--td-font-display);
}
.td-index a:hover {
  border-color: var(--td-color-brand);
  color: var(--td-color-brand);
}
.td-index a span {
  color: var(--td-color-text-muted);
  font-weight: 600;
}
/* Checkout days and pickup windows as radios drawn like .td-day buttons. */
label.td-day {
  position: relative;
}
label.td-day input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
label.td-day:has(input:checked) {
  border-color: var(--td-color-brand);
  color: var(--td-color-brand);
  background: var(--td-color-brand-soft);
}
label.td-day:has(input:focus-visible) {
  outline: 2px solid var(--td-color-brand);
  outline-offset: 2px;
}
.td-opt-detail {
  display: none;
  grid-column: 2;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
}
.td-opt:has(> input:checked) .td-opt-detail {
  display: flex;
}
.td-opt:has(> input:disabled) {
  cursor: not-allowed;
}
/* Product photos: several photos get thumbnails under the main one. */
.td-detail-media {
  align-self: start;
  min-width: 0;
  position: sticky;
  top: 0;
}
.td-page .td-detail-media {
  top: 92px;
}
.td-detail-media .td-detail-img {
  position: static;
}
@media (max-width: 760px) {
  .td-detail-media {
    position: static;
  }
}
/* Floating hero without its photos (engine view), trust points under the buttons. */
.td-hero-floating .td-hero-text {
  margin-inline: auto;
  text-align: center;
}
.td-hero-floating .td-actions {
  justify-content: center;
}
.td-hero-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  list-style: none;
  padding: 0;
  margin: 14px 0 0;
  font-size: 0.88rem;
  color: var(--td-color-text-muted);
}
.td-hero-trust li::before {
  content: "✓ ";
  color: var(--td-color-accent);
  font-weight: 700;
}
.td-contact-form {
  margin-top: 24px;
  max-width: 640px;
}
.td-sort select {
  font: 400 0.9rem var(--td-font-body);
  border: 1px solid var(--td-color-border);
  border-radius: var(--td-radius);
  padding: 6px 8px;
  margin-left: 6px;
  background: var(--td-color-surface);
  color: var(--td-color-text-strong);
}
.td-sort select:focus-visible {
  outline: 2px solid var(--td-color-brand);
  outline-offset: 1px;
}
.td-checkout fieldset {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}
.td-checkout legend {
  padding: 0;
  margin-bottom: 8px;
}
.td-line-title a {
  color: inherit;
  text-decoration: none;
}
.td-line-title a:hover {
  color: var(--td-color-brand);
}
.td-line-right .td-link-btn {
  font: 400 0.82rem var(--td-font-body);
  color: var(--td-color-text-muted);
}
