/* Vaynhanh6 - HTML/CSS/JS thuần */
:root {
  --primary: #E7252B;
  --primary-hover: #c91f24;
  --accent: #DB036E;
  --text: #333;
  --text-muted: #999;
  --border: #ddd;
  --error: #c00;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
}

.wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
.header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 1rem 1.5rem;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-img {
  height: 36px;
  width: auto;
}

.logo-text {
  display: none;
}

.nav {
  display: flex;
  gap: 1.5rem;
}

.nav a {
  color: var(--text);
  text-decoration: none;
}

.nav a:hover {
  color: var(--primary);
}

.btn-cta, .btn-primary, .btn-secondary {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
}

.btn-cta, .btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-cta:hover, .btn-primary:hover {
  background: var(--primary-hover);
}

.btn-secondary {
  background: #f0f0f0;
  color: var(--text);
}

.btn-secondary:hover {
  background: #e0e0e0;
}

.btn-block {
  display: block;
  text-align: center;
  margin-bottom: 0.5rem;
}

/* Main */
.main {
  flex: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  width: 100%;
}

.hero {
  text-align: center;
  padding: 3rem 1rem;
}

.hero h1 {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
}

.hero p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.section {
  padding: 2rem 0;
  border-top: 1px solid var(--border);
}

.section h2 {
  font-size: 1.35rem;
  margin-bottom: 0.5rem;
}

.section-offers .offer-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.offer-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.offer-card:hover {
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(231, 37, 43, 0.15);
}

.offer-card img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  margin-bottom: 0.5rem;
}

.offer-card span {
  font-size: 0.9rem;
  text-align: center;
}

.process-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
  margin: 1rem 0;
}

.process-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 160px;
}

.process-step img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  margin-bottom: 0.5rem;
}

.process-step span {
  font-size: 0.9rem;
  text-align: center;
}

.footer-logo {
  max-height: 40px;
  margin-bottom: 0.5rem;
}

/* Form */
.form-section {
  max-width: 480px;
  margin: 0 auto;
}

.form-section h1 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}

.form .field {
  margin-bottom: 1rem;
}

.form label {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 500;
}

.required {
  color: var(--error);
}

.form input[type="text"],
.form input[type="tel"] {
  width: 100%;
  padding: 0.6rem 0.75rem;
  /* border: 1px solid var(--border); */
  border-radius: 6px;
  font-size: 1rem;
}

.form input:focus {
  outline: none;
  border-color: var(--primary);
}

.field-error {
  display: block;
  color: var(--error);
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

.consent-block {
  margin: 1.5rem 0;
  padding: 1rem;
  background: #f9f9f9;
  border-radius: 6px;
}

.consent-title {
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.consent-item {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  cursor: pointer;
}

.consent-item input {
  margin-right: 0.5rem;
}

.btn-submit {
  width: 100%;
  padding: 0.75rem;
  margin-top: 0.5rem;
}

.btn-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.form-message {
  margin-top: 1rem;
  font-size: 0.9rem;
}

.form-message.success { color: green; }
.form-message.error { color: var(--error); }

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal {
  display: none;
}

.modal[aria-hidden="false"],
.vay6-modal[aria-hidden="false"] {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}

.modal-box {
  position: relative;
  background: #fff;
  border-radius: 8px;
  padding: 1.5rem;
  max-width: 400px;
  width: 100%;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.modal-box h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
}

.modal-box p {
  margin-bottom: 1rem;
  color: var(--text-muted);
}

.modal-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

.modal-actions .btn-primary,
.modal-actions .btn-secondary {
  flex: 1;
}

#input-otp {
  width: 100%;
  padding: 0.6rem;
  font-size: 1.25rem;
  letter-spacing: 0.25em;
  text-align: center;
  border: 1px solid var(--border);
  border-radius: 6px;
  margin: 0.5rem 0;
}

.modal-options-qr {
  text-align: center;
  margin: 0.5rem 0;
}

.modal-options-qr img {
  max-width: 120px;
  height: auto;
}

.modal-store-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem;
  margin-bottom: 0.5rem;
  border-radius: 6px;
  background: var(--primary);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
}

.modal-store-link img {
  height: 28px;
  width: auto;
}

/* Footer */
.footer {
  padding: 1.5rem;
  text-align: center;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.9rem;
}
