/* ─────────────────────────────────────────────────────────────
   Fitness 4 Me — Secure Checkout Styles
   Designed in harmony with index.php & style-index.css
   ───────────────────────────────────────────────────────────── */

.checkout-page {
  background: var(--bg);
  min-height: 100vh;
}

.checkout-page main h1,
.checkout-page main h2,
.checkout-page main h3,
.checkout-page main h4,
.checkout-page main p {
  margin-top: 0;
}

/* ── Hero Section ────────────────────────────────────────── */
.checkout-hero {
  min-height: 340px;
  display: grid;
  align-items: end;
  padding: 95px 0 65px;
  background:
    linear-gradient(90deg, #0d100dee 0%, #0d100dc2 42%, #0d100d33 80%),
    url("../img/fitness-01.webp") center/cover no-repeat;
  border-bottom: 1px solid var(--line);
  position: relative;
}

.checkout-hero-copy .eyebrow {
  margin-bottom: 18px;
}

.checkout-hero h1 {
  max-width: 920px;
  color: var(--ink);
  text-transform: uppercase;
  font-size: clamp(44px, 6.5vw, 96px);
  font-weight: 800;
  letter-spacing: -0.06em;
  line-height: 0.92;
  margin-bottom: 0;
}

.checkout-hero h1 span {
  color: transparent;
  -webkit-text-stroke: 1px #aeb7a3;
}

.checkout-hero .breadcrumb {
  display: flex;
  gap: 8px;
  color: #c1c9b7;
  font-size: 13px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
  background: transparent;
}

.checkout-hero .breadcrumb a {
  color: #c1c9b7;
  transition: color 0.2s;
  text-decoration: none;
}

.checkout-hero .breadcrumb a:hover {
  color: var(--lime);
}

.checkout-hero .breadcrumb b {
  color: #556247;
  font-weight: 400;
}

/* ── Checkout Content Section ────────────────────────────── */
.checkout-section {
  padding: clamp(55px, 7vw, 90px) 0 100px;
  background: var(--bg);
}

/* ── Logged-in User Notice Banner ────────────────────────── */
.checkout-user-banner {
  background: rgba(195, 255, 0, 0.06);
  border: 1px solid rgba(195, 255, 0, 0.35);
  border-radius: 4px;
  padding: 16px 22px;
  margin-bottom: 32px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.checkout-user-icon {
  width: 38px;
  height: 38px;
  background: var(--lime);
  color: var(--bg);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border-radius: 2px;
}

.checkout-user-icon svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 2.5;
  fill: none;
}

.checkout-user-text p {
  margin: 0;
  color: #d1d6c8;
  font-size: 14px;
  line-height: 1.5;
}

.checkout-user-text strong {
  color: var(--lime);
  font-weight: 700;
}

.checkout-user-text a.checkout-logout-link {
  color: #9ea892;
  text-decoration: underline;
  margin-left: 8px;
  font-size: 13px;
  transition: color 0.2s;
}

.checkout-user-text a.checkout-logout-link:hover {
  color: var(--lime);
}

/* ── Form Card Panels ────────────────────────────────────── */
.checkout-box,
.order-box {
  background: #161a13;
  border: 1px solid var(--line);
  padding: clamp(24px, 4vw, 36px);
  position: relative;
  transition: border-color 0.28s ease, box-shadow 0.28s ease;
}

.checkout-box:hover,
.order-box:hover {
  border-color: #4a583e;
}

.checkout-box-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid #273021;
}

.checkout-box-title-wrap {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.checkout-box-num {
  font-size: 14px;
  font-weight: 800;
  color: var(--lime);
  letter-spacing: 0.05em;
}

.checkout-title {
  color: var(--ink);
  font-size: 20px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  margin: 0;
}

.checkout-box-badge {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border: 1px solid #3c4832;
  color: var(--muted);
  background: rgba(16, 18, 15, 0.6);
}

/* ── Form Labels & Controls ──────────────────────────────── */
.form-label {
  color: #cfd6c5;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
  display: block;
}

.form-control,
.form-select {
  background: #11140f !important;
  border: 1px solid #35402c !important;
  color: var(--ink) !important;
  font-family: var(--font, 'Inter Display', sans-serif);
  font-size: 15px;
  height: 52px;
  border-radius: 0;
  padding: 12px 16px;
  transition: border-color 0.25s, box-shadow 0.25s, background-color 0.25s;
  box-shadow: none;
}

.form-control:focus,
.form-select:focus {
  background: #141812 !important;
  color: var(--ink) !important;
  border-color: var(--lime) !important;
  box-shadow: 0 0 0 1px var(--lime) !important;
  outline: none !important;
}

.form-control::placeholder {
  color: #636d5a;
}

.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23c3ff00' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 16px center !important;
  background-size: 16px !important;
  padding-right: 42px;
  cursor: pointer;
}

.form-select option {
  background: #161a13;
  color: var(--ink);
  padding: 10px;
}

/* Validation Error State */
.form-control.error,
.form-select.error,
.form-check-input.error {
  border-color: #ff4757 !important;
  box-shadow: 0 0 0 1px #ff4757 !important;
}

/* Prefilled State */
.prefilled-field {
  opacity: 0.75;
  cursor: not-allowed;
  background: #151812 !important;
  border-color: #2a3323 !important;
}

.prefilled-select {
  pointer-events: none;
  opacity: 0.75;
  cursor: not-allowed;
  background: #151812 !important;
  border-color: #2a3323 !important;
}

/* ── Payment Information Card ────────────────────────────── */
.payment-methods-showcase {
  background: #121510;
  border: 1px solid #28331f;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
  gap: 15px;
}

.payment-methods-showcase h5 {
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0;
}

.payment-methods-showcase img {
  max-width: 170px;
  height: auto;
  display: block;
  filter: contrast(1.05);
}

/* ── Terms & Conditions Checkbox ─────────────────────────── */
.checkout-terms-box {
  background: #131710;
  border: 1px solid #28331f;
  padding: 22px 24px;
  margin-top: 28px;
}

.form-check {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin: 0;
  padding: 0;
}

.form-check-input {
  width: 22px;
  height: 22px;
  min-width: 22px;
  margin: 2px 0 0 0;
  background-color: #11140f !important;
  border: 1px solid #3c4832 !important;
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.2s;
  float: none;
}

.form-check-input:checked {
  background-color: var(--lime) !important;
  border-color: var(--lime) !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%2310120f'%3E%3Cpath fill-rule='evenodd' d='M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z' clip-rule='evenodd'/%3E%3C/svg%3E") !important;
}

.form-check-input:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(195, 255, 0, 0.3) !important;
}

.form-check-label {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
  cursor: pointer;
}

.form-check-label a {
  color: var(--lime);
  text-decoration: underline;
  transition: color 0.2s;
}

.form-check-label a:hover {
  color: #fff;
}

.form-check-label #termsPrice {
  color: var(--ink);
  font-weight: 700;
}

/* ── Order Summary Sidebar (Right Column) ────────────────── */
.order-box {
  position: sticky;
  top: 110px;
}

.order-box-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid #273021;
}

.order-box-title-wrap {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.order-box-num {
  font-size: 14px;
  font-weight: 800;
  color: var(--lime);
  letter-spacing: 0.05em;
}

.order-title {
  color: var(--ink);
  font-size: 20px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  margin: 0;
}

.order-table {
  width: 100%;
  margin-bottom: 24px;
  border-collapse: collapse;
}

.order-table tr {
  border-bottom: 1px solid #252f1e;
}

.order-table tr:first-child td {
  padding-top: 4px;
  padding-bottom: 14px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #8c977e;
}

.order-table tr td {
  padding: 16px 0;
  color: var(--ink);
  font-size: 15px;
  vertical-align: middle;
}

.order-table #product-name {
  font-weight: 700;
  color: var(--ink);
  display: block;
}

.order-table #product-price,
.order-table #price-total {
  font-weight: 700;
}

.order-table tr.total-row {
  border-top: 1px solid #3c4832;
  border-bottom: 0;
}

.order-table tr.total-row td {
  padding-top: 20px;
  padding-bottom: 8px;
  font-size: 18px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--ink);
}

.order-table tr.total-row td.total-amount {
  font-size: 26px;
  color: var(--lime);
  font-weight: 800;
  letter-spacing: -0.02em;
}

/* Complete Checkout Submit Button */
.checkout-btn {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
  padding: 18px 24px;
  background: var(--lime);
  border: 1px solid var(--lime);
  color: #161910;
  font-family: var(--font, 'Inter Display', sans-serif);
  font-size: 15px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  line-height: 1.2;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition: border-color 0.25s, transform 0.2s;
  min-height: 56px;
  cursor: pointer;
  border-radius: 0;
}

.checkout-btn:before {
  content: "";
  position: absolute;
  inset: 0;
  background: #f2f5ed;
  z-index: -1;
  transform: translateY(105%);
  transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.checkout-btn:hover:before,
.checkout-btn:focus-visible:before {
  transform: translateY(0);
}

.checkout-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(195, 255, 0, 0.25);
}

.checkout-btn svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* ── Trust & Security Badges ─────────────────────────────── */
.checkout-trust-badges {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #252f1e;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.trust-badge-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #9ea892;
  font-size: 13px;
}

.trust-badge-item svg {
  width: 18px;
  height: 18px;
  color: var(--lime);
  flex-shrink: 0;
}

/* ── Responsive Styling ──────────────────────────────────── */
@media (max-width: 991px) {
  .checkout-hero {
    min-height: 260px;
    padding: 85px 0 50px;
  }
  .order-box {
    position: static;
    margin-top: 10px;
  }
}

@media (max-width: 767px) {
  .checkout-hero {
    min-height: 220px;
    padding: 70px 0 45px;
  }
  .checkout-section {
    padding: 45px 0 70px;
  }
  .checkout-box,
  .order-box {
    padding: 24px 20px;
  }
  .payment-methods-showcase {
    flex-direction: column;
    align-items: flex-start;
  }
}
