/*
Theme Name: Washing Machine Co Utility
Theme URI: https://washingmachineco.com
Description: Clean utilitarian theme for Washing Machine Co — IBM Plex Sans, right sidebar, list-style cards, data-forward spec tables. Built for washing machine buyers.
Author: Washing Machine Co
Version: 1.0
Tested up to: 7.0
Requires PHP: 8.0
License: GNU GPLv2 or later
Text Domain: wmc
*/

/* =====================================================================
   DESIGN TOKENS
===================================================================== */
:root {
  --acc:      #3b5bdb;   /* primary blue */
  --acc-dk:   #2f44c0;   /* hover blue */
  --acc-lt:   #dde3fa;   /* light blue tint */
  --ink:      #111827;   /* near-black text */
  --ink-2:    #374151;   /* secondary text */
  --muted:    #6b7280;   /* caption / meta */
  --bg:       #ffffff;
  --bg-off:   #f3f6fb;   /* page background tint */
  --bg-panel: #eef1f8;   /* sidebar / disclosure bg */
  --line:     #d1d9e6;
  --line-lt:  #e8ecf4;
  --good:     #1d7a3a;
  --warn:     #c05621;
  --radius:   4px;       /* sharp/utilitarian corners */
  --col-max:  1160px;
  --content-max: 780px;
}

/* =====================================================================
   RESET / BASE
===================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg-off);
  color: var(--ink);
  font-family: 'IBM Plex Sans', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--acc); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  font-family: 'IBM Plex Sans', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-weight: 700;
  line-height: 1.22;
  color: var(--ink);
  margin: 0 0 .5em;
}
h1 { font-size: 2.05rem; letter-spacing: -.02em; }
h2 { font-size: 1.48rem; letter-spacing: -.015em; }
h3 { font-size: 1.18rem; }
h4 { font-size: 1rem; font-weight: 600; }

p, ul, ol { margin: 0 0 1.1em; }
ul, ol { padding-left: 1.4em; }
li { margin: .35em 0; }

/* =====================================================================
   LAYOUT SHELL
===================================================================== */
.wmc-wrap {
  max-width: var(--col-max);
  margin: 0 auto;
  padding: 0 20px;
}

/* =====================================================================
   HEADER — left brand + right nav (horizontal split)
===================================================================== */
.site-header {
  background: var(--bg);
  border-bottom: 3px solid var(--acc);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 4px rgba(0,0,0,.07);
}

.wmc-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--col-max);
  margin: 0 auto;
  padding: 0 20px;
  height: 58px;
  gap: 16px;
}

.wmc-brand {
  font-family: 'IBM Plex Sans', sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: -.02em;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  line-height: 1;
}
.wmc-brand em {
  font-style: normal;
  color: var(--acc);
}

.wmc-nav { display: flex; align-items: center; }

.wmc-nav .menu {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
}

.wmc-nav .menu li { list-style: none; margin: 0; }

.wmc-nav .menu a {
  display: inline-block;
  padding: 6px 14px;
  font-size: .875rem;
  font-weight: 600;
  color: var(--ink-2);
  text-decoration: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -3px; /* align with header border */
  transition: color .12s, border-color .12s;
  white-space: nowrap;
}

.wmc-nav .menu a:hover,
.wmc-nav .menu .current-menu-item > a,
.wmc-nav .menu .current-cat > a,
.wmc-nav .menu .current-post-parent > a,
.wmc-nav .menu .current-menu-parent > a {
  color: var(--acc);
  border-bottom-color: var(--acc);
  text-decoration: none;
}

/* =====================================================================
   SITE BODY — main + sidebar two-column wrapper
===================================================================== */
.site-main { padding: 28px 0 52px; }

/* Two-col: content left, sidebar right */
.wmc-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 32px;
  align-items: start;
  max-width: var(--col-max);
  margin: 0 auto;
  padding: 0 20px;
}

.wmc-content { min-width: 0; }
.wmc-sidebar { min-width: 0; }

/* Full-width pages (home, page.php) */
.wmc-full {
  max-width: var(--col-max);
  margin: 0 auto;
  padding: 0 20px;
}

/* =====================================================================
   BREADCRUMB
===================================================================== */
.wmc-breadcrumb {
  font-size: .8rem;
  color: var(--muted);
  margin: 0 0 1.1em;
  line-height: 1.4;
}
.wmc-breadcrumb a { color: var(--muted); }
.wmc-breadcrumb a:hover { color: var(--acc); text-decoration: none; }
.wmc-breadcrumb span { color: var(--ink-2); }

/* =====================================================================
   ARCHIVE HEADER (category / search pages)
===================================================================== */
.wmc-archive-hd {
  border-left: 4px solid var(--acc);
  padding: 4px 0 4px 14px;
  margin-bottom: 24px;
}
.wmc-archive-hd h1 {
  font-size: 1.55rem;
  margin: 0 0 .15em;
}
.wmc-archive-hd p {
  color: var(--muted);
  font-size: .9rem;
  margin: 0;
}

/* =====================================================================
   LIST-STYLE CARDS (horizontal rows: thumb-left, text-right)
===================================================================== */
.wmc-list { display: flex; flex-direction: column; gap: 0; }

.wmc-list-item {
  display: grid;
  grid-template-columns: 168px 1fr;
  gap: 0;
  background: var(--bg);
  border: 1px solid var(--line);
  border-top: none;
  text-decoration: none;
  color: inherit;
  transition: background .12s;
}
.wmc-list-item:first-child { border-top: 1px solid var(--line); border-radius: var(--radius) var(--radius) 0 0; }
.wmc-list-item:last-child  { border-radius: 0 0 var(--radius) var(--radius); }
.wmc-list-item:only-child  { border-radius: var(--radius); border-top: 1px solid var(--line); }
.wmc-list-item:hover       { background: var(--bg-off); text-decoration: none; }

.wmc-list-item .wmc-thumb {
  width: 168px;
  aspect-ratio: 4/3;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--acc) 0%, #1a3599 100%) center/cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.wmc-list-item .wmc-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.wmc-list-item .wmc-thumb .wmc-thumb-label {
  color: rgba(255,255,255,.85);
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  text-align: center;
  padding: 8px;
  line-height: 1.3;
}

.wmc-list-item .wmc-item-body {
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  border-left: 1px solid var(--line-lt);
}
.wmc-list-item .wmc-item-cat {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--acc);
  margin-bottom: 3px;
}
.wmc-list-item .wmc-item-title {
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 .35em;
  line-height: 1.3;
}
.wmc-list-item:hover .wmc-item-title { color: var(--acc); }

.wmc-list-item .wmc-item-ex {
  font-size: .875rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* separator line between items (not first) */
.wmc-list-item + .wmc-list-item { border-top: 1px solid var(--line-lt); }

/* =====================================================================
   PAGINATION
===================================================================== */
.wmc-pagination {
  margin: 28px 0 0;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.wmc-pagination .page-numbers {
  display: inline-block;
  padding: 6px 13px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: .875rem;
  font-weight: 600;
  color: var(--ink-2);
  text-decoration: none;
  transition: background .12s, border-color .12s;
}
.wmc-pagination .page-numbers:hover { border-color: var(--acc); color: var(--acc); text-decoration: none; }
.wmc-pagination .page-numbers.current { background: var(--acc); color: #fff; border-color: var(--acc); }

/* =====================================================================
   SIDEBAR WIDGETS
===================================================================== */
.wmc-sidebar-widget {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 20px;
}
.wmc-sidebar-widget:last-child { margin-bottom: 0; }

.wmc-widget-title {
  background: var(--bg-panel);
  border-bottom: 1px solid var(--line);
  padding: 10px 16px;
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--ink-2);
  margin: 0;
}

.wmc-sidebar-widget ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.wmc-sidebar-widget ul li {
  margin: 0;
  border-bottom: 1px solid var(--line-lt);
}
.wmc-sidebar-widget ul li:last-child { border-bottom: none; }
.wmc-sidebar-widget ul li a {
  display: block;
  padding: 9px 16px;
  font-size: .875rem;
  color: var(--ink-2);
  text-decoration: none;
  transition: background .1s, color .1s;
}
.wmc-sidebar-widget ul li a:hover {
  background: var(--bg-off);
  color: var(--acc);
  text-decoration: none;
}

/* Recent posts in sidebar — compact row */
.wmc-sb-recent li a {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 16px;
}
.wmc-sb-recent .wmc-sb-thumb {
  width: 56px;
  height: 42px;
  flex-shrink: 0;
  object-fit: cover;
  border-radius: 2px;
  background: var(--bg-panel);
}
.wmc-sb-recent .wmc-sb-text {
  font-size: .82rem;
  line-height: 1.35;
  color: var(--ink-2);
}

/* =====================================================================
   HERO SECTION (front-page)
===================================================================== */
.wmc-hero {
  background: linear-gradient(100deg, #1a3599 0%, var(--acc) 60%, #5b76e8 100%);
  color: #fff;
  padding: 48px 20px 44px;
  text-align: center;
  margin-bottom: 28px;
}
.wmc-hero h1 {
  color: #fff;
  font-size: 2.35rem;
  margin: 0 auto .45em;
  max-width: 680px;
  letter-spacing: -.025em;
}
.wmc-hero p {
  color: rgba(255,255,255,.82);
  font-size: 1.05rem;
  margin: 0 auto;
  max-width: 540px;
}

/* =====================================================================
   ARTICLE / SINGLE
===================================================================== */
.entry {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 36px;
}

.wmc-post-title {
  font-size: 1.9rem;
  letter-spacing: -.025em;
  margin: 0 0 .35em;
  line-height: 1.18;
}

.wmc-meta {
  font-size: .82rem;
  color: var(--muted);
  margin: 0 0 1.3em;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}
.wmc-meta span { display: inline-flex; align-items: center; gap: 4px; }

.entry .wmc-featured-img {
  border-radius: var(--radius);
  margin: 0 0 1.6em;
  width: 100%;
  height: auto;
}

/* Article headings */
.entry h2 {
  font-size: 1.38rem;
  margin: 1.8em 0 .55em;
  padding-bottom: .3em;
  border-bottom: 2px solid var(--acc);
  letter-spacing: -.01em;
}
.entry h3 {
  font-size: 1.12rem;
  margin: 1.4em 0 .4em;
}
.entry h4 {
  font-size: 1rem;
  margin: 1.2em 0 .35em;
  font-weight: 600;
}

.entry p { margin: 0 0 1.05em; }

/* Custom list bullets — horizontal tick marks */
.entry ul {
  list-style: none;
  padding-left: 1.5em;
}
.entry ul > li {
  position: relative;
  padding-left: .2em;
  margin: .4em 0;
}
.entry ul > li::before {
  content: "";
  position: absolute;
  left: -1.3em;
  top: .72em;
  width: .75em;
  height: 2px;
  background: var(--acc);
}
.entry ul > li::after {
  content: "";
  position: absolute;
  left: -1.3em;
  top: .47em;
  width: 2px;
  height: .52em;
  background: var(--acc);
  transform: rotate(0);
}
/* checkmark feel: vertical + horizontal = L-shape accent */

.entry ol { padding-left: 1.5em; }
.entry ol > li { margin: .4em 0; }
.entry ol > li::marker { color: var(--acc); font-weight: 700; }

.entry a { color: var(--acc); }
.entry a:hover { text-decoration: underline; }
.entry blockquote {
  border-left: 4px solid var(--acc);
  background: var(--bg-panel);
  margin: 1.4em 0;
  padding: 14px 20px;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  color: var(--ink-2);
}

/* =====================================================================
   CONTENT TABLE WRAPPER (the_content filter output)
===================================================================== */
.wmc-tablewrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1.4em 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.wmc-tablewrap::-webkit-scrollbar { height: 6px; }
.wmc-tablewrap::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }

.entry table {
  border-collapse: collapse;
  width: 100%;
  min-width: 520px;
  font-size: .9rem;
  margin: 0;
}
.entry th, .entry td {
  border: 1px solid var(--line);
  padding: 9px 13px;
  text-align: left;
  vertical-align: top;
}
.entry th {
  background: var(--bg-panel);
  font-weight: 700;
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--ink-2);
  white-space: nowrap;
  border-top: 2px solid var(--acc);
}
.entry tbody tr:nth-child(odd) { background: var(--bg); }
.entry tbody tr:nth-child(even) { background: var(--bg-off); }
.entry tbody tr:hover { background: var(--acc-lt); }

/* =====================================================================
   DISCLOSURE BOX .cmpc-disc
===================================================================== */
.cmpc-disc {
  font-size: .82rem;
  color: var(--ink-2);
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-top: 3px solid var(--acc);
  border-radius: 0 0 var(--radius) var(--radius);
  padding: 11px 16px;
  margin: 0 0 1.5em;
  line-height: 1.5;
}
.cmpc-disc strong { color: var(--ink); }

/* =====================================================================
   CTA AMAZON BUTTON .cta-amz
===================================================================== */
.cta-amz {
  display: inline-block;
  background: var(--acc);
  color: #fff !important;
  font-weight: 700;
  font-size: .92rem;
  text-decoration: none !important;
  padding: 11px 22px;
  border-radius: var(--radius);
  border: 2px solid var(--acc-dk);
  margin: 10px 0 18px;
  letter-spacing: .01em;
  transition: background .13s, transform .08s, box-shadow .13s;
  box-shadow: 0 2px 0 var(--acc-dk);
}
.cta-amz:hover {
  background: var(--acc-dk);
  border-color: #1e2f8a;
  box-shadow: 0 4px 0 #1e2f8a;
  transform: translateY(-1px);
  text-decoration: none !important;
}
.cta-amz span {
  font-size: .78rem;
  font-weight: 500;
  opacity: .8;
  margin-left: 5px;
}

/* =====================================================================
   RELATED POSTS
===================================================================== */
.wmc-related { margin-top: 32px; }
.wmc-related h2 {
  font-size: 1.1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  border: none;
  padding: 0;
  margin: 0 0 12px;
}

/* =====================================================================
   PAGE TEMPLATE
===================================================================== */
.wmc-page-article {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 36px;
  max-width: var(--content-max);
}
.wmc-page-article h1 { font-size: 1.9rem; margin-bottom: .5em; }

/* =====================================================================
   FOOTER
===================================================================== */
.site-footer {
  background: #0f1b47;
  color: rgba(255,255,255,.7);
  font-size: .84rem;
  margin-top: 0;
  padding: 32px 0 24px;
}
.site-footer a { color: rgba(255,255,255,.75); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: none; }

.wmc-foot-inner {
  max-width: var(--col-max);
  margin: 0 auto;
  padding: 0 20px;
}

.wmc-foot-brand {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 14px;
  letter-spacing: -.01em;
}

.wmc-foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255,255,255,.12);
}
.wmc-foot-links a {
  font-size: .84rem;
  font-weight: 500;
}

.wmc-foot-disc {
  color: rgba(255,255,255,.55);
  line-height: 1.55;
  max-width: 860px;
}

/* =====================================================================
   UTILITY
===================================================================== */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* =====================================================================
   RESPONSIVE — sidebar drops below content on mobile/tablet
===================================================================== */
@media (max-width: 900px) {
  .wmc-layout {
    grid-template-columns: 1fr;
  }
  .wmc-sidebar { order: 2; }
}

@media (max-width: 700px) {
  body { font-size: 16px; line-height: 1.65; }

  .wmc-hd { height: 52px; padding: 0 14px; }
  .wmc-brand { font-size: 1.05rem; }
  .wmc-nav { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .wmc-nav .menu { flex-wrap: nowrap; width: max-content; }
  .wmc-nav .menu a { padding: 5px 10px; font-size: .82rem; }

  .wmc-hero { padding: 32px 16px 28px; }
  .wmc-hero h1 { font-size: 1.65rem; }
  .wmc-hero p { font-size: .95rem; }

  .wmc-layout, .wmc-full { padding: 0 14px; }

  .entry { padding: 20px 18px; }
  .wmc-page-article { padding: 20px 18px; }
  .wmc-post-title { font-size: 1.5rem; }
  .entry h2 { font-size: 1.22rem; }

  /* Card list: stack thumb above text on very small screens */
  .wmc-list-item { grid-template-columns: 120px 1fr; }
  .wmc-list-item .wmc-thumb { width: 120px; }
  .wmc-list-item .wmc-item-body { padding: 10px 12px; }

  .cta-amz { display: block; text-align: center; padding: 12px 16px; }

  .wmc-foot-links { gap: 5px 14px; }
}

@media (max-width: 480px) {
  .wmc-list-item { grid-template-columns: 1fr; }
  .wmc-list-item .wmc-thumb { width: 100%; aspect-ratio: 16/7; }
}
