/*
Theme Name: TPD Parts Theme V4
Theme URI: https://thepartsdistributors.com/
Author: OpenAI
Description: Custom WooCommerce-first appliance parts theme for The Parts Distributors. Search-first, lightweight, and built for OEM part discovery.
Version: 4.0.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
Text Domain: tpd-parts
*/

:root {
  --tpd-navy: #0c2340;
  --tpd-blue: #155eef;
  --tpd-blue-2: #0b4fd8;
  --tpd-sky: #eaf3ff;
  --tpd-gold: #f59e0b;
  --tpd-ink: #101828;
  --tpd-text: #344054;
  --tpd-muted: #667085;
  --tpd-bg: #f7f9fc;
  --tpd-card: #ffffff;
  --tpd-line: #d9e2ec;
  --tpd-line-2: #eaecf0;
  --tpd-success: #067647;
  --tpd-danger: #b42318;
  --tpd-radius: 18px;
  --tpd-radius-sm: 14px;
  --tpd-shadow: 0 10px 32px rgba(16, 24, 40, 0.08);
  --tpd-shadow-lg: 0 18px 50px rgba(16, 24, 40, 0.12);
  --tpd-max: 1340px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--tpd-text);
  background: var(--tpd-bg);
  line-height: 1.65;
}
a { color: var(--tpd-blue); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
input, button, textarea, select { font: inherit; }
.container { width: min(var(--tpd-max), calc(100% - 28px)); margin: 0 auto; }
.screen-reader-text { position: absolute; left: -9999px; }
.site-shell { overflow: hidden; }
.hide-mobile { display: inline; }
.kicker {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 8px 12px;
  background: rgba(255,255,255,.13);
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 999px;
  color: #fff;
  font-size: .85rem;
  font-weight: 700;
}

.site-topbar {
  background: linear-gradient(90deg, var(--tpd-navy), #15335f);
  color: #fff;
  font-size: .92rem;
}
.site-topbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 8px 0;
  flex-wrap: wrap;
}
.site-topbar a { color: #fff; }
.topbar-list { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.topbar-list span::before {
  content: "•";
  margin-right: 8px;
  opacity: .45;
}
.topbar-list span:first-child::before { display: none; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 999;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--tpd-line-2);
}
.header-main {
  display: grid;
  grid-template-columns: 270px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 16px 0;
}
.site-branding { min-width: 0; }
.branding-title {
  display: block;
  color: var(--tpd-ink);
  font-weight: 900;
  font-size: 1.25rem;
  line-height: 1.04;
  letter-spacing: -.02em;
}
.branding-subtitle {
  display: block;
  color: var(--tpd-muted);
  font-size: .84rem;
  margin-top: 4px;
}
.site-search-wrap { min-width: 0; }
.site-search-wrap .search-form,
.hero-search .search-form,
.inline-search .search-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  position: relative;
}
input[type="search"],
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
textarea,
select,
.woocommerce .quantity .qty {
  width: 100%;
  padding: 15px 18px;
  border-radius: 999px;
  border: 1px solid var(--tpd-line);
  background: #fff;
  color: var(--tpd-ink);
  outline: none;
}
textarea { min-height: 140px; border-radius: 18px; }
button,
input[type="submit"],
.button,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button {
  border: 0;
  border-radius: 999px;
  padding: 14px 20px;
  background: linear-gradient(180deg, var(--tpd-blue), var(--tpd-blue-2));
  color: #fff !important;
  font-weight: 800;
  cursor: pointer;
  box-shadow: var(--tpd-shadow);
}
button:hover,
input[type="submit"]:hover,
.button:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover {
  text-decoration: none;
  filter: brightness(1.03);
}
.outline-btn,
.header-pill {
  background: #fff !important;
  color: var(--tpd-blue) !important;
  border: 1px solid var(--tpd-line) !important;
  box-shadow: none !important;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.header-phone {
  color: var(--tpd-ink);
  font-weight: 800;
  white-space: nowrap;
}
.header-phone small { display: block; font-weight: 600; color: var(--tpd-muted); }

.main-nav { border-top: 1px solid var(--tpd-line-2); }
.main-nav .menu {
  list-style: none;
  padding: 12px 0;
  margin: 0;
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}
.main-nav .menu a {
  color: var(--tpd-ink);
  font-weight: 800;
}

.hero {
  position: relative;
  background: radial-gradient(circle at top right, rgba(255,255,255,.14), transparent 30%), linear-gradient(130deg, #0a2042 0%, #103564 44%, #155eef 100%);
  color: #fff;
  padding: 66px 0 58px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 28px;
  align-items: center;
}
.hero h1 {
  margin: 14px 0 14px;
  font-size: clamp(2.2rem, 4vw, 4.1rem);
  line-height: 1;
  letter-spacing: -.04em;
  max-width: 12ch;
}
.hero p {
  max-width: 62ch;
  font-size: 1.05rem;
  opacity: .98;
}
.hero-pills,
.trust-pills,
.mini-pills,
.stat-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.hero-pills span,
.trust-pills span,
.mini-pills span,
.stat-pills span {
  padding: 9px 12px;
  border-radius: 999px;
  font-size: .88rem;
  font-weight: 800;
}
.hero-pills span { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.16); }
.trust-pills span { background: #edf4ff; color: var(--tpd-blue); }
.mini-pills span { background: #fff7e8; color: #9a6700; }
.stat-pills span { background: #f0fdf4; color: var(--tpd-success); }
.hero-search {
  background: rgba(255,255,255,.98);
  border: 1px solid rgba(255,255,255,.32);
  color: var(--tpd-text);
  border-radius: 24px;
  padding: 24px;
  box-shadow: var(--tpd-shadow-lg);
}
.hero-search h2 { margin: 0 0 8px; color: var(--tpd-ink); }
.hero-search .meta-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 16px;
}
.hero-search .meta-card {
  background: #f8fbff;
  border: 1px solid var(--tpd-line-2);
  border-radius: 18px;
  padding: 14px;
}
.hero-search .meta-card strong { display: block; color: var(--tpd-ink); }
.notice-strip {
  position: relative;
  margin-top: -22px;
  z-index: 5;
}
.notice-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  background: #fff;
  border: 1px solid var(--tpd-line-2);
  border-radius: 18px;
  box-shadow: var(--tpd-shadow);
  padding: 16px 18px;
}
.notice-panel strong { color: var(--tpd-ink); }

.section { padding: 56px 0; }
.section-alt { background: #eef4fb; }
.section-title-row {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.section h2 {
  margin: 0 0 8px;
  color: var(--tpd-ink);
  line-height: 1.05;
  letter-spacing: -.03em;
  font-size: clamp(1.7rem, 2.4vw, 2.5rem);
}
.section .lead { margin: 0; max-width: 72ch; color: var(--tpd-muted); }

.grid-2,
.grid-3,
.grid-4,
.footer-grid,
.post-grid,
.brand-grid,
.feature-grid,
.stats-grid,
.collection-grid,
.value-grid,
.related-grid,
.service-grid {
  display: grid;
  gap: 18px;
}
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3,
.post-grid,
.brand-grid,
.feature-grid,
.service-grid { grid-template-columns: repeat(3, 1fr); }
.grid-4,
.stats-grid,
.collection-grid,
.related-grid,
.value-grid { grid-template-columns: repeat(4, 1fr); }

.card,
.panel,
.metric-card,
.article-body,
.widget,
.product-rail,
.product-feature,
.value-card,
.collection-card,
.service-card,
.spec-card,
.shop-cta,
.brand-tile {
  background: var(--tpd-card);
  border: 1px solid var(--tpd-line-2);
  border-radius: var(--tpd-radius);
  box-shadow: var(--tpd-shadow);
}
.card,
.panel,
.value-card,
.collection-card,
.service-card,
.spec-card,
.product-feature { padding: 22px; }
.metric-card { padding: 20px; text-align: center; }
.metric-card strong {
  display: block;
  color: var(--tpd-ink);
  font-size: 1.8rem;
  line-height: 1;
  margin-bottom: 6px;
}
.icon-chip {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  background: #ebf3ff;
  color: var(--tpd-blue);
  font-weight: 900;
  margin-bottom: 14px;
}
.card h3,
.panel h3,
.value-card h3,
.collection-card h3,
.service-card h3,
.product-feature h3,
.spec-card h3 {
  margin: 0 0 8px;
  color: var(--tpd-ink);
  line-height: 1.14;
}
.muted { color: var(--tpd-muted); }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ebf3ff;
  color: var(--tpd-blue);
  border-radius: 999px;
  padding: 7px 11px;
  font-size: .82rem;
  font-weight: 800;
}
.badge.gold { background: #fff7e8; color: #9a6700; }
.badge.green { background: #ecfdf3; color: var(--tpd-success); }

.collection-card { display: flex; flex-direction: column; gap: 12px; min-height: 100%; }
.collection-card .collection-link {
  margin-top: auto;
  font-weight: 800;
}
.brand-tile {
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 16px;
  color: var(--tpd-ink);
  font-weight: 800;
}

.site-content { padding: 34px 0 18px; }
.content-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 28px; }
.content-layout.full-width { grid-template-columns: 1fr; }
.widget { padding: 18px; margin-bottom: 18px; }
.widget-title { margin-top: 0; color: var(--tpd-ink); }

.tpd-breadcrumbs {
  margin-bottom: 18px;
  color: var(--tpd-muted);
  font-size: .94rem;
}
.tpd-breadcrumbs a { color: var(--tpd-muted); }
.archive-head,
.entry-head { margin-bottom: 18px; }
.archive-head h1,
.entry-head h1 {
  margin: 0 0 8px;
  color: var(--tpd-ink);
  line-height: 1.05;
  letter-spacing: -.03em;
}
.entry-meta,
.archive-desc,
.meta-row { color: var(--tpd-muted); font-size: .95rem; }
.entry-card { display: flex; flex-direction: column; gap: 12px; }
.entry-thumb { overflow: hidden; border-radius: 16px; background: #eef4fb; }
.entry-title { margin: 0; color: var(--tpd-ink); line-height: 1.14; }
.entry-title a { color: inherit; }
.entry-excerpt { color: var(--tpd-text); }

.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; }
.article-body { padding: 28px; }
.article-body h2,
.article-body h3,
.article-body h4 { color: var(--tpd-ink); line-height: 1.14; }
.article-cta {
  margin-top: 26px;
  padding: 22px;
  border-radius: 18px;
  background: linear-gradient(180deg, #f6fbff, #edf5ff);
  border: 1px solid var(--tpd-line-2);
}
.article-cta .inline-search { margin-top: 12px; }

.shop-cta {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 20px;
  align-items: center;
  padding: 24px;
}
.inline-search .search-form { max-width: 100%; }
.note-list { margin: 0; padding-left: 18px; }
.note-list li { margin-bottom: 8px; }

.woocommerce .woocommerce-result-count,
.woocommerce .woocommerce-ordering { margin-bottom: 20px; }
.woocommerce ul.products {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px !important;
  margin: 0 !important;
  padding: 0 !important;
}
.woocommerce ul.products::before,
.woocommerce ul.products::after { display: none !important; }
.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product {
  width: auto !important;
  float: none !important;
  margin: 0 !important;
  padding: 18px;
  border: 1px solid var(--tpd-line-2);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--tpd-shadow);
  position: relative;
}
.woocommerce ul.products li.product .woocommerce-loop-product__title,
.woocommerce ul.products li.product h2 { color: var(--tpd-ink); font-size: 1rem; }
.woocommerce ul.products li.product .price { color: var(--tpd-navy); font-weight: 900; }
.woocommerce ul.products li.product a img { border-radius: 16px; }
.woocommerce nav.woocommerce-pagination { margin-top: 24px; text-align: center; }
.woocommerce div.product div.images img {
  border-radius: 20px;
  border: 1px solid var(--tpd-line-2);
}
.woocommerce div.product div.summary {
  background: #fff;
  border: 1px solid var(--tpd-line-2);
  border-radius: 22px;
  padding: 24px;
  box-shadow: var(--tpd-shadow);
}
.woocommerce div.product p.price,
.woocommerce div.product span.price {
  color: var(--tpd-navy);
  font-size: 1.8rem;
  font-weight: 900;
}
.tpd-product-shell {
  display: grid;
  grid-template-columns: 1.06fr .94fr;
  gap: 28px;
  align-items: start;
  margin-bottom: 28px;
}
.tpd-sticky-buy { position: sticky; top: 110px; }
.tpd-product-badges { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.tpd-product-meta-card,
.tpd-highlight-box {
  background: linear-gradient(180deg, #f8fbff, #edf4ff);
  border: 1px solid var(--tpd-line-2);
  border-radius: 18px;
  padding: 18px;
  margin: 16px 0;
}
.tpd-product-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.tpd-product-meta-grid div {
  background: #fff;
  border: 1px solid var(--tpd-line-2);
  border-radius: 16px;
  padding: 12px;
}
.tpd-tab-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 22px; }
.tpd-related { margin-top: 32px; }
.related-grid .tpd-related-item {
  background: #fff;
  border: 1px solid var(--tpd-line-2);
  border-radius: 18px;
  padding: 16px;
  box-shadow: var(--tpd-shadow);
}
.tpd-related-item a { color: var(--tpd-ink); font-weight: 800; }

.site-footer {
  background: linear-gradient(180deg, #0e2035, #0a1728);
  color: #d8e4f3;
  margin-top: 44px;
  padding: 52px 0 28px;
}
.site-footer a { color: #fff; }
.footer-grid { grid-template-columns: 1.2fr .8fr .8fr 1fr; }
.copyright {
  border-top: 1px solid rgba(255,255,255,.12);
  margin-top: 24px;
  padding-top: 16px;
  color: #b5c4d4;
}

.tpd-live-search-form { position: relative; }
.tpd-live-results {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 10px);
  background: #fff;
  border: 1px solid var(--tpd-line-2);
  border-radius: 18px;
  box-shadow: var(--tpd-shadow-lg);
  padding: 8px;
  z-index: 99;
}
.tpd-live-results a {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 12px;
  border-radius: 12px;
  color: var(--tpd-ink);
}
.tpd-live-results a:hover { text-decoration: none; background: #f5f8fc; }
.tpd-live-group {
  padding: 5px 10px;
  color: var(--tpd-muted);
  font-size: .77rem;
  text-transform: uppercase;
  font-weight: 900;
  letter-spacing: .04em;
}
.tpd-live-chip { color: var(--tpd-muted); font-size: .88rem; }

.pagination-wrap,
.woocommerce-pagination { text-align: center; margin-top: 24px; }

@media (max-width: 1200px) {
  .grid-4,
  .stats-grid,
  .collection-grid,
  .related-grid,
  .value-grid,
  .woocommerce ul.products,
  .footer-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 1024px) {
  .header-main,
  .hero-grid,
  .content-layout,
  .article-layout,
  .tpd-product-shell,
  .grid-3,
  .grid-4,
  .collection-grid,
  .stats-grid,
  .feature-grid,
  .service-grid,
  .related-grid,
  .footer-grid,
  .shop-cta,
  .tpd-tab-grid,
  .woocommerce ul.products { grid-template-columns: repeat(2, 1fr); }
  .header-main { grid-template-columns: 1fr; }
  .header-actions { justify-content: flex-start; }
  .tpd-sticky-buy { position: static; }
}
@media (max-width: 760px) {
  .hide-mobile { display: none; }
  .site-topbar .container,
  .header-actions { justify-content: center; }
  .hero,
  .section { padding: 38px 0; }
  .hero h1 { max-width: none; }
  .header-main,
  .hero-grid,
  .content-layout,
  .article-layout,
  .tpd-product-shell,
  .grid-2,
  .grid-3,
  .grid-4,
  .feature-grid,
  .collection-grid,
  .stats-grid,
  .service-grid,
  .related-grid,
  .footer-grid,
  .shop-cta,
  .tpd-tab-grid,
  .woocommerce ul.products,
  .site-search-wrap .search-form,
  .hero-search .search-form,
  .inline-search .search-form { grid-template-columns: 1fr; }
  .main-nav .menu { gap: 14px; }
  .notice-panel { padding: 14px; }
}
