/* ==============================
   ORDER PAGE
============================== */

html,
body,
.order-page body,
body.order-page {
  background: #f5f4f0 !important;
  background-color: #f5f4f0 !important;
}

/* Fullpage wrapper beats any Square SDK body overrides */
#page-bg {
  min-height: 100vh;
  background: #f5f4f0;
  position: relative;
  z-index: 0;
}

/* Generic hidden utility — must be after all other display rules */
.hidden {
  display: none !important;
}

.order-main {
  max-width: 760px;
  margin: 0 auto;
  padding: 8rem 2rem 6rem;
}

.order-header {
  margin-bottom: 3.5rem;
}

.order-title {
  font-size: clamp(3rem, 6vw, 5.5rem);
  margin: 1rem 0 1.2rem;
}

.order-subtitle {
  color: var(--grey-mid);
  max-width: 520px;
  font-size: 0.95rem;
  line-height: 1.8;
}

/* ── Toggle ───────────────────────────────────────── */

.order-toggle {
  display: flex;
  gap: 0;
  margin-bottom: 3rem;
  border: 1px solid var(--black);
  width: fit-content;
}

.toggle-btn {
  padding: 0.75rem 2.2rem;
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  background: transparent;
  color: var(--grey-mid);
  border: none;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}

.toggle-btn.active {
  background: var(--black);
  color: var(--white);
}

/* ── Form Wrap ────────────────────────────────────── */

.order-form-wrap {
  transition: opacity 0.3s ease;
}

.order-form-wrap.hidden {
  display: none;
}

/* ── Form Sections ────────────────────────────────── */

.form-section {
  margin-bottom: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--grey-light);
}

.form-section:last-child {
  border-bottom: none;
}

.form-section-label {
  display: block;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--grey-mid);
  margin-bottom: 1.5rem;
}

.form-row {
  margin-bottom: 1.25rem;
}

.form-row.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

label {
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--grey-dark);
}

.optional {
  text-transform: none;
  letter-spacing: 0;
  color: var(--grey-mid);
  font-size: 0.7rem;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid var(--grey-light);
  background: var(--white);
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 300;
  color: var(--black);
  outline: none;
  transition: border-color var(--transition);
  border-radius: 0;
  -webkit-appearance: none;
}

input:focus,
textarea:focus {
  border-color: var(--black);
}

input::placeholder,
textarea::placeholder {
  color: #bbb;
}

textarea {
  resize: vertical;
  min-height: 90px;
}

/* ── Product Picker ───────────────────────────────── */

.product-picker {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.product-option {
  cursor: pointer;
}

.product-option input[type="radio"] {
  display: none;
}

.product-option-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem 1.4rem;
  border: 1px solid var(--grey-light);
  transition: border-color var(--transition), background var(--transition);
}

.product-option input:checked + .product-option-inner {
  border-color: var(--black);
  background: #f8f7f3;
}

.product-option-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.product-option-info strong {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 400;
}

.product-option-info span {
  font-size: 0.75rem;
  color: var(--grey-mid);
  letter-spacing: 0.04em;
}

.product-option-price {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 300;
}

/* ── Qty + Total ──────────────────────────────────── */

.qty-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
}

.qty-group {
  flex-shrink: 0;
}

.qty-control {
  display: flex;
  align-items: center;
  border: 1px solid var(--grey-light);
  width: fit-content;
}

.qty-control button {
  width: 42px;
  height: 42px;
  background: transparent;
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  color: var(--black);
  transition: background var(--transition);
  font-family: var(--sans);
}

.qty-control button:hover {
  background: var(--grey-light);
}

.qty-control input {
  width: 52px;
  height: 42px;
  text-align: center;
  border: none;
  border-left: 1px solid var(--grey-light);
  border-right: 1px solid var(--grey-light);
  padding: 0;
  font-size: 0.95rem;
}

.order-total {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.3rem;
}

.total-label {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--grey-mid);
}

.total-amount {
  font-family: var(--serif);
  font-size: 2.2rem;
  font-weight: 300;
  line-height: 1;
}

/* ── Loop reminder (commercial) ───────────────────── */

.commercial-loop {
  border-bottom: none !important;
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}

.loop-reminder {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.2rem 1.4rem;
  border: 1px solid var(--grey-light);
  background: #f8f7f3;
}

.loop-reminder p {
  font-size: 0.85rem;
  color: var(--grey-dark);
  line-height: 1.7;
}

/* ── Submit ───────────────────────────────────────── */

.form-submit {
  padding-top: 2.5rem;
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

.form-note {
  font-size: 0.78rem;
  color: var(--grey-mid);
  line-height: 1.7;
  max-width: 340px;
}

.btn-order {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2.4rem;
  background: var(--black);
  color: var(--white);
  border: 1px solid var(--black);
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--transition), color var(--transition);
  flex-shrink: 0;
}

.btn-order:hover {
  background: transparent;
  color: var(--black);
}

.btn-order:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ── Toast ────────────────────────────────────────── */

.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #c0392b;
  color: white;
  padding: 0.8rem 1.6rem;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
  max-width: 400px;
  text-align: center;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── Card section ─────────────────────────────────── */

.card-section {
  margin-top: 2.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--grey-light);
}

#card-container {
  margin-bottom: 2rem;
}

.card-total {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem 0;
  border-top: 1px solid var(--grey-light);
  border-bottom: 1px solid var(--grey-light);
  margin-bottom: 2rem;
}

/* ── Inline success ────────────────────────────────── */

.order-success {
  padding: 6rem 0;
  text-align: center;
}

.order-success .success-icon {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
}

.order-success h2 {
  margin: 0.75rem 0 1.5rem;
}

.order-success p {
  color: var(--grey-mid);
  max-width: 460px;
  margin: 0 auto;
  line-height: 1.9;
}

/* ── Success page ─────────────────────────────────── */

.success-main {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 4rem 2rem;
}

.success-block {
  text-align: center;
  max-width: 480px;
}

.success-icon {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  color: var(--black);
}

.success-block h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  margin: 0.5rem 0 1.5rem;
}

.success-block p {
  color: var(--grey-mid);
  line-height: 1.9;
}

/* ── Responsive ───────────────────────────────────── */

@media (max-width: 600px) {
  .form-row.two-col {
    grid-template-columns: 1fr;
  }

  .form-submit {
    flex-direction: column;
    align-items: flex-start;
  }

  .qty-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .order-total {
    align-items: flex-start;
  }
}
