/* =============================================
   Keskipörhölän Rengas — Päätyylitiedosto
   Vintage-teema logon mukaan:
   tummahiili · kermavalkoinen · antiikkikulta
   ============================================= */

:root {
  --bg-dark:     #0d0b07;
  --bg-card:     #1a1710;
  --bg-nav:      #080604;
  --accent:      #c8922a;
  --accent-hover:#d9a83a;
  --text-primary:#e8d9b0;
  --text-muted:  #8a7d60;
  --border:      #2e2818;
  --radius:      10px;
  --shadow:      0 4px 20px rgba(0,0,0,0.6);
  --font:        'Segoe UI', system-ui, -apple-system, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background-color: var(--bg-dark);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---- NAVIGAATIO ---- */
header {
  background: var(--bg-nav);
  border-bottom: 2px solid var(--accent);
  position: sticky;
  top: 0;
  z-index: 100;
  /* Ohut kultainen sisävarjo antaa syvyyttä */
  box-shadow: 0 2px 12px rgba(200,146,42,0.15);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}

.logo-icon {
  font-size: 1.8rem;
  line-height: 1;
}

.logo-text {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.02em;
}

.logo-text span {
  color: var(--accent);
}

nav {
  display: flex;
  gap: 0.25rem;
}

nav a {
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.5rem 1.1rem;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s, background 0.2s;
}

nav a:hover {
  color: var(--text-primary);
  background: rgba(240,124,0,0.12);
}

nav a.active {
  color: var(--accent);
  background: rgba(240,124,0,0.15);
}

/* Hamburger (mobiili) */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
}
.hamburger span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

/* ---- LOGO-KUVA HEADERISSA ---- */
.logo-img {
  height: 52px;
  width: auto;
  display: block;
  border-radius: 4px;
  /* Logon oma tumma tausta sulautuu naviin */
}

/* ---- HERO-BANNER ---- */
.hero {
  background: #0d0b07;
  border-bottom: 2px solid var(--accent);
  padding: 0;
  text-align: center;
  overflow: hidden;
}

.hero-logo {
  display: block;
  width: 40%;
  max-width: 100%;
  height: auto;
  margin: 2rem auto;
  border-radius: 8px;
  box-shadow: 0 6px 32px rgba(0,0,0,0.7);
}

.hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.hero h1 span { color: var(--accent); }

.hero p {
  margin-top: 0.75rem;
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 540px;
  margin-inline: auto;
}

/* ---- PÄÄSISÄLTÖ ---- */
main {
  flex: 1;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
  padding: 2.5rem 1.5rem;
}

/* ---- YHTEYSTIEDOT ---- */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 0.5rem;
}

.contact-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  box-shadow: var(--shadow);
  transition: border-color 0.2s;
}

.contact-card:hover { border-color: var(--accent); }

.contact-card .icon {
  font-size: 2rem;
  margin-bottom: 0.4rem;
}

.contact-card h3 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  font-weight: 600;
}

.contact-card p, .contact-card a {
  font-size: 1rem;
  color: var(--text-primary);
  text-decoration: none;
  line-height: 1.6;
}

.contact-card a:hover { color: var(--accent); }

.hours-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.25rem;
}

.hours-table td {
  padding: 0.25rem 0;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.hours-table td:last-child {
  text-align: right;
  color: var(--text-muted);
}

/* ---- RENGASMYYNTI ---- */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.section-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
}

.section-header h2 span { color: var(--accent); }

.search-bar {
  display: flex;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 0.2s;
}

.search-bar:focus-within { border-color: var(--accent); }

.search-bar input {
  background: none;
  border: none;
  outline: none;
  padding: 0.55rem 1rem;
  color: var(--text-primary);
  font-size: 0.95rem;
  width: 220px;
}

.search-bar input::placeholder { color: var(--text-muted); }

.search-bar .search-icon {
  padding: 0 0.9rem;
  color: var(--text-muted);
  font-size: 1rem;
  pointer-events: none;
}

.tire-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.tire-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s, transform 0.2s;
}

.tire-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
}

.tire-card img {
  width: 100%;
  height: 150px;
  object-fit: contain;
  display: block;
  background: var(--bg-card);
  margin-top: 1.4rem;
}

.tire-card-body {
  padding: 1.2rem 1.3rem 1.4rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.tire-card-body p {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.55;
  flex: 1;
}

.tire-price {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.5rem;
}

.tire-price .amount {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--accent);
}

.btn-order {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 0.5rem 1.1rem;
  border-radius: 7px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-order:hover { background: var(--accent-hover); }

/* No results */
.no-results {
  text-align: center;
  color: var(--text-muted);
  padding: 3rem 1rem;
  grid-column: 1 / -1;
}

/* Ladataan-spinner */
.loading {
  text-align: center;
  color: var(--text-muted);
  padding: 3rem;
  grid-column: 1 / -1;
}

.spinner {
  display: inline-block;
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 1rem;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ---- FOOTER ---- */
footer {
  background: var(--bg-nav);
  border-top: 1px solid var(--border);
  text-align: center;
  padding: 1.4rem 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

footer a { color: var(--accent); text-decoration: none; }
footer a:hover { text-decoration: underline; }

/* ---- RESPONSIIVISUUS ---- */
@media (max-width: 680px) {
  .hamburger { display: flex; }

  nav {
    display: none;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--bg-nav);
    border-bottom: 2px solid var(--accent);
    flex-direction: column;
    padding: 1rem 1.5rem;
    gap: 0.5rem;
  }

  nav.open { display: flex; }

  nav a {
    padding: 0.7rem 1rem;
    border-radius: 8px;
    font-size: 1rem;
  }

  .section-header { flex-direction: column; align-items: flex-start; }
  .search-bar input { width: 100%; }
  .search-bar { width: 100%; }
  .hero-logo { width: 80%; }
}
