/* ==========================================================================
   Enertime Child Theme - Single Product Styling
   ========================================================================== */

/* ─── Page Canvas & Containers Background ─── */
body.single-product {
  background-color: var(--ener-black) !important;
  background: var(--ener-black) !important;
  color: rgba(255, 255, 255, 0.75) !important;
}

/* Force GP containers to be transparent */
body.single-product #page,
body.single-product #main,
body.single-product .site-content,
body.single-product .content-area,
body.single-product .inside-article {
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
  border: none !important;
}

/* ─── Hex Pattern Background ─── */
.enertime-product-hex-pattern {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  opacity: 0.08;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='93' viewBox='0 0 80 93'%3E%3Cpath d='M40 0 L80 23.3 L80 70 L40 93.3 L0 70 L0 23.3 Z' fill='none' stroke='%23C0392B' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 80px 93px;
}

/* ─── Page Wrapper ─── */
.enertime-single-product-wrap {
  position: relative;
  z-index: 1;
  padding: 40px 20px 80px;
  max-width: 1200px;
  margin: 0 auto;
}

/* ─── Breadcrumbs ─── */
.woocommerce-breadcrumb {
  font-family: var(--font-body);
  font-size: 13px;
  color: rgba(255, 255, 255, 0.45) !important;
  margin-bottom: 30px !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 15px;
}
.woocommerce-breadcrumb a {
  color: rgba(255, 255, 255, 0.6) !important;
  text-decoration: none;
  transition: color var(--transition-fast);
}
.woocommerce-breadcrumb a:hover {
  color: var(--ener-red) !important;
}

/* ─── Main Product Columns Grid ─── */
body.single-product div.product {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 50px !important;
  align-items: start !important;
  margin-bottom: 60px !important;
  float: none !important;
  width: 100% !important;
}

@media (max-width: 768px) {
  body.single-product div.product {
    grid-template-columns: 1fr !important;
    gap: 30px !important;
  }
}

/* ─── Left Column: Product Gallery ─── */
body.single-product .woocommerce-product-gallery {
  width: 100% !important;
  float: none !important;
  margin: 0 0 30px 0 !important;
  background: rgba(26, 26, 46, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  transition: border-color var(--transition-std), box-shadow var(--transition-std);
  box-sizing: border-box;
}

body.single-product .woocommerce-product-gallery:hover {
  border-color: rgba(192, 57, 43, 0.35);
  box-shadow: 0 15px 40px rgba(192, 57, 43, 0.1);
}

body.single-product .woocommerce-product-gallery img {
  border-radius: var(--radius-sm);
  max-height: 450px;
  object-fit: contain;
  filter: drop-shadow(0 15px 25px rgba(0, 0, 0, 0.3));
}

/* Thumbnails Grid Styling */
body.single-product .woocommerce-product-gallery ol.flex-control-thumbs {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 12px !important;
  justify-content: center !important;
  margin: 20px 0 0 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

body.single-product .woocommerce-product-gallery ol.flex-control-thumbs li {
  width: 60px !important;
  float: none !important;
  margin: 0 !important;
  border: 2px solid rgba(255, 255, 255, 0.15) !important;
  border-radius: var(--radius-sm) !important;
  overflow: hidden !important;
  cursor: pointer !important;
  transition: border-color var(--transition-fast) !important;
  background: #ffffff !important;
  padding: 2px !important;
  box-sizing: border-box !important;
}

body.single-product .woocommerce-product-gallery ol.flex-control-thumbs li img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  opacity: 0.6 !important;
  transition: opacity var(--transition-fast) !important;
}

body.single-product .woocommerce-product-gallery ol.flex-control-thumbs li.active img,
body.single-product .woocommerce-product-gallery ol.flex-control-thumbs li img:hover {
  opacity: 1 !important;
}

body.single-product .woocommerce-product-gallery ol.flex-control-thumbs li.active {
  border-color: var(--ener-red) !important;
}

/* ─── Right Column: Summary Details ─── */
body.single-product .summary {
  width: 100% !important;
  float: none !important;
  margin: 0 !important;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

body.single-product .product_title {
  font-family: var(--font-display) !important;
  font-size: 38px !important;
  font-weight: 700 !important;
  color: #fff !important;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  line-height: 1.2 !important;
  margin: 0 !important;
}

/* Price */
body.single-product .summary .price {
  font-family: var(--font-display) !important;
  font-size: 28px !important;
  color: var(--ener-gold) !important;
  font-weight: 700;
  margin: 0 !important;
  display: flex;
  align-items: center;
}
body.single-product .summary .price del {
  font-size: 20px;
  color: rgba(255, 255, 255, 0.4) !important;
  margin-right: 10px;
}
body.single-product .summary .price ins {
  background: transparent !important;
  text-decoration: none !important;
  color: var(--ener-gold) !important;
}

/* Short Description */
body.single-product .woocommerce-product-details__short-description {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.85);
  border-left: 3px solid var(--ener-red);
  padding-left: 15px;
  margin: 10px 0;
}

/* ─── Add to Cart Area ─── */
body.single-product form.cart {
  display: flex;
  gap: 15px;
  align-items: center;
  margin: 20px 0 10px !important;
  padding: 20px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* Quantity Field */
body.single-product .quantity input.qty {
  width: 70px !important;
  height: 48px !important;
  background: rgba(26, 26, 46, 0.8) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  color: #fff !important;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
  border-radius: var(--radius-sm) !important;
  text-align: center;
  transition: all var(--transition-fast);
}
body.single-product .quantity input.qty:focus {
  border-color: var(--ener-red) !important;
  outline: none;
  box-shadow: 0 0 0 2px rgba(192, 57, 43, 0.2);
}

/* Add to Cart Button */
body.single-product .single_add_to_cart_button {
  height: 48px !important;
  background: var(--ener-red) !important;
  color: #fff !important;
  font-family: var(--font-body) !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0 35px !important;
  border-radius: var(--radius-sm) !important;
  border: none !important;
  cursor: pointer !important;
  transition: background var(--transition-fast), transform var(--transition-fast) !important;
}
body.single-product .single_add_to_cart_button:hover {
  background: var(--ener-red-dk) !important;
  transform: translateY(-2px);
}

/* ─── Metadata (SKU, Categories) ─── */
body.single-product .product_meta {
  font-family: var(--font-body);
  font-size: 13px;
  color: rgba(255, 255, 255, 0.45);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
body.single-product .product_meta a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
}
body.single-product .product_meta a:hover {
  color: var(--ener-red);
}
body.single-product .product_meta span {
  display: block;
}

/* ─── WooCommerce Product Tabs ─── */
body.single-product .woocommerce-tabs {
  grid-column: span 2 !important;
  width: 100% !important;
  float: none !important;
  clear: both !important;
  margin-top: 40px !important;
  background: rgba(26, 26, 46, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 35px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

@media (max-width: 768px) {
  body.single-product .woocommerce-tabs {
    grid-column: span 1 !important;
  }
}

body.single-product .woocommerce-tabs ul.tabs {
  display: flex;
  gap: 20px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.08) !important;
  padding: 0 0 10px 0 !important;
  margin: 0 0 30px 0 !important;
  list-style: none !important;
  background: transparent !important;
}

body.single-product .woocommerce-tabs ul.tabs li {
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
}
body.single-product .woocommerce-tabs ul.tabs li::after,
body.single-product .woocommerce-tabs ul.tabs li::before {
  display: none !important;
}

body.single-product .woocommerce-tabs ul.tabs li a {
  font-family: var(--font-display) !important;
  font-size: 20px !important;
  font-weight: 600 !important;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5) !important;
  text-decoration: none !important;
  padding: 10px 15px !important;
  display: block !important;
  transition: all var(--transition-fast) !important;
  border-bottom: 3px solid transparent;
  margin-bottom: -12px;
}

body.single-product .woocommerce-tabs li.active a {
  color: #fff !important;
  border-bottom-color: var(--ener-red) !important;
}

body.single-product .woocommerce-tabs ul.tabs li a:hover {
  color: #fff !important;
}

/* Tab Panels */
body.single-product .woocommerce-Tabs-panel {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.8);
}

body.single-product .woocommerce-Tabs-panel h2 {
  font-family: var(--font-display);
  font-size: 26px;
  color: #fff;
  margin-top: 0;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 10px;
}

/* ─── Additional Information Table ─── */
body.single-product table.shop_attributes {
  width: 100% !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-collapse: collapse !important;
  border-radius: var(--radius-sm) !important;
  overflow: hidden !important;
  margin-bottom: 0 !important;
}

body.single-product table.shop_attributes tr {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

body.single-product table.shop_attributes tr:last-child {
  border-bottom: none !important;
}

body.single-product table.shop_attributes th {
  width: 30% !important;
  background-color: rgba(13, 13, 13, 0.5) !important;
  color: var(--ener-gold) !important;
  font-family: var(--font-body) !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 18px 24px !important;
  text-align: left !important;
  border: none !important;
  border-right: 1px solid rgba(255, 255, 255, 0.08) !important;
}

body.single-product table.shop_attributes td {
  padding: 18px 24px !important;
  font-family: var(--font-body) !important;
  font-size: 14px !important;
  color: rgba(255, 255, 255, 0.85) !important;
  font-style: normal !important;
  border: none !important;
}

body.single-product table.shop_attributes td p {
  margin: 0 !important;
  padding: 0 !important;
}

/* ─── Related Products Section ─── */
body.single-product .related.products {
  grid-column: span 2 !important;
  width: 100% !important;
  float: none !important;
  clear: both !important;
  margin-top: 50px !important;
}

@media (max-width: 768px) {
  body.single-product .related.products {
    grid-column: span 1 !important;
  }
}

body.single-product .related.products > h2 {
  font-family: var(--font-display);
  font-size: 30px;
  color: #fff;
  text-align: center;
  margin-bottom: 40px;
}

/* Force 4 columns on Related Products using CSS Grid */
.woocommerce .related ul.products,
.woocommerce-page .related ul.products,
body.single-product .related ul.products,
body.single-product section.related ul.products,
body.single-product .related.products ul.products,
body.single-product .related.products ul.products.columns-4 {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 24px !important;
  padding: 0 !important;
  margin: 0 !important;
  list-style: none !important;
  float: none !important;
  clear: both !important;
  width: 100% !important;
  max-width: 100% !important;
}

@media (max-width: 1024px) {
  .woocommerce .related ul.products,
  .woocommerce-page .related ul.products,
  body.single-product .related ul.products,
  body.single-product section.related ul.products,
  body.single-product .related.products ul.products,
  body.single-product .related.products ul.products.columns-4 {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}
@media (max-width: 560px) {
  .woocommerce .related ul.products,
  .woocommerce-page .related ul.products,
  body.single-product .related ul.products,
  body.single-product section.related ul.products,
  body.single-product .related.products ul.products,
  body.single-product .related.products ul.products.columns-4 {
    grid-template-columns: 1fr !important;
  }
}

/* Related Product Card Style (matching homepage) */
.woocommerce .related ul.products li.product,
.woocommerce-page .related ul.products li.product,
body.single-product .related ul.products li.product,
body.single-product section.related ul.products li.product,
body.single-product .related.products ul.products li.product,
body.single-product .related.products ul.products.columns-4 li.product {
  background: rgba(26, 26, 46, 0.5) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: var(--radius-md) !important;
  padding: 0 !important;
  margin: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15) !important;
  transition: transform var(--transition-fast) !important;
  box-sizing: border-box !important;
  
  /* Reset theme widths, flex properties, and floats, expand to 100% of grid cell */
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  flex: none !important;
  float: none !important;
  clear: none !important;
}

.woocommerce .related ul.products li.product:hover,
.woocommerce-page .related ul.products li.product:hover,
body.single-product .related ul.products li.product:hover {
  transform: translateY(-5px);
  border-color: rgba(192, 57, 43, 0.35) !important;
}

/* Image Zone & Link Wrapper resets to transparent */
.woocommerce .related ul.products li.product a.woocommerce-LoopProduct-link,
.woocommerce-page .related ul.products li.product a.woocommerce-LoopProduct-link,
body.single-product .related ul.products li.product a.woocommerce-LoopProduct-link {
  display: flex !important;
  flex-direction: column !important;
  flex-grow: 1 !important;
  background: transparent !important;
  background-color: transparent !important;
  text-decoration: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

.woocommerce .related ul.products li.product img,
.woocommerce-page .related ul.products li.product img,
body.single-product .related ul.products li.product img {
  height: 260px !important;
  background: #cccccc !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  object-fit: contain !important;
  width: 100% !important;
  margin: 0 !important;
  transition: transform var(--transition-fast) !important;
  box-sizing: border-box !important;
}

.woocommerce .related ul.products li.product:hover img,
.woocommerce-page .related ul.products li.product:hover img,
body.single-product .related ul.products li.product:hover img {
  transform: scale(1.03);
}

/* Body Info */
.woocommerce .related ul.products li.product .woocommerce-loop-product__title,
.woocommerce-page .related ul.products li.product .woocommerce-loop-product__title,
body.single-product .related ul.products li.product .woocommerce-loop-product__title,
body.single-product .related ul.products li.product h2,
body.single-product .related ul.products li.product h3 {
  font-family: var(--font-body) !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  color: #fff !important;
  padding: 16px 20px 8px !important;
  margin: 0 !important;
  text-transform: none !important;
  word-break: break-word !important;
  line-height: 1.4 !important;
}

.woocommerce .related ul.products li.product .price,
.woocommerce-page .related ul.products li.product .price,
body.single-product .related ul.products li.product .price {
  font-family: var(--font-body) !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  color: var(--ener-gold) !important;
  padding: 0 20px 20px !important;
  margin: 0 !important;
  display: block !important;
  margin-top: auto !important; /* Push price to bottom of layout */
}

/* Add to cart / view product buttons inside the card loop */
.woocommerce .related ul.products li.product .button,
.woocommerce-page .related ul.products li.product .button,
body.single-product .related ul.products li.product .button {
  background: var(--ener-red) !important;
  color: #fff !important;
  text-align: center !important;
  font-family: var(--font-body) !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  padding: 10px 16px !important;
  margin: 0 20px 20px !important;
  border-radius: var(--radius-sm) !important;
  display: block !important;
  text-decoration: none !important;
  transition: background var(--transition-fast) !important;
  box-sizing: border-box !important;
}

.woocommerce .related ul.products li.product .button:hover,
.woocommerce-page .related ul.products li.product .button:hover,
body.single-product .related ul.products li.product .button:hover {
  background: var(--ener-red-dk) !important;
}

/* ─── Custom pricing on product summary ─── */
.enertime-single-custom-pricing {
  margin-top: -10px;
  margin-bottom: 15px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.enertime-single-member-price {
  font-family: var(--font-body) !important;
  font-size: 16px;
  font-weight: 600;
  color: var(--ener-gold);
}
.enertime-single-distributor-price {
  font-family: var(--font-body) !important;
  font-size: 16px;
  font-weight: 600;
  color: #3498db;
}

