/* ==========================================================
   Perth Power Equipment — Single Product Page
   CSS prefix : pdp-
   Fonts      : Barlow (body) · Barlow Condensed Italic 800 (headings)
   Tokens     : --ck-red #e10b17  ·  --ck-ink #0d0d0f
   ========================================================== */


/* ── Outer wrap ─────────────────────────────────────────── */
.pdp-wrap {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}


/* ── Breadcrumbs ─────────────────────────────────────────── */
.pdp-crumbs,
.pdp-crumbs .woocommerce-breadcrumb {
  font-size: 14px;
  color: #5d606a;
  padding: 14px 0 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}
.pdp-crumbs a,
.pdp-crumbs .woocommerce-breadcrumb a {
  color: inherit;
  text-decoration: none;
}
.pdp-crumbs a:hover,
.pdp-crumbs .woocommerce-breadcrumb a:hover {
  color: var(--ck-red, #e10b17);
}
/* Yoast breadcrumb separator */
.pdp-crumbs .breadcrumb_last { color: var(--ck-ink, #0d0d0f); font-weight: 600; }


/* ── Hero 2-column grid ──────────────────────────────────── */
.pdp-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 44px;
  align-items: start;
  padding-bottom: 52px;
}


/* ── Gallery ─────────────────────────────────────────────── */
.pdp-gallery {
  background: #f3f3f4;
  border-radius: 10px;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  display: grid;
  place-items: center;
}
.pdp-gallery img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  transition: opacity .18s ease;
}
.pdp-gallery img.pdp-swapping { opacity: 0; }

.pdp-thumbs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}
.pdp-thumb {
  background: #f3f3f4;
  border: 2px solid transparent;
  border-radius: 7px;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  padding: 0;
  cursor: pointer;
  transition: border-color .15s;
}
.pdp-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.pdp-thumb.is-active,
.pdp-thumb:hover { border-color: var(--ck-red, #e10b17); }


/* ── Summary column ──────────────────────────────────────── */
.pdp-summary { display: flex; flex-direction: column; gap: 0; }

.pdp-title {
  font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  font-style: italic;
  font-weight: 800;
  text-transform: uppercase;
  font-size: clamp(32px, 4.2vw, 50px);
  line-height: .95;
  margin: 0 0 12px;
  color: var(--ck-ink, #0d0d0f);
}

.pdp-short {
  font-size: 17px;
  color: #5d606a;
  margin: 0 0 14px;
  line-height: 1.55;
}


/* ── Price block ─────────────────────────────────────────── */
.pdp-price-block {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  border-top: 1px solid #e3e3e6;
  padding-top: 16px;
  margin-bottom: 16px;
}
/* WooCommerce price */
.pdp-price .price {
  font-size: 40px;
  font-weight: 800;
  line-height: 1;
  color: var(--ck-ink, #0d0d0f);
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
}
.pdp-price .price del {
  font-size: 22px;
  color: #9a9ea8;
  font-weight: 500;
}
.pdp-price .price ins { text-decoration: none; }
/* Variable product price range */
.pdp-price .price .woocommerce-Price-currencySymbol { font-size: .65em; align-self: flex-start; padding-top: 4px; }

/* Stock status */
.pdp-price-block .stock {
  font-size: 14px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 4px;
  margin-bottom: 4px;
}
.pdp-price-block .in-stock     { color: #14833b; background: #edfbf2; }
.pdp-price-block .out-of-stock { color: var(--ck-red, #e10b17); background: #fef0f0; }
.pdp-price-block .available-on-backorder { color: #7a5c00; background: #fffbe6; }


/* ── Add-to-cart (WooCommerce output styling) ───────────── */
.pdp-atc { margin-bottom: 10px; }

/* ·· Variable product: attributes table ·· */
.pdp-atc .variations {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 14px;
}
.pdp-atc .variations td,
.pdp-atc .variations th {
  padding: 0 0 10px;
  border: 0;
  vertical-align: middle;
}
.pdp-atc .variations td.label {
  width: 110px;
  font-size: 13px;
  font-weight: 700;
  color: #5d606a;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding-right: 12px;
  white-space: nowrap;
}
.pdp-atc .variations label { margin: 0; }
.pdp-atc .variations select {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid #cfd0d4;
  border-radius: 7px;
  font: 500 15px/1 'Barlow', sans-serif;
  background: #fff;
  color: var(--ck-ink, #0d0d0f);
  cursor: pointer;
  -webkit-appearance: auto;
  appearance: auto;
  transition: border-color .15s;
}
.pdp-atc .variations select:focus {
  outline: 2px solid var(--ck-red, #e10b17);
  outline-offset: 1px;
  border-color: transparent;
}
.pdp-atc .reset_variations {
  font-size: 13px;
  color: #9a9ea8;
  display: inline-block;
  margin-bottom: 10px;
  text-decoration: underline;
}
.pdp-atc .reset_variations:hover { color: var(--ck-red, #e10b17); }

/* ·· Variation price (updates dynamically) ·· */
.pdp-atc .woocommerce-variation-price { margin-bottom: 14px; }
.pdp-atc .woocommerce-variation-price .price {
  font-size: 36px;
  font-weight: 800;
  color: var(--ck-ink, #0d0d0f);
}

/* ·· Qty + button row ·· */
/* Simple product: .cart contains .quantity + button */
/* Variable product: same structure inside .single_variation_wrap */
.pdp-atc .cart,
.pdp-atc .woocommerce-variation-add-to-cart {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 10px;
  align-items: center;
}
.pdp-atc .quantity { display: contents; }
.pdp-atc .quantity .qty {
  width: 100%;
  padding: 14px 10px;
  border: 1px solid #cfd0d4;
  border-radius: 7px;
  font: 600 17px/1 'Barlow', sans-serif;
  text-align: center;
  color: var(--ck-ink, #0d0d0f);
  background: #fff;
}
.pdp-atc .quantity .qty:focus {
  outline: 2px solid var(--ck-red, #e10b17);
  outline-offset: 1px;
}

/* ·· Add to cart button ·· */
.pdp-atc .single_add_to_cart_button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 20px;
  border-radius: 7px;
  font: 700 15px/1 'Barlow', sans-serif;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #fff !important;
  background: var(--ck-red, #e10b17);
  border: 0;
  cursor: pointer;
  text-decoration: none;
  transition: background .15s;
}
.pdp-atc .single_add_to_cart_button:hover { background: #b8070f; }
.pdp-atc .single_add_to_cart_button.disabled,
.pdp-atc .single_add_to_cart_button:disabled {
  opacity: .5;
  cursor: not-allowed;
}
.pdp-atc .single_add_to_cart_button.loading { opacity: .75; cursor: wait; }
.pdp-atc .single_add_to_cart_button.loading::after {
  content: '';
  width: 15px;
  height: 15px;
  border: 2px solid rgba(255,255,255,.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: pdp-spin .65s linear infinite;
  flex-shrink: 0;
}
@keyframes pdp-spin { to { transform: rotate(360deg); } }

/* Hidden variation wrapper (shown by WC JS) */
.pdp-atc .single_variation_wrap { display: none; }


/* ── Call CTA ────────────────────────────────────────────── */
.pdp-call-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 14px 20px;
  margin-top: 10px;
  border-radius: 7px;
  font: 700 15px/1 'Barlow', sans-serif;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #fff;
  background: var(--ck-ink, #0d0d0f);
  text-decoration: none;
  transition: background .15s;
}
.pdp-call-btn:hover { background: #2a2c33; color: #fff; }
.pdp-call-btn svg { flex-shrink: 0; }


/* ── Trust list ──────────────────────────────────────────── */
.pdp-trust {
  list-style: none;
  margin: 16px 0 0;
  padding: 16px 20px;
  background: #f3f3f4;
  border-radius: 8px;
  display: grid;
  gap: 8px;
  font-size: 14px;
  color: #3a3d46;
}
.pdp-trust li::before {
  content: '\2714';
  color: var(--ck-red, #e10b17);
  margin-right: 10px;
  font-size: 13px;
}


/* ── Long description content ────────────────────────────── */
.pdp-content {
  max-width: 900px;
  padding-bottom: 48px;
  font-size: 16px;
  line-height: 1.65;
  color: #2e3038;
}
.pdp-content h2 {
  font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  font-style: italic;
  font-weight: 800;
  text-transform: uppercase;
  font-size: clamp(26px, 3.4vw, 36px);
  line-height: 1;
  color: var(--ck-ink, #0d0d0f);
  margin: 44px 0 14px;
}
.pdp-content h3 { font-size: 18px; font-weight: 700; margin: 24px 0 8px; }
.pdp-content a  { color: var(--ck-red, #e10b17); font-weight: 600; }
.pdp-content p  { margin: 0 0 14px; }


/* ── Section headings (specs, related) ───────────────────── */
.pdp-sec-title {
  font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  font-style: italic;
  font-weight: 800;
  text-transform: uppercase;
  font-size: clamp(26px, 3.4vw, 36px);
  line-height: 1;
  color: var(--ck-ink, #0d0d0f);
  margin: 0 0 20px;
}


/* ── Full specifications table ───────────────────────────── */
.pdp-specs {
  max-width: 900px;
  padding-bottom: 56px;
}
.pdp-specs .woocommerce-product-attributes {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid #e3e3e6;
  border-radius: 8px;
  overflow: hidden;
}
.pdp-specs .woocommerce-product-attributes th,
.pdp-specs .woocommerce-product-attributes td {
  padding: 11px 18px;
  border-bottom: 1px solid #e3e3e6;
  text-align: left;
  vertical-align: middle;
  font-size: 15px;
}
.pdp-specs .woocommerce-product-attributes th {
  width: 42%;
  background: #fafafa;
  color: #5d606a;
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.pdp-specs .woocommerce-product-attributes tr:last-child th,
.pdp-specs .woocommerce-product-attributes tr:last-child td { border-bottom: 0; }
.pdp-specs .woocommerce-product-attributes p { margin: 0; }
/* Links inside specs (attribute term links) */
.pdp-specs .woocommerce-product-attributes a {
  color: inherit;
  text-decoration: none;
}


/* ── Enquiry dark strip ──────────────────────────────────── */
.pdp-enquiry {
  background: var(--ck-ink, #0d0d0f);
  color: #e7e8ec;
  padding: 60px 0;
}
.pdp-enq-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
.pdp-enq-title {
  font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  font-style: italic;
  font-weight: 800;
  text-transform: uppercase;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1;
  color: #fff;
  margin: 0 0 14px;
}
.pdp-enquiry p {
  color: #a9acb5;
  font-size: 16px;
  line-height: 1.6;
  margin: 0;
}
.pdp-enquiry p a { color: #fff; font-weight: 700; text-decoration: none; }
.pdp-enquiry p a:hover { text-decoration: underline; }
/* GHL form inputs on dark background */
.pdp-enq-form input,
.pdp-enq-form textarea,
.pdp-enq-form select {
  background: rgba(255,255,255,.07);
  border-color: rgba(255,255,255,.2);
  color: #fff;
}
.pdp-enq-form input::placeholder,
.pdp-enq-form textarea::placeholder { color: rgba(255,255,255,.4); }


/* ── Related products grid ───────────────────────────────── */
.pdp-related { padding: 52px 0 64px; }
.pdp-related-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.pdp-related-card {
  display: block;
  border: 1px solid #e3e3e6;
  border-radius: 9px;
  padding: 14px;
  text-decoration: none;
  color: var(--ck-ink, #0d0d0f);
  font-weight: 700;
  font-size: 15px;
  line-height: 1.3;
  transition: border-color .15s, box-shadow .15s;
}
.pdp-related-card:hover {
  border-color: var(--ck-red, #e10b17);
  box-shadow: 0 3px 14px rgba(0,0,0,.07);
}
.pdp-related-card img {
  aspect-ratio: 1 / 1;
  object-fit: contain;
  background: #f3f3f4;
  border-radius: 7px;
  margin-bottom: 10px;
  width: 100%;
  display: block;
}
.pdp-related-card span {
  display: block;
  color: var(--ck-red, #e10b17);
  font-size: 16px;
  font-weight: 700;
  margin-top: 4px;
}
.pdp-related-card .woocommerce-Price-amount { color: var(--ck-red, #e10b17); }


/* ── WooCommerce notices on product page ─────────────────── */
.site-main .woocommerce-message,
.site-main .woocommerce-info,
.site-main .woocommerce-error {
  margin: 0 auto 16px;
  max-width: 1140px;
  padding-left: 24px;
  padding-right: 24px;
}


/* ══════════════════════════════════════════════════════════
   Responsive
   ══════════════════════════════════════════════════════════ */

/* Stack hero + enquiry at 900px */
@media (max-width: 900px) {
  .pdp-hero,
  .pdp-enq-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }
  .pdp-hero { padding-bottom: 36px; }

  /* Cap gallery width on mobile so it doesn't blow out */
  .pdp-gallery-col { max-width: 520px; }

  .pdp-related-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Stack qty/button at 480px */
@media (max-width: 480px) {
  .pdp-atc .cart,
  .pdp-atc .woocommerce-variation-add-to-cart {
    grid-template-columns: minmax(0, 1fr);
  }
  .pdp-title { font-size: 36px; }
  .pdp-enquiry { padding: 44px 0; }
  .pdp-related-grid { gap: 12px; }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .pdp-gallery img,
  .pdp-thumb,
  .pdp-atc .single_add_to_cart_button,
  .pdp-call-btn,
  .pdp-related-card { transition: none !important; }
  .pdp-atc .single_add_to_cart_button.loading::after { animation: none !important; }
}
