/* CSS Custom Properties for Multi-Client Color Palette */
:root {
  /* Primary Colors - Sophisticated Neutral with Warmth */
  --color-primary: #475569; /* Slate gray - professional, industry-neutral */
  --color-primary-dark: #334155; /* Darker slate for hover states */
  --color-primary-light: #64748b; /* Lighter slate for accents */

  /* Success Colors - Natural Green */
  --color-success: #059669; /* Emerald green - universal for money/success */
  --color-success-dark: #047857; /* Darker emerald for hover states */
  --color-success-light: #10b981; /* Lighter emerald for subtle indicators */

  /* Accent Color - Sophisticated Dark */
  --color-accent: #1f2937; /* Rich dark gray - premium and neutral */
  --color-accent-dark: #111827; /* Deep black for hover states */
  --color-accent-light: #374151; /* Medium gray for subtle variations */

  /* Neutral Colors - Warm Undertones */
  --color-background: #fafaf9; /* Warm white background */
  --color-surface: #ffffff; /* Pure white for cards */
  --color-surface-hover: #f5f5f4; /* Warm light gray for hover */
  --color-border: #e7e5e4; /* Warm light border */
  --color-border-light: #f5f5f4; /* Very subtle warm dividers */

  /* Text Colors - High Contrast Warm Neutrals */
  --color-text-primary: #1c1917; /* Rich dark brown-black */
  --color-text-secondary: #57534e; /* Medium warm gray */
  --color-text-light: #a8a29e; /* Light warm gray */
  --color-text-white: #ffffff; /* Pure white for dark backgrounds */

  /* Interactive States */
  --color-hover: #f5f5f4; /* Subtle warm hover */
  --color-focus: #e5e7eb; /* Neutral gray focus ring */
  --color-disabled: #d6d3d1; /* Warm disabled state */
  --color-error: #dc2626; /* Clear red for errors */
  --color-warning: #d97706; /* Amber for warnings */

  /* Shadows - Warmer, Softer */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-base: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(0, 0, 0, 0.04);

  /* Border Radius - Softer, More Organic */
  --radius-sm: 4px;
  --radius-base: 6px;
  --radius-lg: 8px;
  --radius-xl: 12px;

  /* Spacing Scale - Consistent Layout */
  --spacing-xs: 8px;
  --spacing-sm: 16px;
  --spacing-base: 20px;
  --spacing-lg: 32px;
  --spacing-xl: 40px;
  --spacing-2xl: 48px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh;
  background: var(--color-background);
  color: var(--color-text-primary);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
}

.main-content {
  flex: 1;
}

/* Different layouts for different page types */
body.form-page {
  padding: var(--spacing-base);
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #ededed;
}

body.success-page {
  padding: var(--spacing-base);
  background: #ededed;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  min-height: 100vh;
  padding-top: max(var(--spacing-xl), env(safe-area-inset-top));
}

/* Product Listing Styles */
.product-store {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--spacing-base);
  min-height: 100vh;
}

.store-header {
  text-align: center;
  margin-bottom: var(--spacing-lg);
  padding: var(--spacing-lg) var(--spacing-lg) var(--spacing-xl);
  background: linear-gradient(
    135deg,
    var(--color-surface) 0%,
    var(--color-background) 50%,
    var(--color-surface) 100%
  );
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--color-border);
  position: relative;
  overflow: hidden;
}

.store-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(
    90deg,
    var(--color-accent) 0%,
    var(--color-success) 50%,
    var(--color-primary) 100%
  );
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.store-header::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle,
    rgba(var(--color-accent-rgb), 0.03) 0%,
    transparent 70%
  );
  animation: float 8s ease-in-out infinite;
  pointer-events: none;
}

@keyframes float {
  0%,
  100% {
    transform: translate(0, 0) rotate(0deg);
  }
  33% {
    transform: translate(10px, -15px) rotate(1deg);
  }
  66% {
    transform: translate(-10px, 5px) rotate(-1deg);
  }
}

.logo-container {
  position: relative;
  display: inline-block;
  margin-bottom: var(--spacing-sm);
}

.store-logo {
  width: 80px;
  height: 80px;
  object-fit: contain;
  border-radius: var(--radius-xl);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12), 0 4px 15px rgba(0, 0, 0, 0.08);
  border: 3px solid var(--color-surface);
  background: var(--color-background);
  padding: var(--spacing-xs);
  transition: all 0.3s ease;
  position: relative;
  z-index: 2;
}

.store-logo:hover {
  transform: scale(1.05) rotate(2deg);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15), 0 6px 20px rgba(0, 0, 0, 0.1);
}

.logo-container::before {
  content: "";
  position: absolute;
  top: -8px;
  left: -8px;
  right: -8px;
  bottom: -8px;
  background: linear-gradient(
    45deg,
    var(--color-accent),
    var(--color-success),
    var(--color-primary)
  );
  border-radius: var(--radius-xl);
  z-index: 1;
  opacity: 0.1;
  animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.1;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.2;
  }
}

.store-title {
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 800;
  color: var(--color-text-primary);
  margin-bottom: calc(var(--spacing-xs) + 4px);
  line-height: 1.1;
  letter-spacing: -0.8px;
  position: relative;
  z-index: 2;
  background: linear-gradient(
    135deg,
    var(--color-text-primary) 0%,
    var(--color-accent) 100%
  );
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.store-description {
  font-size: 16px;
  color: var(--color-text-secondary);
  margin: 0 auto;
  max-width: 640px;
  line-height: 1.6;
  font-weight: 400;
  letter-spacing: 0.2px;
  position: relative;
  z-index: 2;
  opacity: 0.9;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  margin-bottom: 100px;
  justify-content: center;
  justify-items: center;
}

.product-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-base);
  border: 1px solid var(--color-border);
  overflow: hidden;
  transition: all 0.3s ease;
  width: 100%;
  max-width: 350px;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-primary-light);
}

.product-image {
  height: 220px;
  background: var(--color-background);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-bottom: 1px solid var(--color-border);
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
  transform: scale(1.05);
}

.product-placeholder {
  color: var(--color-text-light);
}

.product-placeholder svg {
  width: 48px;
  height: 48px;
}

.product-info {
  padding: 24px;
}

.product-name {
  font-size: 18px;
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: var(--spacing-xs);
  line-height: 1.4;
}

.product-description {
  font-size: 14px;
  color: var(--color-text-secondary);
  margin-bottom: var(--spacing-sm);
  line-height: 1.5;
}

.product-price {
  font-size: 20px;
  font-weight: 700;
  color: var(--color-success);
  margin-bottom: var(--spacing-base);
}

.product-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.quantity-controls {
  display: flex;
  align-items: center;
  background: var(--color-background);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-base);
  overflow: hidden;
}

.qty-btn {
  width: 36px;
  height: 36px;
  border: none;
  background: var(--color-surface);
  color: var(--color-text-secondary);
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qty-btn:hover {
  background: var(--color-primary);
  color: var(--color-text-white);
}

.qty-input {
  width: 50px;
  height: 36px;
  border: none;
  text-align: center;
  background: var(--color-surface);
  font-weight: 600;
  color: var(--color-text-primary);
}

.add-to-cart-btn {
  flex: 1;
  padding: 10px 16px;
  background: var(--color-accent);
  color: var(--color-text-white);
  border: none;
  border-radius: var(--radius-base);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.add-to-cart-btn:hover {
  background: var(--color-accent-dark);
  transform: translateY(-1px);
}

.add-to-cart-btn:disabled {
  background: var(--color-disabled);
  cursor: not-allowed;
  transform: none;
}

/* Cart Toggle Button */
.cart-toggle {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 64px;
  height: 64px;
  background: var(--color-accent);
  color: var(--color-text-white);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-toggle:hover {
  transform: scale(1.1);
  background: var(--color-accent-dark);
  box-shadow: 0 20px 40px -12px rgba(31, 41, 55, 0.4);
}

.cart-toggle svg {
  width: 24px;
  height: 24px;
}

.cart-count {
  position: absolute;
  top: -2px;
  right: -2px;
  background: var(--color-success);
  color: var(--color-text-white);
  border-radius: 50%;
  width: 22px;
  height: 22px;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--color-surface);
  box-shadow: var(--shadow-sm);
}

/* Cart Sidebar */
.cart-sidebar {
  position: fixed;
  top: 0;
  right: -400px;
  width: 400px;
  height: 100vh;
  background: var(--color-surface);
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.12);
  transition: right 0.3s ease;
  z-index: 1001;
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--color-border);
}

.cart-sidebar.open {
  right: 0;
}

.cart-header {
  padding: 24px;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--color-background);
}

.cart-header h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--color-text-primary);
}

.cart-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--color-text-secondary);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-base);
  transition: all 0.2s ease;
}

.cart-close:hover {
  background: var(--color-hover);
  color: var(--color-text-primary);
}

.cart-items {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
}

.empty-cart {
  text-align: center;
  color: var(--color-text-secondary);
  padding: 60px 20px;
  font-size: 16px;
}

.cart-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 0;
  border-bottom: 1px solid var(--color-border-light);
}

.cart-item:last-child {
  border-bottom: none;
}

.cart-item-info {
  flex: 1;
}

.cart-item-name {
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: 4px;
  font-size: 14px;
}

.cart-item-price {
  color: var(--color-success);
  font-weight: 600;
  font-size: 14px;
}

.cart-item-quantity {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--color-text-secondary);
}

.cart-item-remove {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
  border-radius: var(--radius-sm);
  padding: 4px 8px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.cart-item-remove:hover {
  background: #fecaca;
  color: #991b1b;
}

.cart-footer {
  padding: 24px;
  border-top: 2px solid var(--color-border);
  background: var(--color-background);
}

.cart-total {
  margin-bottom: 20px;
}

.total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 14px;
}

.total-row span:first-child {
  color: var(--color-text-secondary);
}

.total-row span:last-child {
  font-weight: 600;
  color: var(--color-text-primary);
}

.total-final {
  font-weight: 700;
  font-size: 18px;
  padding-top: 12px;
  border-top: 1px solid var(--color-border);
  color: var(--color-text-primary);
}

.checkout-btn {
  width: 100%;
  padding: 16px;
  background: var(--color-accent);
  color: var(--color-text-white);
  border: none;
  border-radius: var(--radius-base);
  font-weight: 700;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.checkout-btn:hover:not(:disabled) {
  background: var(--color-accent-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-base);
}

.checkout-btn:disabled {
  background: var(--color-disabled);
  cursor: not-allowed;
  transform: none;
}

/* Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1002;
  padding: 20px;
}

.modal-overlay.open {
  display: flex;
}

.checkout-modal {
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  border: 1px solid var(--color-border);
}

.modal-header {
  padding: 24px;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--color-background);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.modal-header h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--color-text-primary);
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--color-text-secondary);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-base);
  transition: all 0.2s ease;
}

.modal-close:hover {
  background: var(--color-hover);
  color: var(--color-text-primary);
}

.modal-body {
  padding: 24px;
}

.form-group {
  margin-bottom: 24px;
  position: relative;
}

.form-group label {
  display: block;
  margin-bottom: 10px;
  font-weight: 600;
  color: var(--color-text-primary);
  font-size: 15px;
  transition: color 0.2s ease;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-base);
  font-size: 16px;
  transition: all 0.3s ease;
  background: var(--color-surface);
  color: var(--color-text-primary);
  font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(var(--color-accent-rgb), 0.1);
  transform: translateY(-1px);
}

.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover {
  border-color: var(--color-accent);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--color-text-muted);
  font-style: italic;
}

.order-summary {
  background: linear-gradient(
    135deg,
    var(--color-surface) 0%,
    var(--color-background) 100%
  );
  border: 2px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 32px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.order-summary:hover {
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.order-summary h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--color-text-primary);
  position: relative;
  padding-bottom: 12px;
}

.order-summary h3::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 3px;
  background: var(--color-success);
  border-radius: 2px;
}

.summary-items {
  margin-bottom: 20px;
}

.summary-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding: 8px 0;
  font-size: 15px;
  color: var(--color-text-secondary);
  border-bottom: 1px solid rgba(var(--color-border-rgb), 0.3);
}

.summary-item:last-child {
  border-bottom: none;
}

.summary-totals {
  border-top: 2px solid var(--color-border);
  padding-top: 20px;
  margin-top: 20px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 15px;
  padding: 4px 0;
}

.summary-row span:first-child {
  color: var(--color-text-secondary);
  font-weight: 500;
}

.summary-row span:last-child {
  font-weight: 700;
  color: var(--color-text-primary);
}

.summary-total {
  font-weight: 800;
  font-size: 20px;
  color: var(--color-success);
  padding-top: 12px;
  margin-top: 12px;
  border-top: 2px solid var(--color-success);
  background: rgba(var(--color-success-rgb), 0.05);
  padding: 16px;
  border-radius: var(--radius-base);
}

.place-order-btn {
  width: 100%;
  padding: 18px 24px;
  background: linear-gradient(
    135deg,
    var(--color-accent) 0%,
    var(--color-accent-dark) 100%
  );
  color: var(--color-text-white);
  border: none;
  border-radius: var(--radius-lg);
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(var(--color-accent-rgb), 0.3);
  position: relative;
  overflow: hidden;
}

.place-order-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s ease;
}

.place-order-btn:hover {
  background: linear-gradient(
    135deg,
    var(--color-accent-dark) 0%,
    var(--color-accent) 100%
  );
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(var(--color-accent-rgb), 0.4);
}

.place-order-btn:hover::before {
  left: 100%;
}

.place-order-btn:active {
  transform: translateY(0);
  box-shadow: 0 4px 15px rgba(var(--color-accent-rgb), 0.3);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 80px 20px;
  color: var(--color-text-secondary);
  grid-column: 1 / -1;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  border: 2px dashed var(--color-border);
  margin: 20px 0;
}

.empty-state p {
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 8px;
}

.empty-state small {
  font-size: 14px;
  color: var(--color-text-light);
}

/* Responsive Design */
@media (max-width: 768px) {
  body.form-page {
    padding: 16px;
    align-items: flex-start;
    padding-top: 40px;
  }

  body.success-page {
    padding: 16px;
    padding-top: max(20px, env(safe-area-inset-top));
  }

  .form-card {
    margin: 0 auto;
    max-width: 90%;
  }

  .product-store {
    padding: 16px;
  }

  .store-header {
    margin-bottom: 24px;
    padding: 24px 20px 32px;
  }

  .store-header::after {
    animation-duration: 6s;
  }

  .store-logo {
    width: 70px;
    height: 70px;
  }

  .store-description {
    font-size: 16px;
    line-height: 1.6;
    padding: 0 16px;
  }

  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 16px;
    justify-content: center;
    justify-items: center;
  }

  .cart-sidebar {
    width: 100%;
    right: -100%;
  }

  .checkout-modal {
    width: 95%;
    margin: 20px;
  }
}

@media (max-width: 480px) {
  .store-header {
    margin-bottom: 20px;
    padding: 20px 16px 28px;
  }

  .store-logo {
    width: 60px;
    height: 60px;
  }

  .store-description {
    font-size: 15px;
    line-height: 1.5;
    padding: 0 8px;
  }

  .products-grid {
    grid-template-columns: 1fr;
    justify-content: center;
    justify-items: center;
  }

  .product-actions {
    flex-direction: column;
    gap: 8px;
  }

  .quantity-controls {
    align-self: stretch;
    justify-content: center;
  }
}

/* Enhanced Fundraising Form Styles - Neutral & Motivating Design */
.form-card {
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--color-border);
  padding: 40px;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
}

.form-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(
    90deg,
    var(--color-primary),
    var(--color-success),
    var(--color-accent)
  );
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.logo-container {
  text-align: center;
  margin-bottom: 32px;
  position: relative;
}

.logo {
  width: 100px;
  height: 100px;
  object-fit: contain;
  margin-bottom: 16px;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-base);
  border: 3px solid var(--color-border);
  background: var(--color-background);
  padding: 8px;
}

.card-header {
  text-align: center;
  margin-bottom: 40px;
  padding: 0 8px;
}

.card-header h1 {
  color: var(--color-text-primary);
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 12px;
  line-height: 1.3;
  letter-spacing: -0.5px;
}

.card-header p {
  color: var(--color-text-secondary);
  font-size: 16px;
  line-height: 1.6;
  max-width: 400px;
  margin: 0 auto;
}

.steps {
  display: flex;
  justify-content: space-between;
  margin-bottom: 40px;
  position: relative;
}

.steps::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(
    90deg,
    var(--color-border),
    var(--color-primary),
    var(--color-success)
  );
  border-radius: 2px;
  z-index: 1;
}

.step {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-surface);
  border: 3px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--color-text-secondary);
  position: relative;
  z-index: 2;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

.step.active {
  background: var(--color-success);
  border-color: var(--color-success);
  color: var(--color-text-white);
  transform: scale(1.1);
  box-shadow: var(--shadow-base);
}

.step.completed {
  background: var(--color-success);
  border-color: var(--color-success);
  color: var(--color-text-white);
  box-shadow: var(--shadow-base);
}

.form-step {
  display: none;
}

.form-step.active {
  display: block;
}

.input-group {
  margin-bottom: 28px;
}

.input-group label {
  display: block;
  margin-bottom: 10px;
  font-weight: 600;
  font-size: 15px;
  color: var(--color-text-primary);
  letter-spacing: 0.2px;
}

.input-group input[type="text"],
.input-group input[type="tel"],
.input-group input[type="number"],
.input-group input[type="email"],
.input-group select {
  width: 100%;
  padding: 16px 20px;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-lg);
  font-size: 16px;
  font-weight: 500;
  transition: all 0.3s ease;
  background: var(--color-surface);
  color: var(--color-text-primary);
  box-shadow: var(--shadow-sm);
}

.input-group input:focus,
.input-group select:focus {
  outline: none;
  border-color: var(--color-success);
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1);
  transform: translateY(-1px);
}

.radio-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 12px;
  margin-bottom: 32px;
}

.radio-option {
  position: relative;
}

.radio-option input[type="radio"] {
  display: none;
}

.radio-option label {
  display: block;
  padding: 8px 6px;
  text-align: center;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 600;
  font-size: 11px;
  line-height: 1.2;
  color: var(--color-text-secondary);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 3px;
  height: 60px;
  min-height: 60px;
  max-height: 60px;
  overflow: hidden;
}

.radio-option label:hover {
  border-color: var(--color-success-light);
  background: var(--color-background);
  transform: translateY(-2px);
  box-shadow: var(--shadow-base);
}

.radio-option input[type="radio"]:checked + label {
  border-color: var(--color-success);
  background: var(--color-success);
  color: var(--color-text-white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.fundraising-icon {
  width: 20px;
  height: 20px;
  object-fit: cover;
  border-radius: 50%;
  margin-right: 8px;
  vertical-align: middle;
}

.radio-option input[type="radio"]:checked + label::after {
  content: "✓";
  position: absolute;
  top: -8px;
  right: -8px;
  width: 24px;
  height: 24px;
  background: var(--color-accent);
  color: var(--color-text-white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  box-shadow: var(--shadow-base);
}

.payment-icon {
  display: inline-block;
  margin-right: 8px;
  font-size: 16px;
  vertical-align: middle;
}

/* Payment logo styling */
.payment-logo {
  width: 32px;
  height: 13px;
  object-fit: contain;
  margin-right: 0;
  margin-bottom: 4px;
  border-radius: 3px;
  vertical-align: middle;
}

.payment-logo-small {
  width: 24px;
  height: 10px;
  object-fit: contain;
  margin-right: 8px;
  border-radius: 2px;
  vertical-align: middle;
}

/* Enhanced payment method styling for selects */
.form-group select[name="payment_method"] {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M10.5 3L6 7.5 1.5 3' stroke='%23666' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 12px 12px;
  padding-right: 48px;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

.form-group select[name="payment_method"]:focus {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M10.5 3L6 7.5 1.5 3' stroke='%231f2937' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.buttons {
  display: flex;
  gap: 16px;
  margin-top: 32px;
}

.btn {
  flex: 1;
  padding: 16px 24px;
  border: none;
  border-radius: var(--radius-lg);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: var(--shadow-sm);
}

.btn-back {
  background: var(--color-background);
  color: var(--color-text-secondary);
  border: 2px solid var(--color-border);
}

.btn-back:hover {
  background: var(--color-surface-hover);
  color: var(--color-text-primary);
  transform: translateY(-1px);
  box-shadow: var(--shadow-base);
}

.btn-primary {
  background: var(--color-success);
  color: var(--color-text-white);
  border: 2px solid var(--color-success);
}

.btn-primary:hover {
  background: var(--color-success-dark);
  border-color: var(--color-success-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: var(--shadow-sm) !important;
}

.donate-btn {
  width: 100%;
  padding: 18px 24px;
  background: linear-gradient(
    135deg,
    var(--color-success),
    var(--color-success-dark)
  );
  color: var(--color-text-white);
  border: none;
  border-radius: var(--radius-lg);
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: var(--shadow-base);
  position: relative;
  overflow: hidden;
}

.donate-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  transition: left 0.5s ease;
}

.donate-btn:hover::before {
  left: 100%;
}

.donate-btn:hover {
  background: linear-gradient(
    135deg,
    var(--color-success-dark),
    var(--color-success)
  );
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.donation-form .form-group {
  margin-bottom: 24px;
}

.donation-form .form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  font-size: 15px;
  color: var(--color-text-primary);
  letter-spacing: 0.2px;
}

.donation-form .form-group input,
.donation-form .form-group select {
  width: 100%;
  padding: 16px 20px;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-lg);
  font-size: 16px;
  font-weight: 500;
  transition: all 0.3s ease;
  background: var(--color-surface);
  color: var(--color-text-primary);
  box-shadow: var(--shadow-sm);
}

.donation-form .form-group input:focus,
.donation-form .form-group select:focus {
  outline: none;
  border-color: var(--color-success);
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1);
  transform: translateY(-1px);
}

@media (max-width: 480px) {
  body.form-page {
    padding: 12px;
    min-height: 100vh;
    align-items: flex-start;
    padding-top: max(20px, env(safe-area-inset-top));
  }

  .form-card {
    padding: 28px 24px;
    margin: 16px;
  }

  .logo {
    width: 80px;
    height: 80px;
  }

  .radio-option label {
    padding: 6px 4px;
    font-size: 10px;
    line-height: 1.1;
    flex-direction: column;
    gap: 2px;
    height: 55px;
    min-height: 55px;
    max-height: 55px;
    overflow: hidden;
  }

  .payment-icon {
    font-size: 12px;
    margin-right: 0;
    margin-bottom: 2px;
  }

  .payment-logo {
    width: 28px;
    height: 12px;
    margin-right: 0;
    margin-bottom: 3px;
  }

  .card-header h1 {
    font-size: 24px;
  }

  .donate-btn {
    padding: 16px 20px;
    font-size: 16px;
  }
}

.error-message {
  color: var(--color-error);
  font-size: 14px;
  padding: 12px 16px;
  background: rgba(220, 38, 38, 0.1);
  border: 1px solid rgba(220, 38, 38, 0.2);
  border-radius: var(--radius-base);
  margin-bottom: 16px;
  display: none; /* Hide by default */
}

.error-message:not(:empty) {
  display: block; /* Show when it has content */
}

.success-icon {
  width: 100px;
  height: 100px;
  background: linear-gradient(
    135deg,
    var(--color-success),
    var(--color-success-light)
  );
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 32px;
  box-shadow: var(--shadow-lg);
  position: relative;
}

.success-icon::before {
  content: "";
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  background: linear-gradient(
    45deg,
    var(--color-success),
    var(--color-primary),
    var(--color-success-light)
  );
  border-radius: 50%;
  z-index: -1;
  animation: rotate 3s linear infinite;
}

@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.success-icon svg {
  width: 48px;
  height: 48px;
  color: var(--color-text-white);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.success-title {
  font-size: 32px;
  font-weight: 700;
  color: var(--color-success);
  margin-bottom: 16px;
  text-align: center;
  letter-spacing: -0.5px;
}

.success-message {
  color: var(--color-text-secondary);
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 40px;
  text-align: center;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

.transaction-details {
  background: var(--color-background);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 32px;
  text-align: left;
  box-shadow: var(--shadow-sm);
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  font-size: 15px;
  padding: 8px 0;
}

.detail-row:last-child {
  margin-bottom: 0;
}

.detail-label {
  color: var(--color-text-secondary);
  font-weight: 500;
}

.detail-value {
  color: var(--color-text-primary);
  font-weight: 600;
}

.detail-row.total {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 2px solid var(--color-border);
  font-size: 18px;
}

.detail-row.total .detail-value {
  color: var(--color-success);
  font-weight: 700;
  font-size: 20px;
}

.reference {
  background: linear-gradient(
    135deg,
    rgba(5, 150, 105, 0.1),
    rgba(5, 150, 105, 0.05)
  );
  color: var(--color-success);
  padding: 16px 20px;
  border-radius: var(--radius-lg);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 32px;
  border: 1px solid rgba(5, 150, 105, 0.2);
  text-align: center;
  letter-spacing: 0.5px;
}

.success-card {
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--color-border);
  padding: 40px;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  text-align: center;
}

.success-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(
    90deg,
    var(--color-success),
    var(--color-success-light),
    var(--color-success)
  );
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

/* Enhanced Mobile Responsiveness for Fundraising */
@media (max-width: 480px) {
  .success-card {
    padding: 28px 20px;
    margin: 16px;
  }

  .success-icon {
    width: 80px;
    height: 80px;
  }

  .success-icon svg {
    width: 36px;
    height: 36px;
  }

  .success-title {
    font-size: 28px;
  }

  .transaction-details {
    padding: 20px;
  }

  .reference {
    padding: 12px 16px;
    font-size: 13px;
  }
}

/* Branding Footer */
.branding-footer {
  margin-top: auto;
  padding: 24px 20px;
  text-align: center;
  flex-shrink: 0;
}

.branding-footer p {
  color: var(--color-text-light);
  font-size: 13px;
  margin: 0;
  line-height: 1.4;
}

.branding-footer strong {
  color: var(--color-text-secondary);
  font-weight: 600;
}

@media (max-width: 768px) {
  .branding-footer {
    padding: 20px 16px;
  }

  .branding-footer p {
    font-size: 12px;
  }
}

/* Shipping Section Styles */
.shipping-section {
  margin-top: 32px;
  padding: 24px;
  background: linear-gradient(
    135deg,
    var(--color-surface) 0%,
    var(--color-surface-hover) 100%
  );
  border-radius: var(--radius-lg);
  border: 2px solid var(--color-border);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.shipping-section:hover {
  border-color: var(--color-accent);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.shipping-section h3 {
  margin: 0 0 24px 0;
  color: var(--color-text-primary);
  font-size: 20px;
  font-weight: 700;
  position: relative;
  padding-bottom: 12px;
}

.shipping-section h3::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 3px;
  background: var(--color-accent);
  border-radius: 2px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.shipping-section .form-group {
  margin-bottom: 20px;
}

.shipping-section .form-group label {
  font-size: 15px;
  margin-bottom: 10px;
  font-weight: 600;
  color: var(--color-text-primary);
}

.shipping-section .form-group input,
.shipping-section .form-group textarea {
  border: 2px solid var(--color-border);
  border-radius: var(--radius-base);
  padding: 14px 16px;
  font-size: 16px;
  transition: all 0.2s ease;
  background: var(--color-surface);
}

.shipping-section .form-group input:focus,
.shipping-section .form-group textarea:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(var(--color-accent-rgb), 0.1);
  outline: none;
  transform: translateY(-1px);
}

.shipping-section .form-group textarea {
  min-height: 90px;
  resize: vertical;
  font-family: inherit;
  line-height: 1.5;
}

@media (max-width: 768px) {
  .form-row {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .shipping-section {
    margin-top: 24px;
    padding: 20px;
  }

  .shipping-section h3 {
    font-size: 18px;
  }

  .order-summary {
    padding: 20px;
    margin-bottom: 24px;
  }

  .order-summary h3 {
    font-size: 18px;
  }

  .summary-total {
    font-size: 18px;
  }

  .place-order-btn {
    padding: 16px 20px;
    font-size: 15px;
  }
}

/* Visual indicator for physical vs digital products */
.product-card[data-product-type="PHYSICAL"] .product-info::after {
  content: "Ships to you";
  display: flex;
  align-items: center;
  font-size: 12px;
  color: var(--color-accent);
  margin-top: 8px;
  padding: 6px 10px;
  background: rgba(var(--color-accent-rgb), 0.1);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(var(--color-accent-rgb), 0.2);
  font-weight: 600;
  letter-spacing: 0.3px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23007acc' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 16h6v4a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-4h6'/%3E%3Crect x='6' y='2' width='12' height='10'/%3E%3Cpath d='M12 12V2'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 8px center;
  background-size: 14px 14px;
  padding-left: 28px;
}

.product-card[data-product-type="DIGITAL"] .product-info::after {
  content: "Instant download";
  display: flex;
  align-items: center;
  font-size: 12px;
  color: var(--color-success);
  margin-top: 8px;
  padding: 6px 10px;
  background: rgba(var(--color-success-rgb), 0.1);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(var(--color-success-rgb), 0.2);
  font-weight: 600;
  letter-spacing: 0.3px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2310b981' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4'/%3E%3Cpolyline points='7,10 12,15 17,10'/%3E%3Cline x1='12' y1='15' x2='12' y2='3'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 8px center;
  background-size: 14px 14px;
  padding-left: 28px;
}
