/*
Theme Name: Zgaya Auto Parts
Theme URI: https://example.com/torqueparts
Author: Codex
Author URI: https://example.com
Description: A bold WooCommerce theme for Zgaya Auto, built around fast fitment search, dense product browsing, and a premium garage-retail look.
Version: 1.0.0
Requires at least: 6.4
Tested up to: 6.5
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: torqueparts
Tags: e-commerce, custom-logo, custom-menu, featured-images, block-styles, wide-blocks
*/

:root {
  --tp-ink: #101318;
  --tp-panel: #171c22;
  --tp-panel-2: #202832;
  --tp-line: #323b45;
  --tp-text: #f5f7f8;
  --tp-muted: #aab4bd;
  --tp-paper: #f3f5f6;
  --tp-paper-2: #ffffff;
  --tp-yellow: #ffd43b;
  --tp-orange: #ff6b2d;
  --tp-teal: #20c7b5;
  --tp-red: #e83f4f;
  --tp-radius: 8px;
  --tp-shadow: 0 18px 45px rgba(12, 16, 20, 0.14);
  --tp-max: 1240px;
  --tp-font: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--tp-paper);
  color: var(--tp-ink);
  font-family: var(--tp-font);
  font-size: 16px;
  line-height: 1.55;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.tp-wrap {
  width: min(calc(100% - 32px), var(--tp-max));
  margin: 0 auto;
}

.tp-topbar {
  background: #0c0f13;
  color: var(--tp-muted);
  font-size: 13px;
}

.tp-topbar-inner {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.tp-topbar strong {
  color: var(--tp-yellow);
}

.tp-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(16, 19, 24, 0.96);
  color: var(--tp-text);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
}

.tp-header-main {
  min-height: 78px;
  display: grid;
  grid-template-columns: auto minmax(240px, 1fr) auto;
  align-items: center;
  gap: 24px;
}

.tp-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.tp-brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 2px solid var(--tp-yellow);
  border-radius: 8px;
  color: var(--tp-yellow);
  font-weight: 900;
}

.tp-search {
  display: grid;
  grid-template-columns: 1fr auto;
  min-height: 48px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--tp-radius);
  background: #fff;
}

.tp-search input {
  width: 100%;
  border: 0;
  padding: 0 18px;
  font: inherit;
  color: var(--tp-ink);
  outline: none;
}

.tp-search button,
.button,
button,
input[type="submit"],
.wp-block-button__link,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button {
  min-height: 44px;
  border: 0;
  border-radius: var(--tp-radius);
  background: var(--tp-yellow);
  color: #111;
  cursor: pointer;
  font-weight: 850;
  padding: 0 18px;
  transition: transform 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.tp-search button {
  border-radius: 0;
  padding: 0 24px;
}

.button:hover,
button:hover,
input[type="submit"]:hover,
.wp-block-button__link:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover {
  background: #ffe15f;
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(255, 212, 59, 0.22);
}

.tp-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tp-action {
  min-width: 46px;
  min-height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--tp-radius);
  color: var(--tp-text);
  padding: 0 12px;
  font-size: 13px;
  font-weight: 850;
  text-transform: uppercase;
}

.tp-nav {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.tp-nav-inner {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.tp-menu,
.tp-menu ul {
  display: flex;
  align-items: center;
  gap: 22px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tp-menu a {
  color: var(--tp-muted);
  font-size: 14px;
  font-weight: 750;
  text-transform: uppercase;
}

.tp-menu a:hover {
  color: var(--tp-yellow);
}

.tp-fitment {
  background:
    radial-gradient(circle at 78% 12%, rgba(32, 199, 181, 0.24), transparent 30%),
    linear-gradient(135deg, #12161c 0%, #202832 52%, #101318 100%);
  color: var(--tp-text);
  padding: 54px 0;
}

.tp-fitment-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(320px, 1.1fr);
  gap: 34px;
  align-items: center;
}

.tp-kicker {
  color: var(--tp-yellow);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.tp-hero-title {
  max-width: 680px;
  margin: 12px 0 16px;
  font-size: clamp(38px, 6vw, 76px);
  line-height: 0.94;
  font-weight: 950;
  letter-spacing: 0;
}

.tp-hero-copy {
  max-width: 570px;
  color: var(--tp-muted);
  font-size: 18px;
}

.tp-fitment-box {
  padding: 22px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--tp-radius);
  box-shadow: var(--tp-shadow);
}

.tp-fitment-box h2 {
  margin: 0 0 14px;
  font-size: 22px;
}

.tp-fitment-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.tp-fitment-form select,
.tp-fitment-form input {
  min-height: 48px;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--tp-radius);
  background: #fff;
  color: var(--tp-ink);
  padding: 0 12px;
  font: inherit;
}

.tp-fitment-form button {
  background: var(--tp-orange);
  color: #fff;
}

.tp-strip {
  background: var(--tp-yellow);
  color: #111;
}

.tp-strip-inner {
  min-height: 52px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  font-size: 14px;
  font-weight: 850;
  text-transform: uppercase;
}

.tp-strip-inner span {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  border-left: 1px solid rgba(0, 0, 0, 0.12);
}

.tp-main {
  padding: 42px 0 64px;
}

.tp-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
}

.tp-section-head h2,
.woocommerce-products-header__title,
.entry-title {
  margin: 0;
  font-size: clamp(28px, 3.4vw, 46px);
  line-height: 1;
  font-weight: 950;
  letter-spacing: 0;
}

.tp-category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 34px;
}

.tp-category-card {
  min-height: 150px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px;
  border-radius: var(--tp-radius);
  background: var(--tp-panel);
  color: var(--tp-text);
  overflow: hidden;
  position: relative;
}

.tp-category-card::after {
  content: "";
  position: absolute;
  right: -38px;
  bottom: -48px;
  width: 130px;
  height: 130px;
  border: 22px solid rgba(255, 212, 59, 0.24);
  border-radius: 50%;
}

.tp-category-card strong {
  position: relative;
  z-index: 1;
  font-size: 22px;
  line-height: 1.05;
}

.tp-category-card span {
  position: relative;
  z-index: 1;
  color: var(--tp-yellow);
  font-size: 13px;
  font-weight: 850;
  text-transform: uppercase;
}

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

.woocommerce ul.products::before,
.woocommerce ul.products::after {
  display: none;
}

.woocommerce ul.products li.product {
  width: auto;
  margin: 0;
  float: none;
  background: var(--tp-paper-2);
  border: 1px solid #dfe4e7;
  border-radius: var(--tp-radius);
  box-shadow: 0 6px 20px rgba(12, 16, 20, 0.06);
  padding: 12px 12px 16px;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.woocommerce ul.products li.product:hover {
  transform: translateY(-3px);
  border-color: #c8d1d8;
  box-shadow: var(--tp-shadow);
}

.woocommerce ul.products li.product a img {
  aspect-ratio: 1 / 1;
  object-fit: contain;
  background: #f7f9fa;
  border-radius: 6px;
  padding: 14px;
}

.woocommerce-loop-product__title {
  min-height: 48px;
  color: var(--tp-ink);
  font-size: 16px;
  font-weight: 850;
}

.woocommerce ul.products li.product .price {
  color: var(--tp-red);
  font-size: 18px;
  font-weight: 950;
}

.tp-product-meta {
  display: inline-flex;
  margin: 4px 0 8px;
  border-radius: 999px;
  background: rgba(32, 199, 181, 0.12);
  color: #08766d;
  font-size: 12px;
  font-weight: 850;
  padding: 4px 8px;
  text-transform: uppercase;
}

.woocommerce span.onsale {
  min-width: auto;
  min-height: auto;
  border-radius: 6px;
  background: var(--tp-red);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  padding: 8px 10px;
}

.tp-garage-band {
  margin: 46px 0;
  padding: 28px;
  border-radius: var(--tp-radius);
  background:
    linear-gradient(90deg, rgba(255, 212, 59, 0.13), transparent 42%),
    var(--tp-panel);
  color: var(--tp-text);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
}

.tp-garage-band h2 {
  margin: 0 0 6px;
  font-size: 30px;
  line-height: 1.08;
}

.tp-garage-band p {
  margin: 0;
  color: var(--tp-muted);
}

.entry-content,
.woocommerce div.product {
  background: var(--tp-paper-2);
  border-radius: var(--tp-radius);
  padding: 24px;
}

.woocommerce div.product {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(320px, 1.1fr);
  gap: 34px;
}

.woocommerce div.product div.images,
.woocommerce div.product div.summary {
  width: auto;
  float: none;
}

.woocommerce div.product p.price,
.woocommerce div.product span.price {
  color: var(--tp-red);
  font-size: 32px;
  font-weight: 950;
}

.quantity .qty {
  min-height: 44px;
  border: 1px solid #cfd7dd;
  border-radius: var(--tp-radius);
}

.tp-footer {
  background: #0c0f13;
  color: var(--tp-muted);
  padding: 42px 0 26px;
}

.tp-footer-grid {
  display: grid;
  grid-template-columns: 1.2fr repeat(3, 1fr);
  gap: 28px;
}

.tp-footer h2,
.tp-footer h3 {
  margin: 0 0 12px;
  color: var(--tp-text);
}

.tp-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.tp-footer li + li {
  margin-top: 8px;
}

.tp-footer-bottom {
  margin-top: 34px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 13px;
}

@media (max-width: 980px) {
  .tp-header-main,
  .tp-fitment-grid,
  .woocommerce div.product,
  .tp-footer-grid {
    grid-template-columns: 1fr;
  }

  .tp-category-grid,
  .woocommerce ul.products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tp-fitment-form,
  .tp-strip-inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .tp-topbar-inner,
  .tp-nav-inner,
  .tp-section-head,
  .tp-garage-band {
    align-items: stretch;
    flex-direction: column;
    display: flex;
  }

  .tp-menu {
    flex-wrap: wrap;
    gap: 14px;
  }

  .tp-header-main {
    gap: 14px;
    padding: 14px 0;
  }

  .tp-actions {
    justify-content: space-between;
  }

  .tp-fitment {
    padding: 34px 0;
  }

  .tp-fitment-form,
  .tp-category-grid,
  .woocommerce ul.products,
  .tp-strip-inner {
    grid-template-columns: 1fr;
  }

  .entry-content,
  .woocommerce div.product {
    padding: 16px;
  }
}
