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

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  background: linear-gradient(135deg, #f5f7fa 0%, #f0f4f8 100%);
  color: #2c3e50;
  line-height: 1.6;
  min-height: 100vh;
}

/* ── Hero banner (index page only) ─────────────────────────────────────── */

.site-hero {
  max-width: 1300px;
  margin: 1.25rem auto 0;
  height: 260px;
  overflow: hidden;
  position: relative;
  border-radius: 10px;
}

.site-hero-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

.site-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.25) 0%,
    rgba(0, 0, 0, 0.55) 100%
  );
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1rem;
}

.site-hero-title {
  font-size: 3rem;
  font-weight: 800;
  color: white;
  letter-spacing: -1px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
  margin: 0;
}

.site-hero-sub {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.9);
  margin-top: 0.5rem;
  font-weight: 400;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
  letter-spacing: 0.5px;
}

/* ── Navbar ────────────────────────────────────────────────────────────── */

.navbar {
  background: white;
  border-bottom: 2px solid #e8f0fe;
  padding: 0.625rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.nav-container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.nav-back {
  color: #9ca3af;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  white-space: nowrap;
  transition: color 0.2s;
}

.nav-back:hover {
  color: #6b7280;
}

.navbar h1 {
  font-size: 1.75rem;
  font-weight: 700;
  color: #1f2937;
  letter-spacing: -0.5px;
}

.navbar h1 a {
  color: #1f2937;
  text-decoration: none;
  transition: color 0.3s;
}

.navbar h1 a:hover {
  color: #2563eb;
}

main {
  max-width: 1300px;
  margin: 1.25rem auto;
}

.about-section {
  background: white;
  padding: 1.25rem;
  border-radius: 12px;
  margin-bottom: 1.25rem;
  border: none;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
}

.about-section p {
  font-size: 1.1rem;
  color: #4b5563;
  line-height: 1.8;
}

.btn-inquire {
  display: inline-block;
  margin-top: 1rem;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: white;
  border: none;
  padding: 0.6rem 1.25rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-inquire:hover {
  background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.4);
}

.controls {
  display: flex;
  gap: 0.625rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.search-box, .category-filter {
  padding: 0.4375rem 0.625rem;
  border: 2px solid #e8f0fe;
  border-radius: 8px;
  font-size: 1rem;
  background-color: #fff;
  transition: all 0.3s;
  color: #2c3e50;
}

.search-box {
  flex: 1;
  min-width: 250px;
}

.category-filter {
  min-width: 180px;
  cursor: pointer;
  font-weight: 500;
}

.search-box:focus, .category-filter:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
  background-color: #f8fafc;
}

.items-table {
  width: 100%;
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
  border-collapse: collapse;
}

.items-table thead {
  background: #f8fafc;
  border-bottom: 2px solid #e8f0fe;
}

.items-table thead th {
  padding: 0.625rem;
  text-align: left;
  font-weight: 700;
  color: #1f2937;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.items-table tbody tr {
  border-bottom: 1px solid #e8f0fe;
  transition: all 0.2s;
}

.items-table tbody tr:hover {
  background-color: #f8fafc;
  cursor: pointer;
}

.items-table tbody tr:last-child {
  border-bottom: none;
}

.items-table td {
  padding: 0.625rem;
  color: #4b5563;
}

.items-table td.item-name {
  font-weight: 600;
  color: #2563eb;
}

.items-table td.item-style-size {
  color: #6b7280;
  font-size: 0.9rem;
}

.items-table td.item-msrp {
  color: #9ca3af;
  font-size: 0.95rem;
  text-align: right;
}

.msrp-own {
  font-size: 0.8rem;
  color: #9ca3af;
}

.msrp-total {
  font-size: 0.95rem;
  color: #9ca3af;
  white-space: nowrap;
}

.items-table tr.child-row td.item-msrp {
  font-size: 0.8rem;
}

.items-table td.item-notes {
  color: #6b7280;
  font-size: 0.875rem;
  font-style: italic;
  max-width: 280px;
}

.items-table td.item-price {
  font-weight: 700;
  color: #059669;
  font-size: 1.1rem;
  text-align: right;
}

.items-table tr.child-row td.item-price {
  font-weight: normal;
  color: #9ca3af;
  font-size: 0.95rem;
}

.price-each {
  font-size: 0.8rem;
  font-weight: 500;
  color: #6b7280;
}

.items-table tbody tr.child-row {
  background-color: #fafbff;
}

.items-table tbody tr.child-row:hover {
  background-color: #f0f4ff;
}

.items-table tbody tr.child-row td.item-name {
  padding-left: 1rem;
  color: #4b5563;
  font-weight: 500;
}

.child-indent {
  color: #93c5fd;
  margin-right: 0.35rem;
  font-style: normal;
}

.category-section {
  margin-bottom: 1.5rem;
}

.category-heading {
  font-size: 1.3rem;
  font-weight: 700;
  color: #1f2937;
  padding: 0.3rem 0.5rem;
  background: #e8f0fe;
  border-radius: 8px 8px 0 0;
  border-bottom: 2px solid #c7d7f9;
  margin-bottom: 0;
}

.items-table td.item-thumbnail {
  width: 160px;
  height: 160px;
  padding: 0.25rem !important;
}

.items-table tbody tr.child-row td.item-thumbnail {
  width: 80px;
  height: 80px;
}

.items-table tbody tr.child-row td.item-thumbnail img {
  width: 80px;
  height: 80px;
}

.items-table td.item-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}

.items-table td.item-category {
  font-size: 0.9rem;
  background: #f0f4f8;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  display: inline-block;
  color: #4b5563;
  font-weight: 500;
}

.no-results {
  text-align: center;
  padding: 2rem 1rem;
  color: #9ca3af;
  font-size: 1.2rem;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
}

.item-detail {
  background: white;
  padding: 1.25rem;
  border-radius: 12px;
  margin-bottom: 1.25rem;
  border: none;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
}

.item-detail h2 {
  font-size: 2.25rem;
  margin-bottom: 1rem;
  color: #1f2937;
  font-weight: 700;
}

.item-container {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

@media (max-width: 768px) {
  .item-container {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

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

.item-images {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* ── Carousel ──────────────────────────────────────────────────────────── */

.carousel {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.carousel-main-wrap {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  background: #f0f4f8;
}

.carousel-main-img {
  width: 100%;
  max-height: 500px;
  object-fit: contain;
  display: block;
}

.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.85);
  border: none;
  border-radius: 50%;
  width: 2.5rem;
  height: 2.5rem;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  transition: background 0.2s;
}

.carousel-arrow:hover {
  background: white;
}

.carousel-prev { left: 0.5rem; }
.carousel-next { right: 0.5rem; }

.carousel-thumbs {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.carousel-thumb {
  width: 72px;
  height: 72px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  background: #f0f4f8;
  transition: border-color 0.2s;
  flex-shrink: 0;
}

.carousel-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.carousel-thumb.active {
  border-color: #2563eb;
}

.carousel-thumb:hover:not(.active) {
  border-color: #93c5fd;
}

.no-images {
  padding: 1.5rem 1rem;
  text-align: center;
  color: #9ca3af;
  background-color: #f8fafc;
  border-radius: 12px;
  border: 2px dashed #e8f0fe;
}

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

.price-section {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #e8f0fe;
}

.price-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #9ca3af;
  margin-bottom: 0.125rem;
}

.asking-price {
  font-size: 2.5rem;
  font-weight: 800;
  color: #059669;
}

.detail-selling-notes {
  margin-top: 0.25rem;
  font-size: 0.95rem;
  font-style: italic;
  color: #6b7280;
}

.price-qualifier {
  font-size: 1rem;
  font-weight: 500;
  color: #6b7280;
  margin-left: 0.5rem;
}

.item-details {
  width: 100%;
  margin-bottom: 1rem;
  border-collapse: collapse;
}

.item-details tr {
  border-bottom: 1px solid #e8f0fe;
}

.item-details td {
  padding: 0.5rem 0;
}

.detail-label {
  font-weight: 700;
  width: 140px;
  color: #1f2937;
  font-size: 0.95rem;
}

.detail-value {
  color: #4b5563;
  font-size: 0.95rem;
}

.item-detail h3 {
  font-size: 1.35rem;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
  color: #1f2937;
  font-weight: 700;
}

.item-detail p {
  line-height: 1.8;
  margin-bottom: 0.5rem;
  color: #4b5563;
}

/* ── Full-width body section below the two-column header ───────────────── */

.item-body {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 2px solid #e8f0fe;
  display: flex;
  flex-direction: column;
}

/* ── Description + Features two-column layout ──────────────────────────── */

.prose-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 1rem;
}

.prose-col h3 {
  margin-top: 0 !important;
}

@media (max-width: 768px) {
  .prose-two-col {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

.btn-interested {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  font-size: 1.05rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s;
  margin-top: 1rem;
  margin-bottom: 1.25rem;
  align-self: flex-start;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-interested:hover {
  background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.4);
}

/* ── Also Available grid ───────────────────────────────────────────────── */

.p3-parts {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 2px solid #e8f0fe;
}

.p3-parts h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 0.375rem;
}

.p3-parts-note {
  color: #6b7280;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.p3-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 0.5rem;
}

.p3-item-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: #1f2937;
  background: #f8fafc;
  border: 2px solid #e8f0fe;
  border-radius: 10px;
  padding: 0.5rem;
  transition: all 0.2s;
  text-align: center;
}

.p3-item-card:hover {
  border-color: #2563eb;
  background: white;
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.12);
}

.p3-item-image {
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 6px;
  margin-bottom: 0.375rem;
  background: #e8f0fe;
}

.p3-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.p3-item-name {
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.3;
  color: #374151;
}

@media (max-width: 768px) {
  .p3-grid {
    grid-template-columns: repeat(auto-fill, minmax(65px, 1fr));
    gap: 0.375rem;
  }
}

/* ── Back link ──────────────────────────────────────────────────────────── */

.back-link {
  color: #2563eb;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s;
}

.back-link:hover {
  color: #1d4ed8;
  gap: 0.75rem;
}

.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
  animation: fadeIn 0.2s;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-content {
  background: white;
  margin: 2.5% auto;
  padding: 1.25rem;
  border: none;
  border-radius: 12px;
  width: 90%;
  max-width: 500px;
  box-shadow: 0 20px 25px rgba(0, 0, 0, 0.15);
  animation: slideUp 0.3s;
}

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

.close {
  color: #9ca3af;
  float: right;
  font-size: 32px;
  font-weight: 300;
  cursor: pointer;
  line-height: 1;
  transition: color 0.3s;
}

.close:hover, .close:focus {
  color: #1f2937;
}

.modal h3 {
  margin-bottom: 1rem;
  color: #1f2937;
  font-size: 1.5rem;
  font-weight: 700;
}

.modal form label {
  display: block;
  margin-top: 0.625rem;
  font-weight: 600;
  color: #1f2937;
  font-size: 0.95rem;
}

.modal form input, .modal form textarea {
  width: 100%;
  padding: 0.4375rem 0.5rem;
  margin-top: 0.25rem;
  border: 2px solid #e8f0fe;
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  color: #2c3e50;
  transition: all 0.3s;
}

.modal form input::placeholder, .modal form textarea::placeholder {
  color: #d1d5db;
}

.modal form input:focus, .modal form textarea:focus {
  outline: none;
  border-color: #2563eb;
  background-color: #f8fafc;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-note {
  display: block;
  margin-top: 0.375rem;
  color: #6b7280;
  font-size: 0.85rem;
  font-weight: 500;
}

.btn-submit {
  width: 100%;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: white;
  border: none;
  padding: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  margin-top: 1rem;
  transition: all 0.3s;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-submit:hover {
  background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.4);
}

.footer {
  background: white;
  border-top: 2px solid #e8f0fe;
  padding: 1.5rem 1rem;
  text-align: center;
  color: #6b7280;
  margin-top: 1.5rem;
  font-size: 0.95rem;
}

.footer a {
  color: #2563eb;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s;
}

.footer a:hover {
  color: #1d4ed8;
}

@media (max-width: 768px) {
  .navbar {
    padding: 0.5rem 0;
  }

  .navbar h1 {
    font-size: 1.5rem;
  }

  main {
    margin: 0.75rem auto;
    padding: 0 0.75rem;
  }

  .about-section {
    padding: 0.75rem;
  }

  .controls {
    gap: 0.375rem;
    margin-bottom: 0.75rem;
  }

  .search-box, .category-filter {
    padding: 0.375rem 0.5rem;
    font-size: 0.95rem;
  }

  .items-table {
    font-size: 0.9rem;
  }

  .items-table thead th,
  .items-table td {
    padding: 0.4375rem;
  }

  .item-detail {
    padding: 0.75rem;
  }

  .item-detail h2 {
    font-size: 1.75rem;
  }

  .item-container {
    gap: 0.75rem;
  }

  .asking-price {
    font-size: 2rem;
  }
}