:root {
  --bg: #f4f1ec;
  --ink: #1c1b19;
  --muted: #6f6a64;
  --line: #e3ddd4;
  --card: #ffffff;
  --accent: #8d4b2e;
  --shadow: 0 16px 40px rgba(40, 32, 24, 0.06);
  color-scheme: light;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Manrope, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.45;
}

a { color: inherit; }

.site-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  width: min(1180px, calc(100% - 2.5rem));
  margin: 0 auto;
  padding: 1.6rem 0 1.25rem;
}

.logo {
  display: inline-block;
  color: inherit;
  font-size: clamp(1.7rem, 2.4vw, 2.15rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1;
  text-decoration: none;
}

.tagline {
  margin: 0.45rem 0 0;
  color: var(--muted);
  font-size: 1.02rem;
  font-weight: 500;
}

.hero {
  margin: 0;
}

.hero img {
  display: block;
  width: 100%;
  height: auto;
}

main {
  width: min(1180px, calc(100% - 2.5rem));
  margin: 0 auto;
  padding: 1.75rem 0 4.5rem;
}

.products {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 0.85rem 0.85rem 1.05rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
  box-shadow: var(--shadow);
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease;
}

.card:hover {
  transform: translateY(-3px);
  border-color: #d3c9bb;
}

.card:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.photo {
  display: grid;
  place-items: center;
  aspect-ratio: 1.15 / 1;
  margin-bottom: 0.85rem;
  border-radius: 12px;
  background: #fbfbfb;
}

.photo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0.35rem;
}

.sku {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: none;
  margin: 0;
}

.model {
  margin-top: 0.2rem;
  font-size: 1.22rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.spec {
  margin-top: 0.3rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.brochure {
  margin-top: auto;
  padding-top: 0.95rem;
  color: var(--accent);
  font-size: 0.92rem;
  font-weight: 700;
}

.brochure::after {
  content: " →";
}

.empty-note {
  color: var(--muted);
}

.home-intro {
  margin: 0 0 1.35rem;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.55;
}

.home-intro p {
  margin: 0 0 0.75rem;
}

.home-intro p:last-child {
  margin-bottom: 0;
}

/* Battery detail page */
.battery-back {
  margin: 0 0 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
}

.battery-back a {
  text-decoration: none;
  color: var(--muted);
}

.battery-back a:hover {
  color: var(--ink);
}

.battery-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 2.5rem;
  align-items: start;
}

.battery-media {
  display: grid;
  place-items: center;
  aspect-ratio: 1.1 / 1;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.battery-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.battery-title {
  margin: 0.15rem 0 0;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.battery-copy .spec {
  margin: 0.45rem 0 1.25rem;
  font-size: 1.05rem;
}

.battery-content {
  color: var(--ink);
}

.battery-content > *:first-child {
  margin-top: 0;
}

.battery-content p {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.6;
}

.battery-content h2,
.battery-content .wp-block-heading {
  margin: 1.75rem 0 0.85rem;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* Language toggles — same idea as care4furniture.info buttons */
.battery-content .wp-block-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0.35rem 0 0;
}

.battery-content .wp-block-button {
  margin: 0;
}

.battery-content .wp-block-button__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 7.5rem;
  padding: 0.72rem 1.15rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink) !important;
  box-shadow: none;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.2;
  text-decoration: none !important;
  transition: border-color 160ms ease, transform 160ms ease, background 160ms ease;
}

.battery-content .wp-block-button__link:hover {
  border-color: #d3c9bb;
  background: #fffaf5;
  transform: translateY(-1px);
}

.battery-content .wp-block-button__link:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.battery-content .wp-block-button__link.is-brochure-pending,
.battery-content .wp-block-button__link[aria-disabled="true"] {
  cursor: default;
  opacity: 0.72;
}

.battery-content .wp-block-button__link.is-brochure-pending:hover,
.battery-content .wp-block-button__link[aria-disabled="true"]:hover {
  border-color: var(--line);
  background: var(--card);
  transform: none;
}

.content-page .page-title {
  margin: 0 0 1rem;
  font-size: clamp(1.6rem, 2.5vw, 2rem);
  letter-spacing: -0.03em;
}

.content-page .entry-content {
  color: var(--muted);
  line-height: 1.65;
}

@media (max-width: 980px) {
  .products { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .battery-layout { grid-template-columns: 1fr; gap: 1.5rem; }
}

@media (max-width: 640px) {
  .site-header {
    align-items: flex-start;
    width: min(1180px, calc(100% - 1.5rem));
    padding-top: 1.2rem;
  }

  main { width: min(1180px, calc(100% - 1.5rem)); }

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

  .battery-content .wp-block-button__link {
    min-width: calc(50% - 0.4rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card,
  .battery-content .wp-block-button__link { transition: none; }
  .card:hover,
  .battery-content .wp-block-button__link:hover { transform: none; }
}
