/* =========================
   Base
   ========================= */

html, body {
  margin: 0;
  padding: 0;
}

* {
  box-sizing: border-box;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont,
               "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: #fafafa;
  color: #222;
}


/* =========================
   Layout
   ========================= */

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


/* =========================
   Header
   ========================= */

.site-header {
  background: #fff;
  border-bottom: 1px solid #e5e5e5;
}

.site-header .container {
  padding: 32px 24px 24px;
}

.site-header h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 600;
}

.site-header .tagline {
  margin-top: 6px;
  font-size: 15px;
  color: #666;
}


/* =========================
   Main
   ========================= */

.site-main .container {
  padding: 32px 24px 48px;
}


/* =========================
   Table
   ========================= */

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid #e5e5e5;
}

thead th {
  background: #f3f3f3;
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  border-bottom: 1px solid #e5e5e5;
}

tbody td {
  padding: 12px 14px;
  font-size: 14px;
  border-bottom: 1px solid #eee;
}

tbody tr:hover:not(.model-row) {
  background: #fafafa;
}

.table-meta {
  margin-top: 10px;
  font-size: 13px;
  color: #777;
}


/* =========================
   Model grouping (FINAL FIX)
   ========================= */

.model-row td {
  background: #f8f9fb;
  font-size: 15px;
  font-weight: 600;
  padding: 14px;

  /* 🔑 This replaces the border cleanly */
  box-shadow: inset 0 -1px 0 #e5e5e5;
}


/* =========================
   Shop column alert button
   ========================= */

.model-row .shop-alert {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.price-alert-btn {
  font-size: 11px;
  font-weight: 500;
  color: #444;
  background: #f1f2f4;
  border: 1px solid #e1e2e6;
  border-radius: 3px;
  padding: 3px 8px;
  cursor: pointer;
}

.price-alert-btn:hover {
  background: #e9eaee;
  border-color: #d6d7db;
}


/* =========================
   Best price (LOCKED)
   ========================= */

.best-price td {
  background-color: #f6fbf8;
}

.best-price td:first-child {
  border-left: 2px solid #9fcfb4;
}

.best-price .price {
  font-weight: 600;
}


/* =========================
   Numeric alignment
   ========================= */

th.price,
td.price {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

th.delta,
td.delta {
  text-align: center;
}


/* =========================
   Delta
   ========================= */

.delta-val {
  font-size: 13px;
  font-weight: 500;
}

.delta-up {
  color: #1a7f37;
}

.delta-down {
  color: #b42318;
}

.delta-none {
  color: #777;
}


/* =========================
   Availability
   ========================= */

.available {
  color: #1a7f37;
  font-weight: 600;
}

.unavailable {
  color: #b42318;
  font-weight: 600;
}

.availability-note {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  line-height: 1.3;
  color: #000;
  opacity: 0.45;
  font-weight: 400;
}


/* =========================
   Clickable price (NEW)
   ========================= */

.clickable-price {
  cursor: pointer;
  position: relative;
}

.clickable-price:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.clickable-price:active {
  opacity: 0.75;
}

.price-active {
  font-weight: 600;
}


/* =========================
   Footer
   ========================= */

.site-footer {
  background: #fff;
  border-top: 1px solid #e5e5e5;
}

.site-footer .container {
  padding: 24px;
  font-size: 13px;
  color: #777;
}

.site-footer .muted {
  color: #999;
}


/* =========================
   Mobile
   ========================= */

@media (max-width: 600px) {
  thead {
    display: none;
  }

  table, tbody, tr {
    display: block;
    width: 100%;
  }

  tbody tr {
    padding: 12px 0;
    border-bottom: 1px solid #e5e5e5;
  }

  tbody td {
    display: block;
    padding: 6px 14px;
    text-align: left !important;
  }
}
