/*
Theme Name: Zenrei Car Care
Theme URI: https://zenreicarcare.com
Author: Zenrei
Description: Custom premium automotive-detailing storefront theme for Zenrei — Car Care Perfected. Built on WooCommerce.
Version: 1.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: zenrei
*/

/* ==========================================================================
   DESIGN TOKENS
   ========================================================================== */
:root {
  --zr-black: #131315;
  --zr-charcoal: #2b2b2e;
  --zr-red: #e3352b;
  --zr-red-deep: #a8241d;
  --zr-paper: #f6f4f1;
  --zr-white: #ffffff;
  --zr-steel: #8a8a8f;
  --zr-line: #dcd8d2;
  --zr-line-dark: #3a3a3e;

  --font-display: "Oswald", "Arial Narrow", sans-serif;
  --font-body: "Inter", -apple-system, "Segoe UI", sans-serif;

  --wipe-angle: -6deg;
  --max-width: 1240px;
}

/* ==========================================================================
   RESET & BASE
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--zr-paper);
  color: var(--zr-charcoal);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0 0 0.5em;
  color: var(--zr-black);
  line-height: 1.15;
}
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 28px;
}
:focus-visible {
  outline: 2px solid var(--zr-red);
  outline-offset: 3px;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* Eyebrow rule — the signature "wipe" mark, echoes the logo's red bar.
   Used once above a section heading, never as generic decoration. */
.zr-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--zr-red);
  margin-bottom: 14px;
}
.zr-eyebrow::before {
  content: "";
  display: block;
  width: 34px;
  height: 4px;
  background: var(--zr-red);
  transform: skewX(var(--wipe-angle));
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.button, button, input[type="submit"],
.woocommerce a.button, .woocommerce button.button,
.woocommerce #respond input#submit,
.woocommerce input.button {
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
  background: var(--zr-black);
  color: var(--zr-white);
  border: 1px solid var(--zr-black);
  border-radius: 2px;
  padding: 14px 28px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.button:hover, button:hover, input[type="submit"]:hover,
.woocommerce a.button:hover, .woocommerce button.button:hover,
.woocommerce #respond input#submit:hover,
.woocommerce input.button:hover {
  background: var(--zr-red);
  border-color: var(--zr-red);
  color: var(--zr-white);
}
.button--outline {
  background: transparent;
  color: var(--zr-white);
  border-color: rgba(255,255,255,0.5);
}
.button--outline:hover {
  background: var(--zr-white);
  color: var(--zr-black);
  border-color: var(--zr-white);
}
.woocommerce span.onsale {
  background: var(--zr-red);
  font-family: var(--font-display);
  letter-spacing: 0.08em;
  border-radius: 2px;
}
.woocommerce ul.products li.product .price ins { color: var(--zr-red); }

/* ==========================================================================
   SITE HEADER
   ========================================================================== */
#site-header {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 50;
  padding: 26px 0;
  transition: background 0.3s ease, padding 0.3s ease, position 0.3s ease;
}
#site-header.is-scrolled {
  position: fixed;
  background: rgba(19,19,21,0.96);
  padding: 14px 0;
  box-shadow: 0 2px 24px rgba(0,0,0,0.25);
}
body:not(.home) #site-header,
.no-hero #site-header {
  position: relative;
  background: var(--zr-black);
}
#site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.site-logo { display: flex; align-items: center; }
.site-logo img,
.site-logo .custom-logo {
  height: 34px !important;
  width: auto !important;
  max-width: 220px;
}
.site-logo .site-title {
  font-family: var(--font-display);
  color: var(--zr-white);
  font-size: 22px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.site-logo .site-title span { color: var(--zr-red); }

#site-footer .site-logo img,
#site-footer .site-logo .custom-logo { height: 30px !important; }

#primary-nav ul { display: flex; gap: 34px; }
#primary-nav a {
  color: var(--zr-white);
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s ease, color 0.2s ease;
}
#primary-nav a:hover,
#primary-nav .current-menu-item a { border-color: var(--zr-red); }

.header-actions { display: flex; align-items: center; gap: 22px; }
.header-cart {
  color: var(--zr-white);
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.08em;
}
.header-cart .count {
  background: var(--zr-red);
  color: var(--zr-white);
  border-radius: 50%;
  width: 20px; height: 20px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px;
}
.menu-toggle {
  display: none;
  background: none; border: none; color: var(--zr-white);
  font-family: var(--font-display); letter-spacing: 0.1em;
  font-size: 13px; text-transform: uppercase;
}

@media (max-width: 860px) {
  #primary-nav { display: none; }
  .menu-toggle { display: block; }
  #primary-nav.is-open {
    display: block;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--zr-black);
    padding: 20px 28px 28px;
  }
  #primary-nav.is-open ul { flex-direction: column; gap: 18px; }
}

/* ==========================================================================
   HERO
   ========================================================================== */
.zr-hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  background: var(--zr-black);
  overflow: hidden;
  color: var(--zr-white);
}
.zr-hero__media {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.55;
}
.zr-hero__media::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(19,19,21,0.35) 0%, rgba(19,19,21,0.92) 100%);
}
.zr-hero__wipe {
  position: absolute;
  top: -10%; bottom: -10%;
  left: 58%;
  width: 46%;
  background: linear-gradient(100deg, transparent 0%, rgba(227,53,43,0.16) 35%, rgba(227,53,43,0.05) 100%);
  transform: skewX(var(--wipe-angle));
  pointer-events: none;
}
.zr-hero__content {
  position: relative;
  z-index: 2;
  max-width: 640px;
  padding: 120px 28px 80px;
}
.zr-hero__title {
  font-size: clamp(42px, 6.5vw, 76px);
  margin-bottom: 22px;
}
.zr-hero__subtitle {
  font-family: var(--font-body);
  text-transform: none;
  letter-spacing: normal;
  font-size: 18px;
  color: #d8d6d3;
  max-width: 480px;
  margin-bottom: 34px;
}
.zr-hero__actions { display: flex; gap: 16px; flex-wrap: wrap; }

/* ==========================================================================
   SECTIONS — shared spacing rhythm
   ========================================================================== */
.zr-section { padding: 96px 0; }
.zr-section--dark { background: var(--zr-black); color: var(--zr-white); }
.zr-section--dark h2, .zr-section--dark h3 { color: var(--zr-white); }
.zr-section__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}
.zr-section__head h2 { font-size: clamp(28px, 3.5vw, 42px); margin: 0; }
.zr-section__lede { max-width: 520px; color: var(--zr-steel); }

/* Categories */
.zr-categories { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.zr-category-card {
  position: relative;
  aspect-ratio: 4/5;
  border-radius: 3px;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-end;
}
.zr-category-card::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(19,19,21,0.88) 100%);
}
.zr-category-card__label {
  position: relative;
  z-index: 1;
  padding: 26px;
  color: var(--zr-white);
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.zr-category-card__label .arrow { color: var(--zr-red); font-size: 22px; transition: transform 0.2s ease; }
.zr-category-card:hover .arrow { transform: translateX(6px); }

/* Product grid (WooCommerce) */
.woocommerce ul.products {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px 24px;
  margin: 0 !important;
}
.woocommerce ul.products li.product {
  width: 100% !important;
  margin: 0 !important;
  float: none !important;
  background: var(--zr-white);
  border: 1px solid var(--zr-line);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.woocommerce ul.products li.product:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 40px rgba(19,19,21,0.14);
}
.woocommerce ul.products li.product img {
  aspect-ratio: 1/1;
  object-fit: cover;
  border-radius: 0 !important;
}
.woocommerce ul.products li.product .woocommerce-loop-product__title {
  font-family: var(--font-display);
  font-size: 15px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 18px 18px 0;
  color: var(--zr-black);
}
.woocommerce ul.products li.product .price {
  padding: 8px 18px 0;
  font-family: var(--font-body);
  font-weight: 600;
  color: var(--zr-charcoal);
}
.woocommerce ul.products li.product .button {
  margin: 16px 18px 20px;
  width: calc(100% - 36px);
  text-align: center;
  background: var(--zr-black);
}
.woocommerce ul.products li.product .button:hover { background: var(--zr-red); }

@media (max-width: 900px) {
  .zr-categories { grid-template-columns: repeat(2, 1fr); }
  .woocommerce ul.products { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width: 560px) {
  .zr-categories { grid-template-columns: 1fr; }
  .woocommerce ul.products { grid-template-columns: 1fr !important; }
}

/* Brand story / spec strip */
.zr-story { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.zr-story__image { border-radius: 3px; overflow: hidden; }
.zr-specs { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--zr-line-dark); margin-top: 56px; }
.zr-section--dark .zr-specs { border-color: var(--zr-line-dark); }
.zr-spec { padding: 28px 20px 0; border-left: 1px solid var(--zr-line-dark); }
.zr-spec:first-child { border-left: none; }
.zr-spec__value { font-family: var(--font-display); font-size: 34px; color: var(--zr-red); }
.zr-spec__label { color: var(--zr-steel); font-size: 14px; margin-top: 6px; }

@media (max-width: 780px) {
  .zr-story { grid-template-columns: 1fr; }
  .zr-specs { grid-template-columns: 1fr; }
  .zr-spec { border-left: none; border-top: 1px solid var(--zr-line-dark); padding-top: 20px; margin-top: 20px; }
  .zr-spec:first-child { border-top: none; margin-top: 0; }
}

/* Testimonials */
.zr-testimonials { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.zr-testimonial {
  background: var(--zr-white);
  border: 1px solid var(--zr-line);
  border-radius: 3px;
  padding: 30px;
}
.zr-testimonial p { font-size: 16px; color: var(--zr-charcoal); }
.zr-testimonial__name { font-family: var(--font-display); font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--zr-steel); margin-top: 16px; }
@media (max-width: 860px) { .zr-testimonials { grid-template-columns: 1fr; } }

/* Newsletter / CTA band */
.zr-cta-band {
  background: var(--zr-red);
  color: var(--zr-white);
  padding: 64px 0;
  text-align: center;
}
.zr-cta-band h2 { color: var(--zr-white); }
.zr-cta-band .button { background: var(--zr-black); border-color: var(--zr-black); }
.zr-cta-band .button:hover { background: var(--zr-white); color: var(--zr-black); border-color: var(--zr-white); }

/* ==========================================================================
   SITE FOOTER
   ========================================================================== */
#site-footer {
  background: var(--zr-black);
  color: #b9b8b6;
  padding: 72px 0 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--zr-line-dark);
}
.footer-grid h4 { color: var(--zr-white); font-size: 14px; letter-spacing: 0.1em; margin-bottom: 18px; }
.footer-grid ul li { margin-bottom: 10px; }
.footer-grid a:hover { color: var(--zr-red); }
.footer-brand .site-logo { margin-bottom: 16px; }
.footer-brand p { color: var(--zr-steel); max-width: 280px; }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 24px; font-size: 13px; color: var(--zr-steel); flex-wrap: wrap; gap: 10px;
}
@media (max-width: 780px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* ==========================================================================
   GENERIC PAGE / SINGLE / ARCHIVE FALLBACKS
   ========================================================================== */
.zr-page-header {
  background: var(--zr-black);
  color: var(--zr-white);
  padding: 160px 0 60px;
}
.zr-page-header h1 { color: var(--zr-white); margin: 0; }
.zr-content-wrap { padding: 72px 0; }

/* WooCommerce cart / checkout tidy-up */
.woocommerce-cart table.shop_table, .woocommerce-checkout table.shop_table {
  border-color: var(--zr-line);
}
.woocommerce table.shop_table th { font-family: var(--font-display); letter-spacing: 0.06em; text-transform: uppercase; font-size: 13px; }
.woocommerce-checkout #payment ul.payment_methods { border: none; }
