/*************************************************************
🎮 CFG PRODUCT PAGE – ASTRA CHILD 02 (FINAL v3)
Author: Dallas x ChatGPT
/* CFG single-product.css v1.0.0 — updated 06 Oct 2025 */
/*************************************************************/

/* === 1. GLOBAL BASE === */
body, html {
  background: #0a0c10 !important;
  color: #f4f4f4;
  font-family: "Inter", "Poppins", sans-serif;
  scroll-behavior: smooth;
}
h1, h2, h3, h4, h5, h6 { color: #fff; margin-bottom: 0.6em; }
a { color: #ff5e3a; text-decoration: none; transition: 0.2s ease; }
a:hover { color: #ff3b7f; }

/* === 2. CONTAINER ALIGNMENT === */
.ast-container, .woocommerce #content, .woocommerce-page #content {
  max-width: 1300px !important;
  margin: 0 auto !important;
  padding: 0 20px !important;
  box-sizing: border-box;
}

/* === 3. MAIN PRODUCT WRAPPER === */
.woocommerce div.product {
  display: flex !important;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 60px;
  margin-top: 60px;
}

@media (max-width: 900px) {
  .woocommerce div.product {
    flex-direction: column;
    align-items: center;
    gap: 30px;
  }
}

/* === 4. LEFT COLUMN (IMAGE GALLERY) === */
.woocommerce div.product div.images {
  flex: 1 1 45%;
  background: #101317;
  padding: 25px;
  border-radius: 16px;
  box-shadow: 0 0 25px rgba(255,59,127,0.08);
  text-align: center;
}

.woocommerce div.product div.images img {
  border-radius: 12px;
  max-width: 100%;
  transition: transform 0.3s ease;
  object-fit: contain;
}
.woocommerce div.product div.images img:hover { transform: scale(1.03); }

/* === 5. RIGHT COLUMN (SUMMARY PANEL) === */
.summary.entry-summary {
  flex: 1 1 45%;
  background: #0d0f13;
  padding: 35px 40px;
  border-radius: 18px;
  box-shadow: 0 0 40px rgba(255, 59, 127, 0.08);
}

/* === 6. PRODUCT TITLE === */
h1.product_title.entry-title {
  font-size: clamp(1.8rem, 2.5vw, 2.8rem);
  font-weight: 900;
  line-height: 1.15;
  background: linear-gradient(90deg, #c0132d, #ff5e3a, #ff3b7f);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 14px;
}

/* === 7. PRICE === */
.price {
  color: #ff5e3a !important;
  font-weight: 700;
  font-size: 1.3rem;
  margin-bottom: 20px;
}

/* === 8. VARIATIONS / SELECT === */
.variations_form select {
  background: #121722;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 8px;
}
.variations_form select:focus {
  border-color: #ff5e3a;
  box-shadow: 0 0 6px #ff3b7f;
}

/* === 9. ADD TO CART BUTTON === */
.single_add_to_cart_button {
  width: 100%;
  padding: 15px;
  font-weight: 800;
  border-radius: 10px;
  color: #fff !important;
  border: none;
  background: linear-gradient(90deg, #c0132d, #ff5e3a, #ff3b7f);
  transition: all 0.25s ease;
}
.single_add_to_cart_button:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
}

/* === 10. META DETAILS === */
.product_meta {
  color: #aaa;
  font-size: 0.9rem;
  margin-top: 20px;
}
.product_meta a { color: #ff5e3a; font-weight: 600; }

/* === 11. DESCRIPTION / TABS === */
.woocommerce-Tabs-panel {
  background: #101317;
  padding: 25px;
  border-radius: 12px;
  margin-top: 40px;
  color: #ddd;
}
.woocommerce div.product .woocommerce-tabs ul.tabs li.active a {
  color: #ff5e3a !important;
}
.woocommerce div.product .woocommerce-tabs ul.tabs li a {
  color: #fff !important;
  font-weight: 600;
}

/* === 12. RELATED PRODUCTS GRID === */
.related.products {
  max-width: 1300px;
  margin: 80px auto;
  padding: 0 20px;
  text-align: center;
}

.related.products h2 {
  display: inline-block;
  font-size: 1.8rem;
  font-weight: 800;
  background: linear-gradient(90deg, #c0132d, #ff5e3a, #ff3b7f);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 40px;
  border-bottom: 2px solid #ff5e3a33;
  padding-bottom: 6px;
}

.related ul.products {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 25px;
}

.related ul.products li.product {
  background: #0f1115;
  border-radius: 12px;
  padding: 16px;
  width: 200px !important;
  box-shadow: 0 0 15px rgba(255, 59, 127, 0.05);
  text-align: center;
  transition: transform 0.25s ease;
}

.related ul.products li.product:hover {
  transform: translateY(-4px);
}

.related ul.products li.product img {
  max-height: 160px !important;
  width: auto !important;
  object-fit: contain !important;
  margin: 0 auto 10px auto !important;
  border-radius: 8px;
  transition: transform 0.25s ease;
}
.related ul.products li.product img:hover { transform: scale(1.05); }

.related ul.products li.product .woocommerce-loop-product__title {
  font-size: 0.95rem !important;
  color: #fff !important;
  line-height: 1.3;
  min-height: 40px;
  margin-bottom: 6px;
}
.related ul.products li.product .price {
  font-size: 0.9rem !important;
  color: #ff5e3a !important;
  font-weight: 700;
}

/* === 13. MOBILE OPTIMIZATION === */
@media (max-width: 768px) {
  .summary.entry-summary {
    background: #0a0c10;
    box-shadow: none;
    padding: 25px 20px;
  }
  h1.product_title.entry-title, .price, .product_meta {
    text-align: center;
  }
  .woocommerce div.product div.images { padding: 10px; }
  .related ul.products {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 20px !important;
  }
  .related ul.products li.product {
    width: auto !important;
    padding: 12px !important;
  }
  .related ul.products li.product img {
    max-height: 130px !important;
  }
}

/* === CFG Related Products Refinement === */
.related.products {
  margin-top: 40px !important;      /* reduces excessive white space */
  margin-bottom: 20px !important;
  padding-top: 10px !important;
  padding-bottom: 10px !important;
  text-align: center;
}

/* Reduce heading spacing */
.related.products > h2,
.upsells.products > h2 {
  margin-bottom: 25px !important;
  font-size: 1.8rem;
  font-weight: 700;
  background: linear-gradient(90deg, #c0132d, #ff5e3a, #ff3b7f);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: 0.5px;
}

/* Product grid balance */
.related.products ul.products {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 28px;
  padding: 0 !important;
  margin: 0 auto !important;
  max-width: 100%;
}

/* Product card cleanup */
.related.products ul.products li.product {
  background: #111317;
  border-radius: 12px;
  padding: 18px;
  box-shadow: 0 0 14px rgba(255, 59, 127, 0.08);
  transition: all 0.25s ease;
}
.related.products ul.products li.product:hover {
  transform: translateY(-4px);
  box-shadow: 0 0 18px rgba(255, 59, 127, 0.25);
}

/* Image scaling for consistency */
.related.products ul.products li.product img {
  width: 160px !important;
  height: auto !important;
  object-fit: contain;
  margin: 0 auto 12px;
}

/* Product name */
.related.products ul.products li.product h2,
.related.products ul.products li.product .woocommerce-loop-product__title {
  font-size: 1rem;
  color: #ff3b7f !important;
  font-weight: 600;
  margin-bottom: 4px;
}

/* Category & price */
.related.products ul.products li.product .price,
.related.products ul.products li.product .ast-woo-product-category {
  font-size: 0.85rem;
  color: #ddd !important;
}

/* Responsive tightening */
@media (max-width: 768px) {
  .related.products {
    margin-top: 20px !important;
    margin-bottom: 10px !important;
    padding: 5px !important;
  }

  .related.products ul.products li.product {
    width: 45%;
    padding: 12px;
  }

  .related.products ul.products li.product img {
    width: 100px !important;
  }
}

