:root {
  --green: #2f5d3a;
  --dark: #1d1d1d;
  --rust: #8b4a2f;
  --cream: #f7f3eb;
  --gray: #666;
  --light-gray: #e6e1d8;
  --white: #ffffff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.6;
  color: var(--dark);
  background: var(--cream);
}

a {
  color: var(--green);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  width: 96%;
  margin: 0 auto;
}

.topbar {
  background: var(--dark);
  color: var(--white);
  font-size: 0.95rem;
  padding: 0.65rem 0;
}

.topbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.topbar-left {
  font-weight: 500;
}

.topbar-right {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.topbar-right a {
  color: var(--white);
  text-decoration: none;
  font-weight: 600;
}

.topbar-right a:hover {
  text-decoration: underline;
}

.home-hero {
  background: linear-gradient(rgba(29,29,29,0.6), rgba(29,29,29,0.6)),
              url('https://www.lakelandtractor.com/bapics/banner02.jpg') center/cover no-repeat;
  color: var(--white);
}

.logo {
  font-size: 1.9rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.logo span {
  color: #d9c59a;
}

.hero {
  padding: 5rem 0 6rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 2rem;
  align-items: center;
}

.hero h1 {
  font-size: clamp(2.3rem, 5vw, 4rem);
  line-height: 1.1;
  margin: 0 0 1rem;
}

.hero p {
  font-size: 1.1rem;
  max-width: 950px;
  margin: 0 0 1.5rem;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 0.95rem 1.35rem;
  border-radius: 999px;
  font-weight: 700;
  transition: 0.2s ease;
}

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

.btn-primary:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-secondary {
  border: 2px solid var(--white);
  color: var(--white);
}

.btn-secondary:hover {
  text-decoration: none;
  background: rgba(255,255,255,0.12);
}

.hero-card {
  background: rgba(255,255,255,0.92);
  color: var(--dark);
  border-radius: 20px;
  padding: 1.5rem;
  box-shadow: 0 14px 35px rgba(0,0,0,0.2);
  max-width: 420px;
}

.hero-card h3 {
  margin-top: 0;
  color: var(--green);
}

.hero-card ul {
  margin: 0;
  padding-left: 1.2rem;
}

section {
  padding: 1rem 0;
}

.section-title {
  font-size: 2rem;
  margin: 0 0 0.75rem;
}

.section-intro {
  max-width: 1100px;
  color: var(--gray);
  margin-bottom: 2rem;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.card {
  background: var(--white);
  padding: 1.6rem;
  border-radius: 18px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.06);
  border: 1px solid var(--light-gray);
}

.card h3 {
  margin-top: 0;
  color: var(--green);
}

.highlight {
  background: #efe5d2;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.gallery-item {
  background: var(--white);
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--light-gray);
  box-shadow: 0 8px 18px rgba(0,0,0,0.05);
}

.gallery-photo {
  height: 220px;
  background: linear-gradient(135deg, #b8b1a4, #ddd4c6);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #4d4d4d;
  font-weight: 700;
  text-align: center;
  padding: 1rem;
}

.gallery-copy {
  padding: 1rem;
}

.parts-links {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.parts-link {
  background: var(--white);
  border-radius: 16px;
  padding: 1.2rem;
  border: 1px solid var(--light-gray);
  text-align: center;
  font-weight: 700;
}

.cta {
  background: var(--green);
  color: var(--white);
  border-radius: 24px;
  padding: 2rem;
}

.cta h2 {
  margin-top: 0;
  font-size: 2rem;
}

.cta a {
  color: #f8e2b4;
}

footer {
  background: var(--dark);
  color: #d7d7d7;
  padding: 2rem 0;
}

footer a {
  color: #f1ddb2;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 2rem;
}

/* ===== header.js ===== */

.logo-link {
  color: inherit;
  text-decoration: none;
}

.logo-link:hover {
  text-decoration: none;
}

.topbar-main-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.topbar-lower-row {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.mobile-icons {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.mobile-icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.mobile-icon-link img {
  display: block;
  width: 22px;
  height: 22px;
}

.menu-toggle {
  display: none;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  flex-shrink: 0;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 3px;
  background: var(--white);
  margin: 4px 0;
  border-radius: 2px;
}

/* ===== index hero desktop/mobile ===== */

.hero-main {
  max-width: 950px;
}

.hero-card-desktop {
  display: block;
}

.hero-card-mobile-wrap {
  display: none;
}

.hero-card-mobile {
  width: 100%;
  max-width: 100%;
  margin-top: 1rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 980px) {
  .hero-grid,
  .two-col,
  .cards,
  .gallery-grid,
  .parts-links,
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

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

  .topbar .container {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }

  .topbar-main-row {
    gap: 0.75rem;
  }

  .topbar-lower-row {
    display: block;
  }

  .topbar-left {
    display: none;
  }

  .topbar-right {
    display: none;
    width: 100%;
    flex-direction: column;
    gap: 0;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255,255,255,0.12);
  }

  .topbar-right.nav-open {
    display: flex;
  }

  .topbar-right a {
    display: block;
    padding: 0.7rem 0;
  }

  .menu-toggle {
    display: inline-block;
  }

  .hero-grid,
  .two-col,
  .cards,
  .gallery-grid,
  .parts-links,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 2rem 0 2rem;
  }

  .hero h1 {
    font-size: 1.8rem;
    line-height: 1.2;
  }

  .hero p {
    font-size: 1rem;
    max-width: 100%;
  }

  .hero-card-desktop {
    display: none;
  }

  .hero-card-mobile-wrap {
    display: block;
  }

  .logo {
    font-size: 1.35rem;
    line-height: 1.1;
    flex: 1 1 auto;
  }

  .container {
    width: 95%;
  }
}

@media (min-width: 701px) {
  .topbar-main-row {
    width: auto;
    gap: 1.5rem;
  }

  .mobile-icons {
    display: none;
  }

  .topbar-right {
    display: flex !important;
  }
}


/* ===== tractor pages ===== */

.tractor-page {
  padding: 2rem 0 4rem;
}

.tractor-title {
  font-size: clamp(2rem, 4vw, 3rem);
  margin: 0 0 0.5rem;
}

.tractor-intro {
  max-width: 1100px;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.gallery img {
  width: 100%;
  border-radius: 12px;
  border: 1px solid #ddd;
  display: block;
}

.status {
  background: #efe5d2;
  padding: 1rem;
  border-radius: 12px;
}

.specs {
  background: #ffffff;
  border: 1px solid #ddd8cd;
  border-radius: 12px;
  padding: 1rem;
}

.parts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.part-card {
  background: var(--white);
  border: 1px solid #ddd8cd;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.06);
}

.part-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

.part-card-body {
  padding: 1rem;
}

.price {
  color: var(--green);
  font-weight: 700;
  margin-bottom: 0.65rem;
}

.part-link {
  display: inline-block;
  margin-top: 0.6rem;
  background: var(--green);
  color: var(--white);
  text-decoration: none;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  font-weight: 700;
}

.part-link:hover {
  background: #254b2f;
  text-decoration: none;
}

@media (max-width: 700px) {
  .tractor-page {
    padding: 1.5rem 0 3rem;
  }

  .part-card img {
    height: auto;
  }
}



/* ===== part pages ===== */

.part-page {
  padding: 2rem 0 4rem;
}

.breadcrumbs {
  font-size: 0.95rem;
  margin-bottom: 1rem;
  color: #555;
}

.part-hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 1.5rem;
  align-items: start;
}

.part-main-photo img,
.part-thumbs img {
  width: 100%;
  display: block;
  border-radius: 14px;
  border: 1px solid #ddd8cd;
}

.part-thumbs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}

.part-summary-box {
  background: var(--white);
  border: 1px solid #ddd8cd;
  border-radius: 16px;
  padding: 1.25rem;
  box-shadow: 0 10px 24px rgba(0,0,0,0.06);
}

.part-title {
  font-size: clamp(2rem, 4vw, 3rem);
  margin: 0 0 0.75rem;
  line-height: 1.15;
}

.part-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--green);
  margin-bottom: 1rem;
}

.label {
  font-weight: 700;
}

.part-action-box {
  border-radius: 16px;
  padding: 1.25rem;
  margin-top: 1rem;
}

.part-action-box.shippable {
  background: #efe5d2;
  color: var(--dark);
}

.part-action-box.pickup-delivery,
.part-action-box.pickup-only {
  background: var(--green);
  color: var(--white);
}

.part-action-box a {
  color: #f8e2b4;
}

.part-contact-link {
  display: inline-block;
  margin-top: 0.35rem;
  font-weight: 700;
}

.part-details {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.part-panel {
  background: var(--white);
  border: 1px solid #ddd8cd;
  border-radius: 16px;
  padding: 1.25rem;
  box-shadow: 0 10px 24px rgba(0,0,0,0.05);
}

.back-link {
  display: inline-block;
  margin-top: 1rem;
  font-weight: 700;
}

.cart-box {
  background: #efe5d2;
  border-radius: 14px;
  padding: 1rem;
  margin-top: 1rem;
}

.cart-box label {
  display: block;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.cart-box input[type="number"],
.cart-box input[type="text"],
.cart-box input[type="hidden"] {
  width: 100%;
  max-width: 140px;
  padding: 0.65rem;
  border: 1px solid #cfc7ba;
  border-radius: 10px;
  margin-bottom: 0.85rem;
  font-size: 1rem;
  box-sizing: border-box;
}

.cart-btn {
  display: inline-block;
  background: var(--green);
  color: var(--white);
  border: 0;
  padding: 0.85rem 1.2rem;
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
  font-size: 1rem;
}

.cart-btn:hover {
  background: #254b2f;
}

.small-note {
  color: #555;
  font-size: 0.95rem;
}

@media (max-width: 820px) {
  .part-hero,
  .part-details {
    grid-template-columns: 1fr;
  }

  .part-thumbs {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 560px) {
  .part-thumbs {
    grid-template-columns: 1fr;
  }
}

/* ===== parts index page ===== */

.parts-hero {
  background: linear-gradient(rgba(20,20,20,0.65), rgba(20,20,20,0.65)),
              url('https://www.lakelandtractor.com/mt750/0mt75001.jpg') center/cover no-repeat;
  color: var(--white);
}

.parts-hero .container {
  padding: 4.5rem 0;
}

.parts-page-title {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  margin: 0 0 1rem;
}

.parts-page-intro {
  max-width: 760px;
  font-size: 1.08rem;
}

.parts-page-content {
  padding: 3rem 0 4rem;
}

.parts-notice {
  background: #efe5d2;
  border-radius: 16px;
  padding: 1.25rem 1.4rem;
  margin-bottom: 2rem;
}

.parts-grid-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.partstractor-card {
  background: var(--white);
  border: 1px solid #ddd8cd;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(0,0,0,0.06);
}

.partstractor-card img {
  width: 100%;
  height: 230px;
  object-fit: cover;
  display: block;
}

.partstractor-card-body {
  padding: 1.35rem;
}

.email-link {
  color: var(--green);
  font-weight: 700;
}

.shipping-box {
  background: var(--white);
  border: 1px solid #ddd8cd;
  border-radius: 18px;
  padding: 1.4rem;
  margin-top: 2rem;
}

@media (max-width: 700px) {
  .parts-hero .container {
    padding: 3rem 0;
  }

  .parts-page-title {
    font-size: 2rem;
  }

  .parts-page-intro {
    font-size: 1rem;
  }
}

/* ===== restorations page ===== */

.restoration-block {
  margin-bottom: 1rem;
}

.restoration-block h2 {
  margin-bottom: 0.75rem;
}

.restoration-gallery {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding: 0.25rem 0 0.75rem;
  margin-top: 1rem;
  scroll-behavior: smooth;
}

.restoration-gallery::-webkit-scrollbar {
  height: 10px;
}

.restoration-gallery::-webkit-scrollbar-track {
  background: #ddd4c6;
  border-radius: 999px;
}

.restoration-gallery::-webkit-scrollbar-thumb {
  background: #8b4a2f;
  border-radius: 999px;
}

.restoration-item {
  flex: 0 0 320px;
  margin: 0;
  text-align: center;
  background: var(--white);
  border: 1px solid var(--light-gray);
  border-radius: 14px;
  padding: 0.75rem;
  box-shadow: 0 8px 18px rgba(0,0,0,0.05);
}

.restoration-item img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  border-radius: 10px;
  display: block;
}

.restoration-item figcaption {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: var(--gray);
  font-weight: 600;
}

@media (max-width: 700px) {
  .restoration-item {
    flex: 0 0 85%;
  }

  .restoration-item img {
    height: auto;
  }
}

/* image popup */

.restoration-item img {
  cursor: pointer;
}

/* overlay */
.image-popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.85);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.image-popup img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 10px;
}

@media (min-width: 701px) {
  .restoration-item {
    position: relative;
    overflow: visible;
  }

  .restoration-item img {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
  }

  .restoration-item:hover img {
    transform: scale(1.8);
    z-index: 10;
    position: relative;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
  }
}

/* allow hover zoom to escape container */
.restoration-item {
  overflow: visible;
  position: relative;
}

.restoration-gallery {
  overflow: visible;
}

.restoration-item img {
  position: relative;
  z-index: 1;
}

/* hover zoom */
@media (min-width: 701px) {
  .restoration-item:hover img {
    transform: scale(2.2);
    z-index: 999;
  }
}
/* first image grows to the right */
.restoration-item:first-child:hover img {
  transform-origin: left center;
}
/* last image grows to the left */
.restoration-item:last-child:hover img {
  transform-origin: right center;
}

#image-popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.85);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

#image-popup img {
  max-width: 90%;
  max-height: 90%;
}

#popup-close {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 2rem;
  color: #fff;
  background: none;
  border: none;
  cursor: pointer;
  font-weight: bold;
}

/* ===== homepage restoration preview ===== */

.restoration-preview {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}

.restoration-preview img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid var(--light-gray);
}

/* mobile */
@media (max-width: 700px) {
  .restoration-preview {
    grid-template-columns: 1fr;
  }

  .restoration-preview img {
    height: auto;
  }
}
/* ===== buying tractors page ===== */

.buying-hero {
  background-image: linear-gradient(rgba(20,20,20,0.65), rgba(20,20,20,0.65)),
    url('https://www.lakelandtractor.com/bapics/banner02.jpg');
}

.buying-block {
  margin-bottom: 2rem;
}

.buying-block h2 {
  margin-bottom: 0.75rem;
}

@media (max-width: 700px) {
  .buying-block {
    margin-bottom: 1.5rem;
  }
}

/* ===== contact page ===== */

.contact-hero {
  background-image: linear-gradient(rgba(20,20,20,0.65), rgba(20,20,20,0.65)),
    url('https://www.lakelandtractor.com/bapics/banner02.jpg');
}