/*
Theme Name: Varaosakauppa Traktori
Theme URI: https://example.com/
Author: Tero / ChatGPT
Description: Traktorin varaosakauppa – kevyt WooCommerce-yhteensopiva teema.
Version: 1.0
Text Domain: varaosakauppa
*/

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f5f5f5;
  color: #222;
}

.site-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-header {
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-title a {
  text-decoration: none;
  font-weight: 800;
  color: #000;
  letter-spacing: 0.06em;
  font-size: 1.4rem;
}

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

.main-nav a {
  text-decoration: none;
  color: #222;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.main-nav a:hover,
.main-nav .current-menu-item > a {
  color: #1f6ed4;
}

.site-main {
  flex: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
}

.hero-card,
.card {
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  padding: 1.5rem;
}

.hero-card {
  margin-bottom: 2rem;
}

.hero-title {
  font-size: 1.6rem;
  margin: 0 0 0.75rem;
}

.hero-subtitle {
  margin: 0 0 1.5rem;
  color: #777;
}

.search-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.search-row input[type="search"] {
  flex: 1 1 220px;
  padding: 0.8rem 1rem;
  border-radius: 10px;
  border: 1px solid #ddd;
  font-size: 1rem;
}

.search-row button {
  padding: 0.8rem 1.5rem;
  border-radius: 10px;
  border: none;
  background: #1f6ed4;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.95rem;
}

.search-row button:hover {
  background: #154c93;
}

.section-title {
  font-size: 1.1rem;
  margin: 2rem 0 1rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.grid {
  display: grid;
  gap: 1.5rem;
}

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

.grid-3 {
  grid-template-columns: repeat(3, minmax(0,1fr));
}

.card-center {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  text-align: center;
}

.card-muted {
  color: #777;
  font-size: 0.9rem;
}

.part-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.part-title {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

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

.part-link:hover .part-title {
  color: #1f6ed4;
}

.sale-grid {
  display: grid;
  grid-template-columns: 2fr 3fr;
  gap: 1.5rem;
}

.sale-products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
}

.site-footer {
  background: #111;
  color: #bbb;
  margin-top: 3rem;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem;
  font-size: 0.85rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
}

.footer-inner a {
  color: #fff;
  text-decoration: none;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 900px) {
  .grid-3 {
    grid-template-columns: repeat(2, minmax(0,1fr));
  }
  .sale-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }
  .grid-3,
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

/* Logo isoksi etusivun hero-osioon */

.hero-logo {
  text-align: center;
  margin-bottom: 1.5rem;
}

.hero-logo .custom-logo {
  max-height: 120px;
  width: auto;
  height: auto;
}

.hero-logo-fallback {
  font-size: 1.8rem;
  font-weight: 800;
}

/* WooCommerce: ostoskori ja kassa siistimmäksi */

.woocommerce-page-content {
  margin-top: 1rem;
}

/* Yleinen lomakeleveys kassalla */
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select {
  width: 100%;
  max-width: 500px;
}

/* Ostoskorin ja kassan taulukot vähän selkeämmäksi */
.woocommerce table.shop_table {
  width: 100%;
  border-collapse: collapse;
}

.woocommerce table.shop_table th,
.woocommerce table.shop_table td {
  padding: 0.6rem;
}

/* Painikkeet */
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button {
  border-radius: 6px;
  padding: 0.6rem 1.2rem;
}

/* Pieni maksutapaboksi */
.woocommerce-checkout #payment {
  border-radius: 8px;
  padding: 1rem;
}

/* --- OSTOSKORI – TAULUKKO KUNTOON --- */

/* Ostoskorin lomake erilleen muusta sisällöstä */
.woocommerce-cart form.woocommerce-cart-form {
  margin-bottom: 2rem;
}

/* Varsinainen ostoskoritaulukko */
.woocommerce-cart table.shop_table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid #e2e2e2;
  background: #ffffff;
  font-size: 0.95rem;
}

.woocommerce-cart table.shop_table th {
  background: #f5f5f5;
  font-weight: 600;
  text-align: left;
}

.woocommerce-cart table.shop_table th,
.woocommerce-cart table.shop_table td {
  padding: 0.75rem 0.8rem;
  border-bottom: 1px solid #e2e2e2;
  vertical-align: middle;
}

/* Poisto-ikoni ja pikkukuva kapeiksi sarakkeiksi */
.woocommerce-cart table.shop_table td.product-remove,
.woocommerce-cart table.shop_table td.product-thumbnail {
  width: 40px;
  text-align: center;
}

/* Tuotekuva pienemmäksi */
.woocommerce-cart table.shop_table td.product-thumbnail img {
  max-width: 48px;
  height: auto;
}

/* Tuotenimi korostetuksi */
.woocommerce-cart table.shop_table td.product-name {
  font-weight: 500;
}

/* Hinta-, määrä- ja välisumma-sarakkeet oikealle tasaus */
.woocommerce-cart table.shop_table td.product-price,
.woocommerce-cart table.shop_table td.product-quantity,
.woocommerce-cart table.shop_table td.product-subtotal {
  text-align: right;
  white-space: nowrap;
}

/* Määräkenttä leveämmäksi */
.woocommerce-cart table.shop_table td.product-quantity input.qty {
  max-width: 70px;
}

/* Kuponki + päivitä painike riville siististi */
.woocommerce-cart .actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.woocommerce-cart .actions .coupon {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.woocommerce-cart .actions .coupon input.input-text {
  min-width: 180px;
}

/* Ostoskorin kokonaisuus oikeaan laitaan */
.woocommerce-cart .cart-collaterals {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.woocommerce-cart .cart-collaterals .cart_totals {
  margin-left: auto;
  width: 100%;
  max-width: 380px;
}

/* Napit yhtenäisen näköisiksi */
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button {
  border-radius: 6px;
  padding: 0.55rem 1.3rem;
}

/* Mobiilinäkymä: kasataan pystysuuntaan */
@media (max-width: 768px) {
  .woocommerce-cart table.shop_table th,
  .woocommerce-cart table.shop_table td {
    padding: 0.55rem 0.5rem;
  }

  .woocommerce-cart .actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .woocommerce-cart .cart-collaterals .cart_totals {
    margin-left: 0;
    max-width: 100%;
  }
}
/* --- YLÄPALKIN ULKOASU – VALINTAKULMAN VARAOSA --- */

.site-header {
  background: #111;          /* tumma tausta */
  color: #fff;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

/* Logo / sivuston nimi */

.site-title {
  margin: 0;
}

.site-title a,
.site-title {
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.2rem;
}

.site-title .custom-logo {
  max-height: 50px;
  height: auto;
  width: auto;
  display: block;
}

/* Valikko oikealle */

.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1.5rem;
}

.main-nav li {
  margin: 0;
  padding: 0;
}

.main-nav a {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
}

.main-nav a:hover,
.main-nav .current-menu-item > a,
.main-nav .current_page_item > a {
  text-decoration: underline;
}

/* Mobiili: valikko allekkain */

@media (max-width: 768px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .main-nav ul {
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
  }
}

/* --- OSTOSKORIN MÄÄRÄ VALIKOSSA --- */

.vk-cart-count {
  display: inline-block;
  min-width: 18px;
  padding: 2px 6px;
  background: #e60000;      /* punainen pallo */
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 50%;
  text-align: center;
  margin-left: 4px;
}

/* Yhteystiedot-sivun perusasettelu */

.page-id- .entry-content ul { /* halutessa voi kohdistaa tarkemmin page-id:n mukaan */
  list-style: disc;
  margin-left: 1.2rem;
}

.page-id- .entry-content h2,
.page-id- .entry-content h3 {
  margin-top: 1.2rem;
}

/* Desktop-tila (yli 768px): näytetään valikko normaalisti, piilotetaan nappi */
@media (min-width: 769px) {
  .menu-toggle {
    display: none;
  }

  .main-nav ul {
    display: flex;
    gap: 1.5rem;
  }
}

/* Mobiili (max 768px): näytetään nappi, piilotetaan lista kunnes avataan */
@media (max-width: 768px) {
  .menu-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: none;
    border: 1px solid #fff;
    color: #fff;
    padding: 0.3rem 0.7rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
  }

  .main-nav ul {
    display: none;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.75rem;
  }

  .main-nav ul.is-open {
    display: flex;
  }

  .main-nav a {
    font-size: 1rem;
  }
}

/* Yläpalkin peruslayout (desktop + mobiili jakautuu media-kyselyillä) */

.site-header {
  background: #111;
  color: #fff;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.site-title a,
.site-title {
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.2rem;
}

.site-title .custom-logo {
  max-height: 50px;
  height: auto;
  width: auto;
  display: block;
}

/* Perusvalikkolista, mobile-first: piilotetaan, kunnes avataan */

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

/* Mobiili (max 768px): nappi näkyy, valikko piilossa oletuksena */

@media (max-width: 768px) {

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: none;
    border: 1px solid #fff;
    color: #fff;
    padding: 0.3rem 0.7rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
  }

  .main-nav ul {
    display: none;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.75rem;
  }

  .main-nav ul.is-open {
    display: flex;
  }

  .main-nav a {
    color: #fff;
    text-decoration: none;
    font-size: 1rem;
  }
}

/* Desktop (yli 768px): normaali vaakasuora valikko, nappi piiloon */

@media (min-width: 769px) {

  .menu-toggle {
    display: none;
  }

  .main-nav ul {
    display: flex;
    gap: 1.5rem;
  }

  .main-nav a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
  }

  .main-nav a:hover,
  .main-nav .current-menu-item > a,
  .main-nav .current_page_item > a {
    text-decoration: underline;
  }
}

/* --- YLÄPALKIN ULKOASU --- */

.site-header {
  background: #111;
  color: #fff;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.site-title a,
.site-title {
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.2rem;
}

.site-title .custom-logo {
  max-height: 50px;
  height: auto;
  width: auto;
  display: block;
}

/* Perusvalikko */

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

.main-nav li {
  margin: 0;
  padding: 0;
}

.main-nav a {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
}

/* Hover/aktiivinen */

.main-nav a:hover,
.main-nav .current-menu-item > a,
.main-nav .current_page_item > a {
  text-decoration: underline;
}

/* Desktop: vaakarivi */

@media (min-width: 769px) {
  .main-nav ul {
    display: flex;
    gap: 1.5rem;
  }
}

/* Mobiili: linkit allekkain logon alle */

@media (max-width: 768px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .main-nav ul {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.5rem;
  }

  .main-nav a {
    font-size: 1rem;
  }
}

/* TIIVIS MOBIILI-YLÄPALKki */

@media (max-width: 768px) {

  /* Yläpalkin korkeus pienemmäksi */
  .header-inner {
    flex-direction: row;          /* logo ja valikko samalle riville */
    align-items: center;
    padding: 0.4rem 0.8rem;       /* pienempi padding */
    gap: 0.8rem;
  }

  /* Logo pienemmäksi mobiilissa */
  .site-title .custom-logo {
    max-height: 34px;
  }

  .site-title a,
  .site-title {
    font-size: 1rem;
  }

  /* Valikko mahtuu samaan riviin, rivittyy tarvittaessa */
  .main-nav ul {
    display: flex;
    flex-wrap: wrap;              /* jos ei mahdu yhdelle riville, menee kahdelle */
    gap: 0.6rem;
    margin-top: 0;                /* ei ylimääräistä tilaa */
    justify-content: flex-end;
  }

  .main-nav a {
    font-size: 0.85rem;           /* pienempi teksti */
  }
}

/* Piilotetaan Etusivu ja Kaikki tuotteet mobiilissa (näytön leveys alle 768px) */
@media (max-width: 768px) {

  /* Piilota valikkokohdat joiden teksti on 'Etusivu' tai 'Kaikki tuotteet' */
  .main-nav li a[href*="etusivu"],
  .main-nav li a[href*="kaikki-tuotteet"] {
    display: none !important;
  }
}

/* --- MOBIILI: TIIVIS YLÄPALKki JA PIILOTETAAN ETUSIVU + KAIKKI TUOTTEET --- */
@media (max-width: 768px) {

  /* Yläpalkki matalammaksi */
  .header-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 0.3rem 0.7rem;
    gap: 0.6rem;
  }

  /* Logo pienemmäksi */
  .site-title .custom-logo {
    max-height: 28px;
  }

  .site-title a,
  .site-title {
    font-size: 0.95rem;
  }

  /* Valikko samalle riville, tiiviisti */
  .main-nav ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 0.8rem;
    margin-top: 0;
  }

  .main-nav a {
    font-size: 0.8rem;
  }

  /* PIILOTA 1. (Etusivu) JA 4. (Kaikki tuotteet) VALIKKO-ALKIO MOBIILISSA */
  .main-nav ul li:first-child,
  .main-nav ul li:nth-child(4) {
    display: none !important;
  }
}


/* --- ETUSIVUN PERUSLAYOUT --- */

.site-main {
  max-width: 1200px;
  margin: 1.5rem auto 2.5rem auto;
  padding: 0 1rem;
}

/* Otsikot */

.section-title {
  font-size: 1.4rem;
  margin: 2.5rem 0 1rem;
  font-weight: 700;
}

/* Yleinen korttipohja */

.card {
  background: #ffffff;
  border-radius: 10px;
  padding: 1.25rem 1.4rem;
  box-shadow: 0 8px 20px rgba(0,0,0,0.06);
}

/* --- HERO-OSIO --- */

.hero-card {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  padding: 2.4rem 2.2rem;
  margin-top: 1.5rem;
  margin-bottom: 2.5rem;
  background: radial-gradient(circle at top left, #ffb347 0, #ff8008 30%, #1d1d1d 85%);
  color: #fff;
  box-shadow: 0 16px 35px rgba(0,0,0,0.25);
}

/* Kevyt "valo" oikeaan reunaan, ikään kuin traktorin työvalo */
.hero-card::after {
  content: "";
  position: absolute;
  right: -80px;
  top: -80px;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(255,255,255,0.6) 0, transparent 60%);
  opacity: 0.6;
  pointer-events: none;
}

.hero-title {
  font-size: 2rem;
  margin: 0 0 0.6rem;
  font-weight: 800;
}

.hero-subtitle {
  margin: 0 0 1.4rem;
  max-width: 640px;
  font-size: 0.98rem;
}

/* Hakurivi hero-kortissa */

.search-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.8rem;
}

.search-row input[type="search"] {
  flex: 1 1 240px;
  min-width: 0;
  max-width: 480px;
  border-radius: 6px;
  border: none;
  padding: 0.6rem 0.75rem;
  font-size: 0.95rem;
}

.search-row button {
  border-radius: 6px;
  border: none;
  padding: 0.6rem 1.1rem;
  font-size: 0.95rem;
  font-weight: 600;
  background: #111;
  color: #fff;
  cursor: pointer;
  white-space: nowrap;
}

.search-row button:hover {
  background: #000;
}

/* --- GRIDIT JA MERKKIKORTIT --- */

.grid {
  display: grid;
  gap: 1rem;
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* Kortit traktorimerkeille */

.card-center {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.98rem;
  text-decoration: none;
  color: #222;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: #ffffff;
  border-radius: 10px;
  padding: 1.6rem 1rem;
  box-shadow: 0 8px 18px rgba(0,0,0,0.06);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.card-center:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 24px rgba(0,0,0,0.12);
  background: #f7f7f7;
}

/* --- OSASTOKORTIT --- */

.part-link {
  display: block;
  text-decoration: none;
  color: #222;
  padding: 1.1rem 1.1rem 1rem;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(0,0,0,0.05);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.part-link:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 24px rgba(0,0,0,0.12);
  background: #f9f9f9;
}

.part-icon {
  font-size: 1.7rem;
  margin-bottom: 0.3rem;
}

.part-title {
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.card-muted {
  font-size: 0.9rem;
  color: #666;
}

/* --- UUSIMMAT / TARJOUKSET --- */

.home-products-grid {
  margin-top: 1rem;
}

/* Rajataan WooCommercen tuotekortteja vähän */

.home-products-grid ul.products {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.home-products-grid ul.products li.product {
  background: #fff;
  border-radius: 10px;
  padding: 0.8rem 0.8rem 1rem;
  box-shadow: 0 8px 18px rgba(0,0,0,0.05);
}

/* --- RESPONSIIVISUUS --- */

@media (max-width: 1024px) {
  .grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-products-grid ul.products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {

  .site-main {
    margin-top: 1rem;
  }

  .hero-card {
    padding: 1.6rem 1.4rem;
    margin-bottom: 1.9rem;
  }

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

  .hero-subtitle {
    font-size: 0.9rem;
  }

  .grid-3 {
    grid-template-columns: minmax(0, 1fr);
  }

  .home-products-grid ul.products {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* --- HILLITYMPI HERO JA SELKEÄMMÄT HAKUKENTÄN VÄRIT --- */

/* Hero-kortti vaaleaksi, vähemmän efektiä */
.hero-card {
  background: #f5f5f5;              /* vaalea harmaa tausta */
  color: #111;
  border-radius: 12px;
  padding: 1.8rem 1.6rem;
  margin-top: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
  position: relative;
}

/* Poistetaan aiempi "valo" efekti */
.hero-card::after {
  content: none;
}

/* Otsikot tummiksi ja vähän pienemmiksi */
.hero-title {
  font-size: 1.7rem;
  margin: 0 0 0.5rem;
  font-weight: 800;
  color: #111;
}

.hero-subtitle {
  margin: 0 0 1.2rem;
  max-width: 640px;
  font-size: 0.95rem;
  color: #444;
}

/* Hakurivi: valkoinen kenttä, harmaa reunaviiva, tumma teksti */
.search-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.6rem;
}

.search-row input[type="search"] {
  flex: 1 1 240px;
  min-width: 0;
  max-width: 480px;
  border-radius: 6px;
  border: 1px solid #ccc;
  padding: 0.6rem 0.75rem;
  font-size: 0.95rem;
  background: #ffffff;
  color: #111;
}

/* Placeholder tummemmaksi, että senkin näkee */
.search-row input[type="search"]::placeholder {
  color: #777;
}

/* Hakunappi: selkeä oranssi, tumma teksti */
.search-row button {
  border-radius: 6px;
  border: none;
  padding: 0.6rem 1.1rem;
  font-size: 0.95rem;
  font-weight: 600;
  background: #ff9500;
  color: #111;
  cursor: pointer;
  white-space: nowrap;
}

.search-row button:hover {
  background: #e58600;
}

/* Mobiilissa vähän kompaktimpi hero */
@media (max-width: 768px) {
  .hero-card {
    padding: 1.4rem 1.2rem;
    margin-bottom: 1.6rem;
  }

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

  .hero-subtitle {
    font-size: 0.9rem;
  }
}

/* --- VALEA YLÄPALKki / HEADER --- */

.site-header {
  background: #f7f7f7;        /* vaalea harmaa */
  color: #111;
  border-bottom: 1px solid #ddd;  /* kevyt alaviiva */
}

.header-inner {
  padding: 0.6rem 1.2rem;      /* hieman pienempi, siistimpi */
}

/* Logo ja sivuston nimi */
.site-title a,
.site-title {
  color: #111 !important;
}

/* Valikon linkit tummiksi */
.main-nav a {
  color: #111 !important;
  font-weight: 500;
}

/* Hover vaaleassa yläpalkissa */
.main-nav a:hover,
.main-nav .current-menu-item > a {
  text-decoration: underline;
}

/* Mobiilissa samat värit */
@media (max-width: 768px) {

  .menu-toggle {
    border-color: #111;
    color: #111;
  }

  .main-nav a {
    color: #111 !important;
  }
}

/* --- SIVUN TAUSTAKUVA HAALENA / LÄPINÄKYVÄNÄ --- */

body {
  background: #f7f7f7 url('http://valintakulmanvaraosa.fi/wp-content/uploads/2025/11/juhan_massikka.jpg') no-repeat center top;
  background-size: cover;
  background-attachment: fixed; /* pieni paralax-tyyli */
}

/* Haalistetaan kuva overlay-kerroksella */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255,255,255,0.72); /* kuva haaleammaksi */
  backdrop-filter: blur(2px);         /* pieni blur */
  pointer-events: none;
  z-index: -1;
}

/* Varmistetaan että sivun sisältö on taustakerroksen päällä */
.site-wrap {
  position: relative;
  z-index: 5;
}

/* --- POISTETAAN ETUSIVUN OTSIKOT "Traktorimerkit" JA "Osastoittain" --- */

/* Piilota H2-otsikot, joissa nämä tekstit esiintyvät */
.section-title:contains("Traktorimerkit"),
.section-title:contains("Osastoittain") {
    display: none !important;
}

/* Jos WP ei tue :contains, piilotetaan otsikot järjestyksen perusteella */
.home .site-main h2.section-title:nth-of-type(2),
.home .site-main h2.section-title:nth-of-type(3) {
    display: none !important;
}

/* Väliä traktorimerkkien ja osasto-korttien väliin etusivulla */
.home .site-main > section:nth-of-type(2) {
  margin-bottom: 2rem;   /* voit säätää esim. 1.5rem / 3rem */
}

