/*
  PRO KNITT Product Page Optimizer — v1.0.0
  Clean B2B catalog / black-white Poppins aesthetic.
  Product styles are intentionally scoped to body.single-product and pkpo components.
*/

body.pkpo-active,
body.pkpo-active .woocommerce,
.pkpo-quote-card,
.pkpo-process,
.pkpo-features,
.pkpo-mobile-bar {
  font-family: 'Poppins', Arial, sans-serif;
}

body.pkpo-active .woocommerce div.product {
  --pkpo-ink: #111111;
  --pkpo-muted: #646464;
  --pkpo-line: #e5e5e5;
  --pkpo-soft: #f7f7f7;
}

/* Classic WooCommerce gallery and summary alignment. Do not override Elementor's flex/grid templates. */
@media (min-width: 901px) {
  body.pkpo-active .woocommerce div.product:not(.elementor) > div.woocommerce-product-gallery,
  body.pkpo-active .woocommerce div.product:not(.elementor) > .woocommerce-product-gallery {
    width: 47% !important;
    max-width: 47%;
    margin-bottom: 35px;
  }
  body.pkpo-active .woocommerce div.product:not(.elementor) > div.summary,
  body.pkpo-active .woocommerce div.product:not(.elementor) > .summary {
    width: 49% !important;
    max-width: 49%;
    margin-bottom: 35px;
  }
}

body.pkpo-active .woocommerce div.product .woocommerce-product-gallery__wrapper,
body.pkpo-active .elementor-widget-woocommerce-product-images .woocommerce-product-gallery__wrapper {
  border-radius: 7px;
  overflow: hidden;
  background: #f6f6f6;
}
body.pkpo-active .woocommerce-product-gallery__image img {
  width: 100%;
  height: auto;
  object-fit: contain;
  background: #f7f7f7;
}
body.pkpo-active .woocommerce div.product .flex-control-thumbs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 12px 0 0;
  margin: 0;
}
body.pkpo-active .woocommerce div.product .flex-control-thumbs li {
  width: 100% !important;
  float: none !important;
  margin: 0;
}
body.pkpo-active .woocommerce div.product .flex-control-thumbs img {
  border: 1px solid #e9e9e9;
  border-radius: 5px;
  background: #fafafa;
  transition: border-color .2s ease, opacity .2s ease;
}
body.pkpo-active .woocommerce div.product .flex-control-thumbs img.flex-active,
body.pkpo-active .woocommerce div.product .flex-control-thumbs img:hover { border-color: #161616; opacity: 1; }
body.pkpo-active .woocommerce div.product .product_title,
body.pkpo-active .elementor-widget-woocommerce-product-title h1 {
  font-family: 'Poppins', Arial, sans-serif !important;
  font-weight: 800 !important;
  font-size: clamp(27px, 3.2vw, 43px) !important;
  line-height: 1.2 !important;
  letter-spacing: -.65px;
  color: #101010 !important;
  margin-bottom: 14px !important;
}
body.pkpo-active .woocommerce div.product .woocommerce-product-details__short-description,
body.pkpo-active .elementor-widget-woocommerce-product-short-description {
  color: #585858;
  font-size: 14px;
  line-height: 1.9;
}
body.pkpo-active .woocommerce div.product .product_meta {
  border-top: 1px solid #e9e9e9;
  padding-top: 20px;
  margin-top: 25px;
  color: #777;
  font-size: 12px;
  line-height: 1.9;
}
body.pkpo-active .woocommerce div.product .product_meta a { color: #222; text-decoration: none; }

/* Price and cart are hidden on single product pages only when enabled. */
body.pkpo-hide-price.single-product .woocommerce div.product .summary > p.price,
body.pkpo-hide-price.single-product .woocommerce div.product .summary > span.price,
body.pkpo-hide-price.single-product .elementor-widget-woocommerce-product-price,
body.pkpo-hide-price.single-product .woocommerce div.product .summary .price,
body.pkpo-hide-price.single-product .wc-block-components-product-price { display: none !important; }
body.pkpo-hide-cart.single-product .woocommerce div.product .summary form.cart,
body.pkpo-hide-cart.single-product .elementor-widget-woocommerce-product-add-to-cart,
body.pkpo-hide-cart.single-product .wp-block-woocommerce-add-to-cart-form { display: none !important; }

.pkpo-badge {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.4px;
  line-height: 1.5;
  color: #303030;
  text-transform: uppercase;
  margin: 0 0 15px;
}
.pkpo-badge-dot { background: #101010; width: 7px; height: 7px; border-radius: 50%; }

.pkpo-quote-card,
.pkpo-quote-card * { box-sizing: border-box; }
.pkpo-quote-card {
  background: #fafafa;
  border: 1px solid #dedede;
  border-radius: 8px;
  padding: clamp(19px, 2.3vw, 29px);
  margin: 22px 0 0;
  color: #111;
  text-align: left;
  max-width: 100%;
}
.pkpo-quote-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 11px;
}
.pkpo-eyebrow {
  display: block;
  color: #777;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  font-weight: 750;
  font-size: 10px;
  margin-bottom: 7px;
}
.pkpo-quote-card .pkpo-quote-heading h3 {
  font: 800 clamp(18px, 2vw, 22px)/1.35 'Poppins', Arial, sans-serif !important;
  color: #111 !important;
  margin: 0 !important;
  letter-spacing: -.35px;
}
.pkpo-card-tag {
  background: #171717;
  color: #fff;
  padding: 7px 9px;
  border-radius: 3px;
  letter-spacing: 1px;
  font-weight: 700;
  font-size: 9px;
  white-space: nowrap;
  margin-top: 3px;
}
.pkpo-quote-card .pkpo-quote-copy {
  font: 400 13px/1.85 'Poppins', Arial, sans-serif;
  color: #666;
  margin: 0 0 19px !important;
}
.pkpo-quantity-row {
  display: flex;
  gap: 15px;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 18px;
}
.pkpo-quantity-row label {
  color: #171717;
  font-size: 12px;
  font-weight: 700;
}
.pkpo-quantity-row label small {
  font-weight: 400;
  color: #666;
}
.pkpo-qty-control {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid #dedede;
  background: #fff;
  border-radius: 4px;
  overflow: hidden;
  min-height: 43px;
}
.pkpo-qty-control button,
.pkpo-qty-control input {
  box-shadow: none !important;
  color: #111 !important;
  border: 0 !important;
  border-radius: 0 !important;
  outline-offset: -2px;
  margin: 0 !important;
}
.pkpo-qty-control button {
  width: 35px;
  padding: 0 !important;
  font-size: 18px !important;
  font-weight: 500 !important;
  background: #fff !important;
  cursor: pointer;
}
.pkpo-qty-control button:hover { background: #f1f1f1 !important; }
.pkpo-qty-control input {
  width: 56px !important;
  min-width: 56px !important;
  padding: 0 4px !important;
  text-align: center;
  background: #fff !important;
  appearance: textfield;
  -moz-appearance: textfield;
  font-size: 13px !important;
}
.pkpo-qty-control input::-webkit-inner-spin-button,
.pkpo-qty-control input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

.pkpo-quote-card a.pkpo-quote-button,
.pkpo-quote-card a.pkpo-quote-button:visited {
  display: flex !important;
  width: 100%;
  min-height: 53px;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 13px 19px !important;
  background: #101010 !important;
  color: #fff !important;
  border: 1px solid #101010 !important;
  border-radius: 4px !important;
  text-decoration: none !important;
  font: 800 13px/1.5 'Poppins', Arial, sans-serif !important;
  letter-spacing: .2px;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}
.pkpo-quote-card a.pkpo-quote-button:hover { background: #fff !important; color: #101010 !important; transform: translateY(-1px); }
.pkpo-arrow { font-size: 21px; font-weight: 400; line-height: 1; }
.pkpo-quote-card .pkpo-microcopy {
  color: #757575;
  margin: 10px 0 0 !important;
  text-align: center;
  font-size: 10px;
  line-height: 1.6;
}
.pkpo-quote-card .pkpo-sku {
  font-size: 11px;
  color: #777;
  margin: 12px 0 0 !important;
}
.pkpo-features {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 12px;
  row-gap: 11px;
  background: #fff;
  border-bottom: 1px solid #ededed;
  padding: 21px 0;
  font-size: 11px;
  line-height: 1.6;
  color: #414141;
  margin-bottom: 18px;
}
.pkpo-features > div { display: flex; align-items: flex-start; gap: 9px; }
.pkpo-features span { color: #fff; background: #111; font-weight: 800; line-height: 15px; text-align: center; width: 17px; height: 17px; flex: 0 0 17px; border-radius: 2px; font-size: 10px; }

/* Tabs + information panels */
body.pkpo-active .woocommerce div.product .woocommerce-tabs {
  clear: both;
  padding-top: 35px;
}
body.pkpo-active .woocommerce div.product .woocommerce-tabs ul.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0 25px;
  border-bottom: 1px solid #e5e5e5;
  padding: 0 !important;
  margin: 0 0 22px !important;
  background: transparent !important;
}
body.pkpo-active .woocommerce div.product .woocommerce-tabs ul.tabs::before,
body.pkpo-active .woocommerce div.product .woocommerce-tabs ul.tabs li::before,
body.pkpo-active .woocommerce div.product .woocommerce-tabs ul.tabs li::after { display: none !important; }
body.pkpo-active .woocommerce div.product .woocommerce-tabs ul.tabs li {
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
}
body.pkpo-active .woocommerce div.product .woocommerce-tabs ul.tabs li a {
  display: block;
  padding: 13px 0 15px;
  font-size: 13px;
  color: #777 !important;
  border-bottom: 2px solid transparent;
  font-weight: 700;
}
body.pkpo-active .woocommerce div.product .woocommerce-tabs ul.tabs li.active a,
body.pkpo-active .woocommerce div.product .woocommerce-tabs ul.tabs li a:hover { color: #111 !important; border-bottom-color: #111; }
body.pkpo-active .woocommerce div.product .woocommerce-tabs .panel { color: #555; line-height: 1.85; font-size: 14px; }
.pkpo-custom-tab ul { padding-left: 20px; margin: 15px 0; }
.pkpo-custom-tab li { margin-bottom: 6px; }

/* Custom order process */
.pkpo-process, .pkpo-process * { box-sizing: border-box; }
.pkpo-process {
  clear: both;
  width: 100%;
  padding: clamp(42px, 6vw, 75px) 0;
  margin: 20px 0 28px;
  border-top: 1px solid #e7e7e7;
}
.pkpo-process .pkpo-section-eyebrow { font-size: 10px; letter-spacing: 2px; font-weight: 800; color: #777; margin-bottom: 12px; }
.pkpo-process h2 { margin: 0 0 29px !important; font: 800 clamp(24px, 3vw, 34px)/1.25 'Poppins', Arial, sans-serif !important; color: #111 !important; }
.pkpo-process-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.pkpo-process-grid article { border: 1px solid #e7e7e7; padding: 24px 20px; background: #fff; border-radius: 4px; }
.pkpo-process-grid article span { display: inline-flex; align-items: center; justify-content: center; height: 38px; width: 38px; background: #101010; color: white; font-size: 12px; font-weight: 800; border-radius: 3px; margin-bottom: 18px; }
.pkpo-process-grid article h3 { margin: 0 0 8px !important; font: 750 16px/1.5 'Poppins', Arial, sans-serif !important; color: #111 !important; }
.pkpo-process-grid article p { margin: 0 !important; font-size: 12px; color: #686868; line-height: 1.8; }

/* Related product cards, common WooCommerce loops. */
body.pkpo-active .woocommerce .related.products,
body.pkpo-active .woocommerce .up-sells { margin-top: 35px; }
body.pkpo-active .woocommerce .related.products > h2,
body.pkpo-active .woocommerce .up-sells > h2 {
  font: 800 clamp(22px, 2.5vw, 30px)/1.3 'Poppins', Arial, sans-serif !important;
  color: #111 !important;
  margin-bottom: 24px !important;
}
body.pkpo-active .woocommerce ul.products li.product img { background: #f8f8f8; border-radius: 5px; }
body.pkpo-active .woocommerce ul.products li.product h2.woocommerce-loop-product__title { font: 700 14px/1.6 'Poppins', Arial, sans-serif !important; color: #111 !important; }
.woocommerce a.button.pkpo-archive-button,
.woocommerce a.button.pkpo-archive-button:visited {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #111 !important;
  border: 1px solid #111 !important;
  color: white !important;
  font: 750 12px/1.5 'Poppins', Arial, sans-serif !important;
  border-radius: 4px;
  padding: 11px 14px;
  text-decoration: none !important;
}
.woocommerce a.button.pkpo-archive-button:hover { background: #fff !important; color: #111 !important; }

/* Selected product context above the actual existing quote form. */
.pkpo-form-context {
  background: #f8f8f8;
  border: 1px solid #dedede;
  border-left: 4px solid #111;
  border-radius: 3px;
  padding: 18px 20px;
  margin: 0 0 25px;
  font-family: 'Poppins', Arial, sans-serif;
}
.pkpo-form-context .pkpo-context-kicker { display: block; color: #777; font-size: 10px; font-weight: 800; letter-spacing: 1.3px; margin-bottom: 7px; }
.pkpo-form-context strong { display: block; color: #101010; font-size: 16px; font-weight: 750; }
.pkpo-form-context p { font-size: 12px; color: #666; margin: 7px 0 0 !important; }

/* Mobile bottom action is hidden by default. */
.pkpo-mobile-bar { display: none; }

@media (max-width: 1024px) {
  .pkpo-process-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  body.pkpo-active .woocommerce div.product:not(.elementor) > .woocommerce-product-gallery,
  body.pkpo-active .woocommerce div.product:not(.elementor) > .summary { float: none !important; width: 100% !important; max-width: 100% !important; }
  body.pkpo-active .woocommerce div.product .summary { margin-top: 23px; }
  body.pkpo-active .woocommerce div.product .flex-control-thumbs { gap: 7px; }
}

@media (max-width: 767px) {
  body.pkpo-active.pkpo-has-mobile-bar { padding-bottom: 78px; }
  body.pkpo-active .woocommerce div.product .product_title,
  body.pkpo-active .elementor-widget-woocommerce-product-title h1 { font-size: clamp(25px, 6vw, 32px) !important; }
  .pkpo-quote-card { margin-top: 20px; padding: 21px 18px; }
  .pkpo-quote-card .pkpo-quote-heading h3 { font-size: 18px !important; }
  .pkpo-quote-copy { font-size: 12px !important; }
  .pkpo-features { gap: 11px 8px; font-size: 10px; }
  .pkpo-process { padding: 44px 0; }
  .pkpo-process-grid { gap: 12px; }
  .pkpo-process-grid article { padding: 20px 15px; }
  .pkpo-process-grid article h3 { font-size: 14px !important; }
  .pkpo-mobile-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    position: fixed;
    z-index: 9994;
    left: 0; right: 0; bottom: 0;
    background: rgba(255,255,255,.98);
    border-top: 1px solid #dcdcdc;
    box-shadow: 0 -6px 20px rgba(0,0,0,.06);
    padding: 10px 15px max(10px, env(safe-area-inset-bottom));
  }
  .pkpo-mobile-text { min-width: 0; flex: 1; }
  .pkpo-mobile-text span { display: block; font-size: 9px; letter-spacing: 1px; color: #777; font-weight: 700; }
  .pkpo-mobile-text strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #111; font-size: 11px; font-weight: 800; }
  .pkpo-mobile-link,
  .pkpo-mobile-link:visited {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none !important;
    white-space: nowrap;
    color: #fff !important;
    background: #111 !important;
    border-radius: 3px;
    padding: 11px 14px;
    font-size: 12px;
    font-weight: 800;
  }
}
@media (max-width: 430px) {
  .pkpo-quantity-row { flex-wrap: wrap; }
  .pkpo-quote-heading { align-items: center; }
  .pkpo-card-tag { font-size: 8px; }
  .pkpo-process-grid { grid-template-columns: 1fr; }
  .pkpo-mobile-text { display: none; }
  .pkpo-mobile-link { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .pkpo-quote-button, .pkpo-archive-button, .pkpo-process-grid *, .pkpo-qty-control button { transition: none !important; }
}
