/* Оформление заказа (Simple): современный вид без таблиц и линий. Подключается в header.twig; селекторы ограничены блоками оформления. */
#simplecheckout_form_0 { --mm-accent: #057d99; --mm-border: #e6e9ed; --mm-muted: #6b7280; }

/* карточки вместо серых полос */
#simplecheckout_form_0 .simplecheckout-block {
  background: #fff;
  border: 1px solid var(--mm-border);
  border-radius: 14px;
  box-shadow: 0 2px 14px rgba(20, 30, 50, .05);
  padding: 20px 24px;
  margin: 0 0 18px;
}
#simplecheckout_form_0 .simplecheckout-block .checkout-heading {
  background: none; border: 0; border-radius: 0;
  padding: 0 0 14px; margin: 0;
  font-size: 18px; font-weight: 600; color: #111;
}
#simplecheckout_form_0 .simplecheckout-block .checkout-heading-button { float: right; font-size: 13px; font-weight: 400; }
#simplecheckout_form_0 .simplecheckout-block-content { border: 0 !important; padding: 0 !important; background: none; }

/* «Способ доставки» и «Адрес доставки» выглядят как одна карточка «Доставка» */
#simplecheckout_form_0 #simplecheckout_shipping_address { margin-bottom: 0; border-bottom: 0; border-radius: 14px 14px 0 0; box-shadow: none; padding-bottom: 6px; }
#simplecheckout_form_0 #simplecheckout_shipping { border-top: 0; border-radius: 0 0 14px 14px; padding-top: 0; box-shadow: 0 8px 14px -8px rgba(20, 30, 50, .08); }
#simplecheckout_form_0 #simplecheckout_shipping .checkout-heading { display: none; }
#simplecheckout_form_0 #simplecheckout_shipping .simplecheckout-block-content { padding-top: 4px !important; }

/* поля: подпись над полем */
#simplecheckout_form_0 .form-group { display: block; margin: 0 0 14px; }
#simplecheckout_form_0 .form-group .control-label {
  float: none; display: block; width: 100%; max-width: 100%; text-align: left;
  padding: 0 0 5px; font-size: 13px; font-weight: 500; color: var(--mm-muted);
}
#simplecheckout_form_0 .form-group > div[class*="col-"] { float: none; width: 100%; padding: 0; }
#simplecheckout_form_0 .form-group.required .control-label:before { color: #e66761; }
#simplecheckout_form_0 .form-control {
  height: 46px; border: 1px solid #d9dde3; border-radius: 10px; box-shadow: none;
  padding: 0 14px; font-size: 15px; background-color: #fff; transition: border-color .15s, box-shadow .15s;
}
#simplecheckout_form_0 textarea.form-control { height: auto; min-height: 96px; padding: 10px 14px; }
#simplecheckout_form_0 .form-control:focus { border-color: var(--mm-accent); box-shadow: 0 0 0 3px rgba(5, 125, 153, .12); outline: 0; }

/* способы доставки и оплаты: выбираемые карточки */
#simplecheckout_form_0 #simplecheckout_shipping .radio,
#simplecheckout_form_0 #simplecheckout_payment .radio { margin: 0 0 8px; padding: 0; }
#simplecheckout_form_0 #simplecheckout_shipping .radio label,
#simplecheckout_form_0 #simplecheckout_payment .radio label {
  display: block; width: 100%; min-height: 0; margin: 0; padding: 13px 16px;
  border: 1px solid #d9dde3; border-radius: 10px; font-weight: 500; cursor: pointer; transition: border-color .15s, background .15s;
}
#simplecheckout_form_0 #simplecheckout_shipping .radio label:hover,
#simplecheckout_form_0 #simplecheckout_payment .radio label:hover { border-color: var(--mm-accent); }
#simplecheckout_form_0 #simplecheckout_shipping .radio input[type="radio"],
#simplecheckout_form_0 #simplecheckout_payment .radio input[type="radio"] { position: static; float: none; margin: 0 10px 0 0; vertical-align: -1px; }
#simplecheckout_form_0 #simplecheckout_shipping .radio label:has(input:checked),
#simplecheckout_form_0 #simplecheckout_payment .radio label:has(input:checked) { border-color: var(--mm-accent); background: #f1f9fb; }
#simplecheckout_form_0 #simplecheckout_shipping p > b { display: none; }

/* корзина: строки вместо таблицы */
#simplecheckout_form_0 .simplecheckout-cart,
#simplecheckout_form_0 .simplecheckout-cart tbody { display: block; width: 100%; border: 0; }
#simplecheckout_form_0 .simplecheckout-cart colgroup,
#simplecheckout_form_0 .simplecheckout-cart thead { display: none; }
#simplecheckout_form_0 .simplecheckout-cart tr {
  display: grid; grid-template-columns: 108px 1fr 176px 100px 110px 24px;
  grid-template-areas: "img name qty price total rm";
  align-items: center; gap: 16px; padding: 12px 0; border: 0;
}
#simplecheckout_form_0 .simplecheckout-cart td { display: block; border: 0 !important; padding: 0 !important; background: none; width: auto; }
#simplecheckout_form_0 .simplecheckout-cart td.image { grid-area: img; }
#simplecheckout_form_0 .simplecheckout-cart td.name { grid-area: name; }
#simplecheckout_form_0 .simplecheckout-cart td.quantity { grid-area: qty; }
#simplecheckout_form_0 .simplecheckout-cart td.price { grid-area: price; text-align: right; color: var(--mm-muted); font-size: 13px; }
#simplecheckout_form_0 .simplecheckout-cart td.total { grid-area: total; text-align: right; font-size: 16px; font-weight: 600; }
#simplecheckout_form_0 .simplecheckout-cart td.remove { grid-area: rm; }
#simplecheckout_form_0 .simplecheckout-cart td.model { display: none; }
#simplecheckout_form_0 .simplecheckout-cart td.name .image { display: none; }
#simplecheckout_form_0 .simplecheckout-cart td.image img { width: 108px; height: 108px; object-fit: cover; border-radius: 12px; }
#simplecheckout_form_0 .simplecheckout-cart td.name { text-align: left; }
#simplecheckout_form_0 .simplecheckout-cart td.name > a { font-weight: 500; color: #111; }
#simplecheckout_form_0 .simplecheckout-cart td.name > a:hover { color: var(--mm-accent); }
#simplecheckout_form_0 .simplecheckout-cart td.name .options { color: var(--mm-muted); margin-top: 3px; }
#simplecheckout_form_0 .simplecheckout-cart td.quantity .input-group { display: flex !important; flex-direction: row !important; align-items: center; gap: 8px; max-width: 176px !important; width: auto !important; border: 0; flex-wrap: nowrap !important; }
#simplecheckout_form_0 .simplecheckout-cart td.quantity .input-group-btn { display: flex !important; gap: 10px; width: auto !important; float: none; }
#simplecheckout_form_0 .simplecheckout-cart td.quantity .form-control { width: 56px; height: 44px; border: 1px solid #d9dde3; border-radius: 10px; text-align: center; padding: 0; float: none; flex: 0 0 56px; }
#simplecheckout_form_0 .simplecheckout-cart td.quantity .btn { width: 44px; height: 44px; padding: 0; background: #f1f3f5; color: #333; border: 0; border-radius: 10px; box-shadow: none; display: flex; align-items: center; justify-content: center; }
#simplecheckout_form_0 .simplecheckout-cart td.quantity .btn:hover { background: #e4e8ec; }
#simplecheckout_form_0 .simplecheckout-cart td.quantity .btn i { color: #333; font-size: 14px; }

/* итоги, купон */
#simplecheckout_form_0 .simplecheckout-cart-total { display: flex; justify-content: flex-end; align-items: center; gap: 12px; padding: 5px 0; border: 0; background: none; text-align: right; }
#simplecheckout_form_0 #total_total { font-size: 20px; padding-top: 10px; }
#simplecheckout_form_0 #total_total b { font-weight: 600; }
#simplecheckout_form_0 .simplecheckout-cart-total .inputs { display: flex; align-items: center; gap: 10px; }
#simplecheckout_form_0 .simplecheckout-cart-total .inputs .form-control { width: 160px; height: 40px; }
#simplecheckout_form_0 .simplecheckout-cart-buttons .btn { background: #f4f5f7; color: #333; border-radius: 10px; }

/* ссылки «Есть промокод?» */
#simplecheckout_form_0 .yrf-hide { display: none !important; }
#simplecheckout_form_0 .yrf-promo { gap: 20px; padding-top: 8px; }
#simplecheckout_form_0 .yrf-promo a { color: var(--mm-accent); border-bottom: 1px dashed currentColor; text-decoration: none; font-size: 14px; }

/* кнопка заказа */
#simplecheckout_form_0 #buttons { height: auto !important; overflow: visible !important; padding: 12px 0 !important; }
#simplecheckout_form_0 .simplecheckout-button-right { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 14px 24px; width: 100%; float: none; }
#simplecheckout_form_0 #agreement_checkbox { width: auto; flex: 1 1 420px; text-align: right; }
#simplecheckout_form_0 #agreement_checkbox .checkbox { width: auto; margin: 0; }
#simplecheckout_form_0 #simplecheckout_button_confirm { border-radius: 10px; padding: 0 32px; height: 48px; line-height: 48px; font-size: 16px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; }
#simplecheckout_form_0 #simplecheckout_button_confirm span { line-height: 1; }
#simplecheckout_form_0 .simplecheckout-button-block { border: 0; background: none; }

@media (max-width: 767px) {
  #simplecheckout_form_0 .simplecheckout-block { padding: 16px; border-radius: 12px; }
  #simplecheckout_form_0 #simplecheckout_cart .table-responsive { overflow: visible; border: 0; margin: 0; width: 100%; }
  #simplecheckout_form_0 .simplecheckout-cart { min-width: 0; }
  #simplecheckout_form_0 .simplecheckout-cart tr {
    grid-template-columns: 88px minmax(0, 1fr) auto !important; gap: 10px 14px; padding: 8px 0 14px;
    grid-template-areas: "img name name" "qty qty total";
    align-items: start;
  }
  #simplecheckout_form_0 .simplecheckout-cart td.name { min-width: 0; word-break: break-word; }
  #simplecheckout_form_0 .simplecheckout-cart td.name .options small { display: inline; }
  #simplecheckout_form_0 .simplecheckout-cart td.price,
  #simplecheckout_form_0 .simplecheckout-cart td.remove,
  #simplecheckout_form_0 .simplecheckout-cart td.model { display: none !important; }
  #simplecheckout_form_0 .simplecheckout-cart td.image { display: block !important; }
  #simplecheckout_form_0 .simplecheckout-cart td.image img { width: 88px; height: 88px; }
  #simplecheckout_form_0 .simplecheckout-cart td.quantity { align-self: center; min-width: 0; }
  #simplecheckout_form_0 .simplecheckout-cart td.total { align-self: center; white-space: nowrap; font-size: 17px; }
  #simplecheckout_form_0 .simplecheckout-cart td.quantity .input-group { margin: 0 !important; justify-content: flex-start; }
  #simplecheckout_form_0 .simplecheckout-cart-total { flex-wrap: nowrap; justify-content: space-between; text-align: left; gap: 12px; }
  #simplecheckout_form_0 .simplecheckout-cart-total > span:first-child { flex: 1 1 auto; }
  #simplecheckout_form_0 .simplecheckout-cart-total .simplecheckout-cart-total-value { white-space: nowrap; text-align: right; }
  #simplecheckout_form_0 .simplecheckout-cart-total.yrf-promo { justify-content: flex-start; gap: 20px; }
  #simplecheckout_form_0 .simplecheckout-cart-total .inputs { flex-wrap: wrap; justify-content: flex-end; }
  #simplecheckout_form_0 #agreement_checkbox { flex-basis: 100%; text-align: left; }
  #simplecheckout_form_0 #simplecheckout_button_confirm { width: 100%; }
}
