/* WranglerYJ.com — responsive redesign
   Color theme from original arriviste era: white ground, #cc3333 accent, dark text */

:root {
  --red: #cc3333;
  --red-dark: #ae0000;
  --red-soft: #f8eaea;
  --text: #222222;
  --text-muted: #555555;
  --border: #e0e0e0;
  --bg: #ffffff;
  --bg-soft: #f7f7f7;
  --sidebar: 15.5rem;
  --shell: 72rem;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  --font: "Segoe UI", system-ui, -apple-system, verdana, helvetica, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
}

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

a {
  color: var(--text);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a:hover {
  color: var(--red);
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--red);
  color: #fff;
  padding: 0.5rem 1rem;
  z-index: 1000;
}

.skip-link:focus {
  left: 0.5rem;
  top: 0.5rem;
}

.shell {
  width: min(100% - 1.5rem, var(--shell));
  margin-inline: auto;
}

/* ---------- Header ---------- */

.site-header {
  border-bottom: 3px solid var(--red);
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "brand toggle"
    "tagline tagline";
  gap: 0.35rem 1rem;
  align-items: center;
  padding: 0.65rem 0 0.75rem;
}

.brand {
  grid-area: brand;
  display: block;
  line-height: 0;
}

.brand img {
  display: block;
  width: min(100%, 28rem);
  height: auto;
  border: 0;
}

.tagline {
  grid-area: tagline;
  margin: 0;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.nav-toggle {
  grid-area: toggle;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 3rem;
  height: 3rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  cursor: pointer;
  color: var(--text);
}

.nav-toggle-bar {
  display: block;
  width: 1.25rem;
  height: 2px;
  background: var(--red);
  border-radius: 1px;
}

.nav-toggle-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.nav-toggle[aria-expanded="true"] {
  border-color: var(--red);
  background: var(--red-soft);
}

/* ---------- Layout ---------- */

.layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  padding: 1rem 0 2.5rem;
  align-items: start;
}

.site-nav {
  display: none;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem;
  margin-bottom: 1rem;
}

.site-nav.is-open {
  display: block;
}

.nav-block + .nav-block {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
}

.nav-heading {
  margin: 0 0 0.4rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--red);
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-list a {
  display: block;
  padding: 0.4rem 0.55rem;
  border-radius: 6px;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.nav-list a:hover {
  background: #fff;
  color: var(--text);
}

.nav-list a.is-active {
  background: var(--red);
  color: #fff;
}

.nav-list-shop {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.1rem;
}

.nav-list-shop a {
  font-size: 0.85rem;
  padding: 0.35rem 0.45rem;
}

.main {
  min-width: 0;
}

.article {
  background: #fff;
}

/* ---------- Typography / content ---------- */

.article h1 {
  margin: 0 0 0.85rem;
  font-size: clamp(1.45rem, 2.5vw, 1.85rem);
  line-height: 1.2;
  text-align: left;
  color: var(--text);
  border-bottom: 2px solid var(--red);
  padding-bottom: 0.55rem;
}

.article h2,
.section-heading {
  margin: 1.75rem 0 0.65rem;
  font-size: 1.15rem;
  color: var(--text);
}

.article h3 {
  margin: 1.25rem 0 0.45rem;
  font-size: 1.02rem;
}

.article h4 {
  margin: 1.1rem 0 0.4rem;
  font-size: 0.98rem;
  color: var(--red);
}

.lead {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin: 0 0 1rem;
}

.pagecontent,
.article p,
.storecontent {
  margin: 0 0 1rem;
  color: #333;
  text-align: left;
}

.article ul,
.article ol {
  margin: 0 0 1rem 1.2rem;
  padding: 0;
}

.article li {
  margin-bottom: 0.4rem;
}

.article img.float-left,
.pagecontent img.float-left {
  float: left;
  margin: 0 1rem 0.75rem 0;
  border: 1px solid var(--border);
  border-radius: 4px;
  max-width: min(200px, 42vw);
}

.article .clear,
.clear {
  clear: both;
}

.content-photo,
.sye-photo {
  display: block;
  max-width: min(100%, 28rem);
  margin: 0.75rem auto;
  border: 1px solid var(--border);
  border-radius: 4px;
  float: none;
}

.note {
  background: var(--red-soft);
  border-left: 3px solid var(--red);
  padding: 0.75rem 0.9rem;
  margin: 1rem 0;
  font-size: 0.95rem;
  color: #444;
}

/* Spec / gear tables */
.spec-table,
.gear-table,
.article table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  margin: 1rem 0;
}

.spec-table th,
.spec-table td,
.gear-table td,
.article table th,
.article table td {
  border: 1px solid #ccc;
  padding: 0.35rem 0.45rem;
  text-align: center;
}

.spec-table th,
.article table th {
  background: var(--bg-soft);
  font-size: 0.78rem;
}

.spec-table caption {
  text-align: left;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.gear-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1rem 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.gear-table {
  margin: 0;
  font-size: 0.7rem;
  white-space: nowrap;
}

/* Home cards / thumbs */
.home-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(4.5rem, 1fr));
  gap: 0.4rem;
  margin: 1rem 0 1.25rem;
}

.home-thumbs img {
  width: 100%;
  aspect-ratio: 5 / 4;
  object-fit: cover;
  border: 1px solid var(--border);
  border-radius: 4px;
  display: block;
}

.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin: 1rem 0 1.5rem;
}

.card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
  background: var(--bg-soft);
  box-shadow: var(--shadow);
}

.card h3 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  font-weight: 700;
}

.card h3 a {
  color: var(--red);
  text-decoration: none;
}

.card h3 a:hover {
  text-decoration: underline;
}

.card p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-muted);
}

.shop-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 1rem 0 1.5rem;
}

.shop-chip {
  display: inline-block;
  padding: 0.4rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  text-decoration: none;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.shop-chip:hover {
  border-color: var(--red);
  color: var(--red);
  background: var(--red-soft);
}

/* ---------- Listings ---------- */

.listings-section {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.section-heading {
  margin-top: 0;
  padding-bottom: 0.35rem;
  border-bottom: 2px solid var(--red);
  display: inline-block;
}

.ebay-listings {
  margin-top: 0.85rem;
}

.listing-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

.listing-card {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: 0.75rem;
  align-items: start;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.listing-card:hover {
  border-color: var(--red);
  box-shadow: 0 2px 8px rgba(204, 51, 51, 0.12);
}

.listing-card-link {
  display: contents;
  text-decoration: none;
  color: inherit;
}

.listing-card-media {
  background: var(--bg-soft);
  min-height: 5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem;
}

.listing-card-media img {
  width: 100%;
  height: 5rem;
  object-fit: contain;
  border: 0;
}

.listing-card-body {
  padding: 0.55rem 0.7rem 0.65rem 0;
  min-width: 0;
}

.listing-card-title {
  margin: 0 0 0.35rem;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.listing-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  font-size: 0.85rem;
  align-items: baseline;
}

.listing-card-price {
  color: var(--red-dark);
  font-weight: 700;
  font-size: 1rem;
}

.listing-card-condition,
.listing-card-time {
  color: var(--text-muted);
}

.listings-meta {
  margin-top: 0.75rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.listings-empty,
.listings-loading {
  color: var(--text-muted);
  font-size: 0.95rem;
  padding: 0.75rem 0;
}

/* gauge grid from gas tank page */
.gauge-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin: 1rem 0;
}

.gauge-grid figure {
  margin: 0;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.gauge-grid img {
  width: 100%;
  max-width: 280px;
  margin: 0 auto 0.35rem;
  display: block;
  border: 1px solid var(--border);
  border-radius: 4px;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 3px solid var(--red);
  background: var(--bg-soft);
  padding: 1.25rem 0 1.75rem;
  margin-top: auto;
}

.footer-inner p {
  margin: 0.25rem 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
}

.footer-note {
  font-size: 0.78rem !important;
  max-width: 40rem;
  margin-inline: auto !important;
}

/* ---------- Desktop ---------- */

@media (min-width: 800px) {
  .header-inner {
    grid-template-columns: 1fr auto;
    grid-template-areas: "brand tagline";
    align-items: end;
    padding: 0.85rem 0 0.9rem;
  }

  .brand img {
    width: min(100%, 32rem);
  }

  .tagline {
    text-align: right;
    padding-bottom: 0.35rem;
  }

  .nav-toggle {
    display: none;
  }

  .layout {
    grid-template-columns: var(--sidebar) minmax(0, 1fr);
    gap: 1.5rem;
    padding-top: 1.35rem;
  }

  .site-nav {
    display: block;
    position: sticky;
    top: 5.5rem;
    max-height: calc(100vh - 6.5rem);
    overflow-y: auto;
    margin-bottom: 0;
  }

  .nav-list-shop {
    grid-template-columns: 1fr;
  }

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

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

@media (min-width: 1100px) {
  .listing-grid {
    grid-template-columns: 1fr 1fr 1fr;
  }

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

  .listing-card-media {
    min-height: 9rem;
    padding: 0.5rem;
  }

  .listing-card-media img {
    height: 8.5rem;
  }

  .listing-card-body {
    padding: 0.15rem 0.85rem 0.85rem;
  }

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

@media (max-width: 520px) {
  .article img.float-left,
  .pagecontent img.float-left {
    float: none;
    display: block;
    margin: 0 auto 0.75rem;
    max-width: min(100%, 16rem);
  }

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

  .nav-list-shop {
    grid-template-columns: 1fr;
  }
}

/* Print */
@media print {
  .site-nav,
  .nav-toggle,
  .listings-section {
    display: none !important;
  }

  .layout {
    display: block;
  }

  .site-header {
    position: static;
  }
}
