/*
Theme Name: Revolff 6 Full Product Rebuild
Theme URI: https://thepartsdistributors.com/
Author: OpenAI
Description: Compact, catalog-first WooCommerce theme rebuild for The Parts Distributors.
Version: 6.0.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
Text Domain: revolff-6-product
*/

:root{
  --rev-bg:#f3f6fa;
  --rev-surface:#ffffff;
  --rev-text:#10233f;
  --rev-muted:#5f708a;
  --rev-border:#d9e2ee;
  --rev-blue:#1f5fe0;
  --rev-blue-dark:#163f96;
  --rev-top:#0f2e5d;
  --rev-radius:10px;
  --rev-shadow:0 1px 2px rgba(16,35,63,.04);
  --rev-max:1280px;
}

*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  color:var(--rev-text);
  background:var(--rev-bg);
  line-height:1.5;
  font-size:16px;
}
img{max-width:100%;height:auto}
a{color:var(--rev-blue);text-decoration:none}
a:hover{text-decoration:underline}
.site-wrap{min-height:100vh}

.rev-topbar{
  background:var(--rev-top);
  color:#fff;
  font-size:13px;
}
.rev-topbar__inner,
.rev-header__inner,
.rev-nav__inner,
.rev-main,
.rev-footer__inner{
  max-width:var(--rev-max);
  margin:0 auto;
  padding-left:20px;
  padding-right:20px;
}
.rev-topbar__inner{
  min-height:34px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
}
.rev-header{
  background:#fff;
  border-bottom:1px solid var(--rev-border);
}
.rev-header__inner{
  display:grid;
  grid-template-columns:240px minmax(280px,1fr) auto;
  gap:18px;
  align-items:center;
  padding-top:12px;
  padding-bottom:12px;
}
.rev-logo{
  color:var(--rev-text);
  font-weight:900;
  font-size:26px;
  line-height:1.05;
  letter-spacing:.2px;
  text-transform:uppercase;
  display:inline-block;
}
.rev-logo:hover{text-decoration:none}
.rev-parts-search{
  display:flex;
  gap:10px;
  align-items:center;
}
.rev-parts-search input[type=search]{
  flex:1;
  min-width:0;
  height:48px;
  border:1px solid var(--rev-border);
  border-radius:999px;
  padding:0 18px;
  font-size:16px;
  color:var(--rev-text);
  background:#fff;
}
.rev-btn,
button,
input[type=submit],
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit{
  appearance:none;
  border:0;
  background:var(--rev-blue);
  color:#fff;
  border-radius:999px;
  min-height:44px;
  padding:0 18px;
  font-weight:700;
  font-size:15px;
  cursor:pointer;
  box-shadow:none;
}
.rev-btn:hover,
button:hover,
input[type=submit]:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover{
  background:var(--rev-blue-dark);
  color:#fff;
}
.rev-actions{
  display:flex;
  align-items:center;
  gap:14px;
  white-space:nowrap;
  font-size:15px;
}
.rev-actions a{color:var(--rev-text)}
.rev-nav{
  background:#fff;
  border-bottom:1px solid var(--rev-border);
}
.rev-nav__inner{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:18px;
  min-height:52px;
  overflow:visible!important;
}
.rev-nav ul{
  list-style:none;
  margin:0;
  padding:0;
  display:flex;
  flex-wrap:wrap;
  gap:18px;
}
.rev-nav li{margin:0}
.rev-nav a{
  color:var(--rev-text);
  font-weight:700;
  font-size:15px;
}
.rev-main{padding-top:22px;padding-bottom:40px}
.rev-section{padding:26px 0}
.rev-section--tight{padding:18px 0}
.rev-section h1,.rev-section h2{
  margin:0 0 10px;
  color:var(--rev-text);
  letter-spacing:-.02em;
}
.rev-section h1{font-size:42px;line-height:1.05}
.rev-section h2{font-size:24px;line-height:1.2}
.rev-sub{
  color:var(--rev-muted);
  margin:0 0 16px;
  max-width:760px;
}
.rev-note{
  background:#fff;
  border:1px solid var(--rev-border);
  border-radius:14px;
  padding:14px 16px;
  color:var(--rev-muted);
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:16px;
}
.rev-chipset{display:flex;gap:10px;flex-wrap:wrap}
.rev-chip{
  background:#eef4ff;
  border:1px solid #dbe7ff;
  color:var(--rev-blue);
  border-radius:999px;
  padding:8px 14px;
  font-weight:700;
  font-size:14px;
}
.rev-grid{
  display:grid;
  gap:16px;
}
.rev-cats{grid-template-columns:repeat(4,minmax(0,1fr))}
.rev-brands{grid-template-columns:repeat(6,minmax(0,1fr))}
.rev-products{grid-template-columns:repeat(4,minmax(0,1fr))}
.rev-guides{grid-template-columns:repeat(4,minmax(0,1fr))}
.rev-card,
.rev-brand,
.rev-guide,
.rev-product{
  background:var(--rev-surface);
  border:1px solid var(--rev-border);
  border-radius:12px;
  box-shadow:var(--rev-shadow);
}
.rev-card{
  padding:16px;
  min-height:118px;
}
.rev-card h3,
.rev-product h3,
.rev-guide h3{
  margin:0 0 8px;
  color:var(--rev-text);
}
.rev-card h3{font-size:16px;line-height:1.25}
.rev-card p,
.rev-guide p{
  color:var(--rev-muted);
  margin:0 0 12px;
  font-size:15px;
}
.rev-card__link{font-weight:700}
.rev-brand{
  min-height:50px;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:10px 12px;
  text-align:center;
  font-weight:800;
  color:var(--rev-text);
  text-decoration:none;
}
.rev-brand:hover{text-decoration:none;border-color:#b8c9e3}
.rev-product{
  padding:12px;
  display:flex;
  flex-direction:column;
}
.rev-product__thumb{
  background:#fff;
  border:1px solid #edf1f6;
  border-radius:10px;
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:170px;
  overflow:hidden;
}
.rev-product__thumb img{
  max-height:160px;
  width:auto;
  object-fit:contain;
}
.rev-product__title{
  font-size:15px;
  line-height:1.35;
  font-weight:800;
  min-height:42px;
  margin:10px 0 8px;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}
.rev-price{
  margin-top:auto;
  font-size:16px;
  font-weight:800;
  margin-bottom:10px;
}
.rev-guide{padding:16px}
.rev-guide__eyebrow{
  display:inline-block;
  margin-bottom:10px;
  background:#eef4ff;
  color:var(--rev-blue);
  border:1px solid #dbe7ff;
  border-radius:999px;
  padding:5px 10px;
  font-size:12px;
  font-weight:700;
}
.rev-footer{
  background:#fff;
  border-top:1px solid var(--rev-border);
  margin-top:18px;
}
.rev-footer__inner{
  padding-top:20px;
  padding-bottom:20px;
  font-size:14px;
  color:var(--rev-muted);
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
  gap:14px;
}
.rev-footer__nav{display:flex;gap:16px;flex-wrap:wrap}
.rev-footer__nav a{color:var(--rev-muted)}

.woocommerce-breadcrumb{font-size:14px;color:var(--rev-muted);margin:0 0 12px}
.woocommerce-breadcrumb a{color:var(--rev-muted)}
.woocommerce-result-count,.woocommerce-ordering{margin-bottom:14px}
.woocommerce-ordering select{
  height:42px;border:1px solid var(--rev-border);border-radius:10px;padding:0 12px;background:#fff
}
.woocommerce ul.products{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}
.woocommerce ul.products li.product{
  list-style:none;margin:0!important;width:100%!important;background:#fff;border:1px solid var(--rev-border);
  border-radius:12px;padding:12px;display:flex;flex-direction:column
}
.woocommerce ul.products li.product a img{
  width:100%!important;height:170px!important;object-fit:contain;background:#fff;border:1px solid #edf1f6;border-radius:10px;padding:10px
}
.woocommerce-loop-product__title{
  font-size:15px!important;line-height:1.35!important;font-weight:800!important;
  min-height:42px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;margin:10px 0 8px!important
}
.woocommerce ul.products li.product .price{margin-top:auto;font-size:16px!important;font-weight:800!important;margin-bottom:10px!important}
.woocommerce ul.products li.product .button{width:100%;justify-content:center;text-align:center}
.woocommerce nav.woocommerce-pagination ul{
  list-style:none;display:flex;gap:8px;justify-content:center;padding:0;margin:22px 0 0;border:0
}
.woocommerce nav.woocommerce-pagination ul li{border:0}
.woocommerce nav.woocommerce-pagination ul li a,
.woocommerce nav.woocommerce-pagination ul li span{
  display:inline-flex;align-items:center;justify-content:center;min-width:38px;height:38px;border:1px solid var(--rev-border);border-radius:10px;color:var(--rev-text);background:#fff
}

/* Single product */
.single-product div.product{
  display:grid;
  grid-template-columns:minmax(0,56%) minmax(320px,44%);
  gap:28px;
  align-items:start;
}
.single-product .woocommerce-product-gallery,
.single-product .summary{width:100%!important;float:none!important;margin:0!important}
.single-product .woocommerce-product-gallery__wrapper,
.single-product .woocommerce-product-gallery .flex-viewport{width:100%!important}
.single-product .woocommerce-product-gallery img{
  width:100%!important;
  height:auto!important;
  max-height:680px;
  object-fit:contain;
  background:#fff;
  border:1px solid var(--rev-border);
  border-radius:14px;
}
.single-product .flex-control-thumbs{display:flex!important;gap:10px;list-style:none;padding:0;margin-top:12px}
.single-product .flex-control-thumbs li{width:76px!important;list-style:none}
.single-product .flex-control-thumbs img{width:76px!important;height:76px!important;object-fit:cover;border-radius:8px}
.single-product .product_title{font-size:32px;line-height:1.15;margin:0 0 10px}
.single-product .price{font-size:28px;font-weight:800;margin-bottom:12px}
.single-product form.cart{display:flex;gap:10px;align-items:center;margin-bottom:14px}
.single-product form.cart .qty{width:74px;height:46px;text-align:center;border:1px solid var(--rev-border);border-radius:10px}
.single-product .single_add_to_cart_button{flex:1}
.single-product .woocommerce-tabs,
.single-product .related.products{grid-column:1 / -1}
.single-product .woocommerce-tabs ul.tabs{padding:0;display:flex;gap:8px;list-style:none}
.single-product .woocommerce-tabs ul.tabs li{border:0;background:transparent;padding:0;margin:0}
.single-product .woocommerce-tabs ul.tabs li a{display:inline-flex;align-items:center;height:38px;padding:0 14px;border:1px solid var(--rev-border);border-radius:999px;background:#fff;color:var(--rev-text)}

.rev-article-search{
  background:#f5f7fb;
  border:1px solid var(--rev-border);
  border-radius:12px;
  padding:16px;
  margin:20px 0;
}
.rev-article-search h3{margin:0 0 6px;font-size:20px}
.rev-article-search p{margin:0 0 12px;color:var(--rev-muted)}
.rev-article-search form{display:flex;gap:10px;flex-wrap:wrap}
.rev-article-search input[type=search]{flex:1;min-width:220px;height:44px;border:1px solid var(--rev-border);border-radius:10px;padding:0 14px}

.screen-reader-text{display:none!important}

@media (max-width: 1100px){
  .rev-header__inner{grid-template-columns:220px minmax(220px,1fr);grid-template-areas:"logo actions" "search search";align-items:center}
  .rev-header__inner .rev-logo{grid-area:logo}
  .rev-header__inner .rev-parts-search{grid-area:search}
  .rev-header__inner .rev-actions{grid-area:actions;justify-self:end}
  .rev-cats,.rev-products,.woocommerce ul.products{grid-template-columns:repeat(3,minmax(0,1fr))}
  .rev-brands{grid-template-columns:repeat(6,minmax(0,1fr))}
  .rev-guides{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width: 780px){
  .rev-topbar__inner{justify-content:center}
  .rev-topbar__inner div:last-child{display:none}
  .rev-header__inner{grid-template-columns:1fr;grid-template-areas:"logo" "search" "actions"}
  .rev-logo{text-align:center}
  .rev-actions{justify-content:center}
  .rev-nav__inner{overflow-x:auto}
  .rev-nav ul{flex-wrap:nowrap;padding-bottom:6px}
  .rev-cats,.rev-products,.woocommerce ul.products,.rev-brands,.rev-guides{grid-template-columns:repeat(2,minmax(0,1fr))}
  .single-product div.product{grid-template-columns:1fr}
  .single-product .product_title{font-size:28px}
}
@media (max-width: 520px){
  .rev-main,.rev-topbar__inner,.rev-header__inner,.rev-nav__inner,.rev-footer__inner{padding-left:14px;padding-right:14px}
  .rev-cats,.rev-products,.woocommerce ul.products,.rev-brands,.rev-guides{grid-template-columns:1fr}
  .rev-section h1{font-size:34px}
  .rev-section h2{font-size:22px}
}


/* Compact final overrides */
.rev-topbar{display:none!important}
.rev-main{padding-top:10px;padding-bottom:28px}
.rev-header__inner{
  grid-template-columns:minmax(180px,240px) minmax(320px,1fr) auto;
  gap:14px;
  padding-top:10px;
  padding-bottom:10px;
}
.rev-logo{font-size:24px;line-height:1}
.rev-parts-search input[type=search]{
  height:44px;
  border-radius:8px;
}
.rev-btn,
button,
input[type=submit],
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit{
  border-radius:8px;
  min-height:40px;
  padding:0 14px;
  font-size:14px;
}
.rev-actions{gap:10px;font-size:14px}
.rev-nav__inner{min-height:44px}
.rev-nav ul{flex-wrap:nowrap;overflow:auto;white-space:nowrap}
.rev-nav a{font-size:14px}
.rev-section{padding:16px 0}
.rev-section h1{font-size:26px;line-height:1.15;margin-bottom:12px}
.rev-section h2{font-size:22px;line-height:1.2;margin-bottom:12px}
.rev-sub{display:none}
.rev-grid{gap:12px}
.rev-cats{grid-template-columns:repeat(4,minmax(0,1fr))}
.rev-brands{grid-template-columns:repeat(6,minmax(0,1fr))}
.rev-products{grid-template-columns:repeat(4,minmax(0,1fr))}
.rev-guides{grid-template-columns:repeat(4,minmax(0,1fr))}
.rev-card,.rev-brand,.rev-guide,.rev-product{
  border-radius:8px;
  box-shadow:none;
}
.rev-card{
  min-height:auto;
  padding:14px 16px;
}
.rev-card h3{font-size:16px;margin:0}
.rev-card p,.rev-card__link{display:none}
.rev-brand{
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:44px;
  padding:10px 12px;
  font-weight:700;
  color:var(--rev-text);
}
.rev-product{
  padding:12px;
}
.rev-product__thumb{
  display:block;
  background:#fff;
  border:1px solid var(--rev-border);
  border-radius:8px;
  padding:12px;
  margin-bottom:10px;
}
.rev-product__thumb img{
  width:100%;
  height:160px!important;
  object-fit:contain;
}
.rev-product__title{
  display:block;
  color:var(--rev-text);
  font-weight:700;
  font-size:14px;
  line-height:1.4;
  min-height:40px;
  margin-bottom:8px;
}
.rev-price{
  font-size:16px;
  font-weight:800;
  color:var(--rev-text);
  margin-bottom:10px;
}
.rev-guide{
  display:block;
  padding:14px;
  color:var(--rev-text);
}
.rev-guide__eyebrow{
  display:inline-block;
  margin-bottom:6px;
  font-size:12px;
  font-weight:800;
  color:var(--rev-blue);
  text-transform:uppercase;
  letter-spacing:.03em;
}
.rev-guide h3{
  font-size:15px;
  line-height:1.35;
  margin:0 0 6px;
}
.rev-guide p{
  margin:0;
  font-size:13px;
  color:var(--rev-muted);
  line-height:1.45;
}
.rev-footer{margin-top:12px}
.rev-footer__inner{
  padding-top:18px;
  padding-bottom:18px;
  font-size:13px;
}
@media (max-width: 1100px){
  .rev-header__inner{grid-template-columns:1fr}
  .rev-actions{justify-content:flex-start}
  .rev-cats,.rev-products,.rev-guides{grid-template-columns:repeat(2,minmax(0,1fr))}
  .rev-brands{grid-template-columns:repeat(6,minmax(0,1fr))}
}
@media (max-width: 640px){
  .rev-main{padding-top:8px}
  .rev-header__inner{padding-top:8px;padding-bottom:8px}
  .rev-cats,.rev-products,.rev-guides,.rev-brands{grid-template-columns:repeat(6,minmax(0,1fr))}
  .rev-brand,.rev-card{min-height:42px}
  .rev-product__thumb img{height:140px!important}
}


/* ===== Single product rebuild ===== */
.single-product .rev-sp-wrap{
  max-width:1200px;
  margin:28px auto 40px;
  padding:0 20px;
}
.single-product .woocommerce-breadcrumb{
  margin:0 0 18px;
  font-size:13px;
  color:#667085;
}
.single-product .product{
  display:grid;
  grid-template-columns:minmax(0,56%) minmax(340px,44%);
  gap:36px;
  align-items:start;
}
.single-product div.product div.images,
.single-product div.product div.summary{
  float:none!important;
  width:auto!important;
  margin:0!important;
}
.single-product div.product div.images{
  background:#fff;
  border:1px solid #e5e7eb;
  border-radius:10px;
  padding:16px;
}
.single-product div.product div.images img{
  width:100%!important;
  height:auto!important;
  max-height:520px;
  object-fit:contain;
}
.single-product .woocommerce-product-gallery__image{
  text-align:center;
}
.single-product .flex-control-thumbs{
  display:flex!important;
  gap:10px;
  flex-wrap:wrap;
  margin-top:14px!important;
  padding:0!important;
  list-style:none!important;
}
.single-product .flex-control-thumbs li{
  width:74px!important;
  list-style:none!important;
  border:1px solid #e5e7eb;
  border-radius:8px;
  overflow:hidden;
  background:#fff;
}
.single-product .flex-control-thumbs img{
  width:74px!important;
  height:74px!important;
  object-fit:contain!important;
}
.single-product .summary{
  background:#fff;
  border:1px solid #e5e7eb;
  border-radius:10px;
  padding:22px;
}
.single-product .summary .product_title{
  font-size:36px;
  line-height:1.1;
  margin:0 0 12px;
}
.single-product .rev-meta-top{
  display:flex;
  flex-wrap:wrap;
  gap:10px 14px;
  margin:0 0 12px;
  font-size:14px;
  color:#334155;
}
.single-product .rev-meta-pill{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:6px 10px;
  border:1px solid #dbe3f4;
  border-radius:999px;
  background:#f8fbff;
  font-weight:700;
  color:#0f172a;
}
.single-product .summary .price{
  font-size:30px;
  font-weight:800;
  color:#111827;
  margin:10px 0 12px;
}
.single-product .stock{
  color:#166534;
  font-weight:700;
  margin:0 0 14px;
}
.single-product .woocommerce-product-details__short-description{
  margin:0 0 16px;
  color:#475467;
  line-height:1.6;
  font-size:15px;
}
.single-product form.cart{
  display:flex;
  gap:10px;
  align-items:center;
  margin:0 0 16px;
}
.single-product form.cart .quantity .qty{
  width:80px;
  height:46px;
  border-radius:8px;
  border:1px solid #d0d5dd;
  text-align:center;
}
.single-product .single_add_to_cart_button.button{
  flex:1;
  height:46px;
  border-radius:8px;
  background:#1d4ed8;
  color:#fff;
  font-weight:700;
}
.single-product .rev-fit-box,
.single-product .rev-help-box{
  margin-top:16px;
  padding:14px;
  border:1px solid #e5e7eb;
  border-radius:8px;
  background:#f8fafc;
}
.single-product .rev-fit-box h3,
.single-product .rev-help-box h3{
  font-size:16px;
  margin:0 0 8px;
}
.single-product .rev-fit-form{
  display:flex;
  gap:8px;
}
.single-product .rev-fit-form input{
  flex:1;
  min-width:0;
  height:42px;
  border:1px solid #d0d5dd;
  border-radius:8px;
  padding:0 12px;
}
.single-product .rev-fit-form button{
  height:42px;
  border-radius:8px;
  padding:0 14px;
  background:#111827;
  color:#fff;
}
.single-product .product_meta{
  margin-top:16px;
  padding-top:16px;
  border-top:1px solid #eaecf0;
  font-size:14px;
  color:#475467;
}
.single-product .woocommerce-tabs,
.single-product .related.products{
  margin-top:28px;
}
.single-product .woocommerce-tabs ul.tabs{
  display:flex;
  gap:8px;
  padding:0;
  margin:0 0 16px;
  border-bottom:1px solid #eaecf0;
}
.single-product .woocommerce-tabs ul.tabs li{
  list-style:none;
  margin:0;
  padding:0;
  border:none;
  background:transparent;
}
.single-product .woocommerce-tabs ul.tabs li a{
  display:block;
  padding:10px 12px;
  font-weight:700;
}
.single-product .woocommerce-Tabs-panel{
  background:#fff;
  border:1px solid #e5e7eb;
  border-radius:10px;
  padding:20px;
}
.single-product .related.products > h2{
  font-size:28px;
  margin:0 0 16px;
}
.single-product .related.products ul.products{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:16px;
}
.single-product .related.products ul.products li.product{
  width:100%!important;
  margin:0!important;
  padding:12px;
  background:#fff;
  border:1px solid #e5e7eb;
  border-radius:10px;
  list-style:none!important;
}
.single-product .related.products ul.products li.product img{
  width:100%;
  height:160px;
  object-fit:contain;
}
.single-product .related.products ul.products li.product .button{
  width:100%;
  min-height:40px;
  border-radius:8px;
}
.single-product .woocommerce-review-link,
.single-product .star-rating,
.single-product .comment-form-rating{display:none!important;}

@media (max-width: 980px){
  .single-product .product{grid-template-columns:1fr;gap:18px;}
  .single-product .summary .product_title{font-size:30px;}
  .single-product .related.products ul.products{grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media (max-width: 640px){
  .single-product .rev-sp-wrap{padding:0 14px;}
  .single-product form.cart{flex-wrap:wrap;}
  .single-product .single_add_to_cart_button.button{width:100%;}
  .single-product .rev-fit-form{flex-direction:column;}
  .single-product .related.products ul.products{grid-template-columns:1fr;}
}
