:root {
  --primary-color: #0eda52; /* Bright WhatsApp Green */
  --primary-hover: #0bbd45;
  --accent-color: #ff3b30; /* Highlight red */
  --bg-dark: #121212;
  --bg-card: #1e1e1e;
  --text-light: #f5f5f7;
  --text-dark: #333333;
  --text-muted: #888888;
  --border-color: #333333;
  --gold-color: #ffd700;
  
  --font-family: 'Poppins', sans-serif;
  --max-width: 480px; /* Keep mobile aspect ratio on desktop */
}

/* Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  background-color: #1a1a1a;
  color: var(--text-light);
  line-height: 1.5;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
}

/* Page container (constrains to mobile aspect ratio on larger screens) */
.page-container {
  width: 100%;
  max-width: var(--max-width);
  background-color: var(--bg-dark);
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  position: relative;
  padding-bottom: 90px; /* space for floating button */
}

/* Media Section for responsive images and gifs */
.media-section {
  width: 100%;
  overflow: hidden;
  display: flex;
}

.promo-media {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

/* CTA Buttons layout */
.cta-container {
  width: 100%;
  padding: 20px 15px;
  background-color: #0b0b0b;
  display: flex;
  justify-content: center;
}

.cta-buy-btn {
  width: 100%;
  background-color: var(--primary-color);
  color: #ffffff;
  border: 5px solid #000000;
  border-radius: 30px;
  padding: 14px 20px;
  font-family: var(--font-family);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(14, 218, 82, 0.4);
  animation: buttonShake 3s infinite ease-in-out;
  transition: transform 0.2s, background-color 0.2s;
}

.cta-buy-btn:hover {
  background-color: var(--primary-hover);
  transform: scale(1.02);
}

.cta-buy-btn:active {
  transform: scale(0.98);
}

.cta-buy-btn .btn-title {
  font-size: 1.15rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.cta-buy-btn .btn-subtitle {
  font-size: 0.8rem;
  font-weight: 400;
  opacity: 0.9;
  margin-top: 2px;
}

/* Floating WhatsApp Button */
.whatsapp-floating-btn {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 420px;
  background-color: #25d366; /* Official WhatsApp green */
  color: white;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 25px;
  border-radius: 50px;
  box-shadow: 0 8px 25px rgba(37, 211, 102, 0.5);
  z-index: 999;
  border: 2px solid rgba(255,255,255,0.2);
  transition: background-color 0.3s, bottom 0.3s;
}

.whatsapp-floating-btn:hover {
  background-color: #20ba5a;
}

.whatsapp-floating-btn svg {
  width: 22px;
  height: 22px;
}

/* Modal Overlay styling */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(5px);
  z-index: 1000;
  display: none; /* Controlled by JS */
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  display: flex;
  opacity: 1;
}

.modal-content {
  background-color: #ffffff;
  color: var(--text-dark);
  width: 95%;
  max-width: 450px;
  max-height: 90vh;
  border-radius: 16px;
  overflow-y: auto;
  position: relative;
  padding: 24px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  animation: slideIn 0.3s ease-out;
}

.modal-close-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  font-size: 1.8rem;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
}

.modal-close-btn:hover {
  color: var(--text-dark);
}

.modal-header {
  text-align: center;
  margin-bottom: 20px;
  padding-right: 20px;
  padding-left: 20px;
}

.modal-header h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.modal-header p {
  font-size: 0.85rem;
  color: #555555;
  line-height: 1.4;
}

/* Package Options */
.packages-section {
  margin-bottom: 20px;
}

.packages-section h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: #111;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.package-option {
  display: flex;
  align-items: center;
  border: 2px solid #e1e1e1;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.2s;
  background-color: #fafafa;
}

.package-option:hover {
  border-color: #b5b5b5;
  background-color: #f5f5f5;
}

.package-option.selected {
  border-color: #25d366;
  background-color: rgba(37, 211, 102, 0.05);
}

.package-radio-wrapper {
  margin-right: 12px;
  display: flex;
  align-items: center;
}

.package-radio-wrapper input[type="radio"] {
  width: 18px;
  height: 18px;
  accent-color: #25d366;
}

.package-details {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.package-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #111111;
}

.package-tag {
  font-size: 0.75rem;
  font-weight: 600;
  color: #ffffff;
  background-color: var(--accent-color);
  padding: 2px 6px;
  border-radius: 4px;
  align-self: flex-start;
  margin-top: 4px;
}

.package-tag.discount {
  background-color: #3b82f6;
}

.package-tag.best {
  background-color: #eab308;
}

.package-price {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  min-width: 80px;
}

.package-price .old-price {
  font-size: 0.75rem;
  text-decoration: line-through;
  color: var(--text-muted);
}

.package-price .price-value {
  font-size: 1rem;
  font-weight: 700;
  color: #111;
}

/* Order Summary */
.order-summary {
  background-color: #f5f5f7;
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 20px;
}

.summary-line {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: #666;
  margin-bottom: 6px;
}

.summary-line.total {
  border-top: 1px solid #ddd;
  padding-top: 8px;
  font-weight: 700;
  color: #111;
  font-size: 1rem;
  margin-bottom: 0;
}

.free-text {
  color: var(--primary-hover);
  font-weight: 600;
}

/* Shipping Method Selection layout */
.shipping-method {
  margin-bottom: 20px;
}

.shipping-method h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: #111;
}

.shipping-method-option {
  display: flex;
  align-items: center;
  background-color: #fafafa;
  border: 1px solid #e1e1e1;
  border-radius: 8px;
  padding: 12px;
  font-size: 0.85rem;
  cursor: not-allowed;
}

.shipping-method-option input {
  margin-right: 10px;
  accent-color: #25d366;
}

.method-name {
  flex-grow: 1;
  font-weight: 600;
  color: #111;
}

.method-price {
  font-weight: 700;
  color: var(--primary-hover);
}

/* Form Fields */
.form-fields-section {
  margin-bottom: 20px;
}

.form-fields-section h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 15px;
  color: #111;
  border-bottom: 1px solid #eee;
  padding-bottom: 8px;
}

.form-group {
  margin-bottom: 15px;
  display: flex;
  flex-direction: column;
}

.form-row {
  display: flex;
  gap: 12px;
}

.form-row .form-group {
  flex: 1;
  min-width: 0;
}

.form-group label {
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: #444;
}

.form-group input, .form-group select {
  height: 44px;
  padding: 0 12px;
  border: 1px solid #cccccc;
  border-radius: 8px;
  font-family: var(--font-family);
  font-size: 0.85rem;
  color: var(--text-dark);
  outline: none;
  transition: border-color 0.2s;
  background-color: #ffffff;
}

.form-group input:focus, .form-group select:focus {
  border-color: #25d366;
}

.form-group input.invalid, .form-group select.invalid {
  border-color: var(--accent-color);
  background-color: rgba(255, 59, 48, 0.02);
}

.error-msg {
  font-size: 0.75rem;
  color: var(--accent-color);
  margin-top: 4px;
  display: none;
}

.form-group input.invalid ~ .error-msg, .form-group select.invalid ~ .error-msg {
  display: block;
}

/* Upsells section */
.upsells-section {
  margin-bottom: 25px;
  background-color: #fafafa;
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 16px;
}

.upsells-section h3 {
  font-size: 0.9rem;
  font-weight: 700;
  color: #111;
  margin-bottom: 12px;
}

.upsell-option {
  display: flex;
  align-items: flex-start;
  margin-bottom: 14px;
  cursor: pointer;
}

.upsell-option:last-child {
  margin-bottom: 0;
}

.upsell-checkbox-wrapper {
  margin-right: 12px;
  margin-top: 3px;
  display: flex;
  align-items: center;
}

.upsell-checkbox-wrapper input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #25d366;
}

.upsell-info {
  display: flex;
  flex-direction: column;
}

.upsell-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #111111;
  line-height: 1.3;
}

.upsell-desc {
  font-size: 0.75rem;
  color: #666666;
  margin-top: 2px;
}

/* Submit order button inside modal */
.submit-section {
  text-align: center;
}

.submit-order-btn {
  width: 100%;
  height: 52px;
  background-color: #25d366;
  color: white;
  border: none;
  border-radius: 30px;
  font-family: var(--font-family);
  font-weight: 700;
  font-size: 1.05rem;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
  transition: background-color 0.2s, transform 0.2s;
}

.submit-order-btn:hover {
  background-color: #20ba5a;
  transform: translateY(-1px);
}

.submit-order-btn:active {
  transform: translateY(1px);
}

/* Animations */
@keyframes buttonShake {
  0%, 100% { transform: scale(1); }
  10%, 20% { transform: scale(0.98) rotate(-2deg); }
  30%, 50%, 70%, 90% { transform: scale(1.02) rotate(2deg); }
  40%, 60%, 80% { transform: scale(1.02) rotate(-2deg); }
}

@keyframes slideIn {
  from {
    transform: translateY(30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Scrollbar customization for modal */
.modal-content::-webkit-scrollbar {
  width: 6px;
}

.modal-content::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* Responsive adjustments */
@media (max-width: 480px) {
  .whatsapp-floating-btn {
    bottom: 15px;
    font-size: 0.95rem;
    padding: 12px 20px;
  }
  
  .modal-content {
    padding: 18px;
  }
  
  .form-row {
    flex-direction: column;
    gap: 0;
  }
}
