/* FRUTTI isolated order-test UX V12: map gestures and compact summary.
   Preserve checkout V9-V11 styles. No changes outside #frutti-checkout-test. */
#frutti-checkout-test .fct-summary-toggle {
  display: none;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid #b9d8c3;
  border-radius: 10px;
  background: #fff;
  color: #217445;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.35;
  white-space: nowrap;
  cursor: pointer;
}
#frutti-checkout-test .fct-summary-toggle[hidden] {
  display: none !important;
}
#frutti-checkout-test .fct-summary-heading h2 {
  min-width: 0;
  margin-right: auto;
}
@media (max-width: 991px) {
  #frutti-checkout-test .fct-layout {
    display: flex !important;
    flex-direction: column !important;
    gap: 14px;
  }
  #frutti-checkout-test .fct-main { order: 0; }
  #frutti-checkout-test .fct-summary {
    order: 1;
    position: static !important;
    top: auto;
    overflow: visible !important;
    padding: 16px 18px;
  }
  #frutti-checkout-test .fct-summary-heading {
    gap: 10px;
    flex-wrap: wrap;
  }
  #frutti-checkout-test .fct-summary-toggle:not([hidden]) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
  }
  #frutti-checkout-test .fct-summary[data-fct-collapsed="true"] {
    padding-bottom: 16px;
  }
  #frutti-checkout-test .fct-summary[data-fct-collapsed="true"] > .fct-order-items {
    display: none !important;
  }
  /* Only products collapse: delivery, payment, total and submit stay accessible. */
  #frutti-checkout-test .fct-order-items {
    display: grid;
    max-height: none !important;
    overflow: visible !important;
    overscroll-behavior: auto !important;
    touch-action: pan-y;
  }
  #frutti-checkout-test .fct-map {
    touch-action: pan-y;
  }
}
@media (pointer: coarse) {
  #frutti-checkout-test .fct-map {
    touch-action: pan-y;
  }
}
@media (max-width: 420px) {
  #frutti-checkout-test .fct-summary {
    padding: 13px 14px;
  }
  #frutti-checkout-test .fct-summary-heading h2 {
    font-size: 20px;
  }
  #frutti-checkout-test .fct-summary-toggle {
    min-height: 42px;
    font-size: 14px;
    padding-inline: 9px;
  }
}

/* V13 — mobile/tablet full-width checkout and quiet total.
   Collapse applies ONLY to products; order totals/payment/CTA remain open. */
#frutti-checkout-test .fct-grand-total > strong {
  color: #426050 !important;
  font-size: 23px !important;
  font-weight: 600 !important;
  letter-spacing: -0.012em !important;
}
#frutti-checkout-test .fct-grand-total > span {
  color: #405548 !important;
  font-weight: 650 !important;
}
@media (max-width: 991px) {
  #frutti-checkout-test {
    width: 100% !important;
    max-width: 100% !important;
    margin-inline: auto;
  }
  #frutti-checkout-test .fct-layout {
    width: 100%;
    min-width: 0;
    align-items: stretch !important;
  }
  #frutti-checkout-test .fct-main,
  #frutti-checkout-test .fct-summary {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    align-self: stretch;
    flex: 0 0 auto;
  }
  #frutti-checkout-test .fct-summary-heading {
    display: flex;
    align-items: center;
    justify-content: flex-start !important;
    gap: 8px !important;
    flex-wrap: wrap !important;
  }
  #frutti-checkout-test .fct-summary-heading h2 {
    margin: 0 !important;
    margin-right: 0 !important;
    width: auto !important;
    flex: 0 0 auto;
  }
  #frutti-checkout-test .fct-summary-heading .fct-count {
    flex: 0 0 auto;
    margin: 0 !important;
  }
  #frutti-checkout-test .fct-summary-heading .fct-summary-toggle:not([hidden]) {
    margin-left: auto;
  }
  #frutti-checkout-test .fct-grand-total > strong {
    font-size: 22px !important;
    font-weight: 600 !important;
  }
}

/* Match footer bleed to the 14px mobile summary padding (not legacy 19px). */
@media (max-width: 420px) {
  #frutti-checkout-test .fct-summary-footer {
    margin: 16px -14px -13px !important;
  }
}

/* V14 — checkout confirmation actions. Clear equal controls, no yellow duplicate. */
#frutti-checkout-test .fct-review-footer {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  column-gap: 12px;
  row-gap: 12px;
}
#frutti-checkout-test .fct-review-footer > [data-fct-canary-box]:not([hidden]) {
  display: contents;
}
#frutti-checkout-test .fct-review-footer [data-fct-canary-status] {
  grid-column: 1 / -1;
  margin: 0 !important;
  color: #5b6b60;
  font-size: 14px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
#frutti-checkout-test .fct-review-footer [data-fct-canary-status]:empty {
  display: none;
}
#frutti-checkout-test .fct-review-footer [data-fct-canary-confirm],
#frutti-checkout-test .fct-review-footer > [data-fct-review-close] {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 48px;
  margin: 0 !important;
  padding: 11px 14px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  white-space: normal;
  text-align: center;
}
#frutti-checkout-test .fct-review-footer [data-fct-canary-confirm] {
  grid-column: 1;
  background: #ffbf00;
  color: #18231a;
  border-color: #ffbf00;
}
#frutti-checkout-test .fct-review-footer > [data-fct-review-close] {
  grid-column: 2;
  background: #fff;
  color: #365e47;
  border: 1px solid #aecbb5;
}
#frutti-checkout-test .fct-review-footer > [data-fct-review-close]:hover:not(:disabled) {
  background: #edf5ef;
  border-color: #7aab89;
}
#frutti-checkout-test .fct-review-footer:has(> [data-fct-canary-box][hidden]) {
  grid-template-columns: minmax(0, 1fr);
}
#frutti-checkout-test .fct-review-footer:has(> [data-fct-canary-box][hidden]) > [data-fct-review-close] {
  grid-column: 1;
}
@media (max-width: 480px) {
  #frutti-checkout-test .fct-review-footer {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }
  #frutti-checkout-test .fct-review-footer [data-fct-canary-confirm],
  #frutti-checkout-test .fct-review-footer > [data-fct-review-close] {
    grid-column: 1;
    min-height: 48px;
  }
}


/* FRUTTI P0 2026-10-28: empty cart = only the useful order-empty card.
   Scoped; loaded only on checkout, no cart/session mutation. */
#frutti-checkout-test[data-fct-cart-empty="true"] .fct-main,
#frutti-checkout-test[data-fct-cart-empty="true"] .fct-heading,
#frutti-checkout-test[data-fct-cart-empty="true"] .fct-summary-toggle {
  display: none !important;
}
#frutti-checkout-test[data-fct-cart-empty="true"] .fct-layout {
  display: flex !important;
  flex-direction: row !important;
  justify-content: center !important;
  align-items: flex-start !important;
  gap: 0 !important;
}
#frutti-checkout-test[data-fct-cart-empty="true"] .fct-summary {
  position: static !important;
  top: auto !important;
  order: 0 !important;
  flex: 0 1 560px !important;
  width: min(100%, 560px) !important;
  max-width: 560px !important;
  min-width: 0 !important;
  margin: 0 auto !important;
}
#frutti-checkout-test[data-fct-cart-empty="true"] .fct-summary-details,
#frutti-checkout-test[data-fct-cart-empty="true"] .fct-order-items,
#frutti-checkout-test[data-fct-cart-empty="true"] .fct-edit-cart {
  display: none !important;
}
#frutti-checkout-test[data-fct-cart-empty="true"] .fct-empty:not([hidden]) {
  display: flex !important;
}
@media (max-width: 991px) {
  #frutti-checkout-test[data-fct-cart-empty="true"] .fct-layout {
    flex-direction: column !important;
    align-items: stretch !important;
  }
  #frutti-checkout-test[data-fct-cart-empty="true"] .fct-summary {
    flex: 0 1 auto !important;
    width: 100% !important;
  }
}


/* FRUTTI empty cart v7: vertical layout; summary width unchanged. */
#frutti-checkout-test[data-fct-cart-empty="true"] .fct-empty:not([hidden]) {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center;
  width: 100%;
  gap: 0;
  padding: 28px 16px 12px;
}
#frutti-checkout-test[data-fct-cart-empty="true"] .fct-empty > .fct-icon {
  flex: none;
  width: 44px;
  height: 44px;
  margin: 0 0 14px;
}
#frutti-checkout-test[data-fct-cart-empty="true"] .fct-empty h3 {
  margin: 0;
  font-size: 19px;
  line-height: 1.3;
}
#frutti-checkout-test[data-fct-cart-empty="true"] .fct-empty p {
  max-width: 300px;
  margin: 10px auto 20px;
  line-height: 1.5;
}
#frutti-checkout-test[data-fct-cart-empty="true"] .fct-empty > .fct-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 200px;
  max-width: 100%;
  width: auto;
  margin: 0;
  text-align: center;
}
#frutti-checkout-test[data-fct-cart-empty="true"] .fct-empty > [hidden] {
  display: none !important;
}

