/**
 * Quizt 2.0 - WooCommerce Product Styling
 *
 * Scoped strictly under .single-product, .woocommerce ul.products, .woocommerce-page
 * Restored from proven legacy layout structure and production aesthetics:
 * - 1200px max-width centered container
 * - 2-column desktop row: Gallery (left) + Summary (right)
 * - 1-column mobile layout
 * - Full-width after-summary section for tabs, bottom CTA, and related products
 * - Zero empty grey bars on products without FBT items
 * - Restored chili peppers & tooltip presentation
 * - 4-column related products grid (desktop) / 2-col (tablet) / 1-col (mobile)
 *
 * @package Quizt_Theme
 * @version 2.1.2
 */

/* ==========================================================================
   1. Quizt Product Grid & Reusable Card Component (P2A.2a)
   ========================================================================== */

/* Outer Container (1200px max-width, contained & centered) */
.quizt-shop-container {
  max-width: 1200px;
  margin: 2rem auto 4rem auto;
  padding: 0 1.5rem;
  box-sizing: border-box;
  width: 100%;
}

@media (max-width: 767px) {
  .quizt-shop-container {
    padding-left: 0;
    padding-right: 0;
    margin: 1rem auto 3rem auto;
  }
}


/* Shop Header & Intro */
.quizt-shop-header {
  margin-bottom: 2rem;
}

.quizt-shop-title,
.woocommerce-products-header__title.page-title {
  font-size: 2.25rem !important;
  font-weight: 800 !important;
  color: #1b1a17 !important;
  margin: 0 0 0.75rem 0 !important;
  line-height: 1.2 !important;
}

.quizt-shop-header .term-description,
.quizt-shop-header .page-description,
.woocommerce-products-header .page-description {
  font-size: 1rem !important;
  line-height: 1.6 !important;
  color: #4b5563 !important;
  max-width: 800px;
  margin-bottom: 1.5rem;
}

/* ==========================================================================
   Quizt AJAX Filter Bar (P2A.2b)
   ========================================================================== */

.quizt-filter-container {
  background: #f9fafb !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 12px !important;
  padding: 1.25rem !important;
  margin-bottom: 2rem !important;
  box-sizing: border-box !important;
}

/* Mobile Toggle: Hidden on desktop */
.quizt-filter-mobile-toggle {
  display: none !important;
}

.quizt-filter-form {
  display: block !important;
}

.quizt-filter-row {
  display: flex !important;
  align-items: flex-end !important;
  flex-wrap: wrap !important;
  gap: 1rem !important;
}

.quizt-filter-field {
  flex: 1 1 150px !important;
  min-width: 120px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 0.375rem !important;
}

.quizt-filter-field--search {
  flex: 1.4 1 200px !important;
}

.quizt-filter-label {
  font-size: 0.75rem !important;
  font-weight: 700 !important;
  color: #4b5563 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.04em !important;
  margin: 0 !important;
}

.quizt-filter-input,
.quizt-filter-select {
  width: 100% !important;
  height: 40px !important;
  padding: 0 0.75rem !important;
  background-color: #ffffff !important;
  border: 1px solid #d1d5db !important;
  border-radius: 8px !important;
  font-size: 0.875rem !important;
  color: #1b1a17 !important;
  outline: none !important;
  transition: border-color 0.15s ease, box-shadow 0.15s ease !important;
  box-sizing: border-box !important;
}

.quizt-filter-input:focus,
.quizt-filter-select:focus {
  border-color: #ff5f00 !important;
  box-shadow: 0 0 0 3px rgba(255, 95, 0, 0.12) !important;
}

.quizt-filter-select option:disabled {
  color: #9ca3af !important;
  background-color: #f9fafb !important;
}


.quizt-filter-actions {
  display: flex !important;
  align-items: center !important;
  gap: 0.75rem !important;
  padding-bottom: 1px !important;
}

.quizt-filter-submit-btn {
  display: none !important;
}

.quizt-filter-reset-btn {
  display: inline-flex !important;
  align-items: center !important;
  height: 40px !important;
  padding: 0 1rem !important;
  background: #ffffff !important;
  color: #4b5563 !important;
  border: 1px solid #d1d5db !important;
  border-radius: 8px !important;
  font-size: 0.8125rem !important;
  font-weight: 600 !important;
  text-decoration: none !important;
  cursor: pointer !important;
  white-space: nowrap !important;
  transition: all 0.15s ease !important;
  box-sizing: border-box !important;
}

.quizt-filter-reset-btn:hover {
  background: #f3f4f6 !important;
  color: #ff5f00 !important;
  border-color: #ff5f00 !important;
}

/* Mobile accordion responsive styles */
@media (max-width: 768px) {
  .quizt-filter-container {
    padding: 0.75rem !important;
    border-radius: 10px !important;
    margin-bottom: 1.5rem !important;
  }

  .quizt-filter-mobile-toggle {
    display: block !important;
  }

  .quizt-filter-toggle-btn {
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.5rem !important;
    padding: 0.75rem 1rem !important;
    background: #ffffff !important;
    border: 1px solid #d1d5db !important;
    border-radius: 8px !important;
    font-size: 0.9375rem !important;
    font-weight: 700 !important;
    color: #1b1a17 !important;
    cursor: pointer !important;
  }

  .quizt-filter-toggle-btn:focus-visible {
    outline: 2px solid #ff5f00 !important;
    outline-offset: 2px !important;
  }

  .quizt-filter-toggle-icon,
  .quizt-filter-toggle-icon svg {
    width: 16px !important;
    height: 16px !important;
    display: block !important;
    fill: currentColor !important;
  }

  .quizt-filter-active-indicator {
    width: 8px !important;
    height: 8px !important;
    background: #ff5f00 !important;
    border-radius: 50% !important;
    display: inline-block !important;
  }

  .quizt-filter-form {
    display: none !important;
    padding-top: 1rem !important;
    margin-top: 0.75rem !important;
    border-top: 1px solid #e5e7eb !important;
  }

  .quizt-filter-form.is-expanded {
    display: block !important;
  }

  .quizt-filter-row {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.75rem !important;
  }

  .quizt-filter-field {
    width: 100% !important;
    flex: none !important;
  }

  .quizt-filter-actions {
    margin-top: 0.5rem !important;
    width: 100% !important;
  }

  .quizt-filter-reset-btn {
    width: 100% !important;
    justify-content: center !important;
  }
}

/* Shop Results Container (P2A.2b AJAX filter) */
.quizt-shop-results {
  width: 100%;
  transition: opacity 0.2s ease !important;
  position: relative !important;
}

.quizt-shop-results.is-loading {
  opacity: 0.45 !important;
  pointer-events: none !important;
}

/* Shop Toolbar (Result count + Ordering) */
.quizt-shop-toolbar {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 1rem !important;
  margin-bottom: 2rem !important;
  padding-bottom: 1rem !important;
  border-bottom: 1px solid #e5e7eb !important;
}

.quizt-shop-result-count,
.woocommerce-result-count {
  font-size: 0.9375rem !important;
  color: #6b7280 !important;
  margin: 0 !important;
  float: none !important;
}

.quizt-shop-ordering,
.woocommerce-ordering {
  margin: 0 !important;
  float: none !important;
}

.woocommerce-ordering select.orderby {
  background-color: #ffffff !important;
  border: 1px solid #d1d5db !important;
  border-radius: 8px !important;
  padding: 8px 14px !important;
  font-size: 0.9375rem !important;
  color: #1b1a17 !important;
  cursor: pointer !important;
  outline: none !important;
  transition: border-color 0.15s ease !important;
}

.woocommerce-ordering select.orderby:focus {
  border-color: #ff5f00 !important;
}

/* Structural reset for WooCommerce classic float & clear rules */
.woocommerce ul.products::before,
.woocommerce ul.products::after,
.woocommerce-page ul.products::before,
.woocommerce-page ul.products::after {
  display: none !important;
}

/* 4-column Product Grid (Desktop: 4, Tablet: 2, Mobile: 1) */
.quizt-product-grid,
.quizt-products-grid,
.woocommerce ul.products,
.woocommerce-page ul.products {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 24px !important;
  list-style: none !important;
  padding: 0 !important;
  margin: 24px 0 40px 0 !important;
  clear: both !important;
  box-sizing: border-box !important;
}

@media (max-width: 1023px) {
  .quizt-product-grid,
  .quizt-products-grid,
  .woocommerce ul.products,
  .woocommerce-page ul.products {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 20px !important;
  }
}

@media (max-width: 639px) {
  .quizt-product-grid,
  .quizt-products-grid,
  .woocommerce ul.products,
  .woocommerce-page ul.products {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
}

/* Reusable Product Card (.quizt-product-card) */
.quizt-product-card,
.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product {
  float: none !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  clear: none !important;
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
  box-sizing: border-box !important;
  background-color: #ffffff !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 10px !important;
  padding: 16px !important;
  position: relative !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease !important;
}

.quizt-product-card:hover,
.woocommerce ul.products li.product:hover,
.woocommerce-page ul.products li.product:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06) !important;
  border-color: #ff5f00 !important;
}

/* Card Thumbnail (1:1 square aspect ratio) */
.quizt-product-card__thumbnail {
  position: relative !important;
  width: 100% !important;
  aspect-ratio: 1 / 1 !important;
  border-radius: 8px !important;
  overflow: hidden !important;
  margin-bottom: 14px !important;
  background-color: #f9fafb !important;
}

.quizt-product-card__image-link {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  text-decoration: none !important;
}

.quizt-product-card__image-link img,
.quizt-product-card__image,
.woocommerce ul.products li.product img,
.woocommerce-page ul.products li.product img {
  width: 100% !important;
  height: 100% !important;
  aspect-ratio: 1 / 1 !important;
  object-fit: cover !important;
  display: block !important;
  border-radius: 8px !important;
  transition: transform 0.25s ease !important;
}

.quizt-product-card:hover .quizt-product-card__image-link img,
.quizt-product-card:hover .quizt-product-card__image,
.woocommerce ul.products li.product:hover img,
.woocommerce-page ul.products li.product:hover img {
  transform: scale(1.02) !important;
}

/* Discount Badge (-XX%, top-left, orange background, compact) */
.quizt-product-card__badge,
.quizt-product-card span.onsale,
.woocommerce ul.products li.product span.onsale,
.woocommerce-page ul.products li.product span.onsale {
  position: absolute !important;
  top: 10px !important;
  left: 10px !important;
  right: auto !important;
  margin: 0 !important;
  min-height: 0 !important;
  min-width: 0 !important;
  background-color: #ff5f00 !important;
  color: #ffffff !important;
  font-size: 0.8125rem !important; /* 13px */
  font-weight: 700 !important;
  padding: 4px 8px !important;
  border-radius: 6px !important;
  line-height: 1 !important;
  letter-spacing: 0.02em !important;
  z-index: 5 !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12) !important;
  pointer-events: none !important;
}

/* Suppress obsolete SmilePure badges in loop */
.tm-product-badges,
.product-badges .ppt {
  display: none !important;
}

/* PowerPoint Badge on Product Cards (P2A.2b - Bottom-Left of thumbnail) */
.quizt-product-card__badge--ppt,
.quizt-product-card__thumbnail .ppt {
  position: absolute !important;
  bottom: 10px !important;
  left: 10px !important;
  top: auto !important;
  right: auto !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  background-color: rgba(27, 26, 23, 0.88) !important;
  color: #ffffff !important;
  font-size: 0.6875rem !important; /* 11px */
  font-weight: 700 !important;
  line-height: 1 !important;
  letter-spacing: 0.04em !important;
  text-transform: uppercase !important;
  padding: 4px 7px !important;
  border-radius: 4px !important;
  z-index: 4 !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) !important;
  pointer-events: none !important;
}

.quizt-product-card__badge--ppt .quizt-badge-svg,
.quizt-product-card__badge--ppt svg {
  width: 14px !important;
  height: 14px !important;
  display: block !important;
  fill: currentColor !important;
}

/* Card Content Area (Flex layout ensures bottom alignment) */
.quizt-product-card__content {
  display: flex !important;
  flex-direction: column !important;
  flex-grow: 1 !important;
}

/* Product Title (Max 2 lines, clean typography, accessible) */
.quizt-product-card__title,
.woocommerce ul.products li.product .woocommerce-loop-product__title,
.woocommerce-page ul.products li.product .woocommerce-loop-product__title {
  font-size: 1.0625rem !important; /* 17px */
  font-weight: 700 !important;
  line-height: 1.35 !important;
  color: #1b1a17 !important;
  margin: 0 0 8px 0 !important;
  padding: 0 !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
  min-height: 2.7em !important;
  transition: color 0.15s ease !important;
}

.quizt-product-card__title a,
.woocommerce ul.products li.product .woocommerce-loop-product__title a,
.woocommerce-page ul.products li.product .woocommerce-loop-product__title a {
  color: #1b1a17 !important;
  text-decoration: none !important;
  transition: color 0.15s ease !important;
}

.quizt-product-card:hover .quizt-product-card__title a,
.woocommerce ul.products li.product:hover .woocommerce-loop-product__title a {
  color: #ff5f00 !important;
}

/* Card Meta Items (P2A.2b - Compact, calm dark grey, flexible) */
.quizt-product-card__meta {
  display: flex !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 8px 12px !important;
  margin: 0 0 10px 0 !important;
  min-height: 1.25rem !important;
}

.quizt-product-card__meta-item {
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  font-size: 0.8125rem !important; /* 13px */
  color: #4b5563 !important; /* Calm dark grey */
  font-weight: 500 !important;
  line-height: 1.2 !important;
}

.quizt-product-card__meta-icon,
.quizt-product-card__meta-icon svg,
.quizt-meta-svg {
  width: 14px !important;
  height: 14px !important;
  display: block !important;
  color: #6b7280 !important;
  fill: currentColor !important;
}

.quizt-product-card__meta-label {
  display: inline !important;
}

/* Price (Bold orange, strikethrough regular price) */
.quizt-product-card__price,
.quizt-product-card .price,
.woocommerce ul.products li.product .price,
.woocommerce-page ul.products li.product .price {
  font-size: 1.125rem !important; /* 18px */
  font-weight: 700 !important;
  color: #ff5f00 !important;
  margin: 0 0 16px 0 !important;
  display: flex !important;
  align-items: baseline !important;
  flex-wrap: wrap !important;
  gap: 6px !important;
  line-height: 1.3 !important;
}

.quizt-product-card__price del,
.quizt-product-card .price del,
.woocommerce ul.products li.product .price del,
.woocommerce-page ul.products li.product .price del {
  color: #9ca3af !important;
  font-size: 0.9375rem !important;
  font-weight: 400 !important;
  text-decoration: line-through !important;
}

.quizt-product-card__price ins,
.quizt-product-card .price ins,
.woocommerce ul.products li.product .price ins,
.woocommerce-page ul.products li.product .price ins {
  color: #ff5f00 !important;
  font-weight: 800 !important;
  text-decoration: none !important;
}

/* Action / Add to Cart Button (Bottom-aligned) */
.quizt-product-card__action {
  margin-top: auto !important;
  width: 100% !important;
}

.quizt-product-card__btn,
.woocommerce ul.products li.product .button,
.woocommerce-page ul.products li.product .button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  width: 100% !important;
  background-color: #ff5f00 !important;
  color: #ffffff !important;
  font-size: 0.9375rem !important; /* 15px */
  font-weight: 700 !important;
  line-height: 1.3 !important;
  padding: 11px 16px !important;
  border-radius: 8px !important;
  border: none !important;
  text-decoration: none !important;
  box-sizing: border-box !important;
  cursor: pointer !important;
  margin-top: auto !important;
  transition: background-color 0.15s ease, transform 0.15s ease !important;
}

.quizt-product-card__btn:hover,
.quizt-product-card__btn:active,
.woocommerce ul.products li.product .button:hover,
.woocommerce-page ul.products li.product .button:hover {
  background-color: #e55500 !important;
  color: #ffffff !important;
}

.quizt-product-card__btn svg.quizt-btn-cart,
.quizt-product-card__btn svg.quizt-btn-icon,
.woocommerce ul.products li.product .button svg.quizt-btn-cart,
.woocommerce ul.products li.product .button svg.quizt-btn-icon {
  width: 16px !important;
  height: 16px !important;
  fill: currentColor !important;
  flex-shrink: 0 !important;
  transition: transform 0.15s ease !important;
}

.quizt-product-card__btn:hover svg.quizt-btn-cart,
.quizt-product-card__btn:hover svg.quizt-btn-icon,
.quizt-product-card__btn:active svg.quizt-btn-cart,
.quizt-product-card__btn:active svg.quizt-btn-icon,
.woocommerce ul.products li.product .button:hover svg.quizt-btn-cart,
.woocommerce ul.products li.product .button:hover svg.quizt-btn-icon {
  transform: translateX(3px) !important;
}

/* Shop Pagination */
.quizt-shop-pagination,
.woocommerce-pagination {
  display: flex !important;
  justify-content: center !important;
  margin: 3rem 0 2rem 0 !important;
  clear: both !important;
}

.quizt-shop-pagination ul.page-numbers,
.woocommerce-pagination ul.page-numbers {
  display: flex !important;
  gap: 6px !important;
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
}

.quizt-shop-pagination ul.page-numbers li,
.woocommerce-pagination ul.page-numbers li {
  border: none !important;
  margin: 0 !important;
  padding: 0 !important;
  float: none !important;
}

.quizt-shop-pagination ul.page-numbers li span.current,
.woocommerce-pagination ul.page-numbers li span.current {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 40px !important;
  height: 40px !important;
  padding: 0 12px !important;
  background-color: #ff5f00 !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  border-radius: 8px !important;
  border: none !important;
}

.quizt-shop-pagination ul.page-numbers li a,
.woocommerce-pagination ul.page-numbers li a {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 40px !important;
  height: 40px !important;
  padding: 0 12px !important;
  background-color: #ffffff !important;
  color: #1b1a17 !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 8px !important;
  text-decoration: none !important;
  font-weight: 600 !important;
  transition: all 0.15s ease !important;
}

.quizt-shop-pagination ul.page-numbers li a:hover,
.woocommerce-pagination ul.page-numbers li a:hover {
  border-color: #ff5f00 !important;
  color: #ff5f00 !important;
  background-color: #ffffff !important;
}

/* ==========================================================================
   2. Single Product Page Centered Container & Main Layout
   ========================================================================== */

/* Outer container: single product layout container (delegated to .container) */
.single-product .site-main,
.single-product .content-area {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.single-product div.product.quizt-single-product-container,
.single-product div.product {
  max-width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  box-sizing: border-box;
}


/* 2-column top row: Gallery (left) & Summary (right) */
.quizt-product-main-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px;
  align-items: start;
  margin-top: 24px;
  margin-bottom: 40px;
}

@media (max-width: 860px) {
  .quizt-product-main-row {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

/* Gallery column */
.quizt-product-gallery-col {
  width: 100%;
  position: relative;
}

.quizt-product-gallery-col .woocommerce-product-gallery {
  width: 100% !important;
  float: none !important;
  margin: 0 !important;
  position: relative;
}

/* Product Gallery without zoom or lightbox */
.woocommerce-product-gallery__trigger {
  display: none !important;
}

.quizt-product-gallery-col .woocommerce-product-gallery .woocommerce-product-gallery__image a {
  pointer-events: none !important;
  cursor: default !important;
}

.quizt-product-gallery-col .woocommerce-product-gallery img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1px solid var(--quizt-color-gray-200, #e9ecef);
  box-sizing: border-box;
  cursor: default !important;
}

.quizt-product-gallery-col span.onsale {
  position: absolute !important;
  top: 16px !important;
  left: 16px !important;
  right: auto !important;
  margin: 0 !important;
  min-height: 0 !important;
  min-width: 0 !important;
  background-color: var(--quizt-color-primary, #ff5f00) !important;
  color: #ffffff !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  padding: 6px 12px !important;
  border-radius: 4px !important;
  line-height: 1 !important;
  letter-spacing: 0.5px !important;
  z-index: 10 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Summary column */
.quizt-product-summary-col.summary.entry-summary {
  width: 100% !important;
  float: none !important;
  margin: 0 !important;
}

/* Title */
.single-product .product_title {
  font-size: 2.1rem;
  font-weight: 800;
  color: var(--quizt-color-black, #1b1a17);
  line-height: 1.25;
  margin: 0 0 6px 0;
}

@media (max-width: 639px) {
  .single-product .product_title {
    font-size: 1.65rem;
  }
}

/* Google Reviews Trust Bar under Title */
.reviews-g.quizt-product-reviews-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  margin-bottom: 16px;
  font-size: 0.92rem;
  color: #4b5563;
}

.quizt-product-reviews-stars {
  display: block;
  flex-shrink: 0;
}

.quizt-product-reviews-text a {
  color: #4b5563;
  text-decoration: underline;
  transition: color 0.2s;
}

.quizt-product-reviews-text a:hover {
  color: var(--quizt-color-primary, #ff5f00);
}

/* Scoped Summary Main Price (Simple Products) */
.single-product .summary > .price,
.single-product .summary > p.price {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--quizt-color-black, #1b1a17);
  margin: 0 0 16px 0;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
}

.single-product .summary > .price del,
.single-product .summary > p.price del {
  color: #9ca3af;
  font-size: 1.2rem;
  font-weight: 400;
  text-decoration: line-through;
}

.single-product .summary > .price ins,
.single-product .summary > p.price ins {
  color: var(--quizt-color-primary, #ff5f00);
  font-size: 1.85rem;
  font-weight: 800;
  text-decoration: none;
}

/* Short Description (includes PowerPoint notice) */
.single-product .woocommerce-product-details__short-description {
  margin: 12px 0 18px 0;
  color: #374151;
  font-size: 0.98rem;
  line-height: 1.55;
}

.single-product .woocommerce-product-details__short-description p {
  margin: 0;
}

/* ==========================================================================
   3. Frequently Bought Together (WPC FBT)
   ========================================================================== */

/* Completely hide empty FBT containers to prevent empty grey bars */
.woobt-wrap:empty,
.woobt-wrap:not(:has(.woobt-product)) {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  background: transparent !important;
}

/* Style active FBT containers with items */
.woobt-wrap:has(.woobt-product) {
  background-color: #fafbfc !important;
  border: 1px solid var(--quizt-color-gray-200, #e9ecef) !important;
  border-radius: 8px !important;
  padding: 18px !important;
  margin: 20px 0 !important;
}

.woobt-products {
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
  margin-bottom: 14px !important;
}

.woobt-product {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  font-size: 0.92rem !important;
}

.woobt-product input[type="checkbox"] {
  accent-color: var(--quizt-color-primary, #ff5f00);
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.woobt-product .woobt-thumb img {
  width: 46px !important;
  height: 46px !important;
  aspect-ratio: 1 / 1 !important;
  object-fit: cover !important;
  border-radius: 4px !important;
}

.woobt-product .woobt-title {
  font-weight: 600;
  color: var(--quizt-color-black, #1b1a17);
}

.woobt-product .woobt-price {
  font-weight: 700;
  color: var(--quizt-color-primary, #ff5f00);
  margin-left: auto;
}

.woobt-total {
  padding-top: 14px !important;
  border-top: 1px solid var(--quizt-color-gray-200, #e9ecef) !important;
  font-size: 1.05rem !important;
  font-weight: 800 !important;
  color: var(--quizt-color-black, #1b1a17) !important;
}

/* ==========================================================================
   4. Cart Form, Buttons & Quantity Handling
   ========================================================================== */

.single-product div.product form.cart {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
}

/* Hide empty or hidden quantity inputs */
.single-product div.product form.cart .quantity:has(input[type="hidden"]:only-child),
.single-product div.product form.cart .quantity.hidden,
.single-product div.product.sold-individually form.cart .quantity {
  display: none !important;
}

.single-product div.product .single_add_to_cart_button {
  background-color: var(--quizt-color-primary, #ff5f00) !important;
  color: #ffffff !important;
  font-size: 1.05rem !important;
  font-weight: 800 !important;
  padding: 13px 32px !important;
  border-radius: 8px !important;
  border: none !important;
  cursor: pointer;
  line-height: 1.4 !important;
  transition: background-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.single-product div.product .single_add_to_cart_button:hover {
  background-color: #e55500 !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(255, 95, 0, 0.3);
}

.single-product div.product .single_add_to_cart_button:focus-visible {
  outline: 2px solid var(--quizt-color-black, #1b1a17) !important;
  outline-offset: 2px !important;
}

/* Single product order buttons with cart icon */
.single-product div.product .single_add_to_cart_button,
.quizt-bottom-cta-container .single_add_to_cart_button,
.quizt-bottom-cta-container .quizt-bottom-cta-button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px;
  min-width: 220px;
  text-align: center;
}

.single_add_to_cart_button .quizt-btn-cart-icon,
.single_add_to_cart_button .quizt-btn-icon,
.quizt-bottom-cta-button .quizt-btn-cart-icon,
.quizt-bottom-cta-button .quizt-btn-icon {
  width: 16px;
  height: 16px;
  fill: currentColor;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.single_add_to_cart_button:hover .quizt-btn-cart-icon,
.single_add_to_cart_button:hover .quizt-btn-icon,
.single_add_to_cart_button:active .quizt-btn-cart-icon,
.single_add_to_cart_button:active .quizt-btn-icon,
.quizt-bottom-cta-button:hover .quizt-btn-cart-icon,
.quizt-bottom-cta-button:hover .quizt-btn-icon,
.quizt-bottom-cta-button:active .quizt-btn-cart-icon,
.quizt-bottom-cta-button:active .quizt-btn-icon {
  transform: translateX(3px);
}

@media (max-width: 639px) {
  .single-product div.product .single_add_to_cart_button,
  .quizt-bottom-cta-container .single_add_to_cart_button,
  .quizt-bottom-cta-container .quizt-bottom-cta-button {
    width: 100% !important;
    text-align: center !important;
    justify-content: center !important;
  }
}

/* Bottom Add-to-Cart Call-to-Action - Left-aligned on same content line as description */
.quizt-bottom-cta-container {
  display: flex !important;
  justify-content: flex-start !important;
  align-items: center !important;
  margin: 28px 0 36px 0 !important;
  padding: 0 !important;
  width: 100% !important;
}

.quizt-bottom-cta-container form.cart,
.quizt-bottom-cta-container .quizt-bottom-add-to-cart-form {
  display: flex !important;
  justify-content: flex-start !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  background: transparent !important;
  width: auto;
}

@media (max-width: 639px) {
  .quizt-bottom-cta-container,
  .quizt-bottom-cta-container form.cart,
  .quizt-bottom-cta-container .quizt-bottom-add-to-cart-form {
    width: 100% !important;
  }
}

/* ==========================================================================
   Subscription Presentation (Product 4119 & 4125)
   ========================================================================== */

/* Subscription Price Table */
table#price-table.quizt-price-table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0 12px 0;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--quizt-color-gray-200, #e9ecef);
}

table#price-table.quizt-price-table th {
  background-color: var(--quizt-color-gray-100, #f8f9fa);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 10px 14px;
  text-align: left;
  border-bottom: 2px solid var(--quizt-color-gray-200, #e9ecef);
  color: var(--quizt-color-black, #1b1a17);
}

table#price-table.quizt-price-table td {
  padding: 10px 14px;
  font-size: 0.92rem;
  border-bottom: 1px solid var(--quizt-color-gray-200, #e9ecef);
  color: var(--quizt-color-black, #1b1a17);
}

table#price-table.quizt-price-table tr:hover {
  background-color: #fffaf7;
}

table#price-table.quizt-price-table .besparing-excl,
table#price-table.quizt-price-table .besparing-incl {
  color: #16a34a;
  font-weight: 700;
}

/* Mobile table responsiveness */
@media (max-width: 639px) {
  table#price-table.quizt-price-table {
    display: table;
    width: 100%;
    font-size: 0.85rem;
  }

  table#price-table.quizt-price-table th,
  table#price-table.quizt-price-table td {
    padding: 8px 10px;
    font-size: 0.84rem;
  }
}

/* VAT toggle checkbox */
label[for="toggle-vat"] {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: #6b7280;
  cursor: pointer;
  margin-bottom: 18px;
}

label[for="toggle-vat"] input[type="checkbox"] {
  accent-color: var(--quizt-color-primary, #ff5f00);
  cursor: pointer;
  width: 16px;
  height: 16px;
}

/* Variation buttons (CAP-31 from quizt-core) */
.quizt-variation-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 18px 0;
}

.quizt-variation-button {
  background-color: #ffffff;
  border: 2px solid var(--quizt-color-gray-300, #dee2e6);
  border-radius: 6px;
  padding: 8px 18px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--quizt-color-black, #1b1a17);
  cursor: pointer;
  transition: all 0.2s ease;
}

.quizt-variation-button:hover {
  border-color: var(--quizt-color-primary, #ff5f00);
  color: var(--quizt-color-primary, #ff5f00);
}

.quizt-variation-button.active {
  border-color: var(--quizt-color-primary, #ff5f00);
  background-color: var(--quizt-color-orange-light, #ffeee4);
  color: var(--quizt-color-primary, #ff5f00);
  font-weight: 700;
}

/* Variation Price Container & Subscription Notice */
.single-product .summary .woocommerce-variation-price {
  margin: 14px 0 16px 0 !important;
  font-size: 1rem !important;
  font-weight: 400 !important;
  color: #374151 !important;
  line-height: 1.55 !important;
}

.single-product .summary .woocommerce-variation-price .price {
  font-size: 1rem !important;
  font-weight: 400 !important;
  color: #374151 !important;
  display: block !important;
  margin: 0 !important;
  line-height: 1.55 !important;
}

.quizt-sub-notice-wrapper {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.95rem;
  font-weight: 400;
  color: #1b1a17;
  line-height: 1.5;
}

.quizt-sub-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 0.95rem;
  font-weight: 400;
  color: #1b1a17;
  line-height: 1.5;
}

.quizt-sub-icon {
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--quizt-color-primary, #ff5f00);
}

.quizt-sub-icon svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.quizt-sub-highlight {
  font-weight: 700;
  color: var(--quizt-color-primary, #ff5f00);
}

.quizt-sub-highlight.quizt-sub-price bdi,
.quizt-sub-highlight.quizt-sub-signup bdi,
.quizt-sub-highlight .amount {
  font-weight: 700;
  color: var(--quizt-color-primary, #ff5f00);
}

.quizt-sub-tax {
  font-weight: 400;
  color: #6b7280;
  font-size: 0.9em;
}

/* First payment date under subscription button */
.first-payment-date {
  margin: 10px 0 16px 0 !important;
  font-size: 0.88rem !important;
  color: #6b7280 !important;
  line-height: 1.4 !important;
}

.first-payment-date small {
  font-size: 0.88rem !important;
  color: #6b7280 !important;
}

/* ==========================================================================
   5. Product Meta: WhatsApp, Difficulty & USPs
   ========================================================================== */

.quizt-product-meta {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--quizt-color-gray-200, #e9ecef);
}

/* WhatsApp Direct Contact Link */
.quizt-product-whatsapp {
  margin: 0 0 14px 0;
}

.quizt-product-whatsapp .wa-btn-text {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--quizt-color-black, #1b1a17);
  font-size: 0.94rem;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s;
}

.quizt-product-whatsapp .wa-btn-text u {
  text-decoration: underline;
  font-weight: 700;
}

.quizt-product-whatsapp .wa-btn-text:hover {
  color: #25d366;
}

/* Difficulty Rating (Peppers & Tooltip) - Restored from legacy style.css */
.difficulty-rating {
  margin-top: 10px;
  margin-bottom: 18px;
}

.difficulty-rating .difficulty-content {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.difficulty-rating .difficulty-label {
  font-weight: 700;
  font-size: 14px;
  color: var(--quizt-color-black, #1b1a17);
  margin-right: 2px;
}

.difficulty-rating .peppers {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.difficulty-rating .pepper {
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

.difficulty-rating .quizt-pepper-svg {
  width: 15px;
  height: 15px;
  display: block;
}

.difficulty-rating .full-pepper .quizt-pepper-svg {
  color: #e74c3c;
  fill: #e74c3c;
}

.difficulty-rating .empty-pepper .quizt-pepper-svg {
  color: #dddddd;
  fill: #dddddd;
}

.difficulty-rating .tooltip-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  font-size: 16px;
}

.difficulty-rating .tooltip-icon .tooltip-text {
  visibility: hidden;
  width: 220px;
  background-color: #333333;
  color: #ffffff;
  text-align: center;
  border-radius: 6px;
  padding: 6px 10px;
  position: absolute;
  z-index: 100;
  bottom: 125%;
  left: 50%;
  margin-left: -110px;
  opacity: 0;
  transition: opacity 0.3s ease;
  font-size: 13px;
  line-height: 1.35;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.difficulty-rating .tooltip-icon .tooltip-text::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: #333333 transparent transparent transparent;
}

.difficulty-rating .tooltip-icon:hover .tooltip-text,
.difficulty-rating .tooltip-icon:focus .tooltip-text {
  visibility: visible;
  opacity: 1;
}

/* Quizt USP Checklist - Sleek orange SVG check */
.pubquiz-usp {
  margin: 16px 0 20px 0;
  padding-top: 14px;
  border-top: 1px solid var(--quizt-color-gray-200, #e9ecef);
}

.pubquiz-usp .quizt-usp-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pubquiz-usp .quizt-usp-item {
  position: relative;
  display: flex;
  align-items: flex-start;
  font-size: 0.94rem;
  color: #374151;
  line-height: 1.5;
  margin: 0;
  padding: 0 !important;
}

.pubquiz-usp .quizt-usp-item-header {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
}

.pubquiz-usp .quizt-usp-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  color: var(--quizt-color-primary, #ff5f00);
}

.pubquiz-usp .quizt-usp-icon svg,
.pubquiz-usp .quizt-check-svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.pubquiz-usp .quizt-usp-content {
  flex: 1;
}

.pubquiz-usp .quizt-usp-item b {
  font-weight: 700;
  color: var(--quizt-color-black, #1b1a17);
}

.quizt-usp-scroll-link {
  color: var(--quizt-color-primary, #ff5f00);
  font-weight: 600;
  text-decoration: underline;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color 0.2s;
}

.quizt-usp-scroll-link:hover {
  color: #e55500;
}

.quizt-usp-arrow-icon {
  display: inline-block;
  vertical-align: middle;
}

/* Categories & Hiding Tags */
.single-product .posted_in {
  font-size: 0.88rem;
  color: #6b7280;
  margin-top: 12px;
  display: block;
}

.single-product .posted_in h6 {
  display: inline;
  font-size: 0.88rem;
  font-weight: 700;
  margin: 0 4px 0 0;
  color: var(--quizt-color-black, #1b1a17);
}

.single-product .posted_in a {
  color: var(--quizt-color-black, #1b1a17);
  text-decoration: underline;
}

.single-product .posted_in a:hover {
  color: var(--quizt-color-primary, #ff5f00);
}

/* Always hide product tags on single product page */
.single-product .tagged_as {
  display: none !important;
}

/* ==========================================================================
   6. After Summary Section: Tabs, Bottom CTA & Related Quizzes
   ========================================================================== */

.quizt-product-after-summary {
  width: 100%;
  margin-top: 24px;
}

/* Tabs Section */
.woocommerce-tabs.wc-tabs-wrapper {
  width: 100%;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--quizt-color-gray-200, #e9ecef);
}

.woocommerce-tabs ul.wc-tabs {
  display: flex;
  gap: 24px;
  list-style: none;
  padding: 0;
  margin: 0 0 24px 0;
  border-bottom: 2px solid var(--quizt-color-gray-200, #e9ecef);
}

.woocommerce-tabs ul.wc-tabs li {
  margin: 0;
}

.woocommerce-tabs ul.wc-tabs li a {
  display: block;
  padding: 10px 4px;
  font-size: 1.05rem;
  font-weight: 600;
  color: #6b7280;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.woocommerce-tabs ul.wc-tabs li.active a {
  color: var(--quizt-color-primary, #ff5f00);
  border-bottom-color: var(--quizt-color-primary, #ff5f00);
  font-weight: 700;
}

.woocommerce-tabs ul.wc-tabs li a:hover {
  color: var(--quizt-color-primary, #ff5f00);
}

.woocommerce-tabs .woocommerce-Tabs-panel {
  color: #374151;
  font-size: 0.98rem;
  line-height: 1.7;
}

/* Suppress duplicate H2 Beschrijving if rendered anywhere inside tab */
.woocommerce-tabs #tab-description > h2:first-child {
  display: none !important;
}

/* Try Before You Buy (TBYB) Notice in Description Tab */
.quizt-tbyb-notice {
  margin-bottom: 24px;
}

.quizt-tbyb-inner {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 10px 16px;
  background-color: #ffeee4;
  border: 1px solid rgba(255, 95, 0, 0.25);
  border-radius: 8px;
  max-width: 100%;
}

.quizt-tbyb-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--quizt-color-primary, #ff5f00);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.quizt-tbyb-link {
  font-size: 14px;
  font-weight: 700;
  color: var(--quizt-color-black, #1b1a17);
  text-decoration: underline;
  transition: color 0.15s ease;
}

.quizt-tbyb-link:hover {
  color: var(--quizt-color-primary, #ff5f00);
}

.quizt-tbyb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 14px;
  background-color: var(--quizt-color-primary, #ff5f00);
  color: #ffffff !important;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  line-height: 1.2;
  transition: background-color 0.15s ease;
}

.quizt-tbyb-btn:hover {
  background-color: #e05300;
}

@media (max-width: 540px) {
  .quizt-tbyb-inner {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
  }
}
/* Related Products Section */
section.related.products,
.quizt-related-products {
  width: 100%;
  margin-top: 40px;
  padding-top: 32px;
  padding-left: 0 !important;
  padding-right: 0 !important;
  border-top: 1px solid var(--quizt-color-gray-200, #e9ecef);
}


section.related.products > h2,
.quizt-related-products > h2 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--quizt-color-black, #1b1a17);
  margin-bottom: 24px;
}

/* Clean 4-col (desktop) / 2-col (tablet) / 1-col (mobile) grid */
.quizt-related-products .quizt-products-grid,
.related.products ul.products {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 24px !important;
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

@media (max-width: 960px) {
  .quizt-related-products .quizt-products-grid,
  .related.products ul.products {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 16px !important;
  }
}

@media (max-width: 540px) {
  .quizt-related-products .quizt-products-grid,
  .related.products ul.products {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
}
