/* ==== Marisole redesign: Delivery template — Figma blocks below the first screen (owner QA round 1 Task 4) ==== */
/* Figma Delivery 123:4386 / 129:4893 (values .superpowers/sdd/delivery-figma.md), the owner's «Как в Figma, но мои тексты».
   This sheet holds the photo + card rows of flower-benefits (with its Photo setting: "3. Why choose", "4. Same-day delivery"
   with the Fact cards list), the photo cards (sections/delivery-photo-cards.liquid: "5. Fresh flowers" Tall, "10. Flowers
   for every occasion" Row) and the "We deliver" card's pattern hook. It is linked async by layout/theme.liquid on the
   Delivery template's 30 pages only. Everything here is below the first screen: the hero and the check card stay in
   template-page-delivery.css, which is render-blocking. Every rule starts at .marisole-info--delivery and is keyed on the
   section's type and role, never on its id. The Figma values are in the settings (photo, its side, the list style, the
   arrow, the layout, the lines, the padding); this file holds what no setting says. Budget
   (tools/design-system/components-css.test.mjs): 16 KB raw / 3 KB gzip as shipped. */

/* ---- photo + card (flower-benefits with a Photo; delivery-figma "3. Why choose Marisole", "4. Same-day delivery") ---- */

/* the row: the photo 627 + the card 723, 12 apart (the photo's side is "Photo position"), the photo as high as the card;
   below 990 the photo 358x300 r28 on top of the card, 8 apart. The card bg-card r36 / r28, p56 / 24-20, its parts V24 / V16,
   centred in its height. The list's group is part of the card (not the old bordered box), the buttons one row 12 apart
   (across the card below 990, 10 apart) */
.marisole-info--delivery > .shopify-section:has(> .flower-benefits) > .flower-benefits .flower-benefits__row {
  display: grid;
  gap: 8px;

  @media screen and (min-width: 990px) {
    grid-template-columns: minmax(0, 627fr) minmax(0, 723fr);
    gap: 12px;

    &.flower-benefits__row--media-right {
      grid-template-columns: minmax(0, 723fr) minmax(0, 627fr);

      & > .flower-benefits__media { order: 2; }
    }
  }

  & > .flower-benefits__media {
    position: relative;
    overflow: hidden;
    aspect-ratio: 358 / 300;
    border-radius: var(--radius-lg);
    background-color: var(--color-image-placeholder);

    @media screen and (min-width: 990px) {
      aspect-ratio: auto;
      min-block-size: 100%;
      border-radius: var(--radius-xl);
    }
  }
  & .flower-benefits__image {
    position: absolute;
    inset: 0;
    inline-size: 100%;
    block-size: 100%;
    object-fit: cover;
  }
  & > .flower-benefits__card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 16px;
    min-inline-size: 0;
    padding: 24px 20px;
    border-radius: var(--radius-lg);
    background-color: var(--color-bg-card);
    color: var(--color-text-primary);

    @media screen and (min-width: 990px) {
      gap: 24px;
      padding: 56px;
      border-radius: var(--radius-xl);
    }
  }
  & .flower-benefits__description > * { margin: 0; }
  & .flower-benefits__description > * + * { margin-block-start: 1em; }
  & .flower-benefits__description a {
    color: inherit;
    text-decoration: underline;
    @media (hover: hover) { &:hover { text-decoration-color: transparent; } } /* the info pages' toggle (QA round 1 Task 6) */
  }
  & .flower-benefits__benefits {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-self: stretch;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;

    @media screen and (min-width: 990px) {
      gap: 24px;
    }
  }
  & .flower-benefits__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;

    @media screen and (max-width: 989px) {
      flex-direction: column;
      align-self: stretch;
      gap: 10px;
    }

    & > * { margin: 0; }
  }
}
/* the Fact cards (Same-day): 12 apart, each H16 p16/20/16/16 on the page colour r20 (phones H12 p12/14/12/12 r16), the circle
   48 / 40 accent-soft, the title Body 2 primary and the second line Body 3 2 under it, primary: Figma's muted #5e7272 is 4.38:1
   on the page colour (ADA; the Contact rows' precedent, README 296) */
.marisole-info--delivery > .shopify-section:has(> .flower-benefits) > .flower-benefits .flower-benefits__list--facts {
  gap: 12px;

  & > .flower-benefits__item--fact {
    gap: 12px;
    padding: 12px 14px 12px 12px;
    border-radius: 16px; /* no token: Figma mobile fact r16 */
    background-color: var(--color-page-bg);

    @media screen and (min-width: 990px) {
      gap: 16px;
      padding: 16px 20px 16px 16px;
      border-radius: var(--radius-md);
    }
  }
  & .flower-benefits__icon {
    inline-size: 40px;
    block-size: 40px;

    @media screen and (min-width: 990px) {
      inline-size: 48px;
      block-size: 48px;
    }
  }
  & .flower-benefits__subtext {
    margin: 2px 0 0;
    font: var(--ds-body-3-weight) var(--ds-body-3-size)/var(--ds-body-3-line-height) var(--font-body--family);
    letter-spacing: var(--ds-body-3-letter-spacing);
    color: var(--color-text-primary);
  }
}

/* ---- photo cards (sections/delivery-photo-cards.liquid; delivery-figma "5. Fresh flowers", "10. Flowers for every occasion") ---- */

/* the section: its padding settings (phones x the frame's ratios), Section header L / S (the 70 row: H2 / H4 primary + View
   all, Body 2 + the 48 Icon button Card with the arrow, hidden below 990 as the products row), the intro Body 1 primary
   24 / 16 under it (at most 72ch), the cards 40 / 16 under both */
.marisole-info--delivery > .shopify-section.delivery-cards-section > .delivery-cards {
  row-gap: 16px;
  padding-block: var(--_pad-top) var(--_pad-bottom);

  @media screen and (max-width: 989px) {
    padding-block: calc(var(--_pad-top) * var(--_pad-r-start)) calc(var(--_pad-bottom) * var(--_pad-r-end));
  }
  @media screen and (min-width: 990px) {
    row-gap: 40px;
  }

  & .delivery-cards__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-block-size: 70px;

    @media screen and (min-width: 990px) {
      align-items: flex-end;
    }
  }
  & .delivery-cards__heading {
    margin: 0;
    font: var(--ds-h4-weight) var(--ds-h4-size)/var(--ds-h4-line-height) var(--font-heading--family);
    letter-spacing: var(--ds-h4-letter-spacing);
    color: var(--color-text-primary);

    @media screen and (min-width: 990px) {
      font: var(--ds-h2-weight) var(--ds-h2-size)/var(--ds-h2-line-height) var(--font-heading--family);
      letter-spacing: var(--ds-h2-letter-spacing);
    }
  }
  & .delivery-cards__view-all {
    display: none;
    flex: none;
    align-items: center;
    gap: 16px;
    font: var(--ds-body-2-weight) var(--ds-body-2-size)/var(--ds-body-2-line-height) var(--font-heading--family);
    color: var(--color-text-primary);
    text-decoration: none;

    @media screen and (min-width: 990px) {
      display: inline-flex;
    }
  }
  & .delivery-cards__arrow {
    display: inline-grid;
    place-items: center;
    inline-size: 48px;
    block-size: 48px;
    border-radius: var(--radius-full);
    background-color: var(--color-bg-card);
    color: var(--color-icon-primary);

    & svg { inline-size: 20px; block-size: 20px; }
  }
  /* Task 5: the text under the cards (outro) reads as the intro */
  & :is(.delivery-cards__intro, .delivery-cards__outro) {
    font: var(--ds-body-1-weight) var(--ds-body-1-size)/var(--ds-body-1-line-height) var(--font-body--family);
    letter-spacing: var(--ds-body-1-letter-spacing);
    color: var(--color-text-primary);

    & > * { margin: 0; max-inline-size: 72ch; }
    & > * + * { margin-block-start: 1em; }
  }
  & .delivery-cards__intro {
    @media screen and (min-width: 990px) {
      margin-block-start: -16px;
    }
  }
  & :is(.delivery-cards__intro, .delivery-cards__outro, .delivery-cards__text) a {
    color: inherit;
    text-decoration: underline;
    @media (hover: hover) { &:hover { text-decoration-color: transparent; } } /* the info pages' toggle (QA round 1 Task 6) */
  }
  & .delivery-cards__list {
    display: grid;
    gap: var(--space-grid-gap);
    margin: 0;
    padding: 0;
    list-style: none;
  }
  & .delivery-cards__card {
    min-inline-size: 0;
    background-color: var(--color-bg-card);
    color: var(--color-text-primary);
  }
  & .delivery-cards__media {
    overflow: hidden;
    background-color: var(--color-image-placeholder);
  }
  & .delivery-cards__image {
    display: block;
    inline-size: 100%;
    block-size: 100%;
    object-fit: cover;
  }
  & .delivery-cards__body {
    display: flex;
    flex-direction: column;
    min-inline-size: 0;
  }
  & .delivery-cards__title {
    margin: 0;
    font: var(--ds-h5-weight) var(--ds-h5-size)/var(--ds-h5-line-height) var(--font-heading--family);
    letter-spacing: var(--ds-h5-letter-spacing);
    color: var(--color-text-primary);
    overflow-wrap: anywhere;

    @media screen and (min-width: 990px) {
      font: var(--ds-h4-weight) var(--ds-h4-size)/var(--ds-h4-line-height) var(--font-heading--family);
      letter-spacing: var(--ds-h4-letter-spacing);
    }
  }
  & .delivery-cards__text {
    font: var(--ds-body-3-weight) var(--ds-body-3-size)/var(--ds-body-3-line-height) var(--font-body--family);
    letter-spacing: var(--ds-body-3-letter-spacing);
    color: var(--color-text-muted);

    & > * { margin: 0; }
    & > * + * { margin-block-start: 0.5em; }
  }
  /* Show more: primary (muted is the text's), the theme's 24 px target */
  & .text-truncate__toggle { color: var(--color-text-primary); }
}
/* Tall (Fresh flowers): 5 across from 1280, the card V16 p8/8/24/8 r28, the photo 246.8x340 r20, the text V8 p0/12 (L from
   990); below 1280 a rail across the window (the gutter inside it), cards 240 wide 10 / 12 apart; phones V12 p6/6/16/6
   r24, the photo 228x260 r18, the text V6 p0/8. 1280: the first width where the longest title word of Miami's H4 titles
   ("Ranunculus", "Hydrangeas") fits a fifth of the column (Figma has only 1512 / 390; the Task 4 ruling on broken words) */
.marisole-info--delivery > .shopify-section.delivery-cards-section > .delivery-cards--tall {
  & .delivery-cards__list {
    @media screen and (max-width: 1279px) {
      grid-column: 1 / -1;
      grid-auto-flow: column;
      grid-auto-columns: 240px;
      overflow-x: auto;
      padding-inline: var(--page-margin);
      scroll-padding-inline: var(--page-margin);
      scroll-snap-type: x mandatory;
      scrollbar-width: none;
    }
    @media screen and (min-width: 1280px) {
      grid-template-columns: repeat(5, minmax(0, 1fr));

      /* Task 5: exactly 4 cards (the arrangements of most pages) fill the row */
      &:has(> :nth-child(4):last-child) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    }
  }
  & .delivery-cards__card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 6px 6px 16px;
    border-radius: 24px; /* no token: Figma mobile card r24 */
    scroll-snap-align: start;

    @media screen and (min-width: 990px) {
      gap: 16px;
      padding: 8px 8px 24px;
      border-radius: var(--radius-lg);
    }
  }
  & .delivery-cards__media {
    aspect-ratio: 228 / 260;
    border-radius: 18px; /* no token: Figma mobile photo r18 */

    @media screen and (min-width: 990px) {
      aspect-ratio: 246.8 / 340;
      border-radius: var(--radius-md);
    }
  }
  & .delivery-cards__body {
    gap: 6px;
    padding-inline: 8px;

    @media screen and (min-width: 990px) {
      gap: 8px;
      padding-inline: 12px;
    }
  }
}
/* Row (Occasions): 3 across from 1360, 2 at 750-1359, a list below; the card H20 p8/24/8/8 r28 centred, the photo 150x180 r20,
   the text V8 (from 990); phones H14 p6/14/6/6 r20, the photo 96x110 r14, the text V4. 1360: the first width where the longest
   H4 title word ("Anniversary") fits the text column of a third (Figma has only 1512 / 390) */
.marisole-info--delivery > .shopify-section.delivery-cards-section > .delivery-cards--row {
  & .delivery-cards__list {
    @media screen and (min-width: 750px) {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    @media screen and (min-width: 1360px) {
      grid-template-columns: repeat(3, minmax(0, 1fr));
    }
  }
  & .delivery-cards__card {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    padding: 6px 14px 6px 6px;
    border-radius: var(--radius-md);

    @media screen and (min-width: 990px) {
      grid-template-columns: 150px minmax(0, 1fr);
      gap: 20px;
      padding: 8px 24px 8px 8px;
      border-radius: var(--radius-lg);
    }
  }
  & .delivery-cards__media {
    align-self: start;
    aspect-ratio: 96 / 110;
    border-radius: var(--radius-sm);

    @media screen and (min-width: 990px) {
      aspect-ratio: 150 / 180;
      border-radius: var(--radius-md);
    }
  }
  & .delivery-cards__body {
    gap: 4px;

    @media screen and (min-width: 990px) {
      gap: 8px;
    }
  }
}

/* ---- the We deliver card's pattern (flower-zip-deliveries "Marisole: card pattern"; the owner's asset, none yet) ---- */
.marisole-info--delivery > .shopify-section.flower-zip-deliveries-section > .section > .flower-zip-deliveries > .flower-zip-deliveries__card--pattern {
  background-image: var(--_pattern);
  background-position: center;
  background-size: cover;
}

/* ---- the services' line icons (designer item 7: flower-icons-row "Marisole: icon", Task 10): 24 in the 56 / 48 circle (delivery-figma
   "Icon circles … + 24 icon"; Custom bouquet keeps its 20) ---- */
.marisole-info--delivery > .shopify-section.flower-icons-row-section > .section > .flower-icons-row .flower-icons-row__icon-wrapper > svg {
  inline-size: 24px;
  block-size: 24px;
}

/* ---- the galleries (designer item 6: the custom-liquid sliders of Cemetery, Other venues, Wedding venues, Proposal & Wedding, by
   their own hooks): the heading H2 / H4 primary 40 / 16 above the photos, the photos r20, the counter Body 3 primary, the arrows
   the Icon button Card L (48, the DS arrow 20 icon-primary; the glyph hidden, the button's aria-label is its name) ---- */
.marisole-info--delivery > .shopify-section:has(> .section.spacing-style):not(.section-wrapper, .ui-test-product-list) section[class^="mf-"] {
  & > h2 {
    margin: 0 0 var(--space-heading-gap);
    font: var(--ds-h4-weight) var(--ds-h4-size)/var(--ds-h4-line-height) var(--font-heading--family);
    letter-spacing: var(--ds-h4-letter-spacing);
    color: var(--color-text-primary);

    @media screen and (min-width: 990px) {
      font: var(--ds-h2-weight) var(--ds-h2-size)/var(--ds-h2-line-height) var(--font-heading--family);
      letter-spacing: var(--ds-h2-letter-spacing);
    }
  }
  & [data-mf-track] > * { border-radius: var(--radius-md); }
  & [data-mf-counter] {
    font: var(--ds-body-3-weight) var(--ds-body-3-size)/var(--ds-body-3-line-height) var(--font-body--family);
    color: var(--color-text-primary);
  }
  & :is([data-mf-prev], [data-mf-next]) {
    position: relative;
    inline-size: 48px;
    block-size: 48px;
    border: 0;
    border-radius: var(--radius-full);
    background-color: var(--color-bg-card);
    color: transparent;
    font-size: 0;

    @media (hover: hover) {
      &:hover:not(:disabled) { background-color: var(--color-bg-accent-soft); }
    }
    &::before {
      content: '';
      position: absolute;
      inset: 0;
      margin: auto;
      inline-size: 20px;
      block-size: 20px;
      background-color: var(--color-icon-primary);
      mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.25 10h11.5m0 0-4-4m4 4-4 4'/%3E%3C/svg%3E") center / contain no-repeat;
    }
  }
  & [data-mf-prev]::before { rotate: 180deg; }
}
