/* ============================================================================
 * CRAZYSTORE THANK-YOU PAGE — v1.0.1
 * ============================================================================ */

:root {
  --ty-font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --ty-red: #ff0000;
  --ty-red-dark: #e60000;
  --ty-bg: #f2f2f2;
  --ty-card: #ffffff;
  --ty-border: #e8e8e8;
  --ty-text: #1a1a1a;
  --ty-muted: #6b7280;
}

/* === FULLSCREEN CLEANUP === */
.custom-thank-you-page #page,
.custom-thank-you-page header,
.custom-thank-you-page footer,
.custom-thank-you-page .site-header,
.custom-thank-you-page .site-footer,
.custom-thank-you-page .widget-area,
.custom-thank-you-page .sidebar {
  display: none !important;
}

body.custom-thank-you-page {
  background: var(--ty-bg);
  margin: 0;
  padding: 0;
  font-family: var(--ty-font);
}

#custom-checkout-wrapper-machi,
#custom-checkout-wrapper-machi * {
  font-family: var(--ty-font) !important;
  box-sizing: border-box;
}

/* === LOGO === */
.thkyou_checkout-logo {
  text-align: center;
  padding: 24px 0 12px;
}
.thkyou_checkout-logo img {
  height: 52px;
  max-width: 160px;
  width: auto;
}

/* === BREADCRUMB (replaces ▰▰▰ progress bar) === */
.thkyou_progress-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ty-muted);
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.thkyou_progress-step {
  font-weight: 500;
  color: #bbb;
}
.thkyou_progress-step.completed {
  color: var(--ty-muted);
}
.thkyou_progress-step.active {
  color: var(--ty-text);
  font-weight: 700;
}
.thkyou_progress-sep {
  color: #ccc;
  font-size: 15px;
}
.thkyou_progress-label { display: none; }

/* === CONTAINER === */
.thkyou_container {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 16px 48px;
}

/* === CARDS (shared) === */
.thkyou_card {
  background: var(--ty-card);
  border-radius: 14px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  margin-bottom: 16px;
  overflow: hidden;
}

/* === SUCCESS SECTION === */
.thkyou_success-section {
  background: var(--ty-card);
  border-radius: 14px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  text-align: center;
  margin-bottom: 16px;
  padding: 32px 28px 28px;
  position: relative;
  overflow: hidden;
}
.thkyou_success-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, #ff0000, #ff6b6b);
}

.thkyou_success-icon {
  width: 64px;
  height: 64px;
  background: #16a34a;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  animation: ty-checkmark 0.5s ease-out;
}
.thkyou_success-icon::after {
  content: '✓';
  color: #fff;
  font-size: 32px;
  font-weight: 700;
  line-height: 1;
}

.thkyou_success-title {
  font-size: 26px;
  font-weight: 700;
  color: var(--ty-text);
  margin: 0 0 6px;
  letter-spacing: -0.02em;
}
.thkyou_success-subtitle {
  font-size: 15px;
  color: var(--ty-muted);
  margin: 0 0 14px;
  font-weight: 500;
}
.thkyou_success-message {
  font-size: 14px;
  color: #555;
  line-height: 1.6;
  max-width: 480px;
  margin: 0 auto;
}

/* === ORDER SUMMARY (injected by thank-you.js) === */
.thkyou_dynamic-order-summary {
  background: var(--ty-card);
  border-radius: 14px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  margin-bottom: 16px;
  overflow: hidden;
  position: relative;
}
.thkyou_dynamic-order-summary::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, #ff0000, #ff6b6b);
}

/* Order ID badge */
.thkyou_order-id-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--ty-border);
}
.thkyou_order-id-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--ty-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.thkyou_order-id-value {
  font-size: 13px;
  font-weight: 700;
  color: var(--ty-text);
  background: #f5f5f5;
  border: 1px solid var(--ty-border);
  border-radius: 6px;
  padding: 3px 10px;
  letter-spacing: 0.5px;
}

/* Section headings inside summary */
.thkyou_dynamic-order-summary h3 {
  font-size: 13px;
  font-weight: 700;
  color: var(--ty-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin: 0;
  padding: 14px 20px 10px;
  border-bottom: 1px solid #f0f0f0;
}

/* Products container */
.thkyou_products-container {
  padding: 8px 16px 4px;
}

/* Individual product card */
.thkyou_product-item {
  padding: 12px 4px;
  border-bottom: 1px solid #f5f5f5;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 12px;
  align-items: start;
}
.thkyou_product-item:last-child { border-bottom: none; }

.thkyou_product-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--ty-text);
  line-height: 1.35;
  grid-column: 1 / -1;
}
.thkyou_product-code {
  font-size: 11px;
  color: #aaa;
  font-weight: 500;
  letter-spacing: 0.3px;
  grid-column: 1 / -1;
  margin-top: 2px;
}
.thkyou_product-details {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: #555;
  margin-top: 4px;
  grid-column: 1 / -1;
}
.thkyou_product-details div { line-height: 1.4; }

/* Delivery info */
.thkyou_delivery-info {
  padding: 12px 20px 14px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.thkyou_info-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 14px;
  gap: 12px;
}
.thkyou_info-label {
  color: var(--ty-muted);
  font-size: 13px;
  white-space: nowrap;
  flex-shrink: 0;
}
.thkyou_info-value {
  color: var(--ty-text);
  font-weight: 500;
  text-align: right;
}

/* Total row — dark gradient banner */
.thkyou_total-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, #1a1a1a 0%, #7f1d1d 100%);
  padding: 14px 20px;
  margin-top: 0;
}
.thkyou_total-label {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.75);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.thkyou_total-value {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.3px;
}

/* USDT breakdown */
.thkyou_payment-breakdown {
  padding: 12px 20px;
  background: #f8faff;
  border-top: 1px solid #e3e8ff;
}
.thkyou_payment-breakdown p {
  margin: 0;
  font-size: 13px;
  color: #3b5bdb;
  line-height: 1.6;
}

/* === SOFT REGISTER (unchanged) === */
.thkyou_soft-register {
  background: linear-gradient(135deg, #fafafa 0%, #f3f4f6 100%);
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 28px 24px;
  margin-bottom: 16px;
  text-align: center;
}
.thkyou_soft-register[hidden] { display: none; }
.thkyou_soft-register-icon { font-size: 36px; margin-bottom: 8px; }
.thkyou_soft-register h3 {
  font-size: 20px; font-weight: 600; color: #1a1a1a;
  margin: 0 0 8px; letter-spacing: -0.01em;
}
.thkyou_soft-register p {
  font-size: 14px; color: #4b5563; line-height: 1.5; margin: 0 0 16px;
}
.thkyou_soft-register-field {
  text-align: left; max-width: 360px; margin: 0 auto 12px;
}
.thkyou_soft-register-field label {
  display: block; font-size: 13px; font-weight: 500; color: #333; margin-bottom: 6px;
}
.thkyou_soft-register-field input[type="password"] {
  width: 100%; padding: 11px 14px; border: 1px solid #ddd; border-radius: 8px;
  font-size: 14px; background: #fff; transition: border-color 0.15s, box-shadow 0.15s;
}
.thkyou_soft-register-field input[type="password"]:focus {
  outline: none; border-color: #111; box-shadow: 0 0 0 3px rgba(0,0,0,0.06);
}
.thkyou_soft-register-error { color: #e11; font-size: 12px; margin-top: 6px; min-height: 1em; }
.thkyou_soft-register-btn { max-width: 360px; width: 100%; margin: 0 auto; }
.thkyou_soft-register-skip { margin-top: 10px !important; font-size: 13px !important; }
.thkyou_soft-register-skip a { color: #6b7280; text-decoration: underline; }
.thkyou_soft-register-skip a:hover { color: #111; }
.thkyou_soft-register-success { padding: 16px 8px; }
.thkyou_soft-register-success[hidden] { display: none; }
.thkyou_soft-register-success-icon {
  width: 48px; height: 48px; border-radius: 50%; background: #16a34a;
  color: #fff; font-size: 26px; line-height: 48px; margin: 0 auto 10px; font-weight: 700;
}
.thkyou_soft-register-success p { color: #15803d; margin: 0; }

/* === NEXT STEPS === */
.thkyou_next-steps {
  background: var(--ty-card);
  border-radius: 14px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  padding: 24px 24px 20px;
  margin-bottom: 16px;
}
.thkyou_next-steps h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--ty-text);
  margin: 0 0 18px;
  letter-spacing: -0.01em;
}

.thkyou_steps-list {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  counter-reset: step-counter;
}
.thkyou_steps-list li {
  counter-increment: step-counter;
  padding: 0 0 14px 40px;
  position: relative;
  font-size: 14px;
  line-height: 1.5;
  color: #444;
}
.thkyou_steps-list li:last-child { padding-bottom: 0; }
.thkyou_steps-list li::before {
  content: counter(step-counter);
  position: absolute;
  left: 0; top: 0;
  background: var(--ty-red);
  color: #fff;
  width: 24px; height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
}

/* === BUTTONS === */
.thkyou_action-buttons {
  display: flex;
  justify-content: center;
  margin-top: 4px;
}
.thkyou_btn {
  display: block;
  width: 100%;
  padding: 14px 24px;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}
.thkyou_btn-primary {
  background: var(--ty-red);
  color: #fff;
}
.thkyou_btn-primary:hover {
  background: var(--ty-red-dark);
  transform: translateY(-1px);
}
.thkyou_btn-secondary {
  background: transparent;
  color: var(--ty-red);
  border: 2px solid var(--ty-red);
}
.thkyou_btn-secondary:hover {
  background: var(--ty-red);
  color: #fff;
}

/* === CONTACT SECTION === */
.thkyou_contact-section {
  background: var(--ty-card);
  border-radius: 14px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  padding: 20px 24px;
  text-align: center;
}
.thkyou_contact-section h4 {
  font-size: 15px;
  font-weight: 700;
  color: var(--ty-text);
  margin: 0 0 14px;
}
.thkyou_contact-info {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.thkyou_contact-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: #555;
}
.whatsapp-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #16a34a;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  transition: color 0.2s;
}
.whatsapp-link:hover { color: #15803d; text-decoration: underline; }

/* === ANIMATIONS === */
@keyframes ty-checkmark {
  0%   { transform: scale(0); opacity: 0; }
  60%  { transform: scale(1.15); }
  100% { transform: scale(1); opacity: 1; }
}

.thkyou_container > * {
  animation: ty-fadeup 0.5s ease-out both;
  opacity: 0;
}
.thkyou_container > *:nth-child(1) { animation-delay: 0.05s; }
.thkyou_container > *:nth-child(2) { animation-delay: 0.12s; }
.thkyou_container > *:nth-child(3) { animation-delay: 0.19s; }
.thkyou_container > *:nth-child(4) { animation-delay: 0.26s; }
.thkyou_container > *:nth-child(5) { animation-delay: 0.33s; }

@keyframes ty-fadeup {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* === RESPONSIVE === */
@media (max-width: 640px) {
  .thkyou_container { padding: 0 12px 40px; }
  .thkyou_success-section { padding: 24px 18px 20px; }
  .thkyou_success-title { font-size: 22px; }
  .thkyou_next-steps { padding: 20px 18px 16px; }
  .thkyou_contact-info { flex-direction: column; gap: 12px; }
  .thkyou_product-details { flex-wrap: wrap; gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .thkyou_container > *, .thkyou_success-icon { animation: none; opacity: 1; transform: none; }
}
