/* BulkBuy: Neighborhood Bulk Purchase Coordinator */
:root {
  --color-primary: #2D5F2D;
  --color-primary-dark: #1F4220;
  --color-primary-light: #E8F0E8;
  --color-accent: #C4842D;
  --color-accent-light: #FDF6EC;
  --color-success: #2D8F4E;
  --color-success-light: #E8F5EC;
  --color-danger: #C0392B;
  --color-danger-light: #FDEDEC;
  --color-text: #1A1A1A;
  --color-text-secondary: #5A5A5A;
  --color-text-muted: #8A8A8A;
  --color-border: #D5D5D5;
  --color-border-light: #EBEBEB;
  --color-bg: #FAFAF8;
  --color-card: #FFFFFF;
  --color-hef: #F5F0E8;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1), 0 2px 4px rgba(0,0,0,0.06);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12), 0 4px 8px rgba(0,0,0,0.06);
  --transition: 0.2s ease;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  min-height: 100vh;
}

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

a:hover {
  text-decoration: underline;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.site-header {
  background: var(--color-card);
  border-bottom: 1px solid var(--color-border-light);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 16px;
}

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

.logo:hover {
  text-decoration: none;
}

.main-nav {
  display: flex;
  gap: 8px;
}

.main-nav a {
  padding: 8px 14px;
  border-radius: var(--radius);
  color: var(--color-text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: all var(--transition);
}

.main-nav a:hover {
  background: var(--color-primary-light);
  color: var(--color-primary);
  text-decoration: none;
}

.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.mobile-menu-btn span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text);
  border-radius: 1px;
}

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: white;
  padding: 80px 0;
  text-align: center;
}

.hero h1 {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.hero-subtitle {
  font-size: 1.25rem;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto 40px;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 48px;
}

.stat {
  text-align: center;
}

.stat-number {
  display: block;
  font-size: 2rem;
  font-weight: 700;
}

.stat-label {
  font-size: 0.9rem;
  opacity: 0.8;
}

/* Section Styles */
.section-header {
  text-align: center;
  margin-bottom: 40px;
}

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

.section-header p {
  color: var(--color-text-secondary);
  font-size: 1.05rem;
}

/* Coordinator Section */
.coordinator-section {
  padding: 60px 0;
}

.coordinator-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 24px;
  align-items: start;
}

/* Cards */
.card {
  background: var(--color-card);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow);
}

.card h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 20px;
}

.card h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
}

.card-header h3 {
  margin-bottom: 4px;
}

.card-subtitle {
  color: var(--color-text-secondary);
  font-size: 0.9rem;
}

/* Forms */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-weight: 500;
  font-size: 0.9rem;
  margin-bottom: 6px;
  color: var(--color-text);
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-family: var(--font-sans);
  background: var(--color-bg);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(45, 95, 45, 0.15);
}

.form-group .help-text {
  display: block;
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-top: 4px;
}

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 500;
  font-family: var(--font-sans);
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition);
  text-decoration: none;
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

.btn-primary:hover {
  background: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
}

.btn-secondary {
  background: var(--color-accent);
  color: white;
  border-color: var(--color-accent);
}

.btn-secondary:hover {
  background: #A86E24;
  border-color: #A86E24;
}

.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.btn-outline:hover {
  background: var(--color-primary-light);
}

.btn-danger {
  background: transparent;
  color: var(--color-danger);
  border-color: var(--color-danger);
}

.btn-danger:hover {
  background: var(--color-danger-light);
}

.btn-large {
  padding: 14px 28px;
  font-size: 1.05rem;
}

.btn-small {
  padding: 6px 12px;
  font-size: 0.85rem;
}

/* Badge */
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

.badge-success {
  background: var(--color-success-light);
  color: var(--color-success);
}

.badge-warning {
  background: var(--color-accent-light);
  color: var(--color-accent);
}

/* Pricing Info */
.pricing-info {
  margin-bottom: 24px;
}

.price-compare {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.price {
  text-align: center;
  padding: 16px;
  border-radius: var(--radius);
}

.price.retail {
  background: var(--color-bg);
}

.price.bulk {
  background: var(--color-success-light);
}

.price.savings {
  background: var(--color-accent-light);
}

.price-label {
  display: block;
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-bottom: 4px;
}

.price-value {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
}

.price.savings .price-value {
  color: var(--color-accent);
}

/* Progress */
.progress-section {
  margin-bottom: 24px;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 8px;
}

.progress-bar {
  height: 12px;
  background: var(--color-border-light);
  border-radius: 6px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--color-primary);
  border-radius: 6px;
  transition: width 0.4s ease;
}

.progress-note {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-top: 8px;
}

/* Order Form */
.order-form-section {
  padding: 20px 0;
  border-top: 1px solid var(--color-border-light);
  border-bottom: 1px solid var(--color-border-light);
  margin-bottom: 24px;
}

.order-form-section h4 {
  margin-bottom: 16px;
}

/* Orders Table */
.orders-table-section {
  margin-bottom: 24px;
}

.table-wrapper {
  overflow-x: auto;
}

.orders-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.orders-table th {
  text-align: left;
  padding: 10px 12px;
  background: var(--color-bg);
  font-weight: 600;
  color: var(--color-text-secondary);
  border-bottom: 2px solid var(--color-border);
}

.orders-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--color-border-light);
}

.orders-table .empty-state td {
  text-align: center;
  color: var(--color-text-muted);
  padding: 24px;
}

.delete-btn {
  background: none;
  border: none;
  color: var(--color-danger);
  cursor: pointer;
  font-size: 1.1rem;
  padding: 2px 6px;
  border-radius: 4px;
}

.delete-btn:hover {
  background: var(--color-danger-light);
}

/* Summary */
.summary-section {
  margin-bottom: 24px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.summary-item {
  text-align: center;
  padding: 14px;
  background: var(--color-bg);
  border-radius: var(--radius);
}

.summary-item.highlight {
  background: var(--color-success-light);
}

.summary-label {
  display: block;
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-bottom: 4px;
}

.summary-value {
  display: block;
  font-size: 1.2rem;
  font-weight: 700;
}

.summary-item.highlight .summary-value {
  color: var(--color-success);
}

/* Actions Bar */
.actions-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 20px;
  border-top: 1px solid var(--color-border-light);
}

/* Sidebar */
.coordinator-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sidebar-card {
  padding: 24px;
}

.sidebar-card h4 {
  font-size: 1rem;
  margin-bottom: 6px;
}

.sidebar-desc {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-bottom: 16px;
}

.presets-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.preset-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--color-bg);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius);
  cursor: pointer;
  text-align: left;
  font-family: var(--font-sans);
  width: 100%;
  transition: all var(--transition);
}

.preset-btn:hover {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
}

.preset-icon {
  flex-shrink: 0;
  color: var(--color-primary);
}

.preset-name {
  display: block;
  font-weight: 500;
  font-size: 0.9rem;
}

.preset-detail {
  display: block;
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.saved-list {
  font-size: 0.9rem;
}

.empty-saved {
  color: var(--color-text-muted);
  font-size: 0.85rem;
}

.saved-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--color-border-light);
}

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

.saved-item-name {
  font-weight: 500;
}

.saved-item-date {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

/* How It Works */
.how-section {
  padding: 60px 0;
  background: var(--color-hef);
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.step-card {
  background: var(--color-card);
  padding: 28px;
  border-radius: var(--radius-lg);
  text-align: center;
  box-shadow: var(--shadow);
}

.step-number {
  width: 40px;
  height: 40px;
  background: var(--color-primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  margin: 0 auto 16px;
}

.step-card h3 {
  font-size: 1.05rem;
  margin-bottom: 8px;
}

.step-card p {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
}

/* Examples */
.examples-section {
  padding: 60px 0;
}

.examples-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.example-card {
  background: var(--color-card);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow);
}

.example-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.example-header h3 {
  font-size: 1.1rem;
}

.example-savings {
  background: var(--color-success-light);
  color: var(--color-success);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
}

.example-card > p {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  margin-bottom: 16px;
  line-height: 1.5;
}

.example-details {
  display: flex;
  gap: 16px;
  font-size: 0.85rem;
}

/* Tips */
.tips-section {
  padding: 60px 0;
  background: var(--color-hef);
}

.tips-layout {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.tips-column h3 {
  font-size: 1.1rem;
  margin-bottom: 16px;
  color: var(--color-primary);
}

.tips-list {
  list-style: none;
}

.tips-list li {
  padding: 8px 0;
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  border-bottom: 1px solid var(--color-border-light);
  padding-left: 20px;
  position: relative;
}

.tips-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--color-success);
  font-weight: 700;
}

.tips-list li:last-child {
  border-bottom: none;
}

/* Assumptions */
.assumptions-section {
  padding: 40px 0 60px;
}

.assumptions-box {
  background: var(--color-accent-light);
  border: 1px solid #F0DFC0;
  border-radius: var(--radius-lg);
  padding: 28px;
}

.assumptions-box h3 {
  font-size: 1.1rem;
  margin-bottom: 12px;
  color: var(--color-accent);
}

.assumptions-box p {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
}

/* Footer */
.site-footer {
  background: var(--color-primary-dark);
  color: rgba(255,255,255,0.8);
  padding: 40px 0 20px;
  font-size: 0.9rem;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
}

.footer-logo {
  font-weight: 700;
  font-size: 1.1rem;
  color: white;
}

.footer-brand p {
  margin-top: 6px;
  opacity: 0.7;
  font-size: 0.85rem;
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  color: rgba(255,255,255,0.8);
}

.footer-links a:hover {
  color: white;
}

.footer-bottom {
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.15);
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  opacity: 0.7;
}

.footer-bottom a {
  color: rgba(255,255,255,0.9);
}

.version {
  font-size: 0.75rem;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--color-primary);
  color: white;
  padding: 14px 24px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
  pointer-events: none;
  z-index: 1000;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* Print */
@media print {
  .site-header, .site-footer, .actions-bar, .coordinator-sidebar, 
  .order-form-section, .hero, .how-section, .tips-section, 
  .assumptions-section, .examples-section { display: none !important; }
  .coordinator-section { padding: 0; }
  .coordinator-layout { display: block; }
  .card { border: none; box-shadow: none; padding: 0; }
}

/* Responsive */
@media (max-width: 1024px) {
  .coordinator-layout {
    grid-template-columns: 1fr;
  }
  .coordinator-sidebar {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .steps-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .examples-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .main-nav { display: none; }
  .mobile-menu-btn { display: flex; }
  .hero h1 { font-size: 2rem; }
  .hero-stats { gap: 24px; }
  .stat-number { font-size: 1.5rem; }
  .price-compare { grid-template-columns: 1fr; }
  .summary-grid { grid-template-columns: repeat(2, 1fr); }
  .coordinator-sidebar { grid-template-columns: 1fr; }
  .steps-grid { grid-template-columns: 1fr; }
  .examples-grid { grid-template-columns: 1fr; }
  .tips-layout { grid-template-columns: 1fr; }
  .footer-content { flex-direction: column; gap: 20px; }
  .footer-bottom { flex-direction: column; gap: 8px; }
  .actions-bar { flex-direction: column; }
  .actions-bar .btn { width: 100%; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .card { padding: 20px; }
  .hero { padding: 48px 0; }
  .hero-stats { flex-direction: column; gap: 16px; }
}



/* Factory-injected deployment helpers. The AI owns the site design above this block. */
.ad-unit {
  width: min(100%, 720px);
  min-height: 120px;
  margin: 24px auto;
  display: block;
}

.legal-page {
  width: min(900px, calc(100% - 32px));
  margin: 40px auto;
}

.factory-fallback-nav {
  width: min(900px, calc(100% - 32px));
  margin: 24px auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  font-size: 0.95rem;
}

.factory-fallback-nav a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}
