/*
Theme Name: CSR Performance
Description: Custom theme for csr-performance.com. Replaces VW Auto Parts Pro
  (stock vendor theme) with hand-written code matching the site's existing
  look. No homepage builder, no Customizer color panel, no Bootstrap --
  the visual design that used to live in ~300 Customizer settings is now
  plain CSS.
Version: 1.0.0
Text Domain: csr-theme
*/

/* ---------- Fonts (self-hosted, subset to what's actually used) ---------- */
@font-face {
  font-family: 'Play';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('assets/webfonts/play-bold.woff2') format('woff2');
}
@font-face {
  font-family: 'ABeeZee';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('assets/webfonts/abeezee-regular.woff2') format('woff2');
}

/* ---------- Reset ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
img { max-width: 100%; height: auto; border: none; }
body {
  font-family: 'ABeeZee', Arial, sans-serif;
  font-weight: 300;
  font-size: 15px;
  color: #000;
  background-color: #f1f1f1;
  background-image: url('../../uploads/2022/08/allstar-body.gif');
  background-position: center center;
  background-size: contain;
  background-repeat: repeat;
  background-attachment: fixed;
  /* Boxed layout: the whole body -- header/nav backgrounds included, not
     just the inner content -- is constrained to 1140px, matching the
     live site. The gradient background shows in the margin on either side. */
  width: 1140px;
  margin: 0 auto !important;
}
h1, h2, h3, h4, h5, h6 {
  font-family: 'Play', Arial, sans-serif;
  font-weight: 700;
  letter-spacing: 1px;
  margin: 0;
  padding: 10px 0;
  color: #000;
}
h1, .woocommerce .summary h1 { color: #0a0000; }
p { margin: 0 0 15px; }
a { text-decoration: none; }
a.button {
  display: inline-block;
  background-color: #dd9933;
  color: #fff;
  padding: 10px 22px;
  border-radius: 2px;
}
a.button:hover { background-color: #c4831f; }

/* ---------- Layout: boxed 1140px, no grid framework needed ---------- */
.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 15px;
}
.row { display: flex; flex-wrap: wrap; margin: 0 -15px; }
.row > [class*="col-"] { flex: 1 1 50%; padding: 0 15px; }
.row > .col-lg-9 { flex: 1 1 75%; max-width: 75%; }
.row > .col-lg-3 { flex: 1 1 25%; max-width: 25%; }
.row > .col-lg-12 { flex: 1 1 100%; max-width: 100%; }
@media (max-width: 767px) {
  .row > [class*="col-"] { flex: 1 1 100%; max-width: 100%; }
}
.clearfix::after { content: ""; display: table; clear: both; }

/* ---------- Top bar ---------- */
#topbar {
  background-color: #1b1b1b;
  padding: 5px;
}
#topbar .topbar-sell { text-align: right; }
#topbar .login-text a {
  display: inline-block;
  font-size: 15px;
  color: #7d8086;
  font-weight: 700;
  font-family: 'Play', Arial, sans-serif;
}

/* ---------- Header banner ---------- */
#header { background: none !important; }
#header-box {
  background-color: #111111;
  border-left: 1px double #000;
  border-right: 1px double #000;
}
#header-box .container { padding: 0; }
#custom-header img {
  display: block;
  width: 100%;
  height: auto;
}

/* ---------- Nav + dropdown ---------- */
.menubar, #header-box { background-color: #111111; }
.menubar {
  border-top: 1px solid #3b3b3b;
  border-left: 1px double #000;
  border-right: 1px double #000;
}
.hamburger { display: none; padding: 10px 15px; cursor: pointer; }
.hamburger i { color: #fff; font-size: 22px; }

.side-navigation { padding: 0; margin: 0; text-align: left; }
.side-navigation ul.primary-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
}
.side-navigation li {
  display: inline-block;
  margin: 0;
  padding: 0 25px;
  border-left: 1px solid #3b3b3b;
  position: relative;
}
.side-navigation li:first-child { border-left: none; }
.side-navigation a {
  text-decoration: none;
  padding: 8px 0;
  white-space: nowrap;
  display: block;
  line-height: 25px;
  font-size: 18px;
  letter-spacing: 1px;
  color: #ffffff;
  font-weight: 700;
  font-family: 'Merriweather', Georgia, serif;
  text-align: center;
}
.side-navigation ul li a:hover { color: #dd9933; text-decoration: underline; }
.side-navigation .current_page_item > a { color: #dd9933 !important; }
.side-navigation .current_page_item { border-color: #dd9933 !important; }

.side-navigation ul ul {
  display: none;
  position: absolute;
  left: 0;
  top: 100%;
  background: #1a1a1a;
  min-width: 220px;
  z-index: 9999;
  box-shadow: 0 8px 20px rgba(0,0,0,0.25);
  border-top: 2px solid #dd9933;
}
.side-navigation ul ul li {
  display: block;
  border-left: none;
  padding: 0;
}
.side-navigation ul ul a {
  color: #f2f2f2 !important;
  font-size: 15px;
  padding: 10px 16px;
  text-align: left;
}
.side-navigation ul ul a:hover { color: #dd9933 !important; }
.side-navigation li.menu-item-has-children > a:after {
  content: "\f078";
  font-family: 'Font Awesome 5 Free';
  font-weight: 900;
  font-size: 10px;
  margin-left: 6px;
}
.side-navigation li.js-dropdown-open > ul { display: block; }

@media (max-width: 1024px) {
  .hamburger { display: block; }
  .side-navigation ul.primary-menu { display: none; flex-direction: column; }
  .side-navigation.mobile-open ul.primary-menu { display: flex; }
  .side-navigation li { border-left: none; width: 100%; }
  .side-navigation ul ul { position: static; box-shadow: none; }
}

/* ---------- Return to top ---------- */
#return-to-top {
  background-color: #dd9933;
  width: 40px;
  height: 40px;
  display: none;
  border-radius: 50%;
  position: fixed;
  right: 10px;
  bottom: 40px;
  text-align: center;
  z-index: 5;
}
#return-to-top i { color: #fff; font-size: 15px; line-height: 40px; }

/* ---------- Footer / copyright ---------- */
#footer {
  background-color: #fff;
  padding: 10px;
  margin-bottom: 25px;
  box-shadow: 0 0 57px 0 rgba(0,0,0,0.11);
  border: 1px double #fff;
}
.copyright { background-color: transparent; }
.copyright-outer { align-items: center; }
.copyright-text p { color: #1c1c1c; margin: 0; font-family: 'Play', Arial, sans-serif; }
.paymentimg { text-align: center; }
.paymentimg img { display: inline-block; }

/* ---------- Page content ---------- */
.outer_dpage { padding: 0; }
/* Content containers are flush (0 padding) so their white/card backgrounds
   span the full 1140px box edge-to-edge, seamless with the header/footer
   above and below -- same box, not an inset column. Breathing room for
   text lives on the inner wrapper instead. */
.outer_dpage .container,
.container.shop {
  padding: 0;
}
.middle-content {
  padding: 20px;
  background-color: #fff;
  color: #000;
}
.middle-content .wp-block-columns { align-items: flex-start; }

/* ---------- WooCommerce: shop/category grid ---------- */
.woocommerce ul.products li.product { background-color: #fff; }
.woocommerce .woocommerce-Price-amount {
  color: #cc2222;
  font-family: 'ABeeZee', Arial, sans-serif;
}
.woocommerce span.onsale, .added_to_cart { background-color: #dd9933; }
.woocommerce button.button.alt,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button {
  background-color: #dd9933 !important;
  color: #fff !important;
  border: none !important;
}
.woocommerce button.button.alt:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover { background-color: #c4831f !important; }

/* ---------- WooCommerce: single product ---------- */
div.summary.entry-summary {
  background-color: #fff;
  border: 1px solid #e5e5e5;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
  padding: 24px 28px;
}
.woocommerce-Tabs-panel.entry-content {
  background-color: #fff;
  font-size: 1.4em;
  text-align: left;
  padding: 24px 28px !important;
  border: 1px solid #e5e5e5;
  border-top: none;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}
.woocommerce-Tabs-panel h2 { display: none; }

/* Spec-plate: Part No. / Category / Tags, styled after the metal ID tags
   riveted to the physical parts in the product photos. */
.product-spec-plate {
  display: flex;
  flex-wrap: wrap;
  margin-top: 20px;
  background: #1a1a1a;
  border-radius: 2px;
  position: relative;
}
.product-spec-plate::before, .product-spec-plate::after {
  content: "";
  position: absolute;
  top: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #444;
}
.product-spec-plate::before { left: 8px; }
.product-spec-plate::after { right: 8px; }
.product-spec-plate .spec-field {
  flex: 1 1 33%;
  padding: 16px 18px;
  border-right: 1px solid rgba(255,255,255,0.08);
}
.product-spec-plate .spec-field:last-child { border-right: none; }
.product-spec-plate .spec-label {
  display: block;
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #dd9933;
  font-weight: 700;
  margin-bottom: 4px;
}
.product-spec-plate .spec-value {
  display: block;
  font-family: "Courier New", Courier, monospace;
  font-size: 13px;
  line-height: 1.4;
  color: #f2f2f2;
  word-break: break-word;
}
.product-spec-plate .spec-value a { color: #f2f2f2; text-decoration: underline; }
@media screen and (max-width: 600px) {
  .product-spec-plate .spec-field {
    flex: 1 1 100%;
    border-right: none;
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }
  .product-spec-plate .spec-field:last-child { border-bottom: none; }
}

.fitment-help { font-size: 13px; color: #666; margin: 10px 0 0; }
.fitment-help a { color: #cc2222; font-weight: 700; text-decoration: none; }
.fitment-help a:hover { text-decoration: underline; }

/* ---------- WooCommerce: cart / checkout ---------- */
.woocommerce-cart table.cart img,
.woocommerce-checkout table.cart img {
  width: 90px !important;
  height: auto !important;
}
.woocommerce-cart .cart_totals,
.woocommerce-checkout #order_review {
  background: #fff;
  border: 1px solid #e5e5e5;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
  padding: 24px 28px;
}
.cart_totals h2, #order_review_heading {
  font-family: 'Play', Arial, sans-serif;
  color: #dd9933;
  font-size: 22px;
  margin-bottom: 12px;
}

/* ---------- Shop page + category sidebar ---------- */
div.container.shop-page { background-color: #fff; padding: 0; }
div.container.shop-page .woocommerce-products-header,
div.container.shop-page ul.products { padding: 15px 15px 0; }

/* Category tiles on /shop/: each one a card, image cropped to a consistent
   ratio so varying source-image sizes read as one even grid, text centered
   underneath with a short gold rule echoing the accent divider used on
   dropdowns and the sidebar heading elsewhere on the site. */
div.container.shop-page ul.products li.product-category {
  background: #fff;
  border-radius: 3px;
  box-shadow: 0 3px 14px rgba(0,0,0,0.12);
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
div.container.shop-page ul.products li.product-category:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
  transform: translateY(-3px);
}
div.container.shop-page ul.products li.product-category a {
  display: block;
  text-decoration: none;
}
div.container.shop-page ul.products li.product-category img {
  display: block;
  width: 100%;
  height: 180px;
  object-fit: contain;
  background: #f4f4f4;
  transition: transform 0.3s ease;
}
div.container.shop-page ul.products li.product-category:hover img {
  transform: scale(1.04);
}
div.container.shop-page ul.products li.product-category h2.woocommerce-loop-category__title {
  margin: 0;
  padding: 16px 14px 18px;
  text-align: center;
  font-family: 'Play', Arial, sans-serif;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #000;
  position: relative;
}
div.container.shop-page ul.products li.product-category h2.woocommerce-loop-category__title::after {
  content: "";
  display: block;
  width: 32px;
  height: 2px;
  background: #dd9933;
  margin: 10px auto 0;
}
#sidebar .widget {
  background-color: #fff;
  padding: 20px;
  margin-bottom: 25px;
  box-shadow: 0 0 57px 0 rgba(0,0,0,0.11);
  border: 1px double #fff;
}
#sidebar h3 {
  font-size: 24px;
  color: #dd9933;
  font-weight: 700;
  padding-bottom: 15px;
  margin-bottom: 11px;
  text-align: center;
  border-bottom: 1px solid #e7e7e7;
  font-family: 'Play', Arial, sans-serif;
}
#sidebar ul { list-style: none; margin: 0; padding: 0; font-size: 17px; }
#sidebar ul li {
  font-weight: 600;
  color: #dd9933;
  font-family: 'ABeeZee', Arial, sans-serif;
  font-size: 15px;
  border-bottom: 1px solid #e1e1e1;
  padding: 10px 0;
}
#sidebar ul li:last-child { border: none; }
#sidebar ul li a {
  font-weight: 600;
  color: #000;
  font-family: 'ABeeZee', Arial, sans-serif;
  font-size: 15px;
}
.woocommerce .product-category .count { display: none; }

/* ---------- WooCommerce: My Account ---------- */
nav.woocommerce-MyAccount-navigation {
  padding: 20px;
  margin-bottom: 25px;
  box-shadow: 0 0 57px 0 rgba(0,0,0,0.11);
  border: 1px double #fff;
  background: #fff;
}
nav.woocommerce-MyAccount-navigation ul { list-style: none; margin: 0; padding: 0; }
nav.woocommerce-MyAccount-navigation li { padding: 8px 0; border-bottom: 1px solid #e1e1e1; }
nav.woocommerce-MyAccount-navigation li:last-child { border-bottom: none; }
nav.woocommerce-MyAccount-navigation li a { color: #000; font-weight: 600; }
.woocommerce-MyAccount-navigation .is-active a { color: #dd9933; }
.woocommerce-MyAccount-content { background: #fff; padding: 24px 28px; box-shadow: 0 2px 10px rgba(0,0,0,0.06); border: 1px solid #e5e5e5; }

/* ---------- Pagination (shop/category grids + search results) ---------- */
nav.woocommerce-pagination ul.page-numbers,
.nav-links {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 10px 15px 30px;
  padding: 0;
  border: none;
  background: none;
}
nav.woocommerce-pagination ul.page-numbers li { display: inline-block; }
/* Scoped to the <a>/<span> page links specifically -- WooCommerce's wrapping
   <ul class="page-numbers"> confusingly shares this exact class name with
   its own children, so a bare .page-numbers rule styles the wrapper too. */
a.page-numbers, span.page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding: 0 14px;
  background: #fff;
  border: 1px solid #e1e1e1;
  color: #000;
  font-family: 'Play', Arial, sans-serif;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
a.page-numbers:hover { background: #dd9933; border-color: #dd9933; color: #fff; }
span.page-numbers.current { background: #1a1a1a; border-color: #1a1a1a; color: #fff; }
span.page-numbers.dots { border: none; background: none; min-width: auto; padding: 0 4px; }
a.next.page-numbers, a.prev.page-numbers { font-size: 18px; }
