/* =========================
   CG Single Product Layout
   ========================= */

.cg-sp-wrap{
  width: min(1400px, 92vw);
  margin: 0 auto;
  padding: 28px 0 60px;
}

/* Two-column like Cladco */
.cg-sp{
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 42px;
  align-items: start;
}

@media (max-width: 980px){
  .cg-sp{
    grid-template-columns: 1fr;
    gap: 26px;
  }
}

.cg-sp__gallery .woocommerce-product-gallery{
  margin: 0;
}

.cg-sp__summary{
  position: sticky;
  top: 110px; /* adjust if your header height differs */
}

@media (max-width: 980px){
  .cg-sp__summary{
    position: static;
  }
}

/* Title */
.cg-sp__summary .product_title{
  font-size: clamp(28px, 3.2vw, 40px);
  line-height: 1.1;
  margin: 0 0 10px;
}

/* Meta */
.cg-sp__summary .product_meta{
  margin: 10px 0 16px;
  opacity: .85;
}

/* Base price */
.cg-sp__baseprice .price{
  font-size: 22px;
  margin: 10px 0 18px;
}

/* Calculator form area */
.cg-sp__form{
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 14px;
  padding: 16px;
  background: #fff;
}

/* Make plugin calculator area behave */
.cg-sp__form .bootstrap-iso,
.cg-sp__form #pc_ranges_table{
  width: 100%;
  max-width: 100%;
}

/* Hide Extendons "Output Unit" + "Price" rows (keeps only measurement input row) */
.cg-sp__form .bootstrap-iso table tr:has(td:contains("Output Unit")),
.cg-sp__form .bootstrap-iso table tr:has(td:contains("Price")){
  display: none !important;
}

/* Fallback for browsers that don't support :has() or :contains()
   (we also hide by common Extendons structure) */
.cg-sp__form .bootstrap-iso table tr:nth-child(2),
.cg-sp__form .bootstrap-iso table tr:nth-child(3){
  display: none;
}

/* Our injected total price block */
.cg-pc-total{
  margin-top: 14px;
  padding: 14px;
  border-radius: 14px;
  background: rgba(255,203,5,.18);
  border: 1px solid rgba(255,203,5,.55);
}

.cg-pc-total__label{
  font-weight: 700;
  margin: 0 0 6px;
}

.cg-pc-total__value{
  font-size: 28px;
  font-weight: 800;
  margin: 0;
}

/* Disable state */
form.cart.cg-pc-disabled{
  opacity: 1;
}

form.cart.cg-pc-disabled .single_add_to_cart_button{
  opacity: .5;
  cursor: not-allowed;
}

/* Make add-to-cart look cleaner */
.cg-sp__form .single_add_to_cart_button{
  width: 100%;
  padding: 14px 16px;
  border-radius: 10px;
  font-weight: 700;
}

/* Tabs / related spacing */
.cg-sp__tabs{ margin-top: 44px; }
.cg-sp__related{ margin-top: 44px; }
