/* Order page (cabinet → order) and checkout form. Loaded after site.css/style.css. */

/* ---------- Order page ---------- */
.ord {
  max-width: 760px;
  margin: 8px auto 0;
  font-size: 16px;
  line-height: 1.4;
  color: #333;
}
.ord dl, .ord dd { margin: 0; }

.ord-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e5e5e5;
}
.ord-head__number { font-size: 24px; font-weight: 800; line-height: 1.2; }
.ord-head__date { margin-top: 2px; font-size: 15px; color: #888; }

.ord-status {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: bold;
  white-space: nowrap;
}
.ord-status--success { background: #e6f4e8; color: #0a7d16; }
.ord-status--process { background: #fdf0db; color: #a86400; }

.ord-items { margin: 0; padding: 0; list-style: none; }
.ord-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid #eee;
}
.ord-item__cover { flex: 0 0 56px; }
.ord-item__cover img {
  display: block;
  width: 56px;
  height: auto;
  border-radius: 2px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
}
.ord-item__body { flex: 1; min-width: 0; }
.ord-item__title { font-size: 17px; font-weight: bold; line-height: 1.25; color: #4a90e2; text-decoration: none; }
.ord-item__title:hover { text-decoration: underline; }
.ord-item__meta { margin-top: 4px; font-size: 14px; color: #888; }
.ord-item__sum { font-weight: bold; white-space: nowrap; }

.ord-badge {
  display: inline-block;
  margin-bottom: 4px;
  padding: 1px 8px;
  border-radius: 4px;
  background: rgba(246, 205, 122, .5);
  font-size: 12px;
  line-height: 1.5;
  color: #6b4e0e;
}

.ord-totals { max-width: 320px; margin: 16px 0 0 auto; }
.ord-totals > div { display: flex; justify-content: space-between; gap: 16px; padding: 3px 0; color: #666; }
.ord-totals dd { font-weight: bold; color: #333; white-space: nowrap; }
.ord-totals > .ord-totals__grand {
  margin-top: 6px;
  padding-top: 10px;
  border-top: 1px solid #e5e5e5;
  font-size: 20px;
  font-weight: bold;
  color: #333;
}

.ord-section-title { margin: 32px 0 12px; font-size: 18px; font-weight: 800; }
.ord-info {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 10px 24px;
  padding: 16px 20px;
  border-radius: 8px;
  background: #f7f7f7;
}
.ord-info dt { color: #888; }
.ord-info dd { color: #333; overflow-wrap: anywhere; }

@media (max-width: 600px) {
  .ord-head__number { font-size: 20px; }
  .ord-item { gap: 12px; }
  .ord-info { grid-template-columns: 1fr; gap: 2px; }
  .ord-info dd { margin-bottom: 10px; }
  .ord-info dd:last-child { margin-bottom: 0; }
}

/* ---------- Checkout ---------- */
.checkout.feedback { margin-top: 24px; padding: 0; background: none; }
.checkout .feedback__inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px;
  border: 1px solid #e5e5e5;
  border-radius: 10px;
}
.checkout .feedback__title { font-size: 22px; color: #333; }

.checkout-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 20px;
  margin-top: 16px;
}
.checkout-field { min-width: 0; }
.checkout-field--wide { grid-column: 1 / -1; }

.checkout label {
  display: block;
  margin: 0 0 6px !important;
  font-size: 14px !important;
  color: #555;
}
.checkout input[type="text"],
.checkout input[type="email"],
.checkout input[type="tel"],
.checkout select,
.checkout textarea {
  display: block;
  box-sizing: border-box;
  width: 100% !important;
  height: 44px;
  margin: 0 !important;
  padding: 0 12px !important;
  border: 1px solid #cfcfcf;
  border-radius: 6px;
  background-color: #fff;
  font: inherit;
  font-size: 16px !important;
  color: #333;
}
.checkout select { padding-right: 40px !important; background-position: right 14px center; }
.checkout textarea { height: 96px; padding: 10px 12px !important; resize: vertical; }
.checkout input:focus,
.checkout select:focus,
.checkout textarea:focus {
  outline: none;
  border-color: #4a90e2;
  box-shadow: 0 0 0 3px rgba(74, 144, 226, .15);
}
.checkout input::placeholder,
.checkout textarea::placeholder { color: #999 !important; }

/* Nova Poshta region / city / warehouse lists use select2. */
.checkout .select2-container { width: 100% !important; }
.checkout .select2-container .select2-selection--single {
  height: 44px;
  border: 1px solid #cfcfcf;
  border-radius: 6px;
}
.checkout .select2-container .select2-selection--single .select2-selection__rendered {
  padding-left: 12px;
  line-height: 42px;
  color: #333;
}
.checkout .select2-container .select2-selection--single .select2-selection__arrow { height: 42px; right: 8px; }

.checkout-promo { display: flex; gap: 8px; }
.checkout-promo input { flex: 1; min-width: 0; }
.checkout-promo__apply {
  flex: 0 0 auto;
  height: 44px;
  padding: 0 18px;
  border: 1px solid #4a90e2;
  border-radius: 6px;
  background: #fff;
  font: inherit;
  font-weight: bold;
  color: #4a90e2;
  cursor: pointer;
}
.checkout-promo__apply:hover { background: #4a90e2; color: #fff; }

.checkout-summary {
  margin-top: 24px;
  padding: 16px 20px;
  border-radius: 8px;
  background: #f7f7f7;
}
.checkout-summary .total-price {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 3px 0;
  font-size: 16px !important;
  color: #666;
}
.checkout-summary .total-price b { color: #333; white-space: nowrap; }
.checkout-summary .checkout-summary__total {
  margin-top: 6px;
  padding-top: 10px;
  border-top: 1px solid #e2e2e2;
  font-size: 20px !important;
  font-weight: bold;
  color: #333;
}

.checkout-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 24px;
}
.checkout-back { font-size: 16px; color: #4a90e2; }
.checkout .feedback__submit.checkout-submit {
  float: none;
  margin: 0;
  padding: 12px 28px;
  border-radius: 6px;
  background: #c20e1a;
  font-size: 18px !important;
  font-weight: bold;
  color: #fff;
  cursor: pointer;
}
.checkout .feedback__submit.checkout-submit:hover { background: #a50b17; }
/* The cart's "Далі" button is a link. */
a.feedback__submit.checkout-submit { display: inline-block; text-decoration: none; color: #fff !important; }
.checkout-actions--end { justify-content: flex-end; }

/* ---------- Cart ---------- */
.cart-items { margin-top: 8px; }
.cart-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid #eee;
}
.cart-item__cover { flex: 0 0 56px; }
.cart-item__cover img {
  display: block;
  width: 56px;
  height: auto;
  border-radius: 2px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
}
.cart-item__body { flex: 1; min-width: 0; }
.cart-item__title { font-size: 17px; font-weight: bold; line-height: 1.25; color: #4a90e2; text-decoration: none; }
.cart-item__title:hover { text-decoration: underline; }
.cart-item__meta { margin-top: 4px; font-size: 14px; color: #888; }
.cart-item__count { flex: 0 0 auto; text-align: center; }
.checkout .cart-item__count label { margin: 0 0 4px !important; font-size: 12px !important; color: #888; }
.checkout .cart-item__count input[type="number"] {
  box-sizing: border-box;
  width: 72px !important;
  height: 40px;
  margin: 0 !important;
  padding: 0 8px !important;
  border: 1px solid #cfcfcf;
  border-radius: 6px;
  font: inherit;
  font-size: 16px !important;
  text-align: center;
  color: #333;
}
.checkout .cart-item__count input[type="number"]:focus {
  outline: none;
  border-color: #4a90e2;
  box-shadow: 0 0 0 3px rgba(74, 144, 226, .15);
}
.cart-item__delete {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: #999;
  transition: background-color .15s ease, color .15s ease;
}
.cart-item__delete:hover { background: #f3f3f3; color: #c20e1a; }

@media (max-width: 600px) {
  .checkout .feedback__inner { padding: 16px; border: 0; }
  .checkout-fields { grid-template-columns: 1fr; }
  .checkout-actions { flex-direction: column-reverse; align-items: stretch; text-align: center; }
  .cart-item { flex-wrap: wrap; gap: 12px; }
  .cart-item__body { flex-basis: calc(100% - 68px - 48px); }
  .cart-item__count { order: 3; margin-left: 68px; display: flex; align-items: center; gap: 8px; }
  .checkout .cart-item__count label { margin: 0 !important; }
}
