/* 1401px and up — Full Desktop (also covers 1440 Laptop L, 1920, and 4K 2560): the base styles in this file are the Full Desktop CSS. Narrower sizes are overridden in the RESPONSIVE TIERS section at the bottom of this file. */
/* ==========================================================================
   Cart / Checkout page and Redeem a Gift Code page
   Oct 6 2026 - her request (approved). One row per cart line, in one grid:
   thumbnail | name | price each | quantity | line total. The summary (subtotal,
   discount, total) is flushed right under the lines. Every size and color
   comes from the tokens in css_visual_catalog.css, so each theme can restyle it.
   Under 40rem the price / quantity / total stack under the name, each with its
   column label (data-label), so nothing is lost on a phone.
   ========================================================================== */
.cart_lines_head,
.cart_line {
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr) 6.5rem 6.5rem 6.5rem 2rem;
  column-gap: 0.75rem;
  align-items: center;
}
.cart_lines_head {
  padding-block: 0.25rem;
  border-bottom: 1px solid var(--cart-line-divider);}
.cart_head_name {
  grid-column: 1 / span 2;
}
.cart_head_price,
.cart_head_quantity,
.cart_head_total,
.cart_line_price,
.cart_line_quantity,
.cart_line_total {
  text-align: right;
}
.cart_lines {
  margin: 0;
  padding: 0;
  list-style: none;
}
.cart_line {
  padding-block: 0.75rem;
  border-bottom: 1px solid var(--cart-line-divider);
}
.cart_line_thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 4.5rem;
  height: 4.5rem;
  overflow: hidden;
  border-radius: var(--radius-large);
  background: var(--cart-thumb-background);
}
.cart_line_thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.cart_line_name {
  min-width: 0;
  text-align: left;
}
.cart_line_name h3,
.cart_line_name p {
  margin: 0;
  text-align: left;
}

.cart_line_blocked {
  color: var(--cart-blocked-text);}
.cart_line.is_blocked .cart_line_thumb {
  opacity: 0.5;
}
.cart_line_remove_cell {
  text-align: right;
}
.cart_line_remove {
  padding: 0;
  border: 0;
  background: none;
  color: var(--cart-remove-text);
  cursor: pointer;}
.cart_line_quantity input {
  width: 100%;
  max-width: 6.5rem;
  text-align: right;
}
.cart_lines_actions,
.cart_pay_actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.75rem;
}
.cart_footer {
  display: flex;
  flex-direction: column;
  gap: calc(0.75rem * 2);
  margin-top: calc(0.75rem * 2);
}
.cart_footer_forms {
  display: flex;
  align-self: flex-end;
  width: min(100%, 20rem);
  flex-direction: column;
  gap: calc(0.75rem * 2);
  min-width: 0;
}
.cart_discount_form,
.cart_email_form,
.redeem_form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.cart_email_form h3 {
  margin: 0;
}
.cart_form_row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.cart_form_row .public_form_control {
  flex: 1 1 10rem;
  min-width: 0;
}
.cart_summary {
  width: min(100%, 20rem);
  margin: 0 0 0 auto;
}
.cart_summary_row {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding-block: 0.25rem;
}
.cart_summary_row dt,
.cart_summary_row dd {
  margin: 0;
}
.cart_summary_row dd {
  text-align: right;
}
.cart_summary_total {
  margin-top: 0.25rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--cart-line-divider);}
@media (max-width: 40rem) {
  .cart_lines_head {
    display: none;
  }
  .cart_line {
    grid-template-columns: 4.5rem minmax(0, 1fr);
    row-gap: 0.25rem;
  }
  .cart_line_name {
    grid-column: 2;
  }
  .cart_line_remove_cell {
    grid-column: 1 / -1;
  }
  .cart_line_price,
  .cart_line_quantity,
  .cart_line_total {
    display: flex;
    grid-column: 1 / -1;
    justify-content: space-between;
  }
  .cart_line_price::before,
  .cart_line_quantity::before,
  .cart_line_total::before {
    content: attr(data-label);}
  .cart_line_quantity input {
    width: 6.5rem;
  }
  .cart_summary {
    width: 100%;
  }
}

/* ==========================================================================
   RESPONSIVE TIERS (Oct 11 2026)
   Mobile-first hardening for every device size in the canon (see the DevTools
   preset list). Everything above this line is the normal CSS; these blocks
   only refine it for narrower or wider screens. Add new size fixes here.
   ========================================================================== */

/* 320–428px — Mobile Small + Mobile Large (iPhone SE, iPhone 16, Pixel 9 / 9 Pro / 10, Galaxy A55, Galaxy Z Fold 6 cover, Pixel 9 Pro Fold cover) */
@media (max-width: 428px) {
    main.content :is(td, th, h2, h3, p) { overflow-wrap: anywhere; }
}

/* 768–1024px — Tablet (own tier): iPad Mini landscape (768), Galaxy Z Fold 6 unfolded (~884), Pixel 9 Pro Fold unfolded (~841), Surface Pro 10 / 13 (~912), 1024 */
@media (min-width: 768px) and (max-width: 1024px) {
    main.content :is(td, th, h2, h3, p) { overflow-wrap: anywhere; }
}

/* 1025–1400px — Narrow Desktop: any desktop browser window narrower than the full site width (Nest Hub Max 1280, laptops, resized windows); the three-column layout switches on at 1401 */
@media (min-width: 1025px) and (max-width: 1400px) {
    main.content :is(td, th, h2, h3, p) { overflow-wrap: anywhere; }
}
