:root {
  --color-surface:      #f4f6f8;
  --color-white:        #ffffff;
  --color-text:         #2c3e50;
  --color-text-muted:   #8fa0b0;
  --color-border:       #c8d4dc;
  --color-border-focus: #2e8b9a;
  --color-accent:       #2e8b9a;
  --color-accent-dark:  #236d7a;
  --color-error:        #e05252;
  --color-error-bg:     #fdf0f0;
  --color-label-bg:     #eaeff3;
  --color-label-text:   #666666;

  --radius-sm: 0px;
  --radius-md: 0px;
  --radius-lg: 0px;

  --font: 'Inter', system-ui, sans-serif;

  --transition: 0.2s ease;
}

/* ============================================
   CART PAGE
   ============================================ */
.cart-page {
  padding-top: 135px;
  padding-bottom: 60px;
  background-color: var(--color-bg);
  min-height: calc(100vh - 200px);
}

.cart-page__container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.cart-page__title {
  font-family: "PF BeauSans Pro", var(--font-sans);
  font-weight: 600;
  font-size: 32px;
  line-height: 1.09;
  text-transform: none;
  color: #666666;
  margin: 0 0 30px;
  text-shadow: none;
  -webkit-text-stroke: 0;
}
.cart {
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    justify-content: space-between;
    align-items: flex-start;
}

.cart-content {
	flex: 0 0 60%;
    max-width: 60%;
}

.cart__order {
    display: flex;
    flex: 0 0 40%;
    max-width: 38%;
    justify-content: right;
}

.cart__order-box {
display: flex;
flex-direction: column;
align-items: flex-start; 
background-color: #E9E9E9;
max-width: 480px;
padding: 30px;
gap: 20;

}

.cart__order-box .cart__order-title,
.cart__order-box .cart__order-description {
    text-align: left;
}

.cart__order-box .cart__checkout-btn {
    align-self: center; 
}

.cart__order-title {
font-family: 'Commissioner';
font-style: normal;
font-weight: 500;
font-size: 18px;
line-height: 20px;
color: #222222;
margin:0;
}


.cart__order-description {
font-family: 'Commissioner';
font-style: normal;
font-weight: 400;
font-size: 14px;
line-height: 20px;
color: #222222;
}

/* Скрытый текст для доступности */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.cart__header {
	display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
	margin-bottom: 30px;
}
/* ============================================
   CART EMPTY STATE
   ============================================ */
.cart-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 80px 20px;
  text-align: center;
}

.cart-empty__icon {
  opacity: 0.5;
}

.cart-empty__text {
  font-family: "PF BeauSans Pro", var(--font-sans);
  font-size: 20px;
  font-weight: 500;
  color: #999;
  margin: 0;
}

.cart-empty__btn {
  margin-top: 10px;
  width: 220px;
  height: 48px;
}

.clear-card {
font-family: 'Commissioner';
font-style: normal;
font-weight: 400;
font-size: 14px;
line-height: 20px;
color: #0D47A1;
border: none;
background-color: #ffffff00;
}

/* ============================================
   CART TABLE
   ============================================ */
.cart__table-wrap {
  overflow-x: auto;
}

.cart__table {
  width: 100%;
  border-collapse: collapse;
}

.cart__thead {
  border-bottom: 2px solid var(--color-line);
}

.cart__th {
  font-family: "PF BeauSans Pro", var(--font-sans);
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #888;
  padding: 12px 16px;
  text-align: left;
  white-space: nowrap;
}

.cart__th--price {
  text-align: right;
  width: 160px;
}

.cart__th--qty {
  text-align: center;
  width: 150px;
}

.cart__th--sum {
  text-align: right;
  width: 160px;
}

.cart__th--actions {
  width: 60px;
  text-align: center;
}

/* ============================================
   CART ROW
   ============================================ */
.cart__row {
  border: 1px solid var(--color-line);
  transition: background 0.2s;
}

.cart__row:hover {
  background: #fafafa;
}

.cart__td {
  padding: 5px 10px;
  vertical-align: middle;
}

.cart__td--price {
  text-align: right;
}

.cart__td--qty {
  text-align: center;
      border-left: 1px solid #d9d9d9;
  border-right: 1px solid #d9d9d9;
}

.cart__td--sum {
  text-align: right;
}

.cart__td--actions {
  text-align: center;
}

/* ============================================
   SUM DISPLAY
   ============================================ */
.cart-sum {
  font-family: "PF BeauSans Pro", var(--font-sans);
  font-size: 16px;
  font-weight: 700;
  color: #226984;
  white-space: nowrap;
}

/* ============================================
   PRICE DISPLAY
   ============================================ */
.cart-price {
  font-family: "PF BeauSans Pro", var(--font-sans);
  font-size: 16px;
  font-weight: 600;
  color: #333;
  white-space: nowrap;
}

.cart-price__mobile-label {
  display: none;
}

/* ============================================
   CART ITEM (product cell content)
   ============================================ */
.cart-item {
  display: flex;
  align-items: center;
  gap: 20px;
}

.cart-item__media {
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.cart-item__img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
}

.cart-item__info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.cart-item__name {
  font-family: "PF BeauSans Pro", var(--font-sans);
  font-weight: 500;
  font-size: 16px;
  line-height: 1.4;
  color: #226984;
  text-decoration: none;
  transition: color 0.2s;
}

.cart-item__name:hover {
  color: var(--color-primary);
}

.cart-item__article {
  font-family: "PF BeauSans Pro", var(--font-sans);
  font-size: 13px;
  color: #999;
}

/* ============================================
   QUANTITY CONTROLS
   ============================================ */
.cart-qty {
  display: inline-flex;
  align-items: center;
}

.cart-qty__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  background: #ffffff00;
  font-size: 26px;
  font-weight: 500;
  color: #D3DFEB;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  user-select: none;
  padding: 0;
  line-height: 1;
}

.cart-qty__btn:hover {
  background: #ffffff00;
  color: #0D47A1;
}

.cart-qty__btn:active {
  background:#ffffff00;
  color: #0D47A1;
}

.cart-qty__input {
  width: 50px;
  height: 36px;
  border: none;
  text-align: center;
  font-family: "PF BeauSans Pro", var(--font-sans);
  font-size: 15px;
  font-weight: 600;
  color: #333;
  outline: none;
  background: #ffffff00;
  -moz-appearance: textfield;
}

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

/* ============================================
   REMOVE BUTTON
   ============================================ */
.cart-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  color: #bbb;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
  border-radius: 4px;
  padding: 0;
}

.cart-remove:hover {
  color: #d32f2f;

}

.cart-remove__icon {
  pointer-events: none;
}

/* ============================================
   CART FOOTER (total + actions)
   ============================================ */
.cart__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 30px;
  padding-top: 30px;
  border-top: 2px solid var(--color-line);
  flex-wrap: wrap;
}

.cart__summary {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cart__summary-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.cart__summary-label {
  font-family: "PF BeauSans Pro", var(--font-sans);
  font-size: 16px;
  font-weight: 500;
  color: #555;
}

.cart__summary-count {
  font-family: "PF BeauSans Pro", var(--font-sans);
  font-size: 18px;
  font-weight: 700;
  color: #226984;
}

.cart__summary-row--total .cart__summary-label {
  font-size: 18px;
}

.cart__summary-sum {
  font-family: "PF BeauSans Pro", var(--font-sans);
  font-size: 24px;
  font-weight: 700;
  color: #226984;
}

.cart__actions {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: flex-end;
  margin-top: 30px;
}

.cart__link-catalog {
  font-family: "PF BeauSans Pro", var(--font-sans);
  font-size: 15px;
  font-weight: 500;
  color: var(--color-link-dark-green);
  text-decoration: none;
  transition: color 0.2s;
}

.cart__link-catalog:hover {
  color: var(--color-primary);
}

.cart__checkout-btn {
  width: 220px;
  height: 48px;
  font-size: 16px;
  position: relative;
  overflow: hidden;
  margin-top: 10px;
}

/* Анимация блика на кнопке оформления */
.cart__checkout-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: skewX(-20deg);
  animation: shine 3s infinite;
}

/* ============================================
   ORDER MODAL (Popup)
   ============================================ */
.order-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.order-modal[hidden] {
  display: none;
}

/* Overlay */
.order-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  animation: orderFadeIn 0.25s ease;
}

/* Dialog box */
.order-modal__dialog {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 720px;
  max-height: 90vh;
  background: #fff;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  animation: orderSlideUp 0.3s ease;
  overflow: hidden;
}

/* Header */
.order-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 28px;
  border-bottom: 1px solid var(--color-line);
  flex-shrink: 0;
}

.order-modal__title {
  font-family: "PF BeauSans Pro", var(--font-sans);
  font-weight: 600;
  font-size: 22px;
  color: #226984;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.order-modal__close-corner {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: none;
  background: #f2f2f2;
  color: #666;
  cursor: pointer;
  border-radius: 50%;
  padding: 0;
  transition: background 0.2s, color 0.2s, transform 0.15s;
}

.order-modal__close-corner:hover {
  background: #226984;
  color: #fff;
  transform: rotate(90deg);
}

/* Body */
.order-modal__body {
  padding: 24px 28px;
  overflow-y: auto;
  flex: 1;
}

/* Section titles inside modal */
.order-modal__section-title {
  font-family: "PF BeauSans Pro", var(--font-sans);
  font-weight: 600;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #888;
  margin: 0 0 14px;
}

/* ============================================
   ORDER MODAL — ITEMS LIST
   ============================================ */
.order-modal__items {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.order-modal__item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--color-line);
}

.order-modal__item:last-child {
  border-bottom: none;
}

.order-modal__item-media {
  flex-shrink: 0;
  width: 56px;
  height: 48px;
  background: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.order-modal__item-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 2px;
}

.order-modal__item-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.order-modal__item-name {
  font-family: "PF BeauSans Pro", var(--font-sans);
  font-weight: 500;
  font-size: 14px;
  color: #333;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.order-modal__item-qty {
  font-family: "PF BeauSans Pro", var(--font-sans);
  font-size: 13px;
  color: #999;
}

.order-modal__item-qty-sum {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: "PF BeauSans Pro", var(--font-sans);
  font-size: 13px;
  color: #999;
  flex-wrap: wrap;
}

.order-modal__item-qty-label {
  color: #999;
}

.order-modal__item-sep {
  color: #bbb;
  font-size: 12px;
}

.order-modal__item-price {
  color: #555;
  font-weight: 500;
}

.order-modal__item-total {
  flex-shrink: 0;
  margin-left: auto;
  font-family: "PF BeauSans Pro", var(--font-sans);
  font-size: 15px;
  font-weight: 700;
  color: #226984;
  white-space: nowrap;
  padding-left: 12px;
}

.order-modal__item-qty-block {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  font-family: "PF BeauSans Pro", var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  color: #555;
  white-space: nowrap;
  padding-left: 12px;
  min-width: 52px;
  justify-content: flex-end;
}

.order-modal__item-qty-unit {
  font-weight: 400;
  color: #999;
  font-size: 13px;
}

/* Cart total inside modal */
.order-modal__cart-total {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 12px;
  padding-top: 8px;
}

.order-modal__cart-total-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.order-modal__cart-total-label {
  font-family: "PF BeauSans Pro", var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  color: #666;
}

.order-modal__cart-total-count {
  font-family: "PF BeauSans Pro", var(--font-sans);
  font-size: 16px;
  font-weight: 700;
  color: #226984;
}

.order-modal__cart-total-row--sum {
  margin-top: 4px;
  padding-top: 6px;
  border-top: 1px solid var(--color-line);
}

.order-modal__cart-total-sum {
  font-family: "PF BeauSans Pro", var(--font-sans);
  font-size: 18px;
  font-weight: 700;
  color: #226984;
}

/* Divider */
.order-modal__divider {
  height: 1px;
  background: var(--color-line);
  margin: 20px 0;
}

/* ============================================
   ORDER FORM
   ============================================ */
.order-form__fields {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: 20px;
}

.order-form__field {
  position: relative;
}

/* Reuse contact-field styles from styles.css */
.order-form__control {
  height: 44px;
}

/* Error state */
.order-form__control.is-error {
  border-color: #d32f2f;
}

.order-form__control.is-error + span {
  color: #d32f2f;
}

/* Consent checkbox in modal */
.order-form__consent {
  margin-bottom: 20px;
  grid-column: unset;
  font-size: 14px;
}

/* Success message */
.order-form__success {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  background: rgba(42, 109, 124, 0.08);
  border: 1px solid rgba(42, 109, 124, 0.25);
  font-family: "PF BeauSans Pro", var(--font-sans);
  font-size: 14px;
  color: #226984;
  margin-bottom: 16px;
  line-height: 1.5;
}

.order-form__success[hidden] {
  display: none;
}

/* Submit button */
.order-form__submit {
  width: 100%;
  height: 48px;
  font-size: 16px;
  position: relative;
  overflow: hidden;
}

.order-form__submit::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transform: skewX(-20deg);
  animation: shine 3s infinite;
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes orderFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes orderSlideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   RESPONSIVE — TABLET (max-width: 768px)
   ============================================ */
@media (max-width: 768px) {
  /* Modal */
  .order-modal {
    padding: 10px;
    align-items: flex-end;
  }

  .order-modal__dialog {
    max-height: 85vh;
    max-width: 100%;
  }

  .order-modal__header {
    padding: 16px 20px;
  }

  .order-modal__title {
    font-size: 18px;
  }

  .order-modal__body {
    padding: 16px 20px;
  }
}

/* ============================================
   RESPONSIVE — MOBILE (max-width: 480px)
   ============================================ */
@media (max-width: 480px) {
  /* Modal */
  .order-modal__dialog {
    max-height: 90vh;
  }

  .order-modal__header {
    padding: 14px 16px;
  }

  .order-modal__body {
    padding: 14px 16px;
  }

  .order-modal__item-media {
    width: 44px;
    height: 38px;
  }

  .order-modal__item-name {
    font-size: 13px;
  }

  .order-form__submit {
    height: 44px;
    font-size: 15px;
  }
}



/* ============================================
   АДАПТИВНОСТЬ ТОЛЬКО ДЛЯ КОРЗИНЫ
   ============================================ */

/* ============================================
   ПЛАНШЕТ (max-width: 1024px)
   ============================================ */
@media (max-width: 1024px) {
  
  /* Уменьшаем отступы в блоке заказа */
  .cart__order-box {
    padding: 25px 20px;
  }
}

/* ============================================
   ПЛАНШЕТ (max-width: 1000px)
   ============================================ */
@media (max-width: 1000px) {
  /* Меняем 60/40 на 100% */
  .cart-content {
    flex: 0 0 100%;
    max-width: 100%;
  }

  .cart__order {
    flex: 0 0 100%;
    max-width: 100%;
    justify-content: center;
    margin-top: 30px;
  }
  
}
/* ============================================
   ПЛАНШЕТ (max-width: 768px)
   ============================================ */
@media (max-width: 768px) {

  .cart-page {
    padding-top: 90px;
    padding-bottom: 40px;
  }

  .cart-page__title {
    font-size: 26px;
    margin-bottom: 20px;
  }


  .cart__order-box {
    max-width: 100%;
    padding: 25px 20px;
  }

  .cart__order-title {
    font-size: 17px;
  }

  .cart__order-description {
    font-size: 13px;
  }

  .clear-card {
    font-size: 13px;
  }



  .cart__row {
    padding: 16px 0;
    position: relative;
    border-bottom: 1px solid var(--color-line, #d9d9d9);
  }

  .cart__td {
    padding: 4px 0;
  }

  .cart__td--product {
    margin-bottom: 8px;
 
  }

  .cart__td--qty {
    text-align: left;
    border: none;
  }



  .cart-item {
    gap: 14px;
  }

  .cart-item__media {
    width: 70px;
    height: 70px;
  }

  .cart-item__name {
    font-size: 15px;
  }

  .cart-qty {
    display: inline-flex;
    align-items: center;
    gap: 0;
  }

  .cart-qty__btn {
    width: 32px;
    height: 32px;
    font-size: 22px;
  }

  .cart-qty__input {
    width: 44px;
    height: 32px;
    font-size: 14px;
  }

  .cart-remove {
    width: 32px;
    height: 32px;
  }

  .cart__actions {
    flex-direction: column;
    align-items: stretch;
    gap: 15px;
    margin-top: 20px;
  }

  .cart__link-catalog {
    text-align: center;
    font-size: 14px;
  }

  .cart__checkout-btn {
    width: 100%;
    height: 44px;
    font-size: 15px;
  }

  .cart__summary-count {
    font-size: 16px;
  }

  .cart__summary-label {
    font-size: 14px;
  }
}

/* ============================================
   МОБИЛЬНЫЙ (max-width: 480px)
   ============================================ */
@media (max-width: 480px) {

  .cart-page {
    padding-top: 75px;
    padding-bottom: 30px;
  }

  .cart-page__title {
    font-size: 22px;
    margin-bottom: 15px;
  }

  .cart__order-box {
    padding: 20px 15px;
    gap: 15px;
  }

  .cart__order-title {
    font-size: 16px;
  }

  .cart__order-description {
    font-size: 13px;
    line-height: 18px;
  }

  .cart__header {
    gap: 8px;
    margin-bottom: 15px;
  }

  .clear-card {
    font-size: 12px;
  }

  .cart__row {
    padding: 12px 0;
  }

  .cart__td--product {
    margin-bottom: 6px;
  }

  .cart-item {
    gap: 10px;
  }

  .cart-item__media {
    width: 60px;
    height: 50px;
  }

  .cart-item__name {
    font-size: 13px;
  }

  .cart-qty__btn {
    width: 28px;
    height: 28px;
    font-size: 18px;
  }

  .cart-qty__input {
    width: 36px;
    height: 28px;
    font-size: 13px;
  }

  .cart-remove {
    width: 28px;
    height: 28px;
  }

  .cart-remove img {
    width: 16px;
    height: 16px;
  }

  .cart__actions {
    gap: 12px;
    margin-top: 15px;
  }

  .cart__link-catalog {
    font-size: 13px;
  }

  .cart__checkout-btn {
    height: 40px;
    font-size: 14px;
  }

  .cart__summary-count {
    font-size: 15px;
  }

  .cart__summary-label {
    font-size: 13px;
  }
}

/* ============================================
   ОЧЕНЬ МАЛЕНЬКИЕ ЭКРАНЫ (max-width: 360px)
   ============================================ */
@media (max-width: 360px) {

  .cart-page__title {
    font-size: 20px;
  }

  .cart__order-box {
    padding: 15px 12px;
    gap: 12px;
  }

  .cart__order-title {
    font-size: 15px;
  }

  .cart__order-description {
    font-size: 12px;
  }

  .cart-item__media {
    width: 50px;
    height: 42px;
  }

  .cart-item__name {
    font-size: 12px;
  }

  .cart-qty__btn {
    width: 24px;
    height: 24px;
    font-size: 16px;
  }

  .cart-qty__input {
    width: 32px;
    height: 24px;
    font-size: 12px;
  }

  .cart__checkout-btn {
    height: 38px;
    font-size: 13px;
  }
}



/* ============================================================
   Form
   ============================================================ */
.form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* -- Field -- */
.form__field {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

/* -- Input -- */
.form__input {
  font-family: var(--font);
  font-size: 13.5px;
  color: var(--color-text);
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  width: 100%;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}
.form__input::placeholder { color: var(--color-text-muted); }
.form__input:focus {
  border-color: var(--color-border-focus);
  box-shadow: 0 0 0 3px rgba(46,139,154,0.14);
  background: var(--color-white);
}

/* invalid state */
.form__field--invalid .form__input {
  border-color: var(--color-error);
  background: var(--color-error-bg);
}
.form__field--invalid .form__input:focus {
  box-shadow: 0 0 0 3px rgba(224,82,82,0.13);
}

/* valid state */
.form__field--valid .form__input {
  border-color: #4caf82;
}

/* -- Error message -- */
.form__error {
  font-size: 11.5px;
  color: var(--color-error);
  min-height: 0;
  display: block;
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.2s ease, opacity 0.2s ease;
  opacity: 0;
}
.form__field--invalid .form__error {
  max-height: 40px;
  opacity: 1;
}

/* ============================================================
   Phone input
   ============================================================ */
.form__field--phone .phone-input {
  display: flex;
  align-items: center;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form__field--phone:focus-within .phone-input {
  border-color: var(--color-border-focus);
  box-shadow: 0 0 0 3px rgba(46,139,154,0.14);
}

.form__field--phone.form__field--invalid .phone-input {
  border-color: var(--color-error);
  background: var(--color-error-bg);
}
.form__field--phone.form__field--invalid:focus-within .phone-input {
  box-shadow: 0 0 0 3px rgba(224,82,82,0.13);
}
.form__field--phone.form__field--valid .phone-input {
  border-color: #4caf82;
}

.phone-input__flag {
  display: flex;
  align-items: center;
  padding: 0 8px 0 10px;
  flex-shrink: 0;
}

.phone-input__flag-icon {
  width: 20px;
  height: 14px;
  border-radius: 2px;
  display: block;
}

.phone-input__code {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--color-text);
  white-space: nowrap;
  padding-right: 2px;
  flex-shrink: 0;
}

.phone-input__divider {
  width: 1px;
  height: 20px;
  background: var(--color-border);
  margin: 0 8px;
  flex-shrink: 0;
}

.phone-input__field {
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
  padding-left: 0;
  flex: 1;
}
.phone-input__field:focus {
  box-shadow: none !important;
  border: none !important;
}

/* ============================================================
   Checkbox
   ============================================================ */
.form__field--checkbox {
  margin-top: 4px;
}

.checkbox {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  cursor: pointer;
  user-select: none;
}

.checkbox__input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.checkbox__box {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--color-border);
  border-radius: 3px;
  background: var(--color-white);
  margin-top: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
  position: relative;
}

.checkbox__box::after {
  content: '';
  display: block;
  width: 5px;
  height: 9px;
  border: 2px solid var(--color-white);
  border-top: none;
  border-left: none;
  transform: rotate(45deg) translateY(-1px);
  opacity: 0;
  transition: opacity var(--transition);
}

.checkbox__input:checked ~ .checkbox__box {
  background: var(--color-accent);
  border-color: var(--color-accent);
}
.checkbox__input:checked ~ .checkbox__box::after { opacity: 1; }

.checkbox:hover .checkbox__box {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(46,139,154,0.12);
}

.form__field--invalid .checkbox__box {
  border-color: var(--color-error);
}

.checkbox__label {
  font-size: 12px;
  color: var(--color-text-muted);
  line-height: 1.5;
}

.checkbox__link {
  color: var(--color-accent);
  text-decoration: none;
  border-bottom: 1px dashed rgba(46,139,154,0.4);
  transition: color var(--transition), border-color var(--transition);
}
.checkbox__link:hover {
  color: var(--color-accent-dark);
  border-color: var(--color-accent-dark);
}

/* ============================================================
   Form footer & Button
   ============================================================ */
.form__footer {
  /* display: flex;
  justify-content: flex-end;
  margin-top: 6px; */
}

.is-error{
  border-color: #cf2222 !important;
}

.btn {
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  position: relative;
  overflow: hidden;
}

.btn--primary {
  background: var(--color-accent);
  color: var(--color-white);
  padding: 11px 36px;
  box-shadow: 0 4px 14px rgba(46,139,154,0.3);
}
.btn--primary:hover {
  background: var(--color-accent-dark);
  box-shadow: 0 6px 18px rgba(46,139,154,0.4);
  transform: translateY(-1px);
}
.btn--primary:active { transform: translateY(0); }
.btn--primary:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

/* loading state */
.btn--loading .btn__text { opacity: 0; }
.btn--loading .btn__loader { opacity: 1; }

.btn__loader {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition);
}
.btn__loader::after {
  content: '';
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   Success message
   ============================================================ */
.form__success {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 0 8px;
  gap: 14px;
  text-align: center;
}

.form__success--visible { display: flex; }

.form__success-icon {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(46,139,154,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
}

.form__success-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text);
}

.form__success-sub {
  font-size: 13px;
  color: var(--color-text-muted);
  line-height: 1.5;
}

.is-hidden { display: none !important; }

.cart-remove img {
  width: 22px;
  height: 22px;
}