/* ==========================================================================
   J&R MARINE — Official Website Stylesheet
   Design Direction: Clean, Honest, Professional Marine Craftsmanship
   No AI slop, no sci-fi neon glows, no futuristic telemetry bloat.
   Real American boat builder aesthetic: Solid slate navy, clean white,
   crisp typography, and clear product tables.
   ========================================================================== */

:root {
  /* Core Colors */
  --color-primary: #0284c7;
  /* Clean Marine Blue */
  --color-primary-dark: #0369a1;
  --color-accent: #dc2626;
  /* Classic Racing Red */

  --bg-header: #0f172a;
  /* Deep Slate Navy */
  --bg-page: #f8fafc;
  /* Clean Crisp Light Background */
  --bg-card: #ffffff;
  /* Crisp White Card */
  --bg-dark-section: #0f172a;
  /* Professional Dark Sections */
  --bg-card-dark: #1e293b;
  /* Slate Dark Card */

  --text-dark: #0f172a;
  /* Primary Body Text */
  --text-muted: #64748b;
  /* Secondary Body Text */
  --text-light: #f8fafc;
  /* Header & Dark Section Text */
  --text-light-muted: #94a3b8;
  /* Muted Text in Dark Sections */

  --border-light: #e2e8f0;
  --border-dark: #334155;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;

  --font-base: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-base);
  background-color: var(--bg-page);
  color: var(--text-dark);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

.mono {
  font-family: var(--font-mono);
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Top Announcement Strip */
.top-announcement {
  background-color: #0369a1;
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 8px 0;
  text-align: center;
}

.top-announcement a {
  text-decoration: underline;
  color: #fff;
  font-weight: 600;
}

/* Navbar */
.site-header {
  background-color: var(--bg-header);
  border-bottom: 2px solid #1e293b;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-md);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-badge {
  background-color: var(--color-accent);
  color: #ffffff;
  font-weight: 800;
  font-size: 1.1rem;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  letter-spacing: 0.05em;
}

.logo-title h1 {
  font-size: 1.3rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.05em;
  line-height: 1.1;
}

.logo-title p {
  font-size: 0.72rem;
  color: #94a3b8;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-link {
  color: #cbd5e1;
  font-size: 0.92rem;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-link:hover {
  color: #ffffff;
}

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 1px solid transparent;
  transition: background-color 0.15s, border-color 0.15s;
}

.btn-primary {
  background-color: var(--color-primary);
  color: #ffffff;
}

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

.btn-accent {
  background-color: var(--color-accent);
  color: #ffffff;
}

.btn-accent:hover {
  background-color: #b91c1c;
}

.btn-outline-white {
  background-color: transparent;
  color: #ffffff;
  border-color: #475569;
}

.btn-outline-white:hover {
  background-color: #1e293b;
  border-color: #94a3b8;
}

.btn-outline-dark {
  background-color: transparent;
  color: var(--text-dark);
  border-color: var(--border-light);
}

.btn-outline-dark:hover {
  background-color: #f1f5f9;
  border-color: #cbd5e1;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.82rem;
}

/* Hero Section */
.hero-section {
  background-color: var(--bg-header);
  color: #ffffff;
  padding: 60px 0;
  border-bottom: 1px solid var(--border-dark);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
}

.hero-badge {
  display: inline-block;
  background-color: #1e293b;
  border: 1px solid #334155;
  color: #38bdf8;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  margin-bottom: 18px;
}

.hero-title {
  font-size: 2.7rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 16px;
  color: #ffffff;
}

.hero-desc {
  font-size: 1.05rem;
  color: #cbd5e1;
  margin-bottom: 28px;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  gap: 14px;
  margin-bottom: 30px;
}

.hero-stats {
  display: flex;
  gap: 30px;
  border-top: 1px solid #334155;
  padding-top: 20px;
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-number {
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
}

.stat-label {
  font-size: 0.78rem;
  color: #94a3b8;
  text-transform: uppercase;
}

.hero-image-wrap {
  background-color: #1e293b;
  border: 1px solid #334155;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.hero-image-wrap img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.hero-image-caption {
  padding: 12px 16px;
  background-color: #1e293b;
  border-top: 1px solid #334155;
  font-size: 0.85rem;
  color: #cbd5e1;
  display: flex;
  justify-content: space-between;
}

/* About Us Section */
.about-section {
  padding: 60px 0;
  background-color: #ffffff;
  border-bottom: 1px solid var(--border-light);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
}

.section-tag {
  color: var(--color-primary);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
  display: block;
}

.section-title {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 16px;
  line-height: 1.2;
}

.about-text p {
  color: var(--text-muted);
  margin-bottom: 16px;
  font-size: 0.98rem;
}

.highlight-box {
  background-color: #f1f5f9;
  border-left: 4px solid var(--color-primary);
  padding: 16px 20px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 20px 0;
}

.highlight-box h4 {
  font-size: 0.95rem;
  color: var(--text-dark);
  margin-bottom: 6px;
}

.highlight-box p {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

.about-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.feature-box {
  background-color: #f8fafc;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 18px;
}

.feature-box h4 {
  font-size: 1rem;
  margin-bottom: 6px;
  color: var(--text-dark);
}

.feature-box p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Products Section */
.products-section {
  padding: 60px 0;
  background-color: var(--bg-page);
}

.section-center-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 40px;
}

.section-center-header p {
  color: var(--text-muted);
  font-size: 1rem;
}

.product-cards-container {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.product-row-card {
  background-color: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  display: grid;
  grid-template-columns: 420px 1fr;
  overflow: hidden;
  transition: box-shadow 0.2s;
}

.product-row-card:hover {
  box-shadow: var(--shadow-md);
}

.product-media-column {
  background-color: #f1f5f9;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-right: 1px solid var(--border-light);
}

.product-main-photo {
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border-light);
  background-color: #ffffff;
  aspect-ratio: 16 / 10;
}

.product-main-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-thumbnails {
  display: flex;
  gap: 8px;
}

.thumb-btn {
  width: 64px;
  height: 48px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  background: none;
  padding: 0;
}

.thumb-btn.active {
  border-color: var(--color-primary);
}

.thumb-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-details-column {
  padding: 30px;
  display: flex;
  flex-direction: column;
}

.product-header-group {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.product-model-name {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-dark);
}

.product-tag-badge {
  background-color: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #334155;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
}

.product-tag-badge.national {
  background-color: #fef2f2;
  border-color: #fecaca;
  color: var(--color-accent);
}

.product-summary-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 20px;
}

/* Pricing Table */
.pricing-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  margin-bottom: 20px;
}

.pricing-table th {
  background-color: #f8fafc;
  color: var(--text-dark);
  font-weight: 600;
  text-align: left;
  padding: 8px 12px;
  border: 1px solid var(--border-light);
}

.pricing-table td {
  padding: 8px 12px;
  border: 1px solid var(--border-light);
  color: #334155;
}

.pricing-table td.price {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--color-primary);
  text-align: right;
}

.options-list {
  background-color: #f8fafc;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.options-list strong {
  color: var(--text-dark);
}

.product-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  border-top: 1px solid var(--border-light);
  padding-top: 20px;
}

.price-callout {
  display: flex;
  flex-direction: column;
}

.price-callout span {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.price-callout strong {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-dark);
  font-family: var(--font-mono);
}

.product-action-btns {
  display: flex;
  gap: 10px;
}

/* YouTube Section */
.youtube-section {
  background-color: var(--bg-dark-section);
  color: #ffffff;
  padding: 60px 0;
}

.youtube-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 30px;
}

.youtube-channel-info {
  display: flex;
  align-items: center;
  gap: 16px;
}

.yt-channel-icon {
  width: 48px;
  height: 48px;
  background-color: #ff0000;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

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

.video-card {
  background-color: var(--bg-card-dark);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.video-embed-wrap {
  aspect-ratio: 16 / 9;
  background-color: #000;
}

.video-embed-wrap iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.video-meta {
  padding: 16px;
}

.video-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 6px;
  line-height: 1.35;
}

.video-source {
  font-size: 0.8rem;
  color: #94a3b8;
}

/* Photo Gallery Section */
.gallery-section {
  padding: 60px 0;
  background-color: #ffffff;
}

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

.gallery-item {
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border-light);
  background-color: #f1f5f9;
  aspect-ratio: 4 / 3;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s;
}

.gallery-item:hover img {
  transform: scale(1.03);
}

/* How to Order / Workflow */
.order-workflow-section {
  padding: 60px 0;
  background-color: #f1f5f9;
  border-top: 1px solid var(--border-light);
}

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

.step-card {
  background-color: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 24px;
}

.step-number {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-primary);
  margin-bottom: 8px;
}

.step-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 8px;
}

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

/* Footer */
.site-footer {
  background-color: var(--bg-header);
  color: #cbd5e1;
  padding: 50px 0 30px;
  border-top: 1px solid var(--border-dark);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand h3 {
  color: #ffffff;
  font-size: 1.2rem;
  margin-bottom: 12px;
}

.footer-brand p {
  font-size: 0.88rem;
  color: #94a3b8;
  line-height: 1.6;
  margin-bottom: 16px;
}

.footer-contact {
  font-size: 0.88rem;
  color: #ffffff;
}

.footer-col h4 {
  color: #ffffff;
  font-size: 0.95rem;
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 8px;
}

.footer-col a {
  color: #94a3b8;
  font-size: 0.88rem;
}

.footer-col a:hover {
  color: #ffffff;
}

.footer-bottom {
  border-top: 1px solid #1e293b;
  padding-top: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 0.82rem;
  color: #64748b;
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(15, 23, 42, 0.7);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

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

.modal-window {
  background-color: #ffffff;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  overflow-y: auto;
  border: 1px solid var(--border-light);
}

.modal-window.wide {
  max-width: 900px;
}

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

.modal-header h3 {
  font-size: 1.15rem;
  color: var(--text-dark);
}

.modal-close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  color: #64748b;
  cursor: pointer;
  padding: 4px;
}

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

.modal-body {
  padding: 24px;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #f8fafc;
}

/* Forms */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

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

.form-group.full {
  grid-column: 1 / -1;
}

.form-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-dark);
}

.form-label span.req {
  color: var(--color-accent);
}

.form-input,
.form-select,
.form-textarea {
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  font-family: var(--font-base);
  font-size: 0.9rem;
  color: var(--text-dark);
  background-color: #ffffff;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.2);
}

.form-textarea {
  min-height: 70px;
  resize: vertical;
}

.form-help {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.bid-product-summary {
  background-color: #f8fafc;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.bid-product-summary h4 {
  font-size: 0.95rem;
  color: var(--text-dark);
}

.bid-product-summary p {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.bid-product-summary .quote-amount {
  font-size: 1.3rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--color-primary);
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background-color: #0f172a;
  color: #ffffff;
  border-left: 4px solid #10b981;
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  font-size: 0.9rem;
  z-index: 2000;
  display: none;
}

.toast.show {
  display: block;
}

/* Admin Table */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  margin-top: 14px;
}

.admin-table th {
  background-color: #f8fafc;
  padding: 8px 10px;
  border: 1px solid var(--border-light);
  font-weight: 600;
  text-align: left;
}

.admin-table td {
  padding: 8px 10px;
  border: 1px solid var(--border-light);
  color: #334155;
}

/* Responsive */
@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .about-grid {
    grid-template-columns: 1fr;
  }

  .product-row-card {
    grid-template-columns: 1fr;
  }

  .product-media-column {
    border-right: none;
    border-bottom: 1px solid var(--border-light);
  }

  .video-grid {
    grid-template-columns: 1fr;
  }

  .photo-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .workflow-steps {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .main-nav {
    display: none;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-stats {
    flex-direction: column;
    gap: 12px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .workflow-steps {
    grid-template-columns: 1fr;
  }
}