/* Product suggestion rows (17 Nov 2026): "Your usual items", "Goes well with", "Before you order".
   Built on fbx.css (same variables and product card). Markup: resources/views/frontend/suggest/row.blade.php,
   loaded into <div data-fbx-suggest="…"> placeholders by js/fbx-suggest.js. */

/* A placeholder takes no room until its row arrives (and none at all when there is nothing to show). */
[data-fbx-suggest]:empty { display: none !important; }
[data-fbx-suggest] { min-width: 0; }

.fbx-sug { --sug-bleed: 0px; --sug-card: 148px; min-width: 0; font-family: var(--fbx-font); }
.fbx-sug-head { align-items: center; min-height: 40px; }
.fbx-sug-note { margin: -2px 0 4px; font-size: 14.5px; line-height: 1.35; color: var(--fbx-ink-2); }

.fbx-sug-row { display: flex; gap: 10px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; scrollbar-width: none;
  margin: 0 calc(var(--sug-bleed) * -1); padding: 4px max(var(--sug-bleed), 2px) 10px; scroll-padding: 0 max(var(--sug-bleed), 2px); }
.fbx-sug-row::-webkit-scrollbar { display: none; }

/* One suggested product: the usual card, with an optional line saying why it is here. */
.fbx-sug-item { position: relative; flex: 0 0 var(--sug-card); width: var(--sug-card); min-width: 0; display: flex; flex-direction: column; scroll-snap-align: start; border-radius: 16px; }
.fbx-sug-item > .fbx-card { flex: 1 1 auto; width: auto; }
.fbx-sug-item.has-why { background: var(--fbx-tint-2); box-shadow: var(--fbx-shadow); }
.fbx-sug-item.has-why > .fbx-card { box-shadow: none; border-color: var(--fbx-tint-2); }
.fbx-sug-why { margin: 0; padding: 6px 10px 8px; font-size: 12.5px; line-height: 1.3; font-weight: 600; color: var(--fbx-green-deep); }
.fbx-sug-tag { position: absolute; top: 16px; right: 16px; padding: 2px 8px; border-radius: 999px; background: var(--fbx-amber-tint); color: #6b4a00; border: 1px solid #ecd9a0; font: 700 12px/1.4 var(--fbx-font); pointer-events: none; }

/* Arrows for a mouse (shown by the script only when the row is wider than its place). */
.fbx-sug-nav { display: flex; gap: 8px; }
.fbx-sug-nav[hidden] { display: none; }
.fbx-sug-nav button { width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--fbx-line-strong); background: #fff; color: var(--fbx-ink); display: grid; place-items: center; cursor: pointer; padding: 0; }
.fbx-sug-nav button:hover { border-color: var(--fbx-green-dark); color: var(--fbx-green-dark); }
.fbx-sug-nav button:disabled { opacity: .35; cursor: default; border-color: var(--fbx-line); color: var(--fbx-ink-3); }
.fbx-sug-nav button:focus-visible { outline: 3px solid var(--fbx-green-deep); outline-offset: 2px; }

/* Where the row sits: it runs to the screen edge on a phone, like the other rows of that page. */
.fbx-home .fbx-sug, .fbx-page .fbx-sug { --sug-bleed: 12px; }
.fbx-shoppage [data-fbx-suggest] { margin: 4px 0 10px; }
.fbx-sug-pdp { max-width: 1280px; margin: 0 auto; padding: 8px 16px 20px; }

/* Small version: in the basket and in the product pop-up, where the main button comes first. */
.is-compact .fbx-sug { --sug-card: 128px; }
.is-compact .fbx-sug-head { min-height: 0; margin-bottom: 2px; }
.is-compact .fbx-sug-head h2 { font-size: 18px; }
.is-compact .fbx-sug-note { font-size: 13.5px; }
.is-compact .fbx-sug-row { gap: 8px; padding-bottom: 6px; }
.is-compact .fbx-card { padding: 8px; border-radius: 14px; }
.is-compact .fbx-card-img { margin-bottom: 6px; border-radius: 10px; aspect-ratio: 4 / 3; }
.is-compact .fbx-card-name { font-size: 13.5px; }
.is-compact .fbx-card-shop { font-size: 12px; }
.is-compact .fbx-card-foot { padding-top: 4px; min-height: 48px; }
.is-compact .fbx-card-price { font-size: 15px; }
.is-compact .fbx-choose { padding: 0 10px; font-size: 13px; }
.is-compact .fbx-sug-tag { top: 12px; right: 12px; }
.is-compact .fbx-sug-nav button { width: 44px; height: 44px; }

/* Basket: under the shops, above "Forgot something?"; the order buttons stay where they were. */
.fbx-sug-slot--basket { margin-top: 18px; }
/* Product pop-up: a strip under the details, inside the sheet (the sheet scrolls, the add button stays first). */
.fbx-sug-slot--quick { border-top: 1px solid var(--fbx-line); padding: 12px 20px calc(14px + env(safe-area-inset-bottom)); }
.fbx-sug-slot--quick .fbx-sug { --sug-bleed: 20px; }

@media (min-width: 700px) {
  .fbx-sug { --sug-card: 172px; }
  .fbx-home .fbx-sug { --sug-bleed: 24px; }
  .fbx-sug-note { font-size: 15px; }
  .fbx-sug-row { gap: 14px; }
  .is-compact .fbx-sug { --sug-card: 140px; }
  .is-compact .fbx-sug-row { gap: 10px; }
  .fbx-sug-slot--quick { padding: 14px 28px 18px; }
  .fbx-sug-slot--quick .fbx-sug { --sug-bleed: 28px; }
  .fbx-sug-pdp { padding: 8px 24px 24px; }
}
@media (min-width: 1024px) {
  /* Laptop: six cards across, in line with the product grids above and below; more with the arrows. */
  .fbx-home .fbx-sug, .fbx-page .fbx-sug { --sug-bleed: 0px; }
  .fbx-home .fbx-sug, .fbx-shoppage .fbx-sug, .fbx-sug-pdp .fbx-sug { --sug-card: calc((100% - 70px - 4px) / 6); }
  .is-compact .fbx-sug { --sug-card: 150px; }
  .fbx-shoppage .is-compact .fbx-sug { --sug-card: calc((100% - 70px - 4px) / 6); }
}
