/* Cart page ("Your bag", Bag design)
   Loaded on the cart page after components.css. Templates:
   woocommerce/cart/cart.php, cart-empty.php and the
   template-parts/woocommerce/cart-* partials. Buttons, chips and the
   quantity stepper come from components.css.
--------------------------------------------- */

.bluthe_bag {
  padding: clamp(28px, 4vw, 56px) 0 clamp(56px, 7vw, 92px);
  font-family: var(--bl-font);
  color: var(--bl-navy);
}

/* Intro
--------------------------------------------- */
.bluthe_bag__intro {
  display: flex;
  align-items: baseline;
  gap: 22px;
  flex-wrap: wrap;
  margin-bottom: clamp(22px, 3vw, 36px);
}
.bluthe_bag__count {
  margin-inline-start: auto;
}
/* "1 Bag · 2 Delivery & payment · 3 Confirm" (template-parts/woocommerce/checkout-steps.php) */
.bluthe_bag__steps {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bl-text-muted);
}
.bluthe_bag__steps li + li::before {
  content: "·";
  margin-inline-end: 12px;
}
.bluthe_bag__steps a {
  color: inherit;
  text-decoration: none;
}
.bluthe_bag__steps a:hover,
.bluthe_bag__steps [aria-current] {
  color: var(--bl-navy);
}
.bluthe_bag__title {
  margin: 0;
  font-family: var(--bl-font);
  font-weight: 400;
  font-size: clamp(28px, 3.8vw, 46px);
  line-height: 1.06;
  color: var(--bl-navy);
}
.bluthe_bag__count {
  font-size: 13.5px;
  font-weight: 300;
  color: var(--bl-text-soft);
}
.bluthe_bag__eyebrow {
  display: block;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bl-text-soft);
  margin-bottom: 12px;
}

/* Layout
--------------------------------------------- */
.bluthe_bag__layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
  gap: clamp(22px, 3vw, 48px);
  align-items: start;
  margin: 0;
}
.bluthe_bag__side {
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: sticky;
  top: 110px; /* below the sticky header */
}
.bluthe_bag__card {
  border: 1px solid #E4DCD2;
  border-radius: 16px;
  padding: clamp(20px, 2.5vw, 28px);
}

/* Items: hairlines between rows via the gap on a line-coloured background.
--------------------------------------------- */
.bluthe_bag__items {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--bl-line);
  border: 1px solid var(--bl-line);
  border-radius: 16px 16px 0 0;
  overflow: hidden;
}
.bluthe_bag__item {
  background: var(--bl-cream);
  padding: 20px;
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) auto;
  gap: 20px;
  align-items: start;
}
.bluthe_bag__thumb {
  width: 96px;
  aspect-ratio: 4 / 5;
  background: var(--bl-panel);
  border-radius: 12px;
  overflow: hidden;
}
.bluthe_bag__thumb a {
  display: block;
  height: 100%;
}
.bluthe_bag__thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.bluthe_bag__name {
  font-size: 21px;
  line-height: 1.2;
}
.bluthe_bag__name a {
  color: var(--bl-navy);
  text-decoration: none;
}
.bluthe_bag__name a:hover {
  color: var(--bl-brown);
}
.bluthe_bag__detail,
.bluthe_bag__body dl.variation {
  font-size: 13px;
  font-weight: 300;
  color: var(--bl-text-soft);
  margin: 5px 0 0;
}
.bluthe_bag__body dl.variation {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 2px 8px;
}
.bluthe_bag__body dl.variation dt,
.bluthe_bag__body dl.variation dd,
.bluthe_bag__body dl.variation p {
  margin: 0;
  font-weight: 300;
}
.bluthe_bag__controls {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.bluthe_bag .bluthe_qty__btn {
  padding: 8px 14px;
}
.bluthe_bag .bluthe_qty input.qty {
  width: 36px;
}
/* WooCommerce's remove link, shown as a small text link. */
.bluthe_bag .bluthe_bag__remove {
  display: inline-block;
  width: auto;
  height: auto;
  padding: 0 0 3px;
  border: 0;
  border-bottom: 1px solid rgba(22, 40, 63, 0.3);
  border-radius: 0;
  background: transparent;
  color: var(--bl-navy);
  font-family: var(--bl-font);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1.2;
  text-decoration: none;
}
.bluthe_bag .bluthe_bag__remove:hover {
  color: var(--bl-accent);
  border-bottom-color: var(--bl-accent);
}
.bluthe_bag__total {
  font-size: 16px;
  white-space: nowrap;
  text-align: end;
}
.bluthe_bag__unit {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  font-weight: 300;
  color: var(--bl-text-muted);
}

/* Message on the card
--------------------------------------------- */
.bluthe_bag__message {
  margin-top: 0;
  background: var(--bl-cream);
  border: 1px solid var(--bl-line);
  border-top: 0;
  border-radius: 0 0 16px 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.bluthe_bag__toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 19px;
  cursor: pointer;
}
.bluthe_bag__toggle input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--bl-navy);
}
.bluthe_bag__message_fields {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.bluthe_bag__message_fields[hidden] {
  display: none;
}
.bluthe_bag__message_row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 14px;
}
.bluthe_bag__field .bluthe_bag__eyebrow {
  margin-bottom: 8px;
}
.bluthe_bag__message textarea,
.bluthe_bag__message input[type="text"],
.bluthe_bag__message select {
  width: 100%;
  background: transparent;
  border: 1px solid rgba(22, 40, 63, 0.25);
  border-radius: 12px;
  padding: 12px 14px;
  font-family: var(--bl-font);
  font-size: 14px;
  font-weight: 300;
  color: var(--bl-navy);
}
.bluthe_bag__message textarea {
  resize: vertical;
  min-height: 72px;
}
.bluthe_bag__message :is(textarea, input, select):focus {
  outline: none;
  border-color: var(--bl-navy);
}
.bluthe_bag__helper {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 6px;
  font-size: 12px;
  color: var(--bl-text-muted);
}
.bluthe_bag__actions {
  display: none; /* holds the hidden "Update cart" button + nonce */
}

/* Order summary
--------------------------------------------- */
.bluthe_bag__summary_title {
  margin: 0 0 20px;
  font-family: var(--bl-font);
  font-size: 22px;
  font-weight: 400;
}
.bluthe_bag__rows {
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 14px;
  font-weight: 300;
}
.bluthe_bag__row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
}
.bluthe_bag__row > :first-child {
  color: var(--bl-text-soft);
  font-weight: 300;
  text-align: start;
}
.bluthe_bag__row > :last-child {
  font-weight: 400;
  text-align: end;
}
/* Item lines (checkout summary) sit above the totals, divided by a hairline. */
.bluthe_bag__rows--items {
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--bl-line);
}
.bluthe_bag__row_qty {
  color: var(--bl-text-muted);
}
.bluthe_bag__row dl.variation {
  display: block;
  margin: 4px 0 0;
  font-size: 12.5px;
  color: var(--bl-text-muted);
}
.bluthe_bag__row dl.variation dt,
.bluthe_bag__row dl.variation dd,
.bluthe_bag__row dl.variation p {
  display: inline;
  margin: 0;
  font-weight: 300;
}
.bluthe_bag__row--total {
  align-items: baseline;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--bl-line);
}
.bluthe_bag__row--total > :first-child {
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--bl-text-soft);
}
.bluthe_bag__grand {
  font-size: 28px;
}
.bluthe_bag__note {
  margin: 10px 0 0;
  font-size: 12.5px;
  font-weight: 300;
  line-height: 1.5;
  color: var(--bl-text-soft);
}
.bluthe_bag__checkout {
  margin-top: 20px;
}
.bluthe_bag__checkout .checkout-button {
  letter-spacing: 0.18em;
}
.bluthe_bag__pay {
  margin-top: 16px;
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--bl-text-soft);
}

/* Promotion code
--------------------------------------------- */
.bluthe_bag__coupon_card {
  padding: clamp(18px, 2vw, 24px);
}
.bluthe_bag__coupon {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: flex-end;
}
.bluthe_bag__coupon input[type="text"] {
  flex: 1 1 130px;
  min-width: 0;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(22, 40, 63, 0.3);
  border-radius: 0;
  padding: 9px 2px;
  font-family: var(--bl-font);
  font-size: 14px;
  font-weight: 300;
  color: var(--bl-navy);
}
.bluthe_bag__coupon input[type="text"]:focus {
  outline: none;
  border-bottom-color: var(--bl-navy);
}
.bluthe_bag__coupon .bluthe_btn {
  padding: 10px 20px;
}

/* Help
--------------------------------------------- */
.bluthe_bag__help {
  background: var(--bl-panel);
  border-radius: 16px;
  padding: clamp(18px, 2vw, 24px);
}
.bluthe_bag__help_title {
  margin: 0 0 8px;
  font-family: var(--bl-font);
  font-size: 19px;
  font-weight: 400;
}
.bluthe_bag__help_text {
  margin: 0 0 14px;
  font-size: 13.5px;
  font-weight: 300;
  line-height: 1.65;
  color: var(--bl-text-soft);
}

/* Recommendations
--------------------------------------------- */
.bluthe_bag__recs {
  margin-top: clamp(34px, 4.5vw, 58px);
  padding-top: clamp(24px, 3vw, 38px);
  border-top: 1px solid var(--bl-line);
}
.bluthe_bag__recs_title {
  margin: 0 0 4px;
  font-family: var(--bl-font);
  font-size: 26px;
  font-weight: 400;
}
.bluthe_bag__recs_sub {
  margin: 0 0 18px;
  font-size: 14px;
  font-weight: 300;
  color: var(--bl-text-soft);
}
.bluthe_bag__chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.bluthe_bag__chips_bar {
  margin: 12px 0 22px;
}
.bluthe_bag__recs ul.products {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.bluthe_bag__recs_grid {
  transition: opacity 0.2s ease;
}
.bluthe_bag__recs.is-loading .bluthe_bag__recs_grid {
  opacity: 0.45;
  pointer-events: none;
}
.bluthe_bag__recs_footer {
  display: flex;
  margin-top: 36px;
}
.bluthe_bag__recs_footer[hidden] {
  display: none;
}
/* Instalment widgets injected by payment plugins do not belong in the summary
   (their callbacks are also removed in inc/cart.php). */
.bluthe_bag__summary_card :is([class*="tamara"], [id*="tamara"], tamara-widget, [class*="tabby"], [id*="tabby"], tabby-promo) {
  display: none !important;
}

/* Empty state
--------------------------------------------- */
.bluthe_bag__empty {
  border: 1px solid #E4DCD2;
  border-radius: 16px;
  padding: clamp(28px, 4vw, 52px);
  max-width: 620px;
}
.bluthe_bag__empty_title {
  margin: 0 0 12px;
  font-family: var(--bl-font);
  font-size: 26px;
  font-weight: 400;
}
.bluthe_bag__empty_text {
  margin: 0 0 24px;
  font-size: 14.5px;
  font-weight: 300;
  line-height: 1.7;
  color: var(--bl-text-soft);
}
.bluthe_bag__empty_actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* Responsive
--------------------------------------------- */
@media (max-width: 1024px) {
  .bluthe_bag__layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .bluthe_bag__side {
    position: static;
  }
  .bluthe_bag__recs ul.products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 767px) {
  .bluthe_bag__item {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 16px;
    padding: 16px;
  }
  .bluthe_bag__thumb {
    width: 72px;
  }
  .bluthe_bag__name {
    font-size: 17px;
  }
  .bluthe_bag__total {
    grid-column: 2;
    text-align: start;
  }
  .bluthe_bag__message,
  .bluthe_bag__card {
    padding: 16px;
  }
  .bluthe_bag__message_row {
    grid-template-columns: minmax(0, 1fr);
  }
  /* Chips scroll sideways; the always-visible bar below (.bluthe_scrollbar)
     shows there is more, since native scrollbars hide on phones. */
  .bluthe_bag__chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    margin-bottom: 0;
    padding: 0 0 2px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .bluthe_bag__chips::-webkit-scrollbar {
    display: none;
  }
  .bluthe_bag__chips .bluthe_chip {
    flex: 0 0 auto;
  }
  .bluthe_bag__recs_footer {
    margin-top: 28px;
  }
}
