/* Just Flowers Cart Block presentation.
   The Basket page uses WooCommerce Cart Blocks and Store API interactions.
   This stylesheet intentionally targets block classes only. */

.justflowers-florist-cart {
  --jfc-ink: #173a2c;
  --jfc-leaf: #2d7555;
  --jfc-leaf-deep: #1d513c;
  --jfc-rose: #b33f5b;
  --jfc-cream: #fcfaf6;
  --jfc-paper: #ffffff;
  --jfc-petal: #f7eee2;
  --jfc-mist: #eef5eb;
  --jfc-muted: #61736a;
  --jfc-line: rgba(23, 58, 44, 0.14);
  --jfc-shadow: 0 20px 52px rgba(23, 58, 44, 0.09);
  --jfc-serif: Georgia, Cambria, "Times New Roman", Times, serif;
  --jfc-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  background: var(--jfc-cream);
  color: var(--jfc-ink);
}

.justflowers-florist-cart .site-content,
.justflowers-florist-cart .content-area,
.justflowers-florist-cart .site-main {
  width: 100%;
  max-width: none;
}

.justflowers-florist-cart .site-content {
  margin: 0 !important;
  overflow: visible !important;
}

.justflowers-florist-cart .site-content > .woostify-container,
.justflowers-florist-cart .site-main,
.justflowers-florist-cart .site-main > article {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  overflow: visible !important;
}

/* The cart itself is the conversion surface; avoid the duplicate global CTA. */
.justflowers-florist-cart .jf-footer-cta {
  display: none;
}

.jf-cart-shell,
.jf-cart-block-shell,
.jf-cart-assurance {
  width: min(1240px, calc(100% - 48px));
  margin-inline: auto;
}

/* Intro injected through the Basket page content filter. */
.jf-cart-intro {
  position: relative;
  width: min(1240px, calc(100% - 48px));
  margin: clamp(2rem, 4vw, 3.6rem) auto clamp(1.7rem, 3vw, 3rem);
  overflow: hidden;
  border: 1px solid rgba(23, 58, 44, 0.1);
  border-radius: 1.55rem;
  background: linear-gradient(125deg, #f8ecdf 0%, #fbfaf5 56%, #e7f1e3 100%);
}

.jf-cart-intro::before,
.jf-cart-intro::after {
  position: absolute;
  border: 1px solid rgba(45, 117, 85, 0.13);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.jf-cart-intro::before {
  top: -18rem;
  right: -8rem;
  width: 32rem;
  height: 32rem;
}

.jf-cart-intro::after {
  bottom: -16rem;
  left: -10rem;
  width: 24rem;
  height: 24rem;
}

.jf-cart-intro__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(270px, 0.48fr);
  align-items: end;
  gap: clamp(2rem, 8vw, 7rem);
  padding: clamp(2.3rem, 5vw, 4.4rem) 0;
}

.jf-cart-back {
  display: flex;
  width: fit-content;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 1.4rem;
  color: var(--jfc-leaf-deep);
  font-family: var(--jfc-sans);
  font-size: 0.78rem;
  font-weight: 800;
  text-decoration: none;
}

.jf-cart-back:hover,
.jf-cart-back:focus-visible {
  color: var(--jfc-rose);
}

.jf-cart-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 0.9rem;
  color: var(--jfc-leaf);
  font-family: var(--jfc-sans);
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.13em;
  line-height: 1.3;
  text-transform: uppercase;
}

.jf-cart-eyebrow > span {
  width: 0.56rem;
  height: 0.56rem;
  border-radius: 50% 50% 50% 0;
  background: var(--jfc-rose);
  transform: rotate(-45deg);
}

.jf-cart-intro h1 {
  max-width: 13ch;
  margin: 0;
  color: var(--jfc-ink);
  font-family: var(--jfc-serif);
  font-size: clamp(2.7rem, 5.2vw, 5.15rem);
  font-weight: 400;
  letter-spacing: -0.058em;
  line-height: 0.98;
}

.jf-cart-intro__copy > p:not(.jf-cart-eyebrow) {
  max-width: 56ch;
  margin: 1.25rem 0 0;
  color: #496757;
  font-family: var(--jfc-sans);
  font-size: 0.97rem;
  line-height: 1.7;
}

.jf-cart-intro__aside {
  padding: 1.35rem 0 0;
  border-top: 1px solid rgba(23, 58, 44, 0.16);
}

.jf-cart-intro__count {
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
  margin: 0 0 1.1rem;
  color: var(--jfc-leaf-deep);
  font-family: var(--jfc-sans);
  font-size: 0.78rem;
  font-weight: 800;
}

.jf-cart-intro__count strong {
  color: var(--jfc-rose);
  font-family: var(--jfc-serif);
  font-size: 2.35rem;
  font-weight: 400;
  line-height: 0.9;
}

.jf-cart-intro__aside ul {
  display: grid;
  gap: 0.65rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.jf-cart-intro__aside li,
.jf-cart-intro__aside a {
  color: var(--jfc-ink);
  font-family: var(--jfc-sans);
  font-size: 0.78rem;
  font-weight: 720;
  line-height: 1.4;
  text-decoration: none;
}

.jf-cart-intro__aside li::before {
  display: inline-block;
  width: 0.42rem;
  height: 0.42rem;
  margin-right: 0.55rem;
  border-radius: 50%;
  background: var(--jfc-leaf);
  content: "";
}

.jf-cart-intro__aside li.jf-cart-intro__call::before {
  background: var(--jfc-rose);
}

.jf-cart-intro__aside a:hover,
.jf-cart-intro__aside a:focus-visible {
  color: var(--jfc-rose);
}

/* WooCommerce Cart Block shell. */
.jf-cart-block-shell .wp-block-woocommerce-cart,
.jf-cart-block-shell .wp-block-woocommerce-filled-cart-block,
.jf-cart-block-shell .wp-block-woocommerce-empty-cart-block {
  width: 100%;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.jf-cart-block-shell .wc-block-cart {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.43fr);
  align-items: start;
  gap: clamp(1.5rem, 4vw, 4.5rem);
  width: 100%;
  margin: 0;
}

.jf-cart-block-shell .wc-block-cart__main {
  grid-column: 1;
  min-width: 0;
}

.jf-cart-block-shell .wc-block-cart__sidebar {
  position: sticky;
  top: 7.6rem;
  grid-column: 2;
  min-width: 0;
  margin: 0;
}

/* Cart Blocks add their own 65% / 35% widths and column padding via
   .wc-block-components-sidebar-layout. Reset those internals because this
   page supplies its own CSS Grid tracks above. */
.jf-cart-block-shell .wc-block-components-main.wc-block-cart__main {
  box-sizing: border-box;
  width: auto !important;
  max-width: none !important;
  padding: 0 !important;
}

.jf-cart-block-shell .wc-block-components-sidebar.wc-block-cart__sidebar {
  box-sizing: border-box;
  width: auto !important;
  max-width: none !important;
  margin: 0;
  padding: clamp(1.15rem, 2.2vw, 1.75rem) !important;
  border: 1px solid var(--jfc-line);
  border-radius: 1.2rem;
  background: var(--jfc-paper);
  box-shadow: var(--jfc-shadow);
}

.jf-cart-block-shell .wc-block-cart__totals {
  width: 100%;
  margin: 0;
}

.jf-cart-block-shell .wc-block-cart-items {
  box-sizing: border-box;
  width: 100% !important;
  max-width: none !important;
  margin: 0;
  padding: 0 !important;
  border: 1px solid var(--jfc-line);
  border-radius: 1.2rem;
  background: var(--jfc-paper);
  box-shadow: 0 12px 30px rgba(23, 58, 44, 0.045);
}

.jf-cart-block-shell .wc-block-cart-items__header {
  box-sizing: border-box;
  width: 100%;
  margin: 0;
  padding: 1rem clamp(1.1rem, 2.4vw, 1.8rem) !important;
  border-bottom: 1px solid var(--jfc-line);
  color: var(--jfc-muted);
  font-family: var(--jfc-sans);
  font-size: 0.67rem;
  font-weight: 850;
  letter-spacing: 0.09em;
  line-height: 1.3;
  text-transform: uppercase;
}

.jf-cart-block-shell .wc-block-cart-items__row {
  box-sizing: border-box;
  width: 100%;
  padding: clamp(1.15rem, 2vw, 1.65rem) clamp(1.1rem, 2.4vw, 1.8rem) !important;
  border-bottom: 1px solid var(--jfc-line);
}

.jf-cart-block-shell .wc-block-cart-items__row:last-child {
  border-bottom: 0;
}

.jf-cart-block-shell .wc-block-cart-item__image {
  overflow: hidden;
  border-radius: 0.85rem;
  background: var(--jfc-mist);
}

.jf-cart-block-shell .wc-block-cart-item__image img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: inherit;
  mix-blend-mode: multiply;
}

.jf-cart-block-shell .wc-block-components-product-name {
  color: var(--jfc-ink) !important;
  font-family: var(--jfc-serif);
  font-size: clamp(1.2rem, 1.8vw, 1.55rem);
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 1.1;
  text-decoration: none;
}

.jf-cart-block-shell .wc-block-components-product-name:hover,
.jf-cart-block-shell .wc-block-components-product-name:focus-visible {
  color: var(--jfc-rose) !important;
}

.jf-cart-block-shell .wc-block-components-product-metadata,
.jf-cart-block-shell .wc-block-components-product-metadata__description,
.jf-cart-block-shell .wc-block-components-product-details,
.jf-cart-block-shell .wc-block-components-product-details__name,
.jf-cart-block-shell .wc-block-components-product-details__value {
  color: var(--jfc-muted);
  font-family: var(--jfc-sans);
  font-size: 0.77rem;
  line-height: 1.5;
}

.jf-cart-block-shell .wc-block-components-product-metadata {
  margin-top: 0.6rem;
}

.jf-cart-block-shell .wc-block-components-product-details {
  margin: 0.5rem 0 0;
}

.jf-cart-block-shell .wc-block-components-product-details__name {
  font-weight: 800;
}

.jf-cart-block-shell .wc-block-cart-item__quantity {
  margin-top: 1rem;
}

.jf-cart-block-shell .wc-block-components-quantity-selector {
  border-color: rgba(23, 58, 44, 0.19);
  border-radius: 999px;
  background: #fbfcf9;
}

.jf-cart-block-shell .wc-block-components-quantity-selector input.wc-block-components-quantity-selector__input {
  color: var(--jfc-ink);
  font-family: var(--jfc-sans);
  font-weight: 800;
}

.jf-cart-block-shell .wc-block-components-quantity-selector button {
  color: var(--jfc-leaf-deep);
}

.jf-cart-block-shell .wc-block-components-quantity-selector button:hover,
.jf-cart-block-shell .wc-block-components-quantity-selector button:focus-visible {
  color: var(--jfc-rose);
}

.jf-cart-block-shell .wc-block-cart-item__remove-link {
  color: var(--jfc-rose) !important;
  font-family: var(--jfc-sans);
  font-size: 0.74rem;
  font-weight: 800;
  text-decoration: none;
}

.jf-cart-block-shell .wc-block-cart-item__remove-link:hover,
.jf-cart-block-shell .wc-block-cart-item__remove-link:focus-visible {
  color: var(--jfc-ink) !important;
  text-decoration: underline;
}

.jf-cart-block-shell .wc-block-components-product-price,
.jf-cart-block-shell .wc-block-cart-item__total-price-and-sale-badge-wrapper {
  color: var(--jfc-leaf-deep);
  font-family: var(--jfc-sans);
  font-size: 0.91rem;
  font-weight: 850;
}

/* Order summary. */
.jf-cart-block-shell .wc-block-cart__totals-title,
.jf-cart-block-shell .wc-block-components-totals-wrapper > .wc-block-components-totals-item:first-child {
  color: var(--jfc-ink);
  font-family: var(--jfc-serif);
  font-size: clamp(1.55rem, 2.2vw, 2rem);
  font-weight: 400;
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.jf-cart-block-shell .wc-block-components-totals-wrapper {
  margin-top: 1rem;
}

.jf-cart-block-shell .wc-block-components-totals-item {
  padding: 0.82rem 0;
  border-color: var(--jfc-line);
  color: var(--jfc-ink);
  font-family: var(--jfc-sans);
  font-size: 0.86rem;
}

.jf-cart-block-shell .wc-block-components-totals-item__label {
  color: var(--jfc-muted);
  font-weight: 700;
}

.jf-cart-block-shell .wc-block-components-totals-item__value {
  color: var(--jfc-leaf-deep);
  font-weight: 850;
}

.jf-cart-block-shell .wc-block-components-totals-footer-item {
  margin-top: 0.35rem;
  padding-top: 1rem;
  border-top: 1px solid var(--jfc-line);
}

.jf-cart-block-shell .wc-block-components-totals-footer-item .wc-block-components-totals-item__label,
.jf-cart-block-shell .wc-block-components-totals-footer-item .wc-block-components-totals-item__value {
  color: var(--jfc-ink);
  font-family: var(--jfc-serif);
  font-size: 1.35rem;
  font-weight: 400;
}

.jf-cart-block-shell .wc-block-components-totals-coupon,
.jf-cart-block-shell .wc-block-components-order-summary {
  margin: 0 0 1rem;
  border: 1px solid var(--jfc-line);
  border-radius: 0.85rem;
  background: #f8faf6;
}

.jf-cart-block-shell .wc-block-components-totals-coupon {
  padding: 0.8rem;
}

.jf-cart-block-shell .wc-block-components-totals-coupon-link,
.jf-cart-block-shell .wc-block-components-totals-coupon__button {
  color: var(--jfc-leaf-deep) !important;
  font-family: var(--jfc-sans);
  font-size: 0.78rem;
  font-weight: 800;
}

.jf-cart-block-shell .wc-block-components-text-input input,
.jf-cart-block-shell .wc-block-components-combobox .wc-block-components-combobox-control__input {
  min-height: 2.85rem;
  border-color: rgba(23, 58, 44, 0.18);
  border-radius: 0.68rem;
  background: var(--jfc-paper);
  color: var(--jfc-ink);
  font-family: var(--jfc-sans);
}

.jf-cart-block-shell .wc-block-components-button,
.jf-cart-block-shell .wc-block-cart__submit-button {
  min-height: 3.25rem;
  border: 1px solid var(--jfc-leaf-deep) !important;
  border-radius: 999px !important;
  background: var(--jfc-leaf-deep) !important;
  color: var(--jfc-paper) !important;
  font-family: var(--jfc-sans) !important;
  font-size: 0.78rem !important;
  font-weight: 850 !important;
  letter-spacing: 0.015em;
  text-decoration: none !important;
  transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.jf-cart-block-shell .wc-block-components-button:hover,
.jf-cart-block-shell .wc-block-components-button:focus-visible,
.jf-cart-block-shell .wc-block-cart__submit-button:hover,
.jf-cart-block-shell .wc-block-cart__submit-button:focus-visible {
  border-color: var(--jfc-rose) !important;
  background: var(--jfc-rose) !important;
  color: var(--jfc-paper) !important;
  transform: translateY(-1px);
}

.jf-cart-block-shell .wc-block-cart__submit {
  margin-top: 1.1rem;
}

.jf-cart-block-shell .wc-block-cart__accepted-payment-methods {
  margin-top: 1rem;
  opacity: 0.86;
}

/* Cross-sells and empty-cart state remain native Cart Block components. */
.jf-cart-block-shell .wp-block-woocommerce-cart-cross-sells-block {
  margin-top: clamp(2.6rem, 5vw, 5.2rem);
}

.jf-cart-block-shell .wp-block-woocommerce-cart-cross-sells-block > h2,
.jf-cart-block-shell .wc-block-cart__empty-cart__title {
  margin: 0 0 1.35rem;
  color: var(--jfc-ink);
  font-family: var(--jfc-serif);
  font-size: clamp(1.8rem, 3.4vw, 3rem);
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 1;
}

.jf-cart-block-shell .wp-block-cart-cross-sells-products-block > div,
.jf-cart-block-shell .wp-block-woocommerce-cart-cross-sells-products-block > div {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.jf-cart-block-shell .cross-sells-product {
  overflow: hidden;
  border: 1px solid var(--jfc-line);
  border-radius: 1rem;
  background: var(--jfc-paper);
}

.jf-cart-block-shell .cross-sells-product > div > div:first-child {
  overflow: hidden;
  background: var(--jfc-mist);
}

.jf-cart-block-shell .cross-sells-product img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.jf-cart-block-shell .cross-sells-product .wc-block-components-product-name,
.jf-cart-block-shell .cross-sells-product .wc-block-components-product-price,
.jf-cart-block-shell .cross-sells-product .wc-block-components-product-button {
  display: block;
  margin: 0.8rem 0.85rem 0;
}

.jf-cart-block-shell .cross-sells-product .wc-block-components-product-button {
  margin-bottom: 0.85rem;
}

.jf-cart-block-shell .wp-block-woocommerce-empty-cart-block {
  box-sizing: border-box;
  padding: clamp(2.2rem, 5vw, 4rem);
  border: 1px solid var(--jfc-line);
  border-radius: 1.25rem;
  background: var(--jfc-paper);
  text-align: center;
}

/* Post-cart reassurance. */
.jf-cart-assurance {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin-top: clamp(3rem, 6vw, 6rem);
  margin-bottom: clamp(3rem, 6vw, 6rem);
  overflow: hidden;
  border: 1px solid var(--jfc-line);
  border-radius: 1.2rem;
  background: var(--jfc-paper);
}

.jf-cart-assurance > div {
  min-height: 12.5rem;
  padding: clamp(1.4rem, 3vw, 2.35rem);
  border-right: 1px solid var(--jfc-line);
}

.jf-cart-assurance > div:last-child {
  border-right: 0;
  background: var(--jfc-leaf-deep);
}

.jf-cart-assurance span {
  color: var(--jfc-rose);
  font-family: var(--jfc-sans);
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.12em;
}

.jf-cart-assurance h2 {
  margin: 1rem 0 0.6rem;
  color: var(--jfc-ink);
  font-family: var(--jfc-serif);
  font-size: clamp(1.4rem, 2.2vw, 2rem);
  font-weight: 400;
  letter-spacing: -0.04em;
  line-height: 1.05;
}

.jf-cart-assurance p {
  margin: 0;
  color: var(--jfc-muted);
  font-family: var(--jfc-sans);
  font-size: 0.82rem;
  line-height: 1.6;
}

.jf-cart-assurance__help span,
.jf-cart-assurance__help h2 {
  color: var(--jfc-paper);
}

.jf-cart-assurance__help a {
  display: inline-flex;
  gap: 0.45rem;
  margin-top: 1.1rem;
  color: #f9dfb8;
  font-family: var(--jfc-sans);
  font-size: 0.78rem;
  font-weight: 850;
  text-decoration: none;
}

.jf-cart-assurance__help a:hover,
.jf-cart-assurance__help a:focus-visible {
  color: var(--jfc-paper);
}

.justflowers-florist-cart .wc-block-components-notice-banner {
  margin: 0 0 1rem;
  border-radius: 0.8rem;
  box-shadow: none;
  font-family: var(--jfc-sans);
}

.justflowers-florist-cart .wc-block-components-notice-banner.is-success {
  border-color: rgba(45, 117, 85, 0.3);
  background: var(--jfc-mist);
  color: var(--jfc-ink);
}

.justflowers-florist-cart :focus-visible {
  outline: 3px solid rgba(179, 63, 91, 0.42);
  outline-offset: 3px;
}

@media (max-width: 900px) {
  .jf-cart-block-shell .wc-block-cart {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .jf-cart-block-shell .wc-block-cart__main,
  .jf-cart-block-shell .wc-block-cart__sidebar {
    grid-column: 1;
  }

  .jf-cart-block-shell .wc-block-cart__sidebar {
    position: static;
  }

  .jf-cart-block-shell .wp-block-cart-cross-sells-products-block > div,
  .jf-cart-block-shell .wp-block-woocommerce-cart-cross-sells-products-block > div {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@container (min-width: 700px) {
    .wc-block-cart__main .wc-block-cart-items th {
        padding: 8px 16px 12px 12px !important;
        white-space: nowrap;
    }
}

@media (max-width: 767px) {
  .jf-cart-shell,
  .jf-cart-block-shell,
  .jf-cart-assurance,
  .jf-cart-intro {
    width: calc(100% - 32px);
  }

  .jf-cart-intro {
    margin-top: 1.3rem;
    border-radius: 1.1rem;
  }

  .jf-cart-intro__inner {
    grid-template-columns: 1fr;
    gap: 1.4rem;
    padding: 1.8rem 0;
  }

  .jf-cart-intro h1 {
    max-width: 11ch;
    font-size: clamp(2.35rem, 12vw, 3.3rem);
  }

  .jf-cart-intro__aside {
    padding-top: 1rem;
  }

  .jf-cart-block-shell .wc-block-cart-items,
  .jf-cart-block-shell .wc-block-components-sidebar,
  .jf-cart-block-shell .wc-block-cart__totals {
    border-radius: 1rem;
  }

  .jf-cart-block-shell .wc-block-cart-items {
    padding-inline: 1rem;
  }

  .jf-cart-block-shell .wc-block-cart-items__row {
    padding-block: 1rem;
  }

  .jf-cart-block-shell .wc-block-cart-item__image {
    border-radius: 0.7rem;
  }

  .jf-cart-block-shell .wc-block-components-product-name {
    font-size: 1.18rem;
  }

  .jf-cart-block-shell .wc-block-cart__sidebar {
    margin-bottom: 0;
  }

  .jf-cart-assurance {
    grid-template-columns: 1fr;
  }

  .jf-cart-assurance > div {
    min-height: 0;
    padding: 1.5rem;
    border-right: 0;
    border-bottom: 1px solid var(--jfc-line);
  }

  .jf-cart-assurance > div:last-child {
    border-bottom: 0;
  }

  .jf-cart-assurance h2 {
    font-size: 1.55rem;
  }
}

@media (max-width: 480px) {
  .jf-cart-intro__copy > p:not(.jf-cart-eyebrow) {
    font-size: 0.88rem;
  }

  .jf-cart-block-shell .wc-block-cart-items__header {
    font-size: 0.6rem;
  }

  .jf-cart-block-shell .wc-block-components-totals-footer-item .wc-block-components-totals-item__label,
  .jf-cart-block-shell .wc-block-components-totals-footer-item .wc-block-components-totals-item__value {
    font-size: 1.18rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .jf-cart-block-shell .wc-block-components-button,
  .jf-cart-block-shell .wc-block-cart__submit-button {
    transition: none;
  }
}
