/* ===== Single Product Page ===== */
/* Template: woocommerce/single-product.php. Laid out like the single course page. */

.ce-sglprd-hero-sec {
  background: var(--bg-gradient-2);
}

/* Gallery: WooCommerce's own gallery, full column width (its CSS floats it at 48%). */
.woocommerce div.product.ce-sglprd div.images.woocommerce-product-gallery {
  float: none;
  width: 100%;
  margin-bottom: 0;
}

.ce-sglprd-gallery .woocommerce-product-gallery__image img,
.ce-sglprd-gallery .woocommerce-product-gallery__wrapper img {
  border-radius: 24px;
  width: 100%;
  height: auto;
}

.ce-sglprd-gallery .flex-control-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0.75rem 0 0;
  padding: 0;
  list-style: none;
}

.woocommerce div.product.ce-sglprd div.images .flex-control-thumbs li {
  width: calc(25% - 0.57rem);
  float: none;
}

.ce-sglprd-gallery .flex-control-thumbs img {
  border-radius: 10px;
}

/* ===== Buy box ===== */
.woocommerce div.product.ce-sglprd div.summary.ce-sglprd-card {
  float: none;
  width: 100%;
  margin-bottom: 0;
}

.ce-sglprd-card {
  position: relative;
  background: var(--bg-gradient-primary_15);
  box-shadow: 0 10px 30px rgba(22, 60, 102, 0.12);
  border-radius: 40px;
  padding: 3.5rem 1.75rem 1.75rem;
  text-align: center;
}

.ce-sglprd-off-badge {
  position: absolute;
  top: 5px;
  right: 35px;
  background: var(--theme-color-3);
  color: var(--primary-color);
  font-weight: 800;
  font-size: 0.85rem;
  line-height: 1.2;
  text-align: center;
  padding: 0.5rem 0.7rem;
  border-radius: 12px;
  box-shadow: 0 6px 14px rgba(222, 64, 73, 0.35);
}

.woocommerce div.product.ce-sglprd .ce-sglprd-title {
  color: var(--theme-color-2);
  font-family: var(--primary-font);
  font-size: var(--h3-font-size);
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 1rem;
}

.ce-sglprd-excerpt {
  color: var(--theme-color-2);
  margin-bottom: 1.25rem;
}

.ce-sglprd-excerpt p {
  margin-bottom: 0.5rem;
}

.ce-sglprd-features {
  display: inline-block;
  margin: 0 0 1.25rem;
  padding: 0;
  text-align: left;
}

.ce-sglprd-features li {
  color: var(--theme-color-2);
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

.ce-sglprd-features li i {
  color: var(--theme-color-6);
  margin-right: 0.5rem;
}

/* Price (WooCommerce price HTML: <del> regular, <ins> sale). */
.woocommerce div.product.ce-sglprd .ce-sglprd-price {
  color: var(--theme-color-2);
  font-size: var(--h2-font-size);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 0.5rem;
}

.woocommerce div.product.ce-sglprd .ce-sglprd-price del {
  color: #b7bfd1;
  font-size: 0.6em;
  font-weight: 700;
  margin-right: 0.5rem;
  opacity: 1;
}

.woocommerce div.product.ce-sglprd .ce-sglprd-price ins {
  text-decoration: none;
}

.ce-sglprd-guarantee {
  color: var(--theme-color-6);
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

/* Add to cart form: quantity + button in one row, button styled like .ce-btn yellow → green. */
.woocommerce div.product.ce-sglprd .ce-sglprd-cart form.cart {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin: 0;
}

.woocommerce div.product.ce-sglprd .ce-sglprd-cart form.cart::before,
.woocommerce div.product.ce-sglprd .ce-sglprd-cart form.cart::after {
  display: none;
}

.woocommerce div.product.ce-sglprd .ce-sglprd-cart form.variations_form {
  flex-direction: column;
  align-items: stretch;
}

.woocommerce div.product.ce-sglprd .ce-sglprd-cart .quantity {
  float: none;
  margin: 0;
}

.woocommerce div.product.ce-sglprd .ce-sglprd-cart .quantity .qty {
  width: 4.5rem;
  height: 100%;
  min-height: 3rem;
  border: 1px solid var(--border-color);
  border-radius: 200px;
  text-align: center;
  font-weight: 700;
}

.woocommerce div.product.ce-sglprd .ce-sglprd-cart .single_add_to_cart_button {
  flex: 1;
  float: none;
  min-height: 3rem;
  padding: 0.75rem 1.5rem;
  border: 0;
  border-radius: 200px;
  background: var(--bg-gradient-theme-16_17);
  color: var(--theme-color-2);
  font-family: var(--primary-font);
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  transition: background 0.3s ease, color 0.3s ease;
}

.woocommerce div.product.ce-sglprd .ce-sglprd-cart .single_add_to_cart_button:hover,
.woocommerce div.product.ce-sglprd .ce-sglprd-cart .single_add_to_cart_button:focus {
  background: var(--theme-color-6);
  color: var(--primary-color);
}

.woocommerce div.product.ce-sglprd .ce-sglprd-cart .single_add_to_cart_button.disabled {
  opacity: 0.5;
}

.woocommerce div.product.ce-sglprd .ce-sglprd-cart .stock {
  width: 100%;
  margin: 0 0 0.5rem;
  color: var(--theme-color-6);
  font-weight: 600;
}

.woocommerce div.product.ce-sglprd .ce-sglprd-cart .stock.out-of-stock {
  color: var(--theme-color-3);
}

/* Variations table (variable products). */
.woocommerce div.product.ce-sglprd .ce-sglprd-cart table.variations {
  margin-bottom: 1rem;
  text-align: left;
}

.woocommerce div.product.ce-sglprd .ce-sglprd-cart table.variations select {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 10px;
}

.ce-sglprd-view-cart {
  display: block;
  margin-top: 0.75rem;
  padding: 0.7rem 1rem;
  border: 2px solid var(--theme-color-2) !important;
  font-weight: 700;
  font-size: 0.9rem;
  text-transform: uppercase;
}

/* ===== Description ===== */
.ce-sglprd-desc-sec {
  background: var(--theme-color-10);
}

.ce-sglprd-desc-box {
  background: var(--primary-color);
  border-radius: 40px;
  padding: 2.5rem;
  box-shadow: 0 10px 30px rgba(48, 66, 121, 0.08);
}

.ce-sglprd-desc-title {
  color: var(--theme-color-2);
  font-size: var(--h3-font-size);
  font-weight: 800;
  margin-bottom: 1rem;
}

/* header.css resets all margins; restore content spacing. */
.ce-sglprd-desc-content p,
.ce-sglprd-desc-content ul,
.ce-sglprd-desc-content ol {
  margin-bottom: 1rem;
}

.ce-sglprd-desc-content ul,
.ce-sglprd-desc-content ol {
  padding-left: 1.5rem;
}

.ce-sglprd-desc-content :is(h2, h3, h4) {
  color: var(--theme-color-2);
  margin: 1.5rem 0 0.75rem;
}

/* ===== Responsive ===== */
@media (max-width: 575.98px) {
  .ce-sglprd-card {
    border-radius: 28px;
    padding: 3.5rem 1.25rem 1.5rem;
  }

  .ce-sglprd-desc-box {
    border-radius: 24px;
    padding: 1.5rem;
  }
}
