/* ============================================
   Cart Page Styles
   ============================================ */

/* Cart page container */
.frn-cart-page {
  padding: 0;
}

/* Cart page — two-column layout (items | sticky summary).
   Reference: Claude Design "Furni" / Cart.html. Header and footer are the
   site's own; the reference's slim checkout chrome is deliberately not used. */
.frn-cart-page__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 400px;
  gap: 80px;
  align-items: start;
  margin-top: 30px;
}

.frn-cart-page__side {
  position: sticky;
  top: 20px;
}

.frn-cart-page__title {
  margin: 0 0 22px;
}

/* all_styles.css:3552 adds padding-bottom: 20px to every .frn-cart-page__title.
   On this page that stacks under the 22px margin above, so the heading sat 42px
   clear of the items instead of the designed 22px. Scoped to #cart rather than
   fixed at source because 19 other places emit this class — the checkout steps,
   order-confirmation and order-final-summary — and two of them
   are also matched from JS. */
#cart .frn-cart-page__title {
  padding-bottom: 0;
}

/* Empty cart: the title renders outside the grid, so it must carry the grid's
   breadcrumb gap itself (30px, 20px on mobile) or it sits flush under it. */
#cart .frn-cart-page > .frn-cart-page__title {
  margin-top: 30px;
}

.frn-cart-page__title .frn-cart-head {
  margin: 0;
  font-weight: 500;
  line-height: var(--lh-heading);
  letter-spacing: var(--ls-heading);
}

/* Progress steps */
.frn-cart-page__steps {
  display: flex;
  justify-content: space-between;
  align-items: center;
  /*margin-bottom: 40px;*/
  gap: 1px;
}

.frn-cart-page__steps-item {
  height: 40px;
  display: flex;
  align-items: center;
  gap: 1px;
  flex: 1;
  position: relative;
}

.frn-cart-page__steps-item:not(:last-child)::after {
  /*content: '';
  position: absolute;
  right: -10px;
  width: 10px;
  height: 2px;
  background: #e0e0e0;*/
}

.frn-cart-page__steps-item-number {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: block;
  text-align: center;
  line-height: 25px;
  /*justify-content: center;*/
  background: #f5f5f5;
  color: #999;
  font-weight: bold;
}

.frn-cart-page__steps-item--open .frn-cart-page__steps-item-number {
  background: #d32f2f;
  color: #fff;
}

.frn-cart-page__steps-item--next .frn-cart-page__steps-item-number {
  background: #e0e0e0;
  color: #999;
}

.frn-cart-page__steps-item--prev .frn-cart-page__steps-item-number {
  background: #d32f2f;
  color: #fff;
  align-items: center;
  justify-content: center;
  display: flex;
}

.frn-cart-page__steps-item--prev .frn-cart-page__steps-item-number img {
  width: 12px;
  height: 12px;
}

.frn-cart-page__steps-item.frn-cart-page__steps-item--open .frn-cart-page__steps-item-text {
  width: 83%;
  text-align: center;
  font-family: var(--ffPrimary);
  font-weight: 500;
  font-size: var(--fz-18);
  color: #1a1b1a;
}

.frn-cart-page__steps-item-text {
  text-align: center;
  font-family: var(--ffPrimary);
  font-weight: 400;
  font-size: var(--fz-18);
  color: #575758;
  width: 80%;
}

/* Hide default PrestaShop checkout step titles */
#checkout-process .checkout-step .step-title {
  display: none;
}

/* Product item in cart */
.frn-cart-page__item-in-cart {
  margin-bottom: 20px;
  border-bottom: 1px solid #e0e0e0;
  padding-bottom: 20px;
}

.frn-product-item-cart__top {
  display: flex;
}

.frn-product-item-cart__top-image {
  box-sizing: border-box;
  border: 1px solid rgba(0, 0, 0, 0.05);
  width: 102px;
  margin-right: var(--spaceRightS);
}

@media (min-width: 576px) {
  .frn-product-item-cart__top-image {
    width: 184px;
    height: 128px;
    overflow: hidden;
  }
}

.frn-product-item-cart__top-text-bottom {
  display: none;
}

@media (min-width: 576px) {
  .frn-product-item-cart__top-text-bottom {
    display: block;
    position: relative;
    top: -5px;
  }
}

.frn-product-item-cart__top-text-wrapper {
  flex-direction: column;
  flex-grow: 1;
  justify-content: space-between;
  display: flex;
}

@media (min-width: 576px) {
  .frn-product-item-cart__top-text-wrapper {
    display: block;
  }
}

.frn-product-item-cart__top-text {
  flex-direction: column;
  flex-grow: 1;
  justify-content: space-between;
  display: flex;
}

.frn-product-item-cart__top-title {
  font-weight: 700;
}

.frn-product-item-cart__top-title a {
  font-weight: 500;
  font-size: var(--fz-16);
  line-height: 110%;
  color: #1a1b1a;
}

@media (min-width: 576px) {
  .frn-product-item-cart__top-title {
    margin-bottom: var(--spaceBottomXs);
  }
}

.frn-product-item-cart__top-code {
  color: var(--cTextLight);
  font-size: var(--fz-13);
  padding-bottom: 0;
}

.frn-product-item-cart__dimensions {
  color: #1a1b1a;
  font-size: var(--fz-13);
  padding-bottom: var(--spaceBottomXs);
}

.frn-product-item-cart__top-params {
  font-size: var(--fz-13);
}

.frn-product-item-cart__top-amount .frn-input {
  min-width: unset;
}

.frn-product-item-cart__top-price {
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-end;
  width: 100px;
  display: none;
}

.frn-product-item-cart__top-price .frn-product-item-cart__bottom-price {
  flex-grow: unset;
  align-items: center;
  height: 48px;
  display: flex;
}

.frn-product-item-cart__top-price .frn-product-item-cart__bottom-price--no-height {
  height: auto;
}

.frn-product-item-cart__top-price .frn-product-item-cart__bottom-actions {
  width: auto;
  margin-right: 0;
}

.frn-product-item-cart__top-price .frn-product-item-cart__bottom-actions button {
  margin-right: 0;
  margin-left: var(--spaceLeftXs);
}

@media (min-width: 576px) {
  .frn-product-item-cart__top-price {
    display: flex;
  }

  .frn-product-item-cart__bottom:first-of-type {
    display: none;
  }
}

.frn-product-item-cart__bottom {
  margin-top: var(--spaceTopS);
  justify-content: space-between;
  align-items: center;
  display: flex;
}

@media (min-width: 576px) {
  .frn-product-item-cart__bottom {
    display: none;
  }
}

.frn-product-item-cart__bottom-actions {
  width: 102px;
  margin-right: var(--spaceRightS);
  display: flex;
}

.frn-product-item-cart__bottom-actions button {
  background-color: var(--bgcLight);
  width: 36px;
  height: 36px;
  margin-right: var(--spaceRightS);
  border: 0;
  border-radius: 50%;
  justify-content: center;
  align-items: center;
  display: flex;
}

.frn-product-item-cart__bottom-actions button img {
  width: 14px;
  height: 14px;
}

/* min-height, not height: the estimate is one 20px line whenever it fits, but
   in a narrow column ("Pristatysime rugp. 29 - rugs. 5 d." in the checkout
   recap at <=360px) it wraps to two or three lines, and a fixed 20px box left
   the overflow painted on top of the SKU line above it. */
.frn-product-item-cart__bottom-line {
  min-height: 20px;
  font-size: var(--fz-14); /* Figma line meta 14 */
  align-items: center;
  display: flex;
  /* Same narrow-column case: without wrap the label and the date share one
     flex line and each shrinks to a few characters wide, breaking the date
     range across four lines. Wrapping drops the date onto its own line
     instead. No effect at any width where the line already fits. */
  flex-wrap: wrap;
}

.frn-product-item-cart__bottom-line img {
  margin-right: var(--spaceRightXs);
  /* Height-match the 14px line text; width:auto keeps each icon's own
     aspect ratio instead of squashing box-lines-danger.svg (16x15) or
     house-check-success.svg (18x16) into a forced square. */
  height: var(--fz-14);
  width: auto;
}

.frn-product-item-cart__bottom-line--date {
  color: var(--cDanger);
}

/* Gap between a label and the value that follows it (date or local-stock
   qty). Unconditional at all widths: the design reference has no separate
   mobile treatment, and the inline style this replaced applied everywhere
   too, so gating it to >=576px would have been a regression below that. */
.frn-product-item-cart__bottom-line--date,
.frn-product-item-cart__bottom-line--qty {
  margin-left: var(--spaceLeftXs);
}

.frn-product-item-cart__bottom-line--deliver {
  color: var(--cTextLight);
}

.frn-product-item-cart__bottom-select {
  width: 100px;
}

.frn-product-item-cart__bottom-price {
  text-align: right;
  flex-grow: 1;
  font-weight: 700;
  font-size: var(--fz-18); /* Figma cart item price 20 Medium -> Figtree-adjusted 18 */
}

@media (max-width: 767px) {
  .frn-product-item-cart__bottom-price {
    font-size: var(--fz-16); /* Figma mobile 16 */
  }
}

.frn-product-item-cart__bottom-price div {
  color: var(--cBlack);
}

.frn-product-item-cart__bottom-price .has-discount {
  color: var(--cDanger);
}

.frn-product-item-cart__bottom-price div strike {
  font-size: var(--fz-14); /* old price = small role, Figma 14 */
  color: var(--cTextLight);
  font-weight: 300;
  display: block;
}

/* Delivery manual (additional services). The 15px side inset was card-era
   residue: it pushed this block 15px right of the delivery options and message
   it sits among. Only z_offers' front-ajax.tpl renders this class, and only
   into the checkout's delivery section, so there is no cart-page side. */
/* padding-top zeroed alongside the margin: all_styles.css:2486 adds
   --spaceTopL above this block, which was the gap to the delivery options it
   used to sit under. It now renders inside the courier option's own panel,
   which supplies that inset itself. */
.frn-cart-page__delivery-manual {
    margin: 0;
    padding-top: 0;
}

/* Base + neutral (unmodified) variant: quiet informational row, no card. */
.frn-cart-page__delivery-manual-item {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 12px 0;
  margin: 15px 0 10px 0;
  background: transparent;
  border-radius: 0;
}

/* Success variant (courier can deliver to the door): mint field, owner's call
   over the neutral grey the current design file shows for .co-hintbox.
   Class doubled for weight only: all_styles.css:2482 sets the top margin
   positionally (`:not(:nth-child(2))`, 8px), which outranks a single class and
   left this 2px short of the design's 10px. */
.frn-cart-page__delivery-manual-item.frn-cart-page__delivery-manual-item--valid {
  align-items: flex-start;
  background: var(--cSuccess, #d3f0e6);
  border-radius: var(--bdrsPrimarySm);
  gap: 10px;
  margin: 10px 0 0;
  padding: 13px 14px;
}

/* The "you chose carrying" confirmation follows the hint above it and is the
   same kind of aside, so it sits on the same soft field rather than on bare
   white. Matched on the id prefix because z_offers appends the product id and
   gives this one no modifier class of its own — only the shared base, which
   the two variants above already claim. */
.frn-cart-page__delivery-manual-item[id^="z_offers-carrying-details-"] {
  background: var(--bgcLight, #f4f5f4);
  border-radius: var(--bdrsPrimarySm);
  margin: 10px 0 0;
  padding: 13px 14px;
}

/* No circle around this icon: it carries its own artwork (chat-2.svg) and
   takes the same plain treatment as the danger and neutral variants. The rules
   that drew a green disc with a white check inside it are gone rather than
   overridden — they were the whole reason the icon needed a 9px override. */

/* Warning variant (over max weight): --cDanger-tinted card with a left
   accent bar, matching the design's warning note. */
.frn-cart-page__delivery-manual-item--invalid {
  gap: 11px;
  padding: 15px 18px;
  border-radius: var(--bdrsPrimarySm);
  background: rgba(238, 71, 25, .05); /* --cDanger (#ee4719) @ 5% */
  border: 1px solid rgba(238, 71, 25, .18); /* --cDanger @ 18% */
}

/* The icon centres on the first line of its text, not on the top of the block.
   Given one line-box of height (14px text at 1.5) it stays beside the opening
   words however many lines the note wraps to; flex-start alone left a 14px
   icon riding 3.5px high in a 21px line. */
.frn-cart-page__delivery-manual-item-icon {
  align-items: center;
  display: flex;
  flex-shrink: 0;
  min-height: calc(var(--fz-14) * 1.5);
}

.frn-cart-page__delivery-manual-item-icon img {
  /* Height-match the 14px text; width:auto keeps each icon's own aspect
     (i-circle-danger 14x14, chat-2 18x17, ruler 16x14) instead of the
     previous fixed 21x22 box, which oversized and distorted all three. */
  height: var(--fz-14);
  width: auto;
}

.frn-cart-page__delivery-manual-item-text {
  flex: 1;
  font-size: var(--fz-14);
  color: var(--cTextLight2);
}

/* Delivery advance (checkbox) — design: .co-svc. An option row in its own
   right, so it takes the same shape as the carrier rows above it: 46px tall,
   14px inset, label left and price right on one line. */
.frn-cart-page__delivery-advance {
  align-items: center;
  background: #fff;
  border: 1px solid var(--bdcPrimary, #dee1e0) !important;
  border-radius: var(--bdrsPrimarySm, 4px);
  display: flex;
  gap: 11px;
  min-height: 46px;
  padding: 0 14px;
  transition: border-color 0.12s ease;
}

/* Grey, not the accent — hover on a selectable row must not read as selected.
   Same call as the bank tiles. */
.frn-cart-page__delivery-advance:hover {
  border-color: var(--cTextLight, #6f6a68) !important;
}

/* .is-checked is set by assets/js/checkout-control-state.js; :has() is outside
   this theme's baseline. */
.frn-cart-page__delivery-advance.is-checked {
  border-color: var(--cDanger, #ee4719) !important;
}

.frn-cart-page__delivery-advance .frn-checkbox {
  align-items: center;
  display: flex;
  flex: 1 1 auto;
  gap: 11px;
  margin: 0;
  min-width: 0;
}

.frn-cart-page__delivery-advance .z_offers-label-content {
  display: flex;
  flex: 1 1 auto;
  gap: 11px;
  justify-content: space-between;
  min-width: 0;
}

/* design: .co-svc__p — the price is the emphasised end of the row and must not
   wrap away from its label. */
.frn-cart-page__delivery-advance .z_offers-price {
  font-weight: 500;
  white-space: nowrap;
}

/* design: .co-svc__p small — the tax qualifier is an aside to the price, so it
   drops the price's weight and ink for muted grey, one step down the scale. */
.frn-cart-page__delivery-advance .z_offers-price small {
  color: var(--cTextLight2, #575757);
  font-size: var(--fz-13);
  font-weight: 400;
}

/* design: .co-svc__b fills with the accent, unlike the recap's terms box
   (.co-terms__b), which stays ink. The shared .frn-checkbox mark is ink for
   the whole site, so the accent is scoped to this one row. */
.frn-cart-page__delivery-advance .frn-checkbox__control:checked ~ .frn-checkbox__checkmark {
  background-color: var(--cDanger, #ee4719);
  border-color: var(--cDanger, #ee4719);
}

.frn-cart-page__delivery-advance img {
  margin-left: var(--spaceLeftS);
}

/* Totals */
.frn-cart-page__total {
  margin-top: 20px;
  padding: 15px 15px 0 15px;
  border-radius: 4px;
}

.frn-cart-page__total-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-size: var(--fz-16); /* Figma totals rows 16 (14 mobile via override below) */
}

.frn-cart-page__total-item:last-child {
  margin-bottom: 0;
}

@media (max-width: 767px) {
  .frn-cart-page__total-item {
    font-size: var(--fz-14); /* Figma mobile totals rows 14 */
  }
}

/* Bottom actions */
.frn-cart-page__bottom-action {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-top: unset;
  padding-top: 15px;
}

.frn-cart-page__bottom-action .frn-button {
  min-width: 250px;
}

/* Empty cart */
.frn-cart-page__empty {
  text-align: center;
  padding-top: 24px;
}

.frn-cart-page__empty .frn-button.frn-button--dark-1 {
  width: auto;
  min-width: 280px;
}

.frn-product-item-list__content {
  padding-top: unset;
}

/* Address selector dropdown styles */
.frn-cart-page__address-dropdown {
  border: 1px solid #e0e0e0;
  padding: 16px;
  margin: 20px 0;
  border-radius: 4px;
  background: #fff;
}

.frn-cart-page__address-dropdown-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  user-select: none;
  font-size: var(--fz-16);
  font-weight: 500;
  color: #333;
}

.frn-cart-page__address-dropdown-title img {
  width: 16px;
  height: 16px;
  transition: transform 0.3s ease;
}

.frn-cart-page__address-dropdown-title.active img {
  transform: rotate(180deg);
}

.frn-cart-page__address-dropdown-search {
  margin-top: 16px;
  display: none;
}

.frn-cart-page__address-dropdown-search.active {
  display: block;
}

.frn-cart-page__address-dropdown-results {
  margin-top: 16px;
  max-height: 300px;
  overflow-y: auto;
  border-top: 1px solid #e0e0e0;
  padding-top: 16px;
}

.frn-cart-page__address-dropdown-results-item {
  margin-bottom: 8px;
  cursor: pointer;
  padding: 8px;
  border-radius: 4px;
  transition: background-color 0.2s ease;
}

.frn-cart-page__address-dropdown-results-item:hover {
  background-color: #f5f5f5;
}

.frn-cart-page__address-dropdown-results-item strong {
  display: block;
  margin-bottom: 4px;
  color: #333;
  font-size: var(--fz-14);
}

.frn-cart-page__address-dropdown-results-item div {
  font-size: var(--fz-13);
  color: #666;
  margin-top: 2px;
}

.frn-cart-page__address-dropdown-results .frn-cart-page__address-dropdown-results-item {
  padding: 10px;
}
.frn-cart-page__address-dropdown-results .frn-cart-page__address-dropdown-results-item.selected {
  background-color: var(--bgcLight);
}

/* Total wrapper */
@media (min-width: 960px) {
  .frn-cart-page__total-wrapper {
    border-top: 0;
    margin-top: 0;
    flex-direction: column;
    align-items: flex-end;
    display: flex;
  }

  .frn-cart-page__total-wrapper--no-styles {
    border-top: 0 solid transparent;
    margin-top: 0;
  }

  .frn-cart-page__total-wrapper .frn-cart-page__total:first-child {
    border-top: transparent;
    margin-top: 0;
  }
}

/* Responsive */
@media (max-width: 576px) {
  .frn-cart-page__steps-item-text {
    display: none;
  }

  .frn-product-item-cart__top {
    flex-direction: column;
  }

  .frn-product-item-cart__bottom {
    flex-wrap: wrap;
  }

  .frn-cart-page__bottom-action {
    flex-direction: column;
    gap: 20px;
  }
}


@media (min-width: 960px) {
  .frn-cart-page-1 .frn-cart-page__total-wrapper {
    border-top: 0;
    margin-top: 0;
  }

  .frn-cart-page__total-wrapper {
    border-top: 0;
    margin-top: 0;
    flex-direction: column;
    align-items: flex-end;
    display: flex;
  }

  .frn-cart-page__total-wrapper--no-styles {
    border-top: 0 solid #0000;
    margin-top: 0;
  }

  .frn-cart-page__total-wrapper .frn-cart-page__total:first-child {
      border-top: transparent;
      margin-top: 0;
  }

  .frn-cart-page__total {
    width: 30%;
  }

  .frn-cart-page-1 .frn-cart-page__bottom-action {
    width: 100%;
    padding-top: 0;
  }

  .frn-cart-page__bottom-action {
    width: 30%;
  }
}

.frn-cart__connected-items .frn-product-item__image>img {
  width: unset;
}

.js-cart-line-product-quantity {
    padding-top: 4px !important;
}

/* Quantity stepper pill. touchspin (initialised with verticalbuttons:true)
   wraps the input in .bootstrap-touchspin and puts both +/- buttons together
   in one .input-group-btn-vertical span — the pill is drawn on that generated
   wrapper, not on our own .frn-input markup. Bootstrap's own .input-group sets
   flex-wrap:wrap; nowrap here keeps the pill from wrapping onto two lines.
   .gift-quantity is the is_gift branch's plain <span> (no touchspin, no
   .bootstrap-touchspin wrapper at all) — included here so that unreachable
   branch still gets a boxed quantity instead of bare text. */
.frn-product-item-cart__top-amount .bootstrap-touchspin,
.frn-product-item-cart__top-amount .gift-quantity {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    height: 44px;
    padding: 0 4px;
    border-radius: 22px;
    background: var(--bgcLight);
}

/* This wrapper holds BOTH buttons together (touchspin's verticalbuttons:true
   groups them in one span, after the input in DOM order). display:contents
   unwraps it so the buttons become flex items of .bootstrap-touchspin itself,
   siblings of the input — that's what lets `order` below interleave them
   into minus / input / plus instead of leaving them stuck together after the
   input. */
.frn-product-item-cart__top-amount .bootstrap-touchspin .input-group-btn-vertical {
    display: contents;
}

.frn-product-item-cart__top-amount .js-cart-line-product-quantity {
    width: 30px;
    min-width: 30px;
    order: 2;
    /* Matches the pill wrapper's height: a global (unscoped, !important)
       .js-cart-line-product-quantity rule elsewhere in this file forces
       padding-top:4px on every quantity input site-wide, including the
       checkout page's own copy of this component — not safe to edit at
       source here. Fixing the height (border-box) absorbs that padding
       instead of letting the input overflow the pill. */
    height: 44px;
    border: 0;
    background: none;
    text-align: center;
    font-size: var(--fz-body);
    font-weight: 500;
    padding: 0;
    -moz-appearance: textfield;
    appearance: textfield;
    font-variant-numeric: lining-nums tabular-nums;
}

.frn-product-item-cart__top-amount .js-cart-line-product-quantity::-webkit-outer-spin-button,
.frn-product-item-cart__top-amount .js-cart-line-product-quantity::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Three class selectors — no !important needed — just to stay comfortably
   more specific than any generic .btn styling elsewhere on the page. */
.frn-product-item-cart__top-amount .bootstrap-touchspin .btn-touchspin {
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 18px;
    background: none;
    color: var(--cTextLight2);
    font-size: var(--fz-button);
    line-height: 1;
    display: grid;
    place-items: center;
    padding: 0;
    cursor: pointer;
}

.frn-product-item-cart__top-amount .bootstrap-touchspin .btn-touchspin:hover {
    background: #fff;
    color: var(--cBlack);
}

.frn-product-item-cart__top-amount .bootstrap-touchspin .bootstrap-touchspin-down {
    order: 1;
}

.frn-product-item-cart__top-amount .bootstrap-touchspin .bootstrap-touchspin-up {
    order: 3;
}

/* The buttons' <i class="material-icons"> is empty (no ligature text), so it
   is hidden and the +/- glyph is injected via ::before instead. */
.frn-product-item-cart__top-amount .bootstrap-touchspin .bootstrap-touchspin-down i,
.frn-product-item-cart__top-amount .bootstrap-touchspin .bootstrap-touchspin-up i {
    display: none;
}

.frn-product-item-cart__top-amount .bootstrap-touchspin .bootstrap-touchspin-down::before {
    content: "\2212"; /* minus sign */
}

.frn-product-item-cart__top-amount .bootstrap-touchspin .bootstrap-touchspin-up::before {
    content: "+";
}

/* Green styling for local warehouse stock in cart */
.frn-product-item-cart__bottom-line--local {
  color: var(--cTertiary) !important;
}
.frn-product-item-cart__bottom-line--local strong {
  color: var(--cTertiary) !important;
}
/* Cart bottom row (discount + totals) */
.frn-cart-page__bottom-row {
  display: flex;
  flex-direction: column;
}

@media (min-width: 960px) {
  .frn-cart-page__bottom-row {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
  }
  
  .frn-cart-page__bottom-row .frn-cart-page__total-wrapper {
    flex: 1;
    max-width: 50%;
  }
  
  /* Reset internal widths inside total wrapper if they were restricted */
  .frn-cart-page__bottom-row .frn-cart-page__total {
    width: 100%;
  }
  
  .frn-cart-page__bottom-row .frn-cart-page__bottom-action {
    width: 100%;
  }
}

/* Line item — thumb / body / controls. No table header in this design;
   each line is separated by a hairline instead.
   .frn-cart-page__item-in-cart is a shared wrapper class — order-confirmation.tpl
   (live) also uses it, so its base spacing rule can't be edited at source
   without affecting that page. (order-final-summary.tpl's copy is currently
   dead behind PS_FINAL_SUMMARY_ENABLED — but re-scoping the base rule itself
   is Task 7's job, not this one's.) Scoping the reset to
   .frn-cart-page__items (this page's own list wrapper, set in cart.tpl) keeps
   it local to /krepselis regardless. */
.frn-cart-page__items .frn-cart-page__item-in-cart {
    margin-bottom: 0;
    border-bottom: 0;
    padding-bottom: 0;
    /* all_styles.css:2467 gives every .frn-cart-page__item-in-cart 16px of
       vertical padding. This design spaces rows with the row's own padding and a
       hairline instead, so the top half has to go too — the reset above only
       ever covered padding-bottom, which left a stray 16px above the first row.
       Cannot be deleted at source: order-confirmation.tpl and order-final-summary.tpl
       emit this class and still want that padding. */
    padding-top: 0;
}

/* Scoped to .frn-cart-page__items (this page's own list wrapper): the plain
   .frn-product-item-cart class is also the row root in order-final-summary.tpl,
   which has only two children (image, text) and a different image size — an
   unscoped 3-track 104px grid would pin its layout wrong the moment it becomes
   reachable. */
.frn-cart-page__items .frn-product-item-cart {
    display: grid;
    grid-template-columns: 182px minmax(0, 1fr) auto;
    gap: 22px;
    align-items: start;
    padding: 26px 0;
    border-top: 1px solid var(--bdcPrimary);
}

.frn-cart-page__items .frn-cart-page__item-in-cart:first-child .frn-product-item-cart {
    border-top: 0;
    padding-top: 4px;
}

.frn-product-item-cart__image {
    width: 182px;
    height: 144px;
    overflow: hidden;
    border: 1px solid var(--bdcPrimaryLight);
    border-radius: var(--bdrsPrimarySm);
    background: #fff;
}

.frn-product-item-cart__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.frn-product-item-cart__name {
    margin: 0 0 7px;
    font-size: var(--fz-body);
    font-weight: 500;
    line-height: 1.3;
}

.frn-product-item-cart__name a {
    text-decoration: none;
}

.frn-product-item-cart__meta {
    margin: 0;
    font-size: var(--fz-body);
    color: var(--cTextLight2);
    line-height: 1.6;
}

.frn-product-item-cart__estimate {
    margin-top: 11px;
}

.frn-product-item-cart__controls {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 16px;
    min-width: 224px;
}

.frn-product-item-cart__controls-top {
    display: flex;
    align-items: center;
    gap: 26px;
}

.frn-product-item-cart__price {
    font-size: var(--fz-button);
    font-weight: 600;
    min-width: 88px;
    text-align: right;
    letter-spacing: var(--ls-heading);
    font-variant-numeric: tabular-nums;
}

/* Not in the Task 3 CSS handed down for this component — the old markup's
   discount styling lived under .frn-product-item-cart__bottom-price, which
   is a different (still-shared) selector this line no longer uses. Reusing
   the same tokens the old rule did (var(--cDanger), var(--cTextLight2)). */
.frn-product-item-cart__price .has-discount {
    color: var(--cDanger);
}

.frn-product-item-cart__price strike {
    display: block;
    margin-top: 2px;
    font-size: var(--fz-14);
    font-weight: 400;
    color: var(--cTextLight2);
}

.frn-product-item-cart__actions {
    display: flex;
    gap: 8px;
}

.frn-product-wishlist-btn,
.frn-product-remove-btn {
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 18px;
    background: var(--bgcLight);
    display: grid;
    place-items: center;
    cursor: pointer;
    padding: 0;
}

.frn-product-wishlist-btn:hover,
.frn-product-remove-btn:hover {
    background: var(--bdcPrimaryLight);
}

.frn-product-wishlist-btn img,
.frn-product-remove-btn img {
    width: 14px;
    height: 14px;
}

/* Order summary — sticky right column. Heading is 24px to sit level with the
   page H1's baseline box; see the Deviations table in the plan. */
.frn-cart-summary__title {
    margin: 0 0 22px;
    font-size: var(--fz-h3);
    font-weight: 500;
    line-height: var(--lh-heading);
}

.frn-cart-summary__rows {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.frn-cart-summary__row {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    font-size: var(--fz-body);
    color: var(--cTextLight2);
}

.frn-cart-summary__row span:last-child {
    color: var(--cText);
    font-variant-numeric: tabular-nums;
}

.frn-cart-summary__total {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 20px;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--bdcPrimary);
    font-size: var(--fz-body);
    font-weight: 500;
}

.frn-cart-summary__total span:last-child {
    font-size: var(--fz-h4);
    font-weight: 600;
    letter-spacing: var(--ls-heading);
    font-variant-numeric: tabular-nums;
}

.frn-cart-summary__vat {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 8px;
    font-size: var(--fz-body);
    color: var(--cTextLight2);
}

.frn-cart-summary__vat span:last-child {
    font-variant-numeric: tabular-nums;
}

.frn-cart-summary__vouchers {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.frn-cart-summary__voucher {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: var(--fz-body);
}

.frn-cart-summary__voucher-name {
    flex: 1;
    min-width: 0;
}

.frn-cart-summary__voucher-amount {
    font-variant-numeric: tabular-nums;
}

.frn-cart-summary__voucher-remove {
    display: grid;
    place-items: center;
    color: var(--cTextLight2);
}

.frn-cart-summary__voucher-remove:hover {
    color: var(--cDanger);
}

.frn-cart-summary__promo {
    margin-top: 16px;
}

.frn-cart-summary__promo-link {
    display: inline-block;
    font-size: var(--fz-body);
    color: var(--cText);
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
    list-style: none;
}

.frn-cart-summary__promo-link::-webkit-details-marker {
    display: none;
}

.frn-cart-summary__promo-link:hover {
    color: var(--cDanger);
}

.frn-cart-summary__promo[open] .frn-cart-summary__promo-link {
    margin-bottom: 12px;
}

.frn-cart-summary__promo-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
}

/* ux_validation injects field errors between input and button, and form-level
   errors (e.g. the rate-limit message) at the start of the form. Both go to
   their own full-width row below, so the input keeps its width. */
.frn-cart-summary__promo-form .ux-val-error-container,
.frn-cart-summary__promo-form .ux-val-form-errors {
    grid-column: 1 / -1;
    order: 1;
    margin-top: -4px;
}

.frn-cart-summary__promo-form .ux-val-form-errors {
    margin-bottom: 0;
}

.frn-cart-summary__promo-input {
    width: 100%;
    height: 48px;
    box-sizing: border-box;
    font: inherit;
    font-size: var(--fz-body);
    padding: 0 14px;
    border: 1px solid var(--bdcPrimary);
    border-radius: var(--bdrsPrimarySm);
    background: #fff;
}

.frn-cart-summary__promo-input:focus {
    outline: none;
    border-color: var(--cText);
    box-shadow: 0 0 0 3px rgba(45, 55, 50, .07);
}

.frn-cart-summary__promo-submit {
    height: 48px;
    padding: 0 22px;
    border: 0;
    font: inherit;
    font-size: var(--fz-body);
    font-weight: 500;
    border-radius: 24px;
    background: var(--cBlack);
    color: #fff;
    cursor: pointer;
    white-space: nowrap;
}

.frn-cart-summary__promo-submit:hover {
    background: #000;
}

/* The checkout CTA is the theme's existing button; only spacing is new. */
.frn-cart-summary .frn-button {
    margin-top: 20px;
}

/* ============================================
   Responsive bands
   ============================================ */

/* --- 1081-1180: tighter side column and control gap.
   Deliberately unbounded (max-width only, no min-width): narrower bands below
   re-declare whatever needs to differ from what leaks down from here, rather
   than this band being fenced off at 1081px. In particular the 18px
   controls-top gap set here is also the value the 768-991 band wants, and
   768-991 re-declares it explicitly below instead of relying on the leak. --- */
@media (max-width: 1180px) {
    .frn-cart-page__grid {
        grid-template-columns: minmax(0, 1fr) 340px;
        gap: 48px;
    }
    .frn-product-item-cart__controls-top {
        gap: 18px;
    }
}

/* --- 992-1080: keep three tracks by narrowing the side column. Widening it
   here pushes the controls into the summary; the symptom is action buttons
   overlapping the totals. --- */
@media (min-width: 992px) and (max-width: 1080px) {
    .frn-cart-page__grid {
        grid-template-columns: minmax(0, 1fr) 310px;
        gap: 26px;
    }
    /* Scoped like the base rule (see the .frn-cart-page__items comment above):
       an unscoped .frn-product-item-cart here would also be equal-or-lower
       specificity than that base rule and simply never win the cascade. */
    .frn-cart-page__items .frn-product-item-cart {
        grid-template-columns: 182px minmax(140px, 1fr) auto;
        gap: 16px;
    }
    .frn-product-item-cart__image {
        width: 182px;
        height: 144px;
    }
    .frn-product-item-cart__controls {
        min-width: 180px;
        gap: 12px;
    }
    .frn-product-item-cart__controls-top {
        gap: 12px;
    }
    .frn-product-item-cart__top-amount .bootstrap-touchspin {
        height: 40px;
    }
    /* Matches the base rule's three-class selector; .btn-touchspin alone is
       lower specificity than .bootstrap-touchspin .btn-touchspin and would
       lose the cascade even though it matches the same elements. */
    .frn-product-item-cart__top-amount .bootstrap-touchspin .btn-touchspin {
        width: 32px;
        height: 32px;
    }
    .frn-product-wishlist-btn,
    .frn-product-remove-btn {
        width: 34px;
        height: 34px;
    }
}

/* --- 768-991: single column, summary below with a hairline above.
   Full width returns, so the item row keeps its three tracks. --- */
@media (min-width: 768px) and (max-width: 991px) {
    .frn-cart-page__grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 40px;
    }
    .frn-cart-page__side {
        position: static;
        padding-top: 32px;
        border-top: 1px solid var(--bdcPrimary);
    }
    .frn-cart-page__items .frn-product-item-cart {
        grid-template-columns: 182px minmax(180px, 1fr) auto;
        gap: 20px;
    }
    .frn-product-item-cart__image {
        width: 182px;
        height: 144px;
    }
    /* Same 18px the unbounded 1081-1180 band above already applies here by
       leaking through; stated explicitly so this band doesn't depend on that
       band staying unbounded. */
    .frn-product-item-cart__controls-top {
        gap: 18px;
    }
    .frn-product-item-cart__controls {
        min-width: 200px;
        gap: 14px;
    }
}

/* --- up to 991: the summary stops being a 340-400px side column and spans the
   page, so the promo row has to be capped by hand. Left uncapped the input
   takes every pixel the button doesn't (750 vs 85 at 900px) and the button
   reads as an afterthought; 520px holds it near the ~0.28 button-to-input
   ratio the side column gives at full width. Keyed to 991 rather than 767
   because 768-991 is where the grid collapses to one track. --- */
@media (max-width: 991px) {
    .frn-cart-summary__promo-form {
        gap: 12px;
        max-width: 520px;
    }
    .frn-cart-summary__promo-submit {
        padding: 0 32px;
    }
}

/* --- 577-767: single column, summary below --- */
@media (min-width: 577px) and (max-width: 767px) {
    .frn-cart-page__grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 38px;
    }
    .frn-cart-page__side {
        position: static;
        padding-top: 30px;
        border-top: 1px solid var(--bdcPrimary);
    }
}

/* --- up to 767: controls drop below the product and read
   icons . quantity . price --- */
@media (max-width: 767px) {
    .frn-cart-page__items .frn-product-item-cart {
        grid-template-columns: 100px minmax(0, 1fr);
    }
    /* Explicit here, not inherited from the base rule: below 768px neither the
       768-991 nor 992-1080 band applies, so without this the image would fall
       back to the base 182x144 size inside this band's 100px track. */
    .frn-product-item-cart__image {
        width: 100px;
        height: 80px;
    }
    /* Three tracks — actions | quantity | price — so the quantity sits on the
       row's true centre. It used to be flex: the actions took their width, the
       rest went to .controls-top, and `space-between` inside it pinned the
       stepper to that leftover space's left edge, i.e. hard against the delete
       button with the entire gap to the price empty beside it. Both outer
       tracks are 1fr, so the middle one is centred on the row itself rather
       than on what is left of it. */
    .frn-product-item-cart__controls {
        grid-column: 1 / -1;
        display: grid;
        /* minmax(0,…), not a bare 1fr: a bare fr track will not shrink under
           its content, so on a 320px screen the actions track stuck at its own
           76px minimum, the opposite track kept the slack, and the quantity
           drifted 4.5px off centre. Allowing both to shrink keeps them equal
           at every width; the actions overrun their track by those few pixels
           into the 10px gap instead, which has room for it. */
        grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
        align-items: center;
        width: 100%;
        min-width: 0;
        gap: 10px;
        margin-top: 16px;
    }
    /* Dissolved so the quantity and price become items of the row grid above.
       It carries no box of its own — only flex plumbing — so nothing visual is
       lost by taking it out of the box tree, and `order` is no longer needed
       now that each item names its own track. */
    .frn-product-item-cart__controls-top {
        display: contents;
    }
    /* grid-row is named on all three, not just the column. The actions come
       last in source (they used to be reordered with `order`), and grid's
       placement cursor only moves forward — once the price has taken column 3,
       an actions block asking for column 1 is pushed onto a second row. */
    .frn-product-item-cart__actions {
        grid-column: 1;
        grid-row: 1;
        justify-self: start;
    }
    .frn-product-item-cart__top-amount {
        grid-column: 2;
        grid-row: 1;
    }
    .frn-product-item-cart__price {
        grid-column: 3;
        grid-row: 1;
        justify-self: end;
        min-width: 0;
        text-align: right;
    }
}

/* --- up to 576: mobile --- */
@media (max-width: 576px) {
    .frn-cart-page__grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 32px;
        margin-top: 20px;
    }
    #cart .frn-cart-page > .frn-cart-page__title {
        margin-top: 20px;
    }
    .frn-cart-page__side {
        position: static;
        padding-top: 20px;
        border-top: 1px solid var(--bdcPrimary);
    }
    /* row-gap is zeroed because the rows below are placed explicitly and carry
       their own margins; a shared 14px would stack on top of those. The column
       gap is unchanged. */
    .frn-cart-page__items .frn-product-item-cart {
        grid-template-columns: 100px minmax(0, 1fr);
        column-gap: 14px;
        row-gap: 0;
        padding: 20px 0;
    }

    /* Same move as the checkout recap: the delivery estimate needs 213px but
       the body column is only 191 at 360, so it always broke onto two lines.
       Dissolving the body makes its children items of the item's own grid, so
       the estimate can span both tracks and read on one line beneath the
       thumbnail. The body carries no box of its own — no padding, margin,
       background or border — so nothing is lost by taking it out of the box
       tree. Rows are named explicitly because grid's placement cursor only
       moves forward, and the estimate spanning both columns would otherwise
       push what follows onto a further row. */
    .frn-product-item-cart__body {
        display: contents;
    }
    /* Name and code travel as one grid item beside the thumbnail. Placed
       separately they took a row each, and because the image is taller than
       the two of them together grid shared its leftover height between those
       rows — 20px of slack turning the name's own 7px margin into a 13px gap. */
    .frn-product-item-cart__head {
        grid-column: 2;
        grid-row: 1;
    }
    .frn-product-item-cart__name {
        line-height: 1.35;
    }
    .frn-product-item-cart__estimate {
        grid-column: 1 / -1;
        grid-row: 2;
        margin-top: 9px;
    }
    /* 30px keeps the gap this row had when the 14px row-gap still applied on
       top of its own 16px margin. */
    .frn-product-item-cart__controls {
        grid-row: 3;
        margin-top: 15px;
    }
    .frn-product-item-cart__image {
        grid-column: 1;
        grid-row: 1;
        width: 100px;
        height: 80px;
    }
    .frn-product-item-cart__top-amount .bootstrap-touchspin {
        height: 40px;
    }
    .frn-product-item-cart__top-amount .bootstrap-touchspin .btn-touchspin {
        width: 32px;
        height: 32px;
    }
    .frn-product-wishlist-btn,
    .frn-product-remove-btn {
        width: 34px;
        height: 34px;
    }
    .frn-cart-summary__title {
        font-size: var(--fz-h4);
        margin-bottom: 18px;
    }
    .frn-cart-summary__promo-form {
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
        max-width: none;
    }
    .frn-cart-summary__promo-form .ux-val-error-container {
        order: 0;
    }
    .frn-cart-summary__promo-submit {
        width: 100%;
        padding: 0 20px;
    }
}
