/**
 * Platter Builder — theme bridge.
 *
 * The Platter Builder plugin is deliberately theme-independent: every colour and
 * font it uses is read from a `--wp--preset--*` variable with a literal fallback,
 * so it renders correctly under any theme. Those fallbacks are the palette of the
 * block theme it was ported from — brick red, pickle green, condensed Oswald —
 * which is *not* this theme's palette. Left alone, the builder looks like a
 * component borrowed from another site.
 *
 * This file supplies the missing definitions in terms of this theme's own tokens,
 * scoped to the builder's wrapper so nothing else on the page is touched. The
 * plugin needs no edit: it already asks for these variables, and now it gets
 * answers. Change --primary or --font-heading in style.css and the builder
 * follows.
 *
 * Cascade order does not matter here — a custom property only has to be *in
 * scope* on the element, not declared after the rule that reads it — which is
 * why this works even though the plugin enqueues its stylesheet later in the
 * document than the theme's.
 *
 * Roles, as the plugin uses them:
 *   brick / brick-deep  primary button, hover, selected-tile border
 *   mustard             price figures, focus ring, section rules
 *   pickle              chosen state: tick ring, count badge, running total
 *   ink / smoke         headings and dark surfaces
 *   paper / white       card surfaces
 *   rye / mist          tinted panels
 *   line                hairlines
 *   warmgrey            secondary copy
 *
 * @package Montreal_Smoked_Meat_Rye
 */

.smr-builder {
  /* Calls to action inherit the theme's orange, hover its darker step. */
  --wp--preset--color--brick: var(--primary, #e85d04);
  --wp--preset--color--brick-deep: var(--primary-dark, #d35400);

  /* Prices and focus rings inherit the accent yellow. */
  --wp--preset--color--mustard: var(--accent, #f5c518);

  /*
   * Selection needs to stay distinct from hover, which is now orange, so it maps
   * to the deep navy rather than to a second orange. Green would be a third
   * colour this theme does not own.
   */
  --wp--preset--color--pickle: var(--secondary, #1a1a2e);

  --wp--preset--color--ink: var(--secondary, #1a1a2e);
  --wp--preset--color--smoke: var(--secondary, #1a1a2e);

  --wp--preset--color--paper: var(--white, #fff);
  --wp--preset--color--white: var(--white, #fff);

  --wp--preset--color--rye: var(--bg-alt, #f8f8f8);
  --wp--preset--color--mist: var(--bg-alt, #f8f8f8);

  --wp--preset--color--line: var(--border, #e0e0e0);
  --wp--preset--color--warmgrey: var(--text-light, #777);

  /* Lora for display, Inter for copy — the theme's pairing, not Oswald. */
  --wp--preset--font-family--display: var(--font-heading, 'Lora', Georgia, serif);
  --wp--preset--font-family--body: var(--font-body, 'Inter', 'Helvetica Neue', sans-serif);
}

/*
 * Sit the builder on the theme's grid. The plugin sets no outer width because it
 * cannot know what the host theme's container is.
 */
.smr-builder {
  max-width: var(--container, 1200px);
  margin-inline: auto;
}

/* Three compact choices per row, with the running event estimate floating at right. */
.smr-platter-embed .smr-builder {
  width: 100%;
  max-width: 1280px !important;
}

.smr-platter-embed .smr-builder__layout {
  grid-template-columns: minmax(0, 1fr) 300px !important;
  gap: 22px !important;
  align-items: start !important;
}

.smr-platter-embed .smr-builder__grid {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 14px !important;
}

.smr-platter-embed .smr-builder__cart {
  position: sticky !important;
  top: 94px !important;
  align-self: start !important;
  z-index: 8;
}

.smr-platter-embed .smr-builder__cartinner {
  padding: 22px !important;
  box-shadow: 0 18px 42px rgba(12, 14, 33, .16);
}

.smr-platter-embed .smr-tile__media {
  height: 150px !important;
  min-height: 150px !important;
  background-size: cover !important;
  background-position: center !important;
  color: transparent !important;
  text-shadow: none !important;
}

.smr-platter-embed .smr-tile__body {
  padding: 14px 15px 16px !important;
}

.smr-platter-embed .smr-tile__name {
  font-size: clamp(1.2rem, 1.45vw, 1.55rem) !important;
  line-height: 1.03 !important;
}

.smr-platter-embed .smr-tile__desc {
  font-size: .82rem !important;
  line-height: 1.45 !important;
}

/* Photo assignments follow the builder's five stable menu sections. */
.smr-platter-embed .smr-builder__section:nth-of-type(1) .smr-tile:nth-child(1) .smr-imgslot { background-image: url('../images/premium/article-nine-ways.webp') !important; }
.smr-platter-embed .smr-builder__section:nth-of-type(1) .smr-tile:nth-child(2) .smr-imgslot { background-image: url('../images/premium/10_gallery_sliders_clean.webp') !important; }
.smr-platter-embed .smr-builder__section:nth-of-type(1) .smr-tile:nth-child(3) .smr-imgslot { background-image: url('../images/premium/menu-grilled-vegetable-havarti.webp') !important; }
.smr-platter-embed .smr-builder__section:nth-of-type(1) .smr-tile:nth-child(4) .smr-imgslot { background-image: url('../images/premium/menu-smoked-meat-sliders-mustard.webp') !important; }
.smr-platter-embed .smr-builder__section:nth-of-type(2) .smr-tile:nth-child(1) .smr-imgslot { background-image: url('../images/premium/07_gallery_smoked_meat_spread_clean.webp') !important; }
.smr-platter-embed .smr-builder__section:nth-of-type(2) .smr-tile:nth-child(2) .smr-imgslot { background-image: url('../images/premium/08_gallery_buffet_clean.webp') !important; }
.smr-platter-embed .smr-builder__section:nth-of-type(3) .smr-tile:nth-child(1) .smr-imgslot { background-image: url('../images/premium/menu-montreal-bagels.webp') !important; }
.smr-platter-embed .smr-builder__section:nth-of-type(3) .smr-tile:nth-child(2) .smr-imgslot { background-image: url('../images/premium/09_gallery_sandwich_clean.webp') !important; }
.smr-platter-embed .smr-builder__section:nth-of-type(4) .smr-tile:nth-child(1) .smr-imgslot { background-image: url('../images/premium/menu-kosher-dills-jar.webp') !important; }
.smr-platter-embed .smr-builder__section:nth-of-type(4) .smr-tile:nth-child(2) .smr-imgslot { background-image: url('../images/premium/menu-old-school-coleslaw.webp') !important; }
.smr-platter-embed .smr-builder__section:nth-of-type(5) .smr-tile:nth-child(1) .smr-imgslot { background-image: url('../images/premium/menu-ryans-mustard-jar.webp') !important; }
.smr-platter-embed .smr-builder__section:nth-of-type(5) .smr-tile:nth-child(2) .smr-imgslot { background-image: url('../images/premium/menu-extra-carving-hour.webp') !important; }
.smr-platter-embed .smr-builder__section:nth-of-type(5) .smr-tile:nth-child(3) .smr-imgslot { background-image: url('../images/premium/menu-additional-server.webp') !important; }

@media (max-width: 1120px) {
  .smr-platter-embed .smr-builder__layout {
    grid-template-columns: minmax(0, 1fr) 280px !important;
  }
  .smr-platter-embed .smr-builder__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 860px) {
  .smr-platter-embed .smr-builder__layout {
    grid-template-columns: 1fr !important;
  }
  .smr-platter-embed .smr-builder__cart {
    position: static !important;
  }
}

@media (max-width: 620px) {
  .smr-platter-embed .smr-builder__grid {
    grid-template-columns: 1fr !important;
  }
}
