/* Cart (/basket/). Stepper, progress bar, .luke-bundle-* and product cards .luke-pc come from luke-byb.css.
   Mobile and tablet: bundles, "Add to this delivery", order summary. Desktop: bundles left, summary right (sticky), "Add to this delivery" below */

section.luke-cart-page { /* body has class luke-cart */
  padding: 24px 0 calc(var(--section) * 2);
}
.luke-cart-in {
  display: grid;
  grid-template-areas: "head" "list" "more" "side";
  grid-template-columns: minmax(0, 1fr);
}
.luke-cart-head {
  grid-area: head;
  margin-bottom: 24px;
}
.luke-cart-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  grid-area: list;
  min-width: 0;
}
.luke-cart-side {
  grid-area: side;
  margin-top: 40px;
  min-width: 0;
}
.luke-cart-more {
  grid-area: more;
  margin-top: 48px; /* more space than in the design: the heading was too close to the last bundle */
  min-width: 0;
}
@media (min-width: 768px) {
  section.luke-cart-page {
    padding-top: 32px;
  }
  .luke-cart-head {
    margin-bottom: 32px;
  }
  .luke-cart-list {
    gap: 20px;
  }
  .luke-cart-more {
    margin-top: 64px;
  }
}
@media (min-width: 1200px) {
  .luke-cart-in {
    column-gap: 60px;
    grid-template-areas: "head head" "list side" "more more";
    grid-template-columns: minmax(0, 1fr) 459px;
  }
  .luke-cart-side { /* as tall as the bundles: the sticky summary stays inside it, above "Add to this delivery" */
    margin-top: 0;
  }
  .luke-cart-sum {
    position: sticky;
    top: 104px; /* under the sticky header */
  }
  .luke-cart-more {
    margin-top: 100px;
  }
}

/***************************************************************************** BUNDLE ***/
.luke-cart-box {
  background: var(--c-white);
  border-radius: 20px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, .06);
  padding: 14px 16px;
}
.luke-cart-top {
  align-items: center;
  display: flex;
  gap: 16px;
}
.luke-cart-top > img {
  border-radius: 12px;
  flex-shrink: 0;
  height: 48px;
  object-fit: cover;
  width: 48px;
}
.luke-cart-name {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.luke-cart-row[hidden] { /* Add-ons discount without add-ons */
  display: none;
}
.luke-cart-name a,
.luke-cart-name b {
  color: var(--c-dark);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -.03em;
  line-height: 22px;
}
.luke-cart-name a:hover {
  color: var(--c-green);
  text-decoration: underline;
}
.luke-cart-name span {
  color: var(--c-gray);
  font-size: 14px;
  line-height: 20px;
}
.luke-cart-price {
  align-items: flex-end;
  display: flex;
  flex-direction: column;
  white-space: nowrap;
}
.luke-cart-price s {
  color: var(--c-gray);
  font-size: 12px;
  line-height: 18px;
}
.luke-cart-price s[hidden] {
  display: none;
}
.luke-cart-price b {
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
}
.luke-cart-price .luke-cart-free,
.luke-cart-red {
  color: var(--c-red);
}
.luke-cart-toggle {
  color: var(--c-dark);
  display: flex;
  flex-shrink: 0;
}
.luke-cart-toggle svg {
  transform: rotate(180deg);
  transition: transform .2s;
}
.luke-cart-box.open .luke-cart-toggle svg {
  transform: none;
}

/* Expanded bundle: smoothies, add-ons, remove */
.luke-cart-body {
  border-top: 1px solid var(--c-green);
  display: none;
  flex-direction: column;
  gap: 16px;
  margin-top: 16px;
  padding-top: 16px;
}
.luke-cart-box.open .luke-cart-body {
  display: flex;
}
.luke-cart-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.luke-cart-group[hidden] {
  display: none;
}
.luke-cart-group + .luke-cart-group {
  border-top: 1px solid var(--c-beige0);
  padding-top: 16px;
}
.luke-cart-group-head {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}
.luke-cart-group-head .luke-bundle-name {
  font-size: 16px;
  line-height: 22px;
}
.luke-cart-group .luke-bundle-min {
  font-size: 11px;
  line-height: 14px;
  padding: 5px 8px;
}
.luke-cart-group .luke-bundle-min.ok {
  padding-left: 4px;
}
.luke-cart-group .luke-bundle-min svg {
  height: 16px;
  width: 16px;
}
.luke-cart-group .luke-bar {
  height: 8px;
}
.luke-cart-group .luke-bar-tick:not(:nth-child(3)), /* the 7 tick: full height until 7 smoothies */
.luke-cart-group .luke-bar.ok .luke-bar-tick:nth-child(3) {
  height: 5px;
  margin-top: -2.5px;
}

/* Rows: photo, name, stepper (smoothies); photo, name, ×N, price (add-ons) */
.luke-cart-items {
  list-style: none;
  margin: 0;
  padding: 0;
}
.luke-cart-items:empty {
  display: none;
}
.luke-cart-items li {
  align-items: center;
  display: flex;
  gap: 16px;
  padding: 8px 0;
}
.luke-cart-items li + li {
  border-top: 1px solid var(--c-beige0);
}
.luke-cart-items img {
  border-radius: 12px;
  flex-shrink: 0;
  height: 48px;
  object-fit: cover;
  width: 48px;
}
.luke-cart-items .luke-cart-extra-img {
  border: 1px solid var(--c-beige0);
}
.luke-cart-item-name {
  display: flex;
  flex: 1;
  flex-direction: column;
  font-size: 14px;
  font-weight: 600;
  gap: 2px;
  line-height: 20px;
  min-width: 0;
}
.luke-cart-items .luke-step {
  align-self: center;
  flex-shrink: 0;
}
.luke-step button:disabled {
  color: var(--c-dark);
  cursor: default;
  opacity: .3;
}
/* Add-ons: price, then ×N or the stepper; mobile - the price above them */
.luke-cart-item-side {
  align-items: flex-end;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  gap: 4px;
}
.luke-cart-item-x {
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
}
.luke-cart-item-price {
  align-items: flex-end;
  display: flex;
  flex-direction: column;
  white-space: nowrap;
}
.luke-cart-item-price s {
  color: var(--c-gray);
  font-size: 12px;
  line-height: 18px;
}
.luke-cart-item-price b {
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
}

/* Custom bundle without smoothies */
.luke-cart-none {
  align-items: center;
  background: #DAF1FE;
  border-radius: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  justify-content: space-between;
  padding: 14px 16px;
}
.luke-cart-none[hidden] {
  display: none;
}
.luke-cart-none div {
  display: flex;
  flex-direction: column;
  font-size: 14px;
  gap: 4px;
  line-height: 20px;
}
.luke-cart-none b {
  font-weight: 700;
}
.luke-cart-none-add {
  background: var(--c-white);
  border-color: var(--c-green-btn);
  color: var(--c-green);
  padding: 8px 22px 8px 14px;
}
.luke-cart-add-extras {
  align-items: center;
  align-self: flex-start;
  color: var(--c-green);
  display: inline-flex;
  font-size: 16px;
  font-weight: 600;
  gap: 8px;
  line-height: 22px;
}
.luke-cart-add-extras:hover {
  text-decoration: underline;
}
.luke-cart-remove {
  align-self: flex-start;
  color: var(--c-gray);
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  text-decoration: underline;
}
.luke-cart-remove:hover {
  color: var(--c-dark);
  text-decoration: none;
}

@media (min-width: 768px) {
  .luke-cart-box {
    padding: 20px 24px;
  }
  .luke-cart-top {
    gap: 24px;
  }
  .luke-cart-top > img {
    height: 56px;
    width: 56px;
  }
  .luke-cart-name {
    gap: 6px;
  }
  .luke-cart-name a,
  .luke-cart-name b {
    font-size: 20px;
    line-height: 24px;
  }
  .luke-cart-price s {
    font-size: 14px;
    line-height: 20px;
  }
  .luke-cart-price b {
    font-size: 16px;
    line-height: 22px;
  }
  .luke-cart-toggle { /* a line between the prices and the arrow */
    align-self: stretch;
    align-items: center;
    border-left: 1px solid var(--c-beige0);
    margin-left: 10px;
    padding-left: 34px;
  }
  .luke-cart-body {
    gap: 20px;
  }
  .luke-cart-group {
    gap: 16px;
  }
  .luke-cart-group + .luke-cart-group {
    padding-top: 20px;
  }
  .luke-cart-group-head .luke-bundle-name {
    font-size: 18px;
    line-height: 24px;
  }
  .luke-cart-group .luke-bundle-count,
  .luke-cart-group .luke-bundle-msg {
    font-size: 16px;
    line-height: 22px;
  }
  .luke-cart-group .luke-bundle-min {
    font-size: 13px;
    line-height: 18px;
    padding: 6px 10px;
  }
  .luke-cart-group .luke-bundle-min.ok {
    padding-left: 6px;
  }
  .luke-cart-group .luke-bundle-min svg {
    height: 20px;
    width: 20px;
  }
  .luke-cart-group .luke-bar {
    height: 16px;
  }
  .luke-cart-group .luke-bar-tick:not(:nth-child(3)),
  .luke-cart-group .luke-bar.ok .luke-bar-tick:nth-child(3) {
    height: 10px;
    margin-top: -5px;
  }
  .luke-cart-items li {
    gap: 24px;
  }
  .luke-cart-items img {
    height: 56px;
    width: 56px;
  }
  .luke-cart-item-name {
    font-size: 16px;
    gap: 4px;
    line-height: 22px;
  }
  .luke-cart-item-side {
    align-items: center;
    flex-direction: row;
    gap: 24px;
  }
  .luke-cart-item-x {
    font-size: 16px;
    line-height: 22px;
    text-align: center;
    width: 40px;
  }
  .luke-cart-item-price s {
    font-size: 14px;
    line-height: 20px;
  }
  .luke-cart-none {
    padding: 14px 20px;
  }
  .luke-cart-none div {
    font-size: 16px;
    gap: 6px;
    line-height: 22px;
  }
}

/***************************************************************************** EMPTY CART ***/
.luke-cart-empty {
  align-items: center;
  background: var(--c-white);
  border-radius: 20px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, .06);
  display: flex;
  flex-direction: column;
  gap: 12px;
  grid-column: 1 / -1;
  padding: 40px 20px;
  text-align: center;
}
.luke-cart-empty p {
  color: var(--c-gray);
  font-size: 16px;
  line-height: 22px;
}
.luke-cart-empty-go {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 12px;
}
@media (min-width: 768px) {
  .luke-cart-empty {
    border-radius: 32px;
    padding: 64px 40px;
  }
}

/***************************************************************************** ORDER SUMMARY ***/
.luke-cart-sum {
  background: var(--c-white);
  border-radius: 30px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, .06), 0 4px 11px rgba(0, 0, 0, .05);
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px;
}
.luke-cart-sum-title {
  border-bottom: 1px solid var(--c-beige0);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -.03em;
  line-height: 22px;
  padding-bottom: 16px;
}
.luke-cart-rows {
  border-bottom: 1px solid var(--c-beige0);
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: 16px;
}
.luke-cart-row {
  align-items: center;
  display: flex;
  font-size: 16px;
  font-weight: 500;
  gap: 16px;
  justify-content: space-between;
  letter-spacing: -.02em;
  line-height: 22px;
}
.luke-cart-row > span:first-child {
  align-items: center;
  display: flex;
  gap: 8px;
}
.luke-cart-row svg {
  color: var(--c-green);
  flex-shrink: 0;
}
.luke-cart-row b {
  font-weight: 500;
  white-space: nowrap;
}
.luke-cart-row-line { /* a line between the subtotal and the offers */
  border-top: 1px solid var(--c-beige0);
  padding-top: 10px;
}

/* Deliver every: 3 options in a row */
.luke-cart-freq {
  border-bottom: 1px solid var(--c-beige0);
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-bottom: 16px;
}
.luke-cart-freq-title {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  line-height: 16px;
  text-transform: uppercase;
}
.luke-cart-freq-list {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.luke-cart-freq-item {
  align-items: center;
  background: var(--c-white);
  border: 1px solid #E4E4E4;
  border-radius: 16px;
  cursor: pointer;
  display: flex;
  gap: 8px;
  min-width: 0;
  padding: 13px 8px;
  position: relative;
  transition: border-color .2s;
}
.luke-cart-freq-item:hover {
  border-color: var(--c-green);
}
.luke-cart-freq-item:has(input:checked) {
  background: #F2F8E4;
  border-color: var(--c-green);
  box-shadow: inset 0 0 0 1px var(--c-green); /* 2px border without a shift */
}
.luke-cart-freq-item input {
  height: 1px;
  opacity: 0;
  position: absolute;
  width: 1px;
}
.luke-cart-radio {
  background: var(--c-white);
  border: 1px solid var(--c-green);
  border-radius: 50%;
  flex-shrink: 0;
  height: 20px;
  width: 20px;
}
.luke-cart-freq-item input:checked + .luke-cart-radio {
  background: var(--c-cream);
  border: 6px solid var(--c-green);
}
.luke-cart-freq-item input:focus-visible + .luke-cart-radio {
  outline: 2px solid var(--c-green);
  outline-offset: 2px;
}
.luke-cart-freq-item b {
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  white-space: nowrap;
}
.luke-cart-freq-item .luke-badge {
  font-size: 10px;
  left: 50%;
  line-height: 14px;
  padding: 5px 9px;
  position: absolute;
  top: -12px;
  transform: translateX(-50%);
  white-space: nowrap;
}

/* Total, error, Checkout */
.luke-cart-total {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.luke-cart-total .luke-cart-row {
  font-size: 18px;
  line-height: 24px;
}
.luke-cart-total .luke-cart-row > span:last-child {
  white-space: nowrap;
}
.luke-cart-total s {
  color: var(--c-gray);
  font-size: 14px;
  font-weight: 400;
  margin-right: 8px;
}
.luke-cart-total s[hidden] {
  display: none;
}
.luke-cart-total p {
  color: var(--c-gray);
  font-size: 14px;
  line-height: 20px;
}
.luke-cart-error {
  align-items: center;
  background: #FEE9EE;
  border-radius: 10px;
  display: flex;
  font-size: 14px;
  gap: 8px;
  line-height: 20px;
  padding: 6px 12px;
}
.luke-cart-error[hidden] {
  display: none;
}
.luke-cart-error svg {
  color: var(--c-sale);
  flex-shrink: 0;
}
.luke-cart-error b {
  font-weight: 600;
}
.luke-cart-go {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.luke-cart-checkout {
  width: 100%;
}
.luke-cart-perks {
  align-items: center;
  display: flex;
  flex-direction: column;
  font-size: 13px;
  font-weight: 500;
  gap: 4px;
  line-height: 18px;
}
.luke-cart-perks span {
  align-items: center;
  display: flex;
  gap: 8px;
}
.luke-cart-perks svg {
  color: var(--c-green);
  flex-shrink: 0;
}
@media (min-width: 768px) {
  .luke-cart-sum {
    border-radius: 40px;
    padding: 30px;
  }
  .luke-cart-sum-title {
    font-size: 24px;
    line-height: 28px;
  }
  .luke-cart-row {
    font-size: 18px;
    line-height: 24px;
  }
  .luke-cart-row b {
    font-size: 20px;
    letter-spacing: -.03em;
  }
  .luke-cart-freq-title {
    font-size: 14px;
    line-height: 20px;
  }
  .luke-cart-freq-item {
    gap: 10px;
    padding: 15px 8px;
  }
  .luke-cart-freq-item b {
    font-size: 16px;
    line-height: 22px;
  }
  .luke-cart-total .luke-cart-row {
    font-size: 20px;
  }
  .luke-cart-total s {
    font-size: 16px;
  }
  .luke-cart-total p {
    font-size: 16px;
    line-height: 22px;
  }
  .luke-cart-perks {
    font-size: 14px;
    gap: 8px;
    line-height: 20px;
  }
}
@media (max-width: 374px) {
  .luke-cart-freq-item {
    gap: 6px;
    padding-left: 6px;
    padding-right: 6px;
  }
  .luke-cart-freq-item b {
    font-size: 13px;
  }
}

/***************************************************************************** ADD TO THIS DELIVERY ***/
/* Mobile - a row that scrolls sideways, tablet - 3 columns, desktop - 5 */
.luke-cart-more h2 {
  font-size: 24px;
  line-height: 28px;
  margin-bottom: 16px;
}
.luke-cart-more-list {
  display: flex;
  gap: 8px;
  margin: 0 calc(-1 * var(--gutter));
  overflow-x: auto;
  padding: 0 var(--gutter) 10px;
  scroll-padding: 0 var(--gutter);
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.luke-cart-more-list::-webkit-scrollbar {
  display: none;
}
.luke-cart-more-list .luke-pc {
  flex: 0 0 160px;
  scroll-snap-align: start;
}
@media (min-width: 768px) {
  .luke-cart-more h2 {
    font-size: 40px;
    line-height: 44px;
    margin-bottom: 32px;
  }
  .luke-cart-more-list {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 0;
    overflow: visible;
    padding: 0;
  }
}
@media (min-width: 1200px) {
  .luke-cart-more h2 {
    font-size: 48px;
    line-height: 48px;
    margin-bottom: 50px;
  }
  .luke-cart-more-list {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

/* Checkout of a Luke customer with an active subscription: the drawer dash/add-popup.php (the Reactivate drawer of
   luke-dash.css - .luke-dp, .luke-md, .luke-rv; luke-cart.js) */
.luke-ab-bundle {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.luke-ab-info { /* "You already have another … bundle": only an info (it can be added), under the frame of the bundle */
  align-items: flex-start;
  background: #EAF5FC;
  border-radius: 12px;
  color: #1A4E6B;
  display: flex;
  font-size: 14px;
  gap: 8px;
  line-height: 20px;
  padding: 10px 12px;
}
.luke-ab-info svg {
  flex-shrink: 0;
}
.luke-ab-select { /* Delivery date: as the select of the checkout - with a mouse selectWoo (theme "luke", luke-select.css), on touch screens native */
  position: relative;
}
.luke-ab-select select {
  -webkit-appearance: none;
  appearance: none;
  background: var(--c-white);
  border: 1px solid var(--c-beige1);
  border-radius: 50px;
  color: var(--c-dark);
  cursor: pointer;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  height: 48px;
  line-height: 22px;
  padding: 0 44px 0 16px;
  text-overflow: ellipsis;
  transition: border-color .2s;
  width: 100%;
}
.luke-ab-select select:focus {
  border-color: var(--c-dark);
  outline: none;
}
.luke-ab-select svg { /* the arrow of the native select */
  pointer-events: none;
  position: absolute;
  right: 16px;
  top: 16px;
}
.luke-ab-select .select2-container {
  width: 100% !important;
}
.luke-ab-select .select2-container + svg { /* selectWoo has its own arrow */
  display: none;
}
.luke-md-box.loading .luke-ab-go {
  opacity: .6;
  pointer-events: none;
}
.luke-cart-checkout.loading {
  opacity: .6;
  pointer-events: none;
}
