:root {
  --green: #1c9c4c;
  --green-dark: #147a3a;
  --dark: #16281f;
  --gray: #667a70;
  --bg: #f6faf7;
  --card-bg: #ffffff;
  --danger: #d64545;
  --radius: 14px;
  --shadow: 0 6px 20px rgba(20, 40, 30, 0.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--dark);
  line-height: 1.5;
}

.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header {
  background: #fff;
  border-bottom: 1px solid #e7efe9;
  position: sticky; top: 0; z-index: 10;
}
.header-inner {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 20px;
}
.logo { font-size: 1.4rem; font-weight: 700; }
.logo span { color: var(--green); }
nav a {
  margin-left: 24px; text-decoration: none; color: var(--dark); font-weight: 500;
}
nav a:hover { color: var(--green); }

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--green) 0%, var(--green-dark) 100%);
  color: #fff; padding: 60px 20px; text-align: center;
}
.hero h1 { font-size: 2.2rem; margin-bottom: 10px; }
.hero p { font-size: 1.05rem; opacity: 0.95; }

/* Section title */
.section-title {
  text-align: center; margin: 50px 0 30px; font-size: 1.6rem;
}

/* Product grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 24px;
  padding-bottom: 20px;
}
.product-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
  text-align: center;
  position: relative;
  transition: transform .15s ease;
}
.product-card:hover { transform: translateY(-4px); }
.product-badge {
  position: absolute; top: 14px; right: 14px;
  background: #ffe07a; color: #6b5300;
  font-size: .7rem; font-weight: 700;
  padding: 4px 10px; border-radius: 20px;
}
.product-img { font-size: 3rem; margin-bottom: 10px; }
.product-card h3 { font-size: 1.1rem; margin-bottom: 6px; }
.desc { color: var(--gray); font-size: .88rem; min-height: 40px; }
.price { font-weight: 700; font-size: 1.15rem; margin: 12px 0; color: var(--green-dark); }

.btn {
  background: var(--green);
  color: #fff; border: none;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 1rem; font-weight: 600;
  cursor: pointer; width: 100%;
  transition: background .15s ease;
}
.btn:hover { background: var(--green-dark); }
.btn:disabled { opacity: .6; cursor: not-allowed; }

/* How it works */
.how-it-works { padding: 20px 0 60px; }
.steps {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px,1fr));
  gap: 16px;
}
.step {
  background: #fff; border-radius: 12px; padding: 20px 14px;
  text-align: center; box-shadow: var(--shadow); font-size: .9rem;
}
.step span {
  display: block; width: 34px; height: 34px; line-height: 34px;
  border-radius: 50%; background: var(--green); color: #fff;
  font-weight: 700; margin: 0 auto 10px;
}

/* Footer */
.site-footer {
  background: var(--dark); color: #cfe3d5;
  text-align: center; padding: 24px 20px; font-size: .85rem; margin-top: 40px;
}

/* Modal */
.modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(10, 20, 15, 0.55);
  align-items: center; justify-content: center;
  z-index: 100; padding: 16px;
}
.modal-overlay.active { display: flex; }
.modal {
  background: #fff; border-radius: var(--radius);
  padding: 32px 28px; width: 100%; max-width: 380px;
  position: relative; text-align: center;
  box-shadow: 0 20px 50px rgba(0,0,0,0.25);
}
.modal-close {
  position: absolute; top: 14px; right: 16px;
  background: none; border: none; font-size: 1.4rem;
  cursor: pointer; color: var(--gray);
}
.modal h3 { margin-bottom: 6px; font-size: 1.3rem; }
.modal-product { color: var(--gray); font-size: .95rem; }
.modal-amount { font-size: 1.6rem; font-weight: 700; color: var(--green-dark); margin: 6px 0 20px; }

.modal label { display: block; text-align: left; font-size: .85rem; font-weight: 600; margin-bottom: 6px; }
.modal input[type="tel"] {
  width: 100%; padding: 12px 14px; border-radius: 10px;
  border: 1.5px solid #dbe6de; font-size: 1rem; margin-bottom: 4px;
}
.modal input[type="tel"]:focus { outline: none; border-color: var(--green); }
.input-hint { font-size: .78rem; color: var(--gray); text-align: left; margin-bottom: 18px; }
.error-msg { color: var(--danger); font-size: .85rem; margin-top: 10px; min-height: 18px; }

.hidden { display: none !important; }

.spinner {
  width: 46px; height: 46px; margin: 0 auto 20px;
  border: 4px solid #dbe6de; border-top-color: var(--green);
  border-radius: 50%; animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.result-icon {
  width: 60px; height: 60px; line-height: 60px;
  border-radius: 50%; font-size: 1.8rem; margin: 0 auto 16px;
  color: #fff;
}
.result-icon.success { background: var(--green); }
.result-icon.failed { background: var(--danger); }

#modalStepWaiting p, #modalStepSuccess p, #modalStepFailed p {
  color: var(--gray); font-size: .92rem; margin-bottom: 6px;
}
#retryBtn { margin-top: 16px; }
