/*
Theme Name: TPD Light Theme
Theme URI: https://thepartsdistributors.com/
Author: OpenAI
Description: Lightweight responsive WooCommerce theme foundation for The Parts Distributors.
Version: 0.1.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
Text Domain: tpd-light
*/

:root{
  --tpd-bg:#eef2f7;
  --tpd-card:#ffffff;
  --tpd-line:#d7deea;
  --tpd-text:#102a55;
  --tpd-muted:#62738f;
  --tpd-blue:#2f5fe8;
  --tpd-blue-dark:#1f4fd5;
  --tpd-radius:12px;
  --tpd-radius-sm:10px;
  --tpd-shadow:0 1px 2px rgba(16,42,85,.04);
  --tpd-container:1320px;
}

*,
*::before,
*::after{box-sizing:border-box}

html{scroll-behavior:smooth}

body{
  margin:0;
  font-family:Arial, Helvetica, sans-serif;
  background:var(--tpd-bg);
  color:var(--tpd-text);
  line-height:1.45;
  overflow-x:hidden;
}

img{max-width:100%;height:auto;display:block}
a{color:var(--tpd-text);text-decoration:none}
a:hover{color:var(--tpd-blue)}
button,input,select,textarea{font:inherit}

.site-wrap{
  min-height:100vh;
  display:flex;
  flex-direction:column;
}

.tpd-container{
  width:min(100% - 28px, var(--tpd-container));
  margin-inline:auto;
}

.top-strip{height:8px;background:#000}

.site-header{
  background:#fff;
  border-bottom:1px solid var(--tpd-line);
}

.header-main{
  display:grid;
  grid-template-columns:220px minmax(0,1fr) 150px auto;
  gap:12px;
  align-items:center;
  padding:14px 0;
}

.site-branding a{
  display:inline-block;
  font-size:22px;
  line-height:.92;
  letter-spacing:-.4px;
  font-weight:900;
  color:var(--tpd-text);
}

.header-search .woocommerce-product-search,
.header-search form{
  display:block;
  margin:0;
}

.header-search input[type="search"],
.header-search input[type="text"]{
  width:100%;
  height:48px;
  border:1px solid #cbd5e4;
  border-radius:10px;
  padding:0 14px;
  font-size:15px;
  background:#fff;
  color:var(--tpd-text);
}

.tpd-btn,
button,
input[type="submit"],
.header-search button{
  appearance:none;
  border:0;
  background:var(--tpd-blue);
  color:#fff;
  border-radius:10px;
  font-weight:800;
  font-size:15px;
  min-height:48px;
  padding:0 18px;
  cursor:pointer;
}

.tpd-btn:hover,
button:hover,
input[type="submit"]:hover,
.header-search button:hover{
  background:var(--tpd-blue-dark);
  color:#fff;
}

.tpd-btn--secondary{
  background:#fff;
  color:var(--tpd-text);
  border:1px solid #cbd5e4;
  min-height:40px;
}

.tpd-btn--secondary:hover{
  background:#f6f8fc;
  color:var(--tpd-text);
}

.header-cart{
  justify-self:end;
}

.header-cart a{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:40px;
  padding:0 12px;
  border:1px solid #cbd5e4;
  border-radius:10px;
  background:#fff;
  font-weight:700;
}

.nav-wrap{
  background:#fff;
  border-bottom:1px solid var(--tpd-line);
}

.primary-nav{
  display:flex;
  gap:24px;
  align-items:center;
  white-space:nowrap;
  overflow-x:auto;
  scrollbar-width:none;
  padding:14px 0;
  font-size:14px;
  font-weight:800;
}
.primary-nav::-webkit-scrollbar{display:none}

main.site-main{
  flex:1;
  padding:26px 0 34px;
}

.tpd-section{margin-bottom:30px}
.tpd-section:last-child{margin-bottom:0}

.section-title{
  margin:0 0 14px;
  font-size:22px;
  line-height:1.1;
  font-weight:900;
}

.brand-grid{
  display:grid;
  grid-template-columns:repeat(6,1fr);
  gap:12px;
}

.brand-chip{
  min-height:66px;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  padding:12px 10px;
  background:var(--tpd-card);
  border:1px solid var(--tpd-line);
  border-radius:var(--tpd-radius);
  box-shadow:var(--tpd-shadow);
  font-size:15px;
  font-weight:800;
}

.product-grid{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:16px;
}

.product-card{
  display:flex;
  flex-direction:column;
  background:var(--tpd-card);
  border:1px solid var(--tpd-line);
  border-radius:14px;
  padding:12px;
  box-shadow:var(--tpd-shadow);
}

.product-thumb{
  width:100%;
  aspect-ratio:1/1;
  display:flex;
  align-items:center;
  justify-content:center;
  border:1px solid #e3e8f1;
  border-radius:12px;
  background:#f7f9fc;
  overflow:hidden;
  margin-bottom:10px;
}

.product-title{
  font-size:15px;
  line-height:1.3;
  font-weight:700;
  min-height:40px;
  margin-bottom:8px;
}

.product-price{
  font-size:18px;
  font-weight:900;
  margin:0 0 10px;
}

.product-card .tpd-btn{
  width:100%;
  min-height:40px;
  font-size:14px;
  margin-top:auto;
}

.guide-grid{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:16px;
}

.guide-card{
  background:var(--tpd-card);
  border:1px solid var(--tpd-line);
  border-radius:14px;
  padding:14px;
  box-shadow:var(--tpd-shadow);
}

.guide-pill{
  display:inline-block;
  padding:5px 8px;
  margin-bottom:10px;
  border-radius:999px;
  background:#eef3ff;
  border:1px solid #dce5ff;
  color:var(--tpd-blue);
  font-size:10px;
  font-weight:900;
}

.guide-title{
  font-size:15px;
  line-height:1.3;
  font-weight:800;
  margin:0 0 8px;
}

.guide-text{
  font-size:13px;
  line-height:1.5;
  color:var(--tpd-muted);
  margin:0;
}

.site-footer{
  background:#fff;
  border-top:1px solid var(--tpd-line);
  margin-top:24px;
}

.footer-inner{padding:22px 0 28px}
.footer-copy{
  font-size:14px;
  color:var(--tpd-muted);
  margin-bottom:14px;
}
.footer-links{
  display:grid;
  grid-template-columns:repeat(6,auto);
  gap:18px;
  font-size:14px;
  font-weight:700;
  color:var(--tpd-muted);
}

.page-card,
.archive-card{
  background:#fff;
  border:1px solid var(--tpd-line);
  border-radius:14px;
  box-shadow:var(--tpd-shadow);
  padding:18px;
}

.entry-title,
.page-title,
.woocommerce-products-header__title.page-title{
  font-size:28px;
  line-height:1.15;
  margin:0 0 14px;
}

.entry-content,
.term-description{
  color:var(--tpd-text);
}

.woocommerce ul.products,
.woocommerce-page ul.products{
  display:grid!important;
  grid-template-columns:repeat(4,1fr);
  gap:16px;
  margin:0!important;
  padding:0!important;
}

.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product{
  width:auto!important;
  float:none!important;
  margin:0!important;
  padding:12px;
  border:1px solid var(--tpd-line);
  border-radius:14px;
  background:#fff;
  box-shadow:var(--tpd-shadow);
}

.woocommerce div.product{
  background:#fff;
  border:1px solid var(--tpd-line);
  border-radius:14px;
  box-shadow:var(--tpd-shadow);
  padding:18px;
}

.woocommerce-message,
.woocommerce-info,
.woocommerce-error{
  border-radius:10px;
}

@media (max-width:1100px){
  .header-main{grid-template-columns:200px minmax(0,1fr) 132px auto}
  .brand-grid{grid-template-columns:repeat(4,1fr)}
  .guide-grid{grid-template-columns:repeat(2,1fr)}
  .woocommerce ul.products,
  .woocommerce-page ul.products{grid-template-columns:repeat(3,1fr)!important}
}

@media (max-width:820px){
  .header-main{
    grid-template-columns:1fr;
  }
  .site-branding,
  .header-search,
  .header-find,
  .header-cart{
    width:100%;
  }
  .site-branding a{font-size:20px}
  .header-find .tpd-btn,
  .header-cart a{width:100%}
  .brand-grid{grid-template-columns:repeat(2,1fr)}
  .product-grid{grid-template-columns:repeat(2,1fr)}
  .guide-grid{grid-template-columns:1fr}
  .woocommerce ul.products,
  .woocommerce-page ul.products{grid-template-columns:repeat(2,1fr)!important}
}

@media (max-width:540px){
  .tpd-container{width:min(100% - 24px, var(--tpd-container))}
  .section-title{font-size:20px}
  .footer-links{grid-template-columns:repeat(2,auto);gap:10px 18px}
  .woocommerce ul.products,
  .woocommerce-page ul.products{grid-template-columns:1fr!important}
}
