/* WholesaleMatrix CSS Design System */
:root {
  --bg: #0b0f17;
  --card-bg: #111827;
  --card-hover: #1f2937;
  --border: #1f2937;
  --border-focus: #f59e0b;
  --primary: #d97706;
  --primary-hover: #b45309;
  --primary-light: #f59e0b;
  --accent: #10b981;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --text-main: #f9fafb;
  --text-muted: #9ca3af;
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

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

body {
  background-color: var(--bg);
  color: var(--text-main);
  font-family: var(--font);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header & Navbar */
.navbar {
  background: rgba(17, 24, 39, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 10px 0;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: #fff;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.5px;
}

.logo-icon { font-size: 22px; }
.logo strong { color: var(--primary-light); }

.nav-links-suite {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  padding: 4px 0;
  scrollbar-width: none;
}
.nav-links-suite::-webkit-scrollbar { display: none; }

.nav-tool-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 6px;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid transparent;
  transition: all 0.2s;
}

.nav-tool-link:hover, .nav-tool-link.active {
  color: #fff;
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.3);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Main Container & Hero */
.main-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 20px 60px;
  flex: 1;
}

.hero-section {
  text-align: center;
  margin-bottom: 28px;
}

.hero-section h1 {
  font-size: 28px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}

.hero-section p {
  color: var(--text-muted);
  font-size: 14px;
  max-width: 680px;
  margin: 0 auto;
}

/* Calculator Grid */
.calc-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 24px;
  margin-bottom: 32px;
}

@media (max-width: 860px) {
  .calc-grid { grid-template-columns: 1fr; }
}

.calc-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.card-header h2 {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}

.fee-badge {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
}

/* Forms & Inputs */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}

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

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 12px;
  font-weight: 600;
  color: #d1d5db;
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.currency-prefix {
  position: absolute;
  left: 12px;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 13px;
}

.suffix {
  position: absolute;
  right: 12px;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 12px;
}

input, select, textarea {
  width: 100%;
  background: #0b0f17;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px 10px 26px;
  color: #fff;
  font-size: 14px;
  font-family: var(--font);
  font-weight: 600;
  outline: none;
  transition: border-color 0.2s;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--border-focus);
}

/* Results Output Card */
.profit-highlight {
  background: linear-gradient(135deg, rgba(217, 119, 6, 0.12) 0%, rgba(16, 185, 129, 0.12) 100%);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  margin-bottom: 18px;
}

.profit-label {
  font-size: 12px;
  font-weight: 700;
  color: #fcd34d;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.profit-amount {
  font-size: 34px;
  font-weight: 800;
  color: #fff;
  margin: 6px 0 12px;
}

.profit-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 12px;
}

.metric .m-label {
  font-size: 11px;
  color: var(--text-muted);
  display: block;
}

.metric .m-val {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}

.summary-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.summary-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--text-muted);
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.summary-item strong {
  color: #fff;
}

.text-danger { color: var(--danger) !important; }
.text-success { color: var(--success) !important; }

/* Action Buttons */
.action-btn, .share-calc-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.share-calc-btn {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.3);
  color: #fcd34d;
}
.share-calc-btn:hover { background: var(--primary); color: #fff; }

/* Perks & Rewards Section */
.perks-rewards-section {
  background: #111827;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px;
  margin-bottom: 32px;
}

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

.perks-header h3 {
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.perks-badge {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
}

.perks-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

@media (max-width: 768px) {
  .perks-grid { grid-template-columns: 1fr; }
}

.perk-card {
  background: #0b0f17;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
}

.perk-top {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.perk-icon-box {
  font-size: 22px;
  background: rgba(255, 255, 255, 0.05);
  padding: 8px;
  border-radius: 8px;
}

.perk-title {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}

.perk-desc {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
}

.perk-action-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 10px;
}

.perk-code-tag {
  font-size: 11px;
  font-weight: 700;
  color: #fcd34d;
  background: rgba(245, 158, 11, 0.1);
  padding: 3px 8px;
  border-radius: 4px;
}

.perk-btn {
  background: var(--primary);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 6px;
  text-decoration: none;
  transition: opacity 0.2s;
}
.perk-btn.green { background: var(--success); }
.perk-btn:hover { opacity: 0.9; }

/* FAQ Accordion Section */
.faq-section {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 32px;
}

.faq-header { margin-bottom: 18px; }
.faq-header h3 { font-size: 16px; font-weight: 800; color: #fff; }
.faq-header p { font-size: 12px; color: var(--text-muted); }

.faq-grid { display: flex; flex-direction: column; gap: 10px; }

.faq-accordion {
  background: #0b0f17;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.faq-question {
  padding: 14px 16px;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-question::-webkit-details-marker { display: none; }
.faq-question::after { content: '+'; font-size: 16px; color: var(--text-muted); }
.faq-accordion[open] .faq-question::after { content: '−'; }

.faq-answer {
  padding: 0 16px 14px;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  padding: 24px 0;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: auto;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #10b981;
  color: #fff;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1000;
}
.toast.show { transform: translateY(0); opacity: 1; }

/* ==========================================================================
   Partner Recommendation Card (High-Converting Wholesale/FBA Unit)
   ========================================================================== */
.partner-rec-container {
  margin-top: 18px;
}

.partner-card {
  background: linear-gradient(135deg, rgba(35, 30, 15, 0.8), rgba(20, 15, 7, 0.95));
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 10px;
  padding: 14px 16px;
  position: relative;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.partner-card:hover {
  transform: translateY(-2px);
  border-color: rgba(245, 158, 11, 0.6);
}

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

.partner-badge {
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.partner-tag {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-dim);
}

.partner-body {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.partner-icon {
  font-size: 24px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 6px;
  line-height: 1;
}

.partner-info {
  flex: 1;
}

.partner-title {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
  line-height: 1.3;
}

.partner-desc {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
  margin: 0;
}

.partner-footer {
  text-align: right;
}

.partner-btn {
  display: inline-block;
  background: linear-gradient(135deg, #d97706, #b45309);
  color: #fff;
  text-decoration: none;
  font-size: 11px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 6px;
  transition: opacity 0.2s ease;
}

.partner-btn:hover {
  opacity: 0.9;
}

/* ==========================================================================
   Executive 1-Page Printable PDF Stylesheet for Landed Cost POs
   ========================================================================== */
@media print {
  body {
    background: #fff !important;
    color: #0f172a !important;
    font-size: 12pt;
    padding: 0 !important;
    margin: 0 !important;
  }

  .navbar, .footer, .perks-rewards-section, .faq-section,
  .pwa-banner, .feedback-floating-btn, .feedback-modal-overlay,
  .share-calc-btn, #landed-copy-btn, #landed-pdf-btn {
    display: none !important;
  }

  .main-container {
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .hero-section {
    text-align: left !important;
    margin-bottom: 20px !important;
    border-bottom: 2px solid #0f172a;
    padding-bottom: 12px;
  }

  .hero-section h1 {
    font-size: 20pt !important;
    color: #0f172a !important;
  }

  .calc-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 20px !important;
  }

  .calc-card {
    background: #f8fafc !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: none !important;
    color: #0f172a !important;
  }

  .card-header h2, .form-group label, .profit-label {
    color: #0f172a !important;
  }

  .profit-highlight {
    background: #f1f5f9 !important;
    border: 1px solid #94a3b8 !important;
  }

  .profit-amount {
    color: #b45309 !important;
    font-size: 28pt !important;
  }

  .summary-item {
    border-bottom: 1px solid #e2e8f0 !important;
    color: #334155 !important;
  }

  .summary-item strong {
    color: #0f172a !important;
  }

  .print-letterhead {
    display: block !important;
    border-bottom: 2px solid #0f172a;
    padding-bottom: 12px;
    margin-bottom: 20px;
  }

  .letterhead-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
  }

  .letterhead-title {
    font-size: 18pt;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: 0.5px;
  }

  .letterhead-date {
    font-size: 10pt;
    color: #64748b;
  }

  .letterhead-sub, .letterhead-notes {
    font-size: 11pt;
    color: #334155;
    margin-top: 4px;
  }
}

/* ==========================================================================
   Interactive PDF Customizer Modal & Mobile Sticky Quick-Action Bar
   ========================================================================== */
.print-letterhead {
  display: none;
}

.customizer-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 16px;
}

.customizer-modal-box {
  background: #0d121d;
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: 12px;
  max-width: 480px;
  width: 100%;
  padding: 24px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
  animation: modalPop 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalPop {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.customizer-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
}

.customizer-modal-header h3 {
  font-size: 16px;
  color: #fff;
  font-weight: 700;
  margin: 0;
}

.customizer-modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
}

.modal-form-group {
  margin-bottom: 14px;
}

.modal-form-group label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.modal-form-group input {
  width: 100%;
  background: #06090f;
  border: 1px solid #334155;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 13px;
  color: #fff;
  outline: none;
  transition: border-color 0.2s;
}

.modal-form-group input:focus {
  border-color: var(--primary);
}

.customizer-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
  border-top: 1px solid var(--border);
  padding-top: 14px;
}

.modal-btn-cancel {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.modal-btn-print {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  border: none;
  padding: 8px 18px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
}

/* Mobile Sticky Quick-Action Bar */
.mobile-sticky-bar {
  display: none;
}

@media (max-width: 768px) {
  .mobile-sticky-bar {
    position: fixed;
    bottom: 12px;
    left: 12px;
    right: 12px;
    background: rgba(13, 18, 29, 0.95);
    border: 1px solid rgba(245, 158, 11, 0.4);
    backdrop-filter: blur(12px);
    border-radius: 30px;
    padding: 8px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    z-index: 999;
  }

  .mobile-sticky-info {
    display: flex;
    align-items: center;
    gap: 6px;
  }

  .mobile-sticky-label {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 600;
  }

  .mobile-sticky-val {
    font-size: 14px;
    font-weight: 800;
    color: #fbbf24;
  }

  .mobile-sticky-actions {
    display: flex;
    gap: 6px;
  }

  .mobile-sticky-btn {
    border: none;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
  }

  .mobile-sticky-btn.pdf {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.4);
  }

  .mobile-sticky-btn.share {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.4);
  }
}
