/* =============================================================
   Product detail – mirrors chargeWeb/web/product.html (#pd-style)
   ============================================================= */

.charge-product-page {
  --e-global-color-06bb3ad: #f8f8f8;
  --e-global-color-7f072dc: #2a3239;
  --page-title-display: block;
}

.product-detail {
  padding: 80px 0;
  background: #fff;
  color: #222;
  font-family: inherit;
}

.product-detail .container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
  box-sizing: border-box;
}

.product-detail .pd-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}

.charge-product-page .product-detail .pd-grid > .pd-gallery,
.charge-product-page .product-detail .pd-grid > .pd-detail {
  float: none !important;
  width: auto !important;
  max-width: 100% !important;
}

@media (max-width: 991px) {
  .product-detail .pd-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

/* ---------------- Gallery ---------------- */

.pd-gallery .pd-main {
  position: relative;
  background: #f6f8fa;
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pd-gallery .pd-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity .25s;
}

.pd-thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 14px;
}

.pd-thumbs button {
  background: #f6f8fa;
  border: 2px solid transparent;
  border-radius: 10px;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 1 / 1;
}

.pd-thumbs button.active {
  border-color: #2bbf6a;
}

.pd-thumbs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Hide the default WooCommerce gallery scaffolding – we render our own. */
.product-detail .woocommerce-product-gallery,
.product-detail .woocommerce-product-gallery__trigger,
.product-detail .flex-control-nav,
.product-detail .flex-viewport {
  display: none !important;
}

/* ---------------- Info column ---------------- */

.pd-detail h1,
.pd-detail .product_title {
  display: block !important;
  font-size: 2rem;
  line-height: 1.2;
  margin: 0 0 8px;
  font-weight: 700;
  color: #0f1d2c;
  visibility: visible !important;
  opacity: 1;
}

.pd-detail .pd-sku {
  font-size: .85rem;
  color: #7a8694;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.pd-detail .pd-price {
  font-size: 1.6rem;
  font-weight: 700;
  color: #0f1d2c;
  margin-bottom: 8px;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
}

.pd-detail .pd-price .price,
.pd-detail .pd-price p.price {
  display: inline;
  margin: 0;
  padding: 0;
  font-size: inherit;
  font-weight: inherit;
  color: inherit;
}

.pd-detail .pd-price .pd-from {
  font-size: 1rem;
  color: #7a8694;
  font-weight: 500;
  margin-right: 6px;
}

.pd-detail .pd-finance {
  font-size: .92rem;
  color: #7a8694;
  margin-bottom: 24px;
}

.product-detail .star-rating {
  margin-bottom: 12px;
}

/* ---------------- Option groups (variations) ---------------- */

.pd-option {
  padding: 18px 0;
  border-top: 1px solid #ebeef2;
}

.pd-option:last-of-type {
  border-bottom: 1px solid #ebeef2;
}

.pd-option h4,
.pd-option .label label {
  font-size: 1rem;
  margin: 0 0 4px;
  font-weight: 600;
  color: #0f1d2c;
}

.pd-option .label {
  display: none !important;
}

.pd-option .pd-hint {
  font-size: .88rem;
  color: #7a8694;
  margin: 0 0 12px;
}

.pd-chips {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 10px;
}

.pd-chip {
  appearance: none;
  background: #fff;
  border: 1.5px solid #d6dbe1;
  border-radius: 10px;
  padding: 10px 16px;
  font-size: .92rem;
  font-weight: 500;
  color: #0f1d2c;
  cursor: pointer;
  transition: .15s;
  font-family: inherit;
  line-height: 1.2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: auto;
  max-width: 100%;
  flex: 0 0 auto;
  white-space: nowrap;
}

.pd-chip:hover {
  border-color: #2bbf6a;
  color: #2bbf6a;
}

.pd-chip.active {
  background: #0f1d2c;
  border-color: #0f1d2c;
  color: #fff;
}

.pd-chip.active .pd-swatch {
  box-shadow: 0 0 0 2px #fff;
}

.pd-chip small {
  display: inline;
  font-size: .72rem;
  color: #7a8694;
  font-weight: 400;
  margin-left: 4px;
}

.pd-chip.active small {
  color: #bcd9ca;
}

.pd-swatch {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: inline-block;
  border: 1px solid rgba(0, 0, 0, .15);
}

/* Theme WooCommerce rules target product summary buttons and blow up chip layout. */
.charge-product-page .product-detail .pd-detail .pd-chips,
.charge-product-page .product-detail div.product form.cart .pd-chips {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  gap: 10px !important;
}

.charge-product-page .product-detail .pd-detail button.pd-chip,
.charge-product-page .product-detail div.product form.cart button.pd-chip {
  display: inline-flex !important;
  align-items: center !important;
  width: auto !important;
  max-width: none !important;
  flex: 0 0 auto !important;
  padding: 10px 16px !important;
  min-height: 0 !important;
  height: auto !important;
  margin: 0 !important;
  border: 1.5px solid #d6dbe1 !important;
  border-radius: 10px !important;
  background: #fff !important;
  color: #0f1d2c !important;
  font-weight: 500 !important;
  line-height: 1.2 !important;
  box-shadow: none !important;
  white-space: nowrap;
}

.charge-product-page .product-detail .pd-detail button.pd-chip:hover,
.charge-product-page .product-detail div.product form.cart button.pd-chip:hover {
  border-color: #2bbf6a !important;
  color: #2bbf6a !important;
  background: #fff !important;
}

.charge-product-page .product-detail .pd-detail button.pd-chip.active,
.charge-product-page .product-detail div.product form.cart button.pd-chip.active {
  background: #0f1d2c !important;
  border-color: #0f1d2c !important;
  color: #fff !important;
}

.charge-product-page .product-detail .pd-detail button.pd-chip.active:hover,
.charge-product-page .product-detail div.product form.cart button.pd-chip.active:hover {
  background: #0f1d2c !important;
  border-color: #0f1d2c !important;
  color: #fff !important;
}

.charge-product-page .product-detail .pd-detail button.pd-chip:focus,
.charge-product-page .product-detail div.product form.cart button.pd-chip:focus {
  outline: none !important;
  box-shadow: none !important;
}

/* Hide default WooCommerce variation table + reset link (chips replace them). */
.product-detail .variations_form {
  margin: 0;
}

.charge-variation-options {
  margin: 0;
}

.product-detail .variations_form table.variations,
.product-detail .variations_form .reset_variations,
.charge-variation-select-wrap {
  display: none !important;
}

.charge-product-page .product-detail .woocommerce-variation-price {
  display: none;
}

.charge-product-page .product-detail .single_variation_wrap .woocommerce-variation {
  display: none !important;
}

.charge-product-page .product-detail .single_variation_wrap {
  margin-top: 0;
  display: block !important;
  clear: both;
}

/* ---------------- Amazon CTA ---------------- */

.charge-product-page .product-detail .amazon-cta {
  flex-wrap: wrap;
  align-items: center;
  clear: both;
  width: 100%;
  box-sizing: border-box;
  display: flex !important;
  margin-top: 14px;
  gap: 16px;
}

.charge-product-page .product-detail .amazon-cta-info {
  flex: 1 1 auto;
  min-width: min(100%, 240px);
}

.charge-product-page .product-detail .amazon-cta-btn {
  flex: 0 0 auto;
  max-width: 100%;
  margin-left: auto;
  min-width: 180px;
  justify-content: center;
  white-space: nowrap;
}

/* ---------------- Purchase (qty + add to basket) ---------------- */

.pd-purchase {
  margin-top: 28px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: nowrap;
  width: 100%;
}

.pd-purchase form.cart {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin: 0;
  width: 100%;
}

.charge-product-page .product-detail .woocommerce-variation-add-to-cart,
.charge-product-page .product-detail .woocommerce-variation-add-to-cart.pd-purchase,
.charge-product-page .product-detail form.cart.pd-purchase {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  gap: 14px;
  width: 100%;
  margin-top: 28px;
}

.charge-product-page .product-detail .woocommerce-variation-add-to-cart .pd-qty {
  flex: 0 0 auto !important;
  width: auto !important;
  max-width: none !important;
}

.charge-product-page .product-detail .pd-purchase {
  clear: both;
}

.pd-qty {
  display: inline-flex;
  align-items: center;
  border: 1.5px solid #d6dbe1;
  border-radius: 10px;
  overflow: hidden;
  flex: 0 0 auto;
  box-sizing: border-box;
}

.pd-qty button {
  appearance: none;
  background: #fff;
  border: 0;
  width: 40px;
  height: 46px;
  font-size: 1.2rem;
  cursor: pointer;
  color: #0f1d2c;
}

.pd-qty button:hover {
  background: #f6f8fa;
}

.pd-qty input,
.pd-qty .qty {
  width: 56px;
  height: 46px;
  border: 0;
  border-left: 1.5px solid #d6dbe1;
  border-right: 1.5px solid #d6dbe1;
  text-align: center;
  font-size: 1rem;
  font-weight: 600;
  color: #0f1d2c;
  font-family: inherit;
  box-shadow: none;
  border-radius: 0;
  min-height: 46px;
  padding: 0;
}

.pd-qty input::-webkit-outer-spin-button,
.pd-qty input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.charge-product-page .product-detail .pd-qty,
.charge-product-page .product-detail .pd-qty .qty,
.charge-product-page .product-detail .pd-qty input.qty {
  box-sizing: border-box;
}

.charge-product-page .product-detail .pd-qty .qty,
.charge-product-page .product-detail .pd-qty input.qty {
  width: 56px !important;
  min-height: 46px;
  height: 46px;
  border: 0 !important;
  border-left: 1.5px solid #d6dbe1 !important;
  border-right: 1.5px solid #d6dbe1 !important;
  border-radius: 0 !important;
  background: #fff !important;
  box-shadow: none !important;
}

.charge-product-page .product-detail .pd-qty button.pd-qty-minus,
.charge-product-page .product-detail .pd-qty button.pd-qty-plus {
  width: 40px !important;
  height: 46px !important;
  min-height: 46px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #fff !important;
  color: #0f1d2c !important;
  box-shadow: none !important;
  line-height: 1;
}

.charge-product-page .product-detail .pd-qty button.pd-qty-minus:hover,
.charge-product-page .product-detail .pd-qty button.pd-qty-plus:hover {
  background: #f6f8fa !important;
  color: #0f1d2c !important;
}

.pd-add,
.pd-purchase .single_add_to_cart_button,
.charge-product-page .product-detail div.product form.cart .button.single_add_to_cart_button,
.charge-product-page .product-detail .woocommerce-variation-add-to-cart .single_add_to_cart_button {
  appearance: none;
  border: 0 !important;
  background: #2bbf6a !important;
  color: #fff !important;
  padding: 13px 30px !important;
  border-radius: 10px !important;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: .15s;
  font-family: inherit;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px !important;
  min-height: 46px;
  line-height: 1.2;
  box-shadow: none !important;
  flex: 0 0 auto;
  min-width: 180px;
  width: auto !important;
  max-width: none !important;
}

.charge-product-page .product-detail div.product form.cart .button.single_add_to_cart_button:focus,
.charge-product-page .product-detail .woocommerce-variation-add-to-cart .single_add_to_cart_button:focus {
  background: #2bbf6a !important;
  border: 0 !important;
  color: #fff !important;
  border-radius: 10px !important;
  outline: none !important;
  box-shadow: none !important;
}

.pd-add:hover,
.pd-purchase .single_add_to_cart_button:hover,
.charge-product-page .product-detail div.product form.cart .button.single_add_to_cart_button:hover,
.charge-product-page .product-detail .woocommerce-variation-add-to-cart .single_add_to_cart_button:hover {
  background: #26a85d !important;
  transform: translateY(-1px);
  color: #fff !important;
  border: 0 !important;
}

.charge-product-page .product-detail .pd-detail button.single_add_to_cart_button,
.charge-product-page .product-detail .pd-detail button.pd-add,
.charge-product-page .product-detail div.product form.cart button.single_add_to_cart_button,
.charge-product-page .product-detail .woocommerce-variation-add-to-cart .single_add_to_cart_button {
  display: inline-flex !important;
  width: auto !important;
  max-width: none !important;
  flex: 0 0 auto !important;
  margin: 0 !important;
}

.pd-add svg,
.pd-purchase .single_add_to_cart_button svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  flex: 0 0 auto;
}

@media (max-width: 480px) {
  .charge-product-page .product-detail .amazon-cta {
    flex-direction: column;
    align-items: stretch;
    flex-wrap: wrap;
  }

  .charge-product-page .product-detail .amazon-cta-btn {
    margin-left: 0;
    width: 100%;
    justify-content: center;
  }

  .charge-product-page .product-detail .woocommerce-variation-add-to-cart {
    flex-direction: column !important;
    align-items: stretch !important;
    flex-wrap: wrap !important;
  }

  .charge-product-page .product-detail .woocommerce-variation-add-to-cart .single_add_to_cart_button {
    width: 100% !important;
  }
}

/* ---------------- Tabs ---------------- */

.pd-tabs-wrap {
  margin-top: 0;
}

.pd-tabs {
  margin-top: 60px;
  border-top: 1px solid #ebeef2;
  padding-top: 30px;
}

.pd-tab-nav {
  display: flex;
  gap: 6px;
  border-bottom: 2px solid #ebeef2;
  margin-bottom: 30px;
  flex-wrap: wrap;
  list-style: none;
  padding: 0;
}

.pd-tab-btn {
  appearance: none;
  background: transparent;
  border: 0;
  padding: 14px 22px;
  font-size: 1rem;
  font-weight: 600;
  color: #7a8694;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  font-family: inherit;
  transition: .15s;
  text-decoration: none;
}

.pd-tab-btn:hover {
  color: #0f1d2c;
}

.pd-tab-btn.active {
  color: #0f1d2c;
  border-bottom-color: #2bbf6a;
}

.pd-tab-panel {
  display: none;
  line-height: 1.7;
  color: #3a4654;
}

.pd-tab-panel.active {
  display: block !important;
}

.pd-tab-panel h2:first-child,
.pd-tab-panel > h2:first-child {
  display: none;
}

.pd-tab-panel h3 {
  font-size: 1.4rem;
  margin: 0 0 16px;
  color: #0f1d2c;
}

.pd-tab-panel h4 {
  margin: 24px 0 10px;
  font-size: 1.05rem;
  color: #0f1d2c;
}

.pd-tab-panel p {
  margin: 0 0 12px;
}

.pd-tab-panel ul {
  margin: 0 0 14px;
  padding-left: 20px;
}

.pd-tab-panel ul li {
  margin-bottom: 4px;
}

/* ---------------- Spec tables ---------------- */

.pd-spec-group {
  margin-bottom: 28px;
}

.pd-spec-table,
.product-detail table.shop_attributes {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 8px;
  background: #fff;
  border: 1px solid #ebeef2;
  border-radius: 10px;
  overflow: hidden;
}

.pd-spec-table td,
.product-detail table.shop_attributes th,
.product-detail table.shop_attributes td {
  padding: 11px 16px;
  font-size: .93rem;
  border-top: 1px solid #ebeef2;
  vertical-align: top;
}

.pd-spec-table tr:first-child td,
.product-detail table.shop_attributes tr:first-child th,
.product-detail table.shop_attributes tr:first-child td {
  border-top: 0;
}

.pd-spec-table td:first-child,
.product-detail table.shop_attributes th {
  font-weight: 600;
  color: #0f1d2c;
  width: 42%;
  background: #fafbfc;
}

/* ---------------- Downloads ---------------- */

.pd-downloads {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.pd-dl-card {
  border: 1px solid #ebeef2;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  background: #fff;
  transition: .15s;
}

.pd-dl-card:hover {
  border-color: #2bbf6a;
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .06);
}

.pd-dl-card .pd-dl-icon {
  width: 46px;
  height: 46px;
  margin: 0 auto 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e8f7ee;
  color: #2bbf6a;
  border-radius: 50%;
}

.pd-dl-card .pd-dl-icon svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.pd-dl-card h4 {
  margin: 6px 0 12px;
  font-size: 1rem;
}

.pd-dl-card a {
  display: inline-block;
  color: #2bbf6a;
  text-decoration: none;
  font-weight: 600;
  font-size: .9rem;
  border-bottom: 1px solid transparent;
  transition: .15s;
}

.pd-dl-card a:hover {
  border-bottom-color: #2bbf6a;
}

/* ---------------- WooCommerce container overrides ---------------- */

.charge-product-page .product-detail div.product,
.charge-product-page .product-detail .charge-wc-single-product {
  float: none;
  width: auto;
  margin: 0;
  clear: none;
}

.charge-product-page .site-content {
  padding-top: 0;
  max-width: none;
  width: 100%;
  overflow-x: clip;
}

.charge-product-page .product-detail .pd-detail {
  min-width: 0;
  width: 100%;
  max-width: 100%;
  float: none !important;
}

.charge-product-page .product-detail .pd-chips {
  width: 100%;
}
