/* Cart page — Freeman Tools RU storefront */
.cart-page-wrap {
  background: linear-gradient(180deg, rgb(var(--color-scheme-1-bg, 244 244 244)) 0%, rgb(var(--bg-color, 255 255 255)) 320px);
}

.cart-page {
  font-size: 1.25rem;
  line-height: 1.55;
  padding-bottom: calc(var(--section-gap, 32px) * 2.5);
}

.cart-page .container {
  max-width: var(--page-width, 1440px);
}

.cart-page__crumbs {
  padding-top: 1.25rem;
  padding-bottom: 0.75rem;
  font-size: 1.125rem;
}

.cart-page__hero {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem 2rem;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(var(--text-color), 0.12);
}

.cart-page__title {
  margin: 0;
  font-family: var(--heading-font-family, Barlow, sans-serif);
  font-weight: 800;
  font-size: clamp(2.25rem, 5vw, 3.125rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.cart-page__lead {
  margin: 0.65rem 0 0;
  max-width: 48rem;
  color: rgba(var(--text-color), 0.7);
  font-size: 1.3125rem;
  line-height: 1.5;
}

.cart-page__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}

.cart-page__badge {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  background: rgba(var(--btn-bg-color, 255 143 28), 0.12);
  color: rgb(var(--btn-bg-color, 255 143 28));
  font-size: 1.1875rem;
  font-weight: 700;
}

.cart-page__continue {
  font-size: 1.25rem;
  font-weight: 700;
  text-decoration: none;
  color: rgb(var(--link-color, 0 0 0));
  border-bottom: 1px solid currentColor;
}

.cart-page__continue:hover {
  color: rgb(var(--btn-bg-color, 255 143 28));
  border-color: currentColor;
}

/* Site-grid width single column */
.cart-page__layout {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  width: 100%;
  max-width: 100%;
  margin: 0;
}

.cart-page__checkout {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  width: 100%;
}

/* Cards */
.cart-card {
  width: 100%;
  padding: 2rem 1.75rem;
  border-radius: 12px;
  border: 1px solid rgba(var(--text-color), 0.1);
  background: rgb(var(--bg-color, 255 255 255));
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.05);
}

@media (min-width: 768px) {
  .cart-card {
    padding: 2.25rem 2.5rem;
  }
}

.cart-card__title {
  margin: 0 0 1.75rem;
  font-family: var(--heading-font-family, Barlow, sans-serif);
  font-size: clamp(1.625rem, 3vw, 2rem);
  font-weight: 800;
  line-height: 1.2;
}

.cart-card__back {
  margin: 1.75rem 0 0;
  font-size: 1.25rem;
}

.cart-card__back a {
  font-weight: 600;
  color: rgba(var(--text-color), 0.75);
  text-decoration: none;
}

.cart-card__back a:hover {
  color: rgb(var(--btn-bg-color, 255 143 28));
}

/* Line item */
.cart-line {
  display: grid;
  gap: 1.5rem;
  padding: 1.75rem;
  border-radius: 10px;
  border: 1px solid rgba(var(--text-color), 0.1);
  background: rgba(var(--color-scheme-1-bg, 244 244 244), 0.35);
}

@media (min-width: 640px) {
  .cart-line {
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 2rem;
    padding: 2rem;
  }
}

@media (min-width: 900px) {
  .cart-line {
    grid-template-columns: 170px minmax(0, 1fr) auto;
    align-items: start;
  }
}

.cart-line__media {
  display: block;
  overflow: hidden;
  border-radius: 8px;
  background: rgb(var(--bg-color, 255 255 255));
  aspect-ratio: 1;
}

.cart-line__media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.cart-line__body {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  min-width: 0;
}

.cart-line__vendor {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(var(--text-color), 0.5);
}

.cart-line__name {
  margin: 0;
  font-size: clamp(1.375rem, 2.5vw, 1.625rem);
  font-weight: 700;
  line-height: 1.35;
}

.cart-line__name a {
  color: inherit;
  text-decoration: none;
}

.cart-line__name a:hover {
  color: rgb(var(--btn-bg-color, 255 143 28));
}

.cart-line__attrs {
  margin: 0;
  font-size: 1.25rem;
  line-height: 1.45;
  color: rgba(var(--text-color), 0.75);
}

.cart-line__attrs strong {
  color: rgba(var(--text-color), 0.9);
  font-weight: 600;
}

.cart-line__aside {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: stretch;
}

@media (min-width: 900px) {
  .cart-line__aside {
    align-items: flex-end;
    text-align: right;
    min-width: 12rem;
  }
}

.cart-line__price {
  margin: 0;
  font-size: 1.875rem;
  font-weight: 800;
  white-space: nowrap;
}

.cart-line__unit {
  margin: 0;
  font-size: 1.1875rem;
  color: rgba(var(--text-color), 0.55);
}

.cart-line__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
}

@media (min-width: 900px) {
  .cart-line__actions {
    justify-content: flex-end;
  }
}

/* Quantity */
.cart-qty {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid rgba(var(--text-color), 0.18);
  border-radius: var(--input-border-radius, 5px);
  overflow: hidden;
  background: rgb(var(--input-bg-color, 255 255 255));
}

.cart-qty__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  padding: 0;
  border: none;
  background: rgb(var(--input-bg-color-diff-3, 247 247 247));
  color: rgb(var(--text-color));
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease;
}

.cart-qty__btn:hover {
  background: rgb(var(--input-bg-color-diff-6, 240 240 240));
}

.cart-qty__input {
  width: 3.5rem;
  min-width: 3.5rem;
  padding: 0.65rem 0.25rem;
  border: none;
  border-left: 1px solid rgba(var(--text-color), 0.12);
  border-right: 1px solid rgba(var(--text-color), 0.12);
  text-align: center;
  font-size: 1.25rem;
  font-weight: 600;
  -moz-appearance: textfield;
  appearance: textfield;
}

.cart-qty__input::-webkit-outer-spin-button,
.cart-qty__input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.cart-line__remove {
  padding: 0;
  border: none;
  background: none;
  font-size: 1.1875rem;
  font-weight: 600;
  color: rgba(var(--text-color), 0.55);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.cart-line__remove:hover {
  color: rgb(var(--error-text-color, 180 12 28));
}

/* Perks row */
.cart-perks {
  display: grid;
  gap: 1rem;
  margin-top: 1.75rem;
}

@media (min-width: 640px) {
  .cart-perks {
    grid-template-columns: repeat(3, 1fr);
  }
}

.cart-perk {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 1.15rem 1.25rem;
  border-radius: 8px;
  background: rgba(var(--color-scheme-1-bg, 244 244 244), 0.65);
  font-size: 1.125rem;
  line-height: 1.45;
}

.cart-perk__icon {
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
  margin-top: 0.15rem;
  color: rgb(var(--btn-bg-color, 255 143 28));
}

.cart-perk strong {
  display: block;
  font-size: 1.1875rem;
  margin-bottom: 0.25rem;
}

/* Summary */
.cart-summary__rows {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 1.3125rem;
}

.cart-summary__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1.5rem;
}

.cart-summary__row dt {
  margin: 0;
  color: rgba(var(--text-color), 0.75);
}

.cart-summary__row dd {
  margin: 0;
  font-weight: 600;
}

.cart-summary__discount {
  color: rgb(var(--success-text-color, 44 126 63));
}

.cart-summary__total {
  margin-top: 0.85rem;
  padding-top: 1.35rem;
  border-top: 1px solid rgba(var(--text-color), 0.12);
  font-size: 1.5rem;
}

.cart-summary__total dd {
  font-size: clamp(2.125rem, 4vw, 2.625rem);
  font-weight: 800;
  color: rgb(var(--text-color));
}

.cart-summary__note {
  margin: 1.5rem 0 0;
  font-size: 1.1875rem;
  line-height: 1.55;
  color: rgba(var(--text-color), 0.55);
}

/* Checkout form */
.cart-form__section {
  margin-bottom: 2.25rem;
}

.cart-form__section:last-of-type {
  margin-bottom: 0;
}

.cart-form__heading {
  margin: 0 0 1.25rem;
  font-size: 1.3125rem;
  font-weight: 700;
  color: rgba(var(--text-color), 0.85);
}

.cart-form__grid {
  display: grid;
  gap: 1.25rem;
  align-items: start;
}

@media (min-width: 600px) {
  .cart-form__grid--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.cart-field {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  width: 100%;
  min-width: 0;
}

.cart-field__label {
  font-size: 1.1875rem;
  font-weight: 600;
  color: rgba(var(--text-color), 0.9);
}

.cart-field:focus-within .cart-field__label {
  color: rgb(var(--btn-bg-color, 255 143 28));
}

/* Aligned inputs — override theme flex on .input */
.cart-page .cart-input,
.cart-page .cart-field .input {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  flex: none !important;
  box-sizing: border-box !important;
  font-size: 1.25rem !important;
  line-height: 1.4 !important;
  padding: 0.95rem 1.15rem !important;
  min-height: 3.25rem !important;
  border: 2px solid rgba(var(--text-color), 0.5) !important;
  border-radius: 8px !important;
  background: #ffffff !important;
  color: rgb(var(--text-color)) !important;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08), inset 0 1px 2px rgba(0, 0, 0, 0.06) !important;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease !important;
}

.cart-page .cart-input::placeholder,
.cart-page .cart-field .input::placeholder {
  color: rgba(var(--text-color), 0.58) !important;
  opacity: 1 !important;
}

.cart-page .cart-input:hover,
.cart-page .cart-field .input:hover {
  border-color: rgba(var(--text-color), 0.72) !important;
  background: #fffdfb !important;
}

.cart-page .cart-input:focus,
.cart-page .cart-field .input:focus {
  border-color: rgb(var(--btn-bg-color, 255 143 28)) !important;
  background: #fff !important;
  box-shadow: 0 0 0 4px rgba(var(--btn-bg-color, 255 143 28), 0.22), inset 0 1px 2px rgba(0, 0, 0, 0.04) !important;
  outline: none !important;
}

.cart-page .cart-field textarea.input {
  min-height: 8rem;
  resize: vertical;
}

.cart-page .cart-field select.input {
  appearance: auto;
  cursor: pointer;
}

/* Radio options — visible control + card */
.cart-option-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (min-width: 768px) {
  .cart-option-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
  }
}

.cart-option {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  cursor: pointer;
  margin: 0;
  height: 100%;
}

.cart-option input[type="radio"] {
  position: relative;
  flex-shrink: 0;
  width: 1.35rem;
  height: 1.35rem;
  margin: 1.15rem 0 0;
  opacity: 1;
  pointer-events: auto;
  accent-color: rgb(var(--btn-bg-color, 255 143 28));
  cursor: pointer;
}

.cart-option__box {
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1;
  min-width: 0;
  min-height: 6.25rem;
  padding: 1.25rem 1.35rem;
  border: 2px solid rgba(var(--text-color), 0.14);
  border-radius: 10px;
  background: rgb(var(--bg-color, 255 255 255));
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.cart-option input[type="radio"]:checked + .cart-option__box {
  border-color: rgb(var(--btn-bg-color, 255 143 28));
  background: rgba(var(--btn-bg-color, 255 143 28), 0.06);
  box-shadow: 0 0 0 1px rgba(var(--btn-bg-color, 255 143 28), 0.25);
}

.cart-option input[type="radio"]:focus-visible + .cart-option__box {
  outline: 2px solid rgb(var(--btn-bg-color, 255 143 28));
  outline-offset: 2px;
}

.cart-option__title {
  display: block;
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.cart-option__desc {
  display: block;
  font-size: 1.125rem;
  color: rgba(var(--text-color), 0.6);
  line-height: 1.45;
}

.cart-form__consent {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin: 2rem 0 1.75rem;
  font-size: 1.1875rem;
  line-height: 1.55;
  color: rgba(var(--text-color), 0.75);
}

.cart-form__consent input[type="checkbox"] {
  flex-shrink: 0;
  width: 1.35rem;
  height: 1.35rem;
  margin-top: 0.25rem;
  accent-color: rgb(var(--btn-bg-color, 255 143 28));
  cursor: pointer;
}

.cart-form__actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 28rem;
}

@media (min-width: 600px) {
  .cart-form__actions {
    max-width: 24rem;
  }
}

.cart-form__actions .btn {
  width: 100%;
  justify-content: center;
  font-size: 1.3125rem;
  padding: 1.1rem 1.75rem;
  min-height: 3.5rem;
}

.cart-form__submit {
  font-size: 1.375rem;
  font-weight: 700;
}

.cart-form__actions .btn--secondary {
  background: transparent;
  border: 1px solid rgba(var(--text-color), 0.2);
  color: rgb(var(--text-color));
}

.cart-form__actions .btn--secondary:hover {
  border-color: rgb(var(--btn-bg-color, 255 143 28));
  color: rgb(var(--btn-bg-color, 255 143 28));
}

.cart-card--total {
  background: rgba(var(--color-scheme-1-bg, 244 244 244), 0.4);
}
