/* ============================================================
   Sitewide Product Detail Stylesheet -- inapta.org
   Scope: .single-product (WooCommerce's body class on every
   single product page, site-wide -- NOT limited to the PAC
   catalog). Pairs with the restructured child-theme copy of
   woocommerce/content-single-product.php.
   Layout: two-column CSS Grid (image + description on the left,
   wider; price/quantity/button on the right, narrower), modeled
   on the reference Square product page.
   The shared visual design of product cards (border, radius,
   title, price, button) AND the "Add to cart" button used here
   in the buy-box live in pac-shared.css, loaded on every product
   page alongside this file, so the PAC grid, the related-products
   grid below, and this buy-box all look identical and can't drift
   apart. Only the two-column layout structure and buy-box-specific
   positioning stay in this file.
   Built without any WPBakery-specific markup or classes -- just
   WooCommerce's own template hooks + plain CSS Grid -- ahead of
   a planned migration off WPBakery to Divi 5 or Elementor.
   UNITS: rem, scaled against this site's actual 10px root
   (html{font-size:62.5%} site-wide -- see pac-store.css for the
   full write-up of this quirk). Border widths kept in px.
   ============================================================ */

.single-product .pac-product-layout{display:grid;grid-template-columns:2fr 1fr;gap:4rem;align-items:start;margin:3rem 0;}
/* upside-child/style.css has a pre-existing ".product .images { display:none !important; }"
   rule (unrelated to this redesign -- present before this template was touched) that hides
   the WooCommerce product gallery wrapper. Restore it on product pages specifically. */
.single-product .images,
.single-product .woocommerce-product-gallery{display:block !important;}
/* Image + description sit side-by-side on desktop (client confirmed this look, seen live,
   is preferred over strictly stacking). WooCommerce's classic float-layout CSS
   (.woocommerce div.product div.images{width:...;float:left;}) was ACCIDENTALLY producing
   a similar side-by-side look via float-wrap -- replaced with a deliberate flex layout so
   it's controlled and doesn't depend on image height vs. text length lining up by chance. */
.single-product .pac-product-media{display:flex;align-items:flex-start;gap:2rem;}
.single-product .pac-product-media .images,
.single-product .pac-product-media .woocommerce-product-gallery{float:none !important;width:auto !important;flex:0 0 38%;max-width:38%;}
.single-product .pac-product-media img{width:100%;height:auto;border-radius:0.5rem;display:block;}
.single-product .pac-product-description{flex:1 1 auto;padding:0 2rem;font-size:1.6rem;line-height:1.6;color:#333;font-family:"Roboto",Arial,sans-serif;}
.single-product .pac-product-description p{margin:0 0 1.6rem;}

.single-product .pac-product-buy{font-family:"Roboto",Arial,sans-serif;}
.single-product .pac-product-buy .product_meta,
.single-product .pac-product-buy .woocommerce-product-rating{display:none !important;}
.single-product .pac-product-buy > h1.product_title,
.single-product .pac-product-buy > .product_title{
  display:block !important;font-size:2.8rem !important;font-weight:700 !important;
  color:#357ebf !important;line-height:1.2 !important;margin:0 0 1.2rem !important;
  padding:0 !important;font-family:"Roboto",Arial,sans-serif !important;
}

/* --- Top control bar: Continue Shopping + cart link, spans the full
   width of the layout below. Continue Shopping goes back to wherever
   the visitor came from (e.g. the PAC store page) when that referer is
   on this site, otherwise falls back to WooCommerce's own Shop page. --- */
.single-product .pac-product-topbar{
  display:flex;align-items:center;justify-content:space-between;
  padding:1.2rem 0;margin-top:2rem;border-top:1px solid #e3e3e3;
  border-bottom:1px solid #e3e3e3;font-family:"Roboto",Arial,sans-serif;
}
.single-product .pac-continue-shopping{
  display:inline-flex;align-items:center;gap:0.6rem;
  color:#1e73be !important;font-weight:600;font-size:1.4rem;
  text-decoration:none !important;
}
.single-product .pac-continue-shopping:hover{color:#175a94 !important;}
.single-product .pac-icon-arrow-left::before{content:"\f104";font-family:"FontAwesome";}
.single-product .pac-cart-link{
  display:inline-flex;align-items:center;gap:0.8rem;
  color:#1b1b1b !important;font-weight:600;font-size:1.4rem;
  text-decoration:none !important;
}
.single-product .pac-cart-link:hover{color:#1e73be !important;}
.single-product .pac-icon-cart::before{content:"\f07a";font-family:"FontAwesome";font-size:1.6rem;}
.single-product .pac-cart-count{
  background:#1e73be;color:#fff;border-radius:999px;font-size:1.1rem;
  font-weight:700;min-width:1.8rem;height:1.8rem;padding:0 0.4rem;
  display:inline-flex;align-items:center;justify-content:center;
}

.single-product .pac-product-buy form.cart{display:flex;flex-wrap:wrap;align-items:stretch;gap:1.2rem;margin:0;}
.single-product .pac-product-buy .quantity{margin:0 !important;}
.single-product .pac-product-buy .quantity .qty{width:8rem !important;padding:0 1.2rem !important;}

.single-product .pac-product-buy button.single_add_to_cart_button{flex:1 1 auto;padding:0 2rem !important;min-height:4.8rem !important;line-height:4.8rem !important;}

/* --- Related products grid layout (card visual design is in pac-shared.css) --- */
.single-product ul.products::before,
.single-product ul.products::after{display:none !important;content:none !important;}
.single-product ul.products{display:grid !important;grid-template-columns:repeat(3,1fr);gap:2.4rem;list-style:none;margin:3rem 0 0;padding:0;}
.single-product ul.products li.product{display:flex;flex-direction:column;box-sizing:border-box;width:100% !important;max-width:none !important;float:none !important;margin:0 !important;}

@media (max-width:56.25em){
  .single-product .pac-product-layout{grid-template-columns:1fr;gap:2rem;}
  .single-product ul.products{grid-template-columns:repeat(2,1fr);}
}
@media (max-width:37.5em){
  .single-product ul.products{grid-template-columns:1fr;}
  /* Mobile: image + description stack instead of sitting side-by-side. */
  .single-product .pac-product-media{flex-direction:column;gap:1.6rem;}
  .single-product .pac-product-media .images,
  .single-product .pac-product-media .woocommerce-product-gallery{flex:0 0 auto;width:100% !important;max-width:100%;}
  .single-product .pac-product-description{padding:0;}
}
