/* ==========================================
   Cart & Checkout
   ========================================== */

/* These two pages read better in a tighter column than the site-wide 90%
   content width — narrower measure keeps the summary panel beside the items
   instead of stretching both across a very wide screen. */
.hp-content--narrow { width: 70% !important; }
@media (max-width: 1100px) { .hp-content--narrow { width: 90% !important; } }

.hp-cart, .hp-checkout {
  padding: 48px 0 88px;
  background: linear-gradient(180deg, #f6f8fc 0%, #f8fafc 100%);
  min-height: 66vh;
}

/* ---------- Cart ---------- */

.hp-cart__head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 28px; }
.hp-cart__title, .hp-checkout__title {
  font-size: clamp(27px, 3vw, 35px);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f172a;
  margin: 0;
}
.hp-cart__count { font-size: 14px; color: #64748b; font-weight: 600; }

.hp-cart__layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 26px; align-items: start; }

.hp-cart__items { display: flex; flex-direction: column; gap: 12px; }

.hp-cart-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: #fff;
  border: 1px solid #e8ecf4;
  border-radius: 14px;
  padding: 18px 20px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
  transition: box-shadow 0.18s ease, border-color 0.18s ease;
}
.hp-cart-row:hover { border-color: #d6e2f0; box-shadow: 0 6px 20px rgba(15, 23, 42, 0.06); }

.hp-cart-row__info { display: flex; align-items: center; gap: 16px; min-width: 0; }

.hp-cart-row__thumb {
  width: 54px; height: 54px; border-radius: 11px; flex-shrink: 0;
  background: linear-gradient(135deg, #120028 0%, #2c055c 100%);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
  color: #fff; font-weight: 800; font-size: 20px;
}
.hp-cart-row__thumb img { width: 100%; height: 100%; object-fit: cover; }

.hp-cart-row__meta { min-width: 0; }
.hp-cart-row__name { font-weight: 700; font-size: 15.5px; color: #0f172a; text-decoration: none; display: block; }
.hp-cart-row__name:hover { color: #0096D9; }
.hp-cart-row__tagline {
  font-size: 12.5px; color: #64748b; margin: 3px 0 0; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}
.hp-cart-row__badges { display: flex; gap: 6px; margin-top: 7px; flex-wrap: wrap; }
.hp-cart-badge {
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 999px; background: #f1f5f9; color: #64748b;
}
.hp-cart-badge--recurring { background: #eaf6fd; color: #0077ad; }

.hp-cart-row__controls { display: flex; align-items: center; gap: 20px; flex-shrink: 0; }

.hp-cart-qty { display: inline-flex; align-items: center; border: 1.5px solid #e2e8f0; border-radius: 9px; overflow: hidden; background: #fff; }
.hp-cart-qty__btn {
  width: 30px; height: 32px; border: none; background: #fff; color: #475569;
  font-size: 16px; font-weight: 600; cursor: pointer; line-height: 1;
  transition: background 0.15s ease, color 0.15s ease;
}
.hp-cart-qty__btn:hover:not(:disabled) { background: #f1f5f9; color: #0f172a; }
.hp-cart-qty__btn:disabled { opacity: 0.35; cursor: not-allowed; }
.hp-cart-qty__value { min-width: 30px; text-align: center; font-size: 14px; font-weight: 700; color: #0f172a; }

.hp-cart-row__pricing { text-align: right; min-width: 78px; }
.hp-cart-row__total { font-size: 16.5px; font-weight: 800; color: #0f172a; letter-spacing: -0.01em; }
.hp-cart-row__period { font-size: 12px; font-weight: 600; color: #64748b; }
.hp-cart-row__unit { font-size: 11.5px; color: #94a3b8; margin-top: 2px; }

.hp-cart-row__remove {
  background: none; border: none; color: #cbd5e1; cursor: pointer; padding: 6px;
  display: flex; align-items: center; border-radius: 7px; transition: color 0.15s ease, background 0.15s ease;
}
.hp-cart-row__remove:hover { color: #dc2626; background: #fef2f2; }

/* Cart summary panel */

.hp-cart__summary, .hp-checkout__summary {
  background: #fff;
  border: 1px solid #e8ecf4;
  border-radius: 16px;
  padding: 24px 22px;
  position: sticky;
  top: 24px;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
}

.hp-cart__summary-title, .hp-checkout__summary-title {
  margin: 0 0 18px; font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.07em; color: #94a3b8;
}

.hp-cart__summary-row, .hp-checkout-row {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 14px; color: #475569; padding: 7px 0;
}
.hp-cart__summary-row--muted, .hp-checkout-row--muted { color: #94a3b8; font-size: 13px; }
.hp-cart__summary-row--total, .hp-checkout-row--total {
  border-top: 1px solid #eef1f6; margin-top: 10px; padding-top: 15px;
  font-size: 18px; font-weight: 800; color: #0f172a; letter-spacing: -0.01em;
}

.hp-cart-warning {
  background: #fff8ed; color: #92600a; border: 1px solid #fde9c8;
  font-size: 12.5px; line-height: 1.55; padding: 11px 13px; border-radius: 9px; margin: 14px 0;
}
.hp-cart-warning strong { display: block; margin-bottom: 2px; }

.hp-cart__checkout-btn, .hp-checkout__pay-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; margin-top: 16px; padding: 14px 20px;
  font-size: 15px; font-weight: 700; border: none; cursor: pointer;
}

.hp-cart__continue {
  display: block; text-align: center; font-size: 13.5px; color: #64748b;
  text-decoration: none; margin-top: 12px; transition: color 0.15s ease;
}
.hp-cart__continue:hover { color: #0096D9; }

.hp-cart__trust, .hp-checkout__trust {
  list-style: none; margin: 20px 0 0; padding: 18px 0 0; border-top: 1px solid #f1f5f9;
  display: flex; flex-direction: column; gap: 9px;
}
.hp-cart__trust li, .hp-checkout__trust li {
  font-size: 12.5px; color: #64748b; padding-left: 22px; position: relative; line-height: 1.45;
}
.hp-cart__trust li::before, .hp-checkout__trust li::before {
  content: '✓'; position: absolute; left: 0; top: 0;
  color: #16a34a; font-weight: 800; font-size: 12px;
}

/* Empty cart */

.hp-cart__empty {
  text-align: center; padding: 72px 24px;
  background: #fff; border: 1px solid #e8ecf4; border-radius: 16px;
}
.hp-cart__empty-icon {
  width: 76px; height: 76px; border-radius: 50%; background: #f1f5f9; color: #94a3b8;
  display: flex; align-items: center; justify-content: center; margin: 0 auto 20px;
}
.hp-cart__empty h2 { font-size: 20px; font-weight: 800; color: #0f172a; margin: 0 0 8px; }
.hp-cart__empty p { color: #64748b; font-size: 14.5px; margin: 0 0 22px; }

/* ---------- Checkout ---------- */

.hp-checkout__back {
  display: inline-block; font-size: 13.5px; color: #64748b; text-decoration: none;
  margin-bottom: 18px; transition: color 0.15s ease;
}
.hp-checkout__back:hover { color: #0096D9; }

.hp-checkout__layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 26px; align-items: start; }

.hp-checkout__lede { color: #64748b; font-size: 14.5px; line-height: 1.6; margin: 10px 0 24px; max-width: 46ch; }

.hp-checkout-card {
  background: #fff; border: 1px solid #e8ecf4; border-radius: 14px;
  padding: 22px; margin-bottom: 16px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}
.hp-checkout-card__title {
  display: flex; align-items: center; gap: 10px;
  font-size: 15px; font-weight: 700; color: #0f172a; margin: 0 0 18px;
}
.hp-checkout-step {
  width: 23px; height: 23px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, #120028 0%, #2c055c 100%); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800;
}
.hp-checkout-card__note {
  font-size: 12.5px; color: #94a3b8; line-height: 1.55; margin: 14px 0 0;
  padding-top: 14px; border-top: 1px solid #f1f5f9;
}

.hp-checkout-field { margin-bottom: 16px; }
.hp-checkout-field:last-child { margin-bottom: 0; }
.hp-checkout-field label { display: block; font-size: 12.5px; font-weight: 700; color: #334155; margin-bottom: 7px; }
.hp-checkout-field input {
  width: 100%; padding: 12px 14px; border: 1.5px solid #e2e8f0; border-radius: 10px;
  font-size: 14.5px; font-family: inherit; color: #0f172a;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.hp-checkout-field input::placeholder { color: #cbd5e1; }
.hp-checkout-field input:focus {
  outline: none; border-color: #0096D9; box-shadow: 0 0 0 3px rgba(0, 150, 217, 0.12);
}
.hp-checkout-field__hint { display: block; font-size: 12px; color: #94a3b8; margin-top: 6px; }

.hp-checkout-gateways { display: flex; flex-direction: column; gap: 10px; }
.hp-checkout-gateway {
  display: flex; align-items: center; gap: 11px; padding: 14px 16px;
  border: 1.5px solid #e2e8f0; border-radius: 11px; cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.hp-checkout-gateway:hover { border-color: #cbd5e1; }
.hp-checkout-gateway input { position: absolute; opacity: 0; pointer-events: none; }
.hp-checkout-gateway__radio {
  width: 18px; height: 18px; border-radius: 50%; border: 2px solid #cbd5e1; flex-shrink: 0;
  position: relative; transition: border-color 0.15s ease;
}
.hp-checkout-gateway:has(input:checked) { border-color: #0096D9; background: #f5fbff; box-shadow: 0 0 0 3px rgba(0, 150, 217, 0.09); }
.hp-checkout-gateway:has(input:checked) .hp-checkout-gateway__radio { border-color: #0096D9; }
.hp-checkout-gateway:has(input:checked) .hp-checkout-gateway__radio::after {
  content: ''; position: absolute; inset: 3px; border-radius: 50%; background: #0096D9;
}
.hp-checkout-gateway__label { font-size: 14.5px; font-weight: 700; color: #0f172a; }
.hp-checkout-gateway__hint { font-size: 12.5px; color: #94a3b8; margin-left: auto; }

.hp-checkout-single-gateway {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px; border: 1.5px solid #e2e8f0; border-radius: 11px; background: #fafcff;
}

.hp-checkout__pay-btn { margin-top: 4px; }

.hp-checkout-warning {
  background: #fff8ed; color: #92600a; border: 1px solid #fde9c8;
  padding: 16px 18px; border-radius: 11px; font-size: 14px; line-height: 1.6;
}

/* Checkout summary items */

.hp-checkout__items { display: flex; flex-direction: column; gap: 13px; padding-bottom: 16px; margin-bottom: 6px; border-bottom: 1px solid #f1f5f9; }

.hp-checkout-item { display: flex; align-items: center; gap: 12px; }
.hp-checkout-item__thumb {
  width: 42px; height: 42px; border-radius: 9px; flex-shrink: 0; position: relative;
  background: linear-gradient(135deg, #120028 0%, #2c055c 100%);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
  color: #fff; font-weight: 800; font-size: 15px;
}
.hp-checkout-item__thumb img { width: 100%; height: 100%; object-fit: cover; }
.hp-checkout-item__qty {
  position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 4px;
  background: #0096D9; color: #fff; border-radius: 999px; font-size: 10.5px; font-weight: 800;
  display: flex; align-items: center; justify-content: center; border: 2px solid #fff;
}
.hp-checkout-item__meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hp-checkout-item__name { font-size: 13.5px; font-weight: 700; color: #0f172a; line-height: 1.3; }
.hp-checkout-item__sub { font-size: 11.5px; color: #94a3b8; }
.hp-checkout-item__price { margin-left: auto; font-size: 14px; font-weight: 700; color: #0f172a; white-space: nowrap; }

/* Success page */

.hp-checkout__success-icon {
  width: 66px; height: 66px; border-radius: 50%; background: #dcfce7; color: #16a34a;
  display: flex; align-items: center; justify-content: center; font-size: 29px; margin: 0 auto 22px;
}

.hp-checkout__licenses {
  margin-top: 32px; background: #fff; border: 1px solid #e8ecf4; border-radius: 14px;
  padding: 22px; text-align: left;
}
.hp-checkout__licenses h3 { margin: 0 0 14px; font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: #94a3b8; }
.hp-checkout__license-row {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 11px 0; border-bottom: 1px solid #f1f5f9; font-size: 14px; flex-wrap: wrap;
}
.hp-checkout__license-row:last-child { border-bottom: none; }
.hp-checkout__license-row .license-key {
  font-family: 'SFMono-Regular', Menlo, Consolas, monospace; font-size: 13px;
  background: #f6f8fc; border: 1px solid #e8ecf4; border-radius: 7px; padding: 5px 9px; color: #0f172a;
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .hp-cart__layout, .hp-checkout__layout { grid-template-columns: 1fr; }
  .hp-cart__summary, .hp-checkout__summary { position: static; }
}

@media (max-width: 640px) {
  .hp-cart-row { flex-direction: column; align-items: stretch; gap: 16px; }
  .hp-cart-row__controls { justify-content: space-between; }
  .hp-checkout-gateway__hint { display: none; }
}
