/* A product's page (app/views/products/show.html.erb): the head (name,
   description, pack, price, "Order" and the drawing) in the hero's manner,
   then "What's inside" (products/_inside, inside.css) on white. */
@layer sections {
  .product {
    background: var(--pl-green-100);
    color: var(--pl-ink);
    border-radius: 0 0 var(--pl-r-hero) var(--pl-r-hero);
  }

  /* Copy column + drawing: side by side from about 885px (as "What's inside"
     below, two columns from 901px), one column when both no longer fit. */
  .product__layout {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: clamp(28px, 5vw, 72px);
    padding-top: clamp(28px, 4.4vw, 56px);
    padding-bottom: clamp(40px, 5.4vw, 72px);
  }

  .product__copy {
    flex: 1.25 1 min(440px, 100%);
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  /* "← Menu" */
  .product__back {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: var(--pl-ink);
    font-size: 15px;
    font-weight: 600;
    text-decoration: underline;
    text-decoration-thickness: 1.5px;
    text-underline-offset: 4px;
  }

  /* The hero's title type; the "New" badge sits after the name. */
  .product__title {
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 14px;
    font-size: clamp(36px, 4.05vw, 58px);
    font-weight: 800;
    line-height: 1.06;
    letter-spacing: -0.022em;
    overflow-wrap: anywhere;
  }

  .product__new {
    letter-spacing: 0;
    line-height: 1.55;
  }

  .product__lead {
    margin: 0;
    max-width: 30em;
    font-size: clamp(16.5px, 1.45vw, 18.5px);
    line-height: 1.6;
    color: var(--pl-muted);
  }

  .product__meta {
    margin: 0;
    font-size: 14.5px;
    color: var(--pl-muted);
  }

  .product__price {
    margin: 0;
    font-size: 26px;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
  }

  /* The hero's "Continue" look → the menu (or the paused notice). */
  .product__order {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 58px;
    padding: 10px 24px;
    border-radius: var(--pl-r-control);
    background: var(--pl-green-800);
    color: var(--pl-paper);
    font-size: 17.5px;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
  }

  .product__order svg {
    flex: none;
  }

  .product__visual {
    flex: 1 1 min(320px, 100%);
    min-width: 0;
    display: flex;
    justify-content: center;
  }

  /* At most 560px wide (as the hero's art card, centred when the head is one
     column): never a slab taller than the screen on a tablet. */
  .product__art {
    position: relative;
    width: min(100%, 560px);
    aspect-ratio: 1 / 0.8;
    border-radius: var(--pl-r-card);
    background: var(--pl-green-950);
    overflow: hidden;
  }

  .product__drawing {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 46%;
    height: auto;
    transform: translate(-50%, -50%);
    fill: var(--pl-paper);
  }

  /* Small phones: 36px from about 410px up; below, just small enough for
     "ვეგანური ხინკალი" (wider than the hero's title) to stay on one line. */
  @media (max-width: 480px) {
    .product__title {
      font-size: clamp(30px, (100vw - 40px) * 0.098, 36px);
    }
  }

  /* "What's inside" follows on white, so its nutrition card turns sand. */
  .product + .inside {
    background: var(--pl-paper);
  }

  .product + .inside .inside__card {
    background: var(--pl-sand-50);
  }

  .product + .inside .inside__chip:not(.inside__chip--allergen) {
    background: var(--pl-sand-50);
  }
}
