/* ===== RESET & BASE ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 14px; line-height: 1.5; -webkit-tap-highlight-color: transparent; scroll-behavior: smooth; scroll-padding-top: 55px; overflow-x: hidden; }
body {
  font-family: 'Be Vietnam Pro', 'Roboto', sans-serif;
  background: #f4f7f4;
  color: #222;
  max-width: 420px;
  margin: 0 auto;
  box-shadow: 0 0 20px rgba(0,0,0,0.08);
  position: relative;
  background-color: #fff;
}
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
button, input, select, textarea { font-family: inherit; font-size: inherit; }

/* ===== TOP NAV BAR ===== */
.top-nav {
  display: flex;
  gap: 6px;
  padding: 6px 8px;
  background: #f0f7f0;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid #e2ece2;
}
.top-nav a {
  flex: 1;
  text-align: center;
  padding: 9px 2px;
  background: linear-gradient(135deg, #2e7d32, #1b5e20);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  border-radius: 6px;
  box-shadow: 0 3px 6px rgba(0,0,0,0.15);
  transition: transform 0.15s, box-shadow 0.15s;
}
.top-nav a:active {
  transform: translateY(2px);
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.top-nav a#nav-order {
  background: linear-gradient(135deg, #d81b60, #ad1457); /* Nổi bật nút đặt hàng */
}

/* ===== PRODUCT TITLE ===== */
.product-title-bar {
  background: #fff;
  padding: 12px 14px 8px;
  text-align: center;
  border-bottom: 1px solid #f5f5f5;
}
.product-title-bar h1 {
  font-size: 21px;
  font-weight: 800;
  color: #4a148c; /* Màu tím của cải tím */
  line-height: 1.3;
  text-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.product-subtitle {
  font-size: 13px;
  font-weight: 700;
  color: #2e7d32; /* Màu xanh lá cây */
  margin-top: 3px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ===== GALLERY ===== */
.gallery-section {
  background: #fff;
  padding-bottom: 10px;
}
.gallery-main {
  width: 100%;
  aspect-ratio: 1 / 0.85;
  position: relative;
  overflow: hidden;
}
.gallery-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.gallery-track img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  flex-shrink: 0;
}
.gallery-badge {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #e91e63, #8e24aa);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  padding: 6px 16px;
  border-radius: 50px;
  z-index: 10;
  box-shadow: 0 3px 10px rgba(0,0,0,0.25);
  white-space: nowrap;
  letter-spacing: 0.5px;
  animation: badgePulse 2s ease-in-out infinite;
}
.gallery-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 8px 0;
}
.gallery-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #e0e0e0;
  cursor: pointer;
  transition: all 0.3s;
}
.gallery-dots span.active {
  background: #8e24aa;
  width: 20px;
  border-radius: 4px;
}
.gallery-thumbs {
  display: flex;
  gap: 8px;
  padding: 4px 10px 8px;
  overflow-x: auto;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}
.gallery-thumbs::-webkit-scrollbar { display: none; }
.gallery-thumbs img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 6px;
  border: 2px solid transparent;
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color 0.2s;
}
.gallery-thumbs img.active {
  border-color: #8e24aa;
}
.rating-bar {
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 700;
  color: #e65100;
  background: #fffdf7;
  border-top: 1px solid #fff3e0;
  border-bottom: 1px solid #fff3e0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Benefits */
.benefits {
  background: #fff;
  padding: 8px 14px 14px;
}
.benefit-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 0;
  font-size: 13.5px;
  font-weight: 600;
  color: #333;
  line-height: 1.4;
}
.benefit-row::before {
  content: '✓';
  color: #fff;
  background: #2e7d32;
  font-size: 10px;
  font-weight: 900;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

/* ===== PRICE + ORDER FORM ===== */
.order-section {
  background: linear-gradient(180deg, #f3e5f5, #efebe9);
  padding: 16px 12px 20px;
  border-bottom: 1px solid #e0d8e2;
}
.price-header {
  font-size: 18px;
  font-weight: 800;
  text-transform: uppercase;
  color: #4a148c;
  margin-bottom: 6px;
  text-align: center;
}
.price-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 10px;
}
.price-current {
  font-size: 14px;
  font-weight: 700;
  color: #555;
}

/* Countdown */
.countdown-bar {
  background: linear-gradient(90deg, #311b92, #1a0c41);
  color: #fff;
  text-align: center;
  padding: 10px;
  font-size: 13px;
  font-weight: 700;
  border-radius: 8px;
  margin: 0 4px 14px;
  box-shadow: 0 4px 10px rgba(49, 27, 146, 0.2);
}
.countdown-bar span {
  display: inline-block;
  background: #d81b60;
  padding: 3px 6px;
  border-radius: 4px;
  min-width: 28px;
  margin: 0 2px;
  font-size: 14px;
  font-family: monospace;
}

/* Combo selection */
.combo-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}
.combo-option {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  padding: 10px 12px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}
.combo-option.selected {
  border-color: #8e24aa;
  background: #fdfafc;
  box-shadow: 0 3px 10px rgba(142, 36, 170, 0.1);
}
.combo-option input { display: none; }
.combo-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid #ccc;
  flex-shrink: 0;
  position: relative;
  transition: border-color 0.2s;
}
.combo-option.selected .combo-dot {
  border-color: #8e24aa;
}
.combo-option.selected .combo-dot::after {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 10px; height: 10px;
  background: #8e24aa;
  border-radius: 50%;
}
.combo-text {
  flex: 1;
  font-size: 13px;
  font-weight: 600;
  color: #444;
  line-height: 1.4;
}
.combo-text strong { color: #111; font-size: 14px; }
.combo-price {
  font-weight: 800;
  font-size: 16px;
  color: #d81b60;
}
.combo-tag {
  position: absolute;
  top: -8px;
  right: 10px;
  background: linear-gradient(135deg, #8e24aa, #ab47bc);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
}
.combo-tag.best {
  background: linear-gradient(135deg, #d81b60, #ff2a70);
}

/* Form inputs */
.form-input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 15px;
  margin-bottom: 8px;
  background: #fff;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-input:focus {
  border-color: #8e24aa;
  box-shadow: 0 0 0 3px rgba(142, 36, 170, 0.1);
}
.form-input::placeholder { color: #999; }
textarea.form-input {
  resize: vertical;
  min-height: 50px;
}

.btn-order {
  display: block;
  width: 100%;
  padding: 14px;
  background: linear-gradient(180deg, #d81b60, #ad1457);
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  text-align: center;
  box-shadow: 0 4px 15px rgba(216, 27, 96, 0.35);
  transition: transform 0.15s, box-shadow 0.15s;
  margin-top: 6px;
  animation: btnPulse 1.5s ease-in-out infinite;
  letter-spacing: 0.5px;
}
.btn-order:active {
  transform: translateY(3px);
  box-shadow: 0 2px 6px rgba(216, 27, 96, 0.25);
}
.order-note {
  text-align: center;
  font-size: 12px;
  color: #666;
  margin-top: 10px;
  line-height: 1.5;
}
.buyer-count {
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: #d81b60;
  margin-top: 8px;
  background: rgba(216, 27, 96, 0.05);
  padding: 4px;
  border-radius: 4px;
}

/* ===== GROW GUIDE ===== */
.grow-guide {
  background: #fff;
  padding: 16px 12px 20px;
}
.grow-steps {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.grow-step {
  background: #f9fbf9;
  border: 1px solid #e8ede8;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.grow-step img {
  width: 100%;
  height: 120px;
  object-fit: cover;
}
.grow-step-info {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 6px;
}
.step-num {
  width: 24px;
  height: 24px;
  background: #2e7d32;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 12px;
  flex-shrink: 0;
}
.grow-step-info div {
  min-width: 0;
}
.grow-step-info strong {
  font-size: 12.5px;
  color: #222;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.grow-step-info p {
  font-size: 10.5px;
  color: #666;
  margin: 0;
  line-height: 1.3;
}

/* ===== REVIEWS ===== */
.reviews-section {
  background: #fff;
  padding: 16px 12px;
}
.section-title {
  font-size: 17px;
  font-weight: 800;
  color: #2e7d32;
  margin-bottom: 12px;
  text-transform: uppercase;
  border-left: 4px solid #8e24aa;
  padding-left: 8px;
}
.review-item {
  display: flex;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
}
.review-item:last-child { border-bottom: none; }
.review-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid #e0e0e0;
}
.review-body { flex: 1; min-width: 0; }
.review-name {
  font-weight: 700;
  font-size: 13.5px;
  color: #1565c0;
}
.review-text {
  font-size: 13px;
  color: #333;
  margin-top: 3px;
  line-height: 1.4;
}
.review-meta {
  font-size: 11px;
  color: #888;
  margin-top: 4px;
  display: flex;
  gap: 8px;
  align-items: center;
}
.review-photo {
  margin-top: 6px;
  border-radius: 6px;
  overflow: hidden;
  max-width: 140px;
  border: 1px solid #eee;
}
.review-photo img {
  width: 100%;
  max-height: 140px;
  object-fit: cover;
}
.stars { color: #f57f17; font-size: 12px; }

/* ===== POLICY ===== */
.policy-section {
  background: #f9fbf9;
  padding: 16px 12px;
  border-top: 1px solid #e8ede8;
}
.policy-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 6px 0;
  font-size: 13px;
  color: #444;
}
.policy-item .ico {
  font-size: 14px;
  flex-shrink: 0;
  margin-top: 1px;
}

/* ===== FOOTER ===== */
.footer {
  background: #1b301b;
  color: #b2cbb2;
  padding: 20px 12px 80px;
  text-align: center;
  font-size: 12px;
  line-height: 1.6;
}
.footer a {
  color: #80cbc4;
  font-weight: 600;
}
.footer p {
  margin-top: 4px;
}

/* ===== FIXED BOTTOM CTA ===== */
.fixed-cta {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 420px;
  display: flex;
  align-items: center;
  background: #fff;
  box-shadow: 0 -3px 10px rgba(0,0,0,0.1);
  z-index: 200;
  padding: 8px 12px;
  gap: 10px;
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.fixed-cta-price {
  font-size: 12px;
  font-weight: 700;
  color: #d81b60;
  white-space: nowrap;
  line-height: 1.2;
}
.fixed-cta-price strong {
  display: block;
  font-size: 15px;
}
.fixed-cta-btn {
  flex: 1;
  padding: 11px;
  background: linear-gradient(180deg, #d81b60, #ad1457);
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  text-align: center;
  box-shadow: 0 3px 8px rgba(216,27,96,0.3);
}

/* ===== THANK YOU OVERLAY ===== */
.thankyou-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.6);
  z-index: 9999;
  justify-content: center;
  align-items: center;
  padding: 16px;
  backdrop-filter: blur(4px);
}
.thankyou-overlay.active { display: flex; }
.thankyou-card {
  background: #fff;
  border-radius: 16px;
  padding: 24px 16px;
  max-width: 380px;
  width: 100%;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
  animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow-y: auto;
  max-height: 90vh;
}
.thankyou-icon {
  width: 54px; height: 54px;
  background: #4caf50;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
}
.thankyou-icon svg { width: 28px; height: 28px; }
.thankyou-card h2 { font-size: 19px; color: #2e7d32; margin-bottom: 6px; font-weight: 800; }
.thankyou-card p { font-size: 13.5px; color: #555; margin-bottom: 6px; line-height: 1.4; }
.thankyou-info {
  background: #f1f8e9;
  border: 1px solid #dcedc8;
  border-radius: 8px;
  padding: 10px 12px;
  margin: 10px 0;
  text-align: left;
  font-size: 12.5px;
}
.thankyou-info .row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
}
.thankyou-info .row + .row {
  border-top: 1px dashed #dcedc8;
}
.thankyou-info .label { color: #777; }
.thankyou-info .value { font-weight: 700; color: #333; }
.thankyou-close {
  display: inline-block;
  margin-top: 12px;
  padding: 10px 24px;
  background: #8e24aa;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  font-size: 14px;
  width: 100%;
}
.thankyou-warning {
  background: #fff8e1;
  border: 1px solid #ffe082;
  border-radius: 6px;
  padding: 8px;
  font-size: 11.5px;
  color: #b7791f;
  margin-top: 8px;
  text-align: left;
  line-height: 1.4;
}

/* ===== TOAST ===== */
.toast {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%) translateY(-100px);
  background: #fff;
  border: 1px solid #4caf50;
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  z-index: 10000;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  max-width: 340px;
  width: calc(100% - 32px);
  text-align: center;
}
.toast.error { border-color: #f44336; color: #c62828; background: #ffebee; }
.toast.success { color: #2e7d32; background: #e8f5e9; }
.toast.show { transform: translateX(-50%) translateY(0); }

/* ===== SEPARATOR ===== */
.sep {
  height: 8px;
  background: #efebe9;
  border-top: 1px solid #e0d8d5;
  border-bottom: 1px solid #e0d8d5;
}

/* ===== ANIMATIONS ===== */
@keyframes popIn {
  from { transform: scale(0.85); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
@keyframes badgePulse {
  0%, 100% { transform: translateX(-50%) scale(1); }
  50% { transform: translateX(-50%) scale(1.06); }
}
@keyframes btnPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 4px 12px rgba(216, 27, 96, 0.35); }
  50% { transform: scale(1.04); box-shadow: 0 6px 20px rgba(216, 27, 96, 0.5); }
}
