/*
 * SCHOOLY single product page.
 * One scoped source of truth for product-page visuals.
 * WooCommerce owns the gallery/FlexSlider/zoom behavior.
 */

body.single-product {
  --sp-page: #eef4fc;
  --sp-card: #ffffff;
  --sp-soft: #f5f8fd;
  --sp-line: #d8e4f3;
  --sp-line-soft: #edf3fa;
  --sp-ink: #061a3f;
  --sp-text: #465a78;
  --sp-muted: #7c8da7;
  --sp-blue: #1550ac;
  --sp-blue-dark: #0b347a;
  --sp-blue-soft: #edf4ff;
  --sp-red: #be123c;
  --sp-green: #1550ac;
  --sp-radius-lg: 16px;
  --sp-radius: 10px;
  --sp-radius-sm: 8px;
  --sp-shadow: 0 16px 42px rgba(15, 43, 91, .10);
  --sp-shadow-soft: 0 8px 22px rgba(15, 43, 91, .07);
  --sp-control-h: 46px;
  --sp-gallery-h: clamp(430px, 43vw, 560px);
}

body.single-product .schooly-shop-page {
  background: var(--sp-page) !important;
}

body.single-product .woocommerce div.product,
body.single-product div.product {
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

body.single-product .sp-product-row {
  row-gap: 24px !important;
  align-items: stretch !important;
}

body.single-product .sp-gallery-col {
  display: flex !important;
  flex-direction: column !important;
}

body.single-product .woocommerce div.product div.images,
body.single-product div.product div.images,
body.single-product .woocommerce div.product .summary.entry-summary,
body.single-product div.product .summary.entry-summary,
body.single-product .woocommerce div.product .woocommerce-tabs,
body.single-product div.product .woocommerce-tabs {
  border: 1px solid var(--sp-line) !important;
  border-radius: var(--sp-radius-lg) !important;
  background: var(--sp-card) !important;
  box-shadow: var(--sp-shadow) !important;
}

/* Gallery */
body.single-product .sp-gallery-col {
  position: relative !important;
}

body.single-product .schooly-gallery-frame {
  position: relative;
  width: 100%;
}

@media (min-width: 992px) {
  body.single-product .sp-gallery-col {
    position: sticky !important;
    top: 90px !important;
  }
}

body.single-product .woocommerce div.product div.images,
body.single-product div.product div.images {
  float: none !important;
  width: 100% !important;
  max-width: 100% !important;
  flex: 1 1 auto !important;
  margin: 0 !important;
  padding: 12px !important;
  overflow: visible !important;
  position: relative !important;
}

body.single-product .woocommerce-product-gallery {
  display: flex !important;
  flex-direction: row !important;
  align-items: stretch !important;
  gap: 12px !important;
  width: 100% !important;
  margin: 0 !important;
  position: relative !important;
}

body.single-product .woocommerce-product-gallery .flex-viewport {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  order: 2 !important;
  border-radius: var(--sp-radius) !important;
  background: var(--sp-soft) !important;
  box-shadow: inset 0 0 0 1px rgba(216, 228, 243, .85) !important;
  overflow: hidden !important;
  cursor: zoom-in !important;
}

body.single-product .woocommerce-product-gallery .woocommerce-product-gallery__image,
body.single-product .woocommerce-product-gallery .woocommerce-product-gallery__image > a {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: var(--sp-gallery-h) !important;
  background: var(--sp-soft) !important;
  line-height: 0 !important;
}

body.single-product .woocommerce-product-gallery .flex-viewport img:not(.zoomImg) {
  display: block !important;
  width: 100% !important;
  height: var(--sp-gallery-h) !important;
  padding: 0 !important;
  margin: 0 !important;
  object-fit: contain !important;
  object-position: center !important;
  background: var(--sp-soft) !important;
  border-radius: 0 !important;
  transition: none !important;
  transform: none !important;
}

body.single-product .woocommerce-product-gallery .flex-viewport img.zoomImg {
  width: auto !important;
  height: auto !important;
  max-width: none !important;
  max-height: none !important;
  padding: 0 !important;
  margin: 0 !important;
  object-fit: unset !important;
  background: transparent !important;
  border-radius: 0 !important;
  transition: none !important;
  transform: none !important;
}

body.single-product .woocommerce-product-gallery .flex-control-thumbs {
  order: 1 !important;
  width: 58px !important;
  max-height: var(--sp-gallery-h) !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  flex: 0 0 58px !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  list-style: none !important;
  scrollbar-width: thin !important;
  scrollbar-color: var(--sp-line) transparent !important;
}

body.single-product .woocommerce-product-gallery .flex-control-thumbs li {
  width: 58px !important;
  height: 58px !important;
  flex: 0 0 58px !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  border-radius: var(--sp-radius-sm) !important;
}

body.single-product .woocommerce-product-gallery .flex-control-thumbs li img {
  display: block !important;
  width: 58px !important;
  height: 58px !important;
  padding: 4px !important;
  border: 1px solid var(--sp-line) !important;
  border-radius: var(--sp-radius-sm) !important;
  background: #fbfdff !important;
  object-fit: contain !important;
  opacity: .72 !important;
  cursor: pointer !important;
  transition: border-color .16s ease, box-shadow .16s ease, opacity .16s ease !important;
}

body.single-product .woocommerce-product-gallery .flex-control-thumbs li img:hover,
body.single-product .woocommerce-product-gallery .flex-control-thumbs li img.flex-active {
  border-color: var(--sp-blue) !important;
  box-shadow: 0 0 0 3px rgba(21, 80, 172, .13) !important;
  opacity: 1 !important;
}

body.single-product .woocommerce-product-gallery__trigger {
  top: 12px !important;
  left: 18px !important;
  right: auto !important;
  inset-inline-start: auto !important;
  inset-inline-end: auto !important;
  width: 38px !important;
  height: 38px !important;
  border: 1px solid var(--sp-line) !important;
  border-radius: 50% !important;
  background: rgba(255, 255, 255, .96) !important;
  box-shadow: var(--sp-shadow-soft) !important;
  z-index: 5 !important;
}

body.single-product .woocommerce-product-gallery__trigger span {
  font-size: .95rem !important;
}

body.single-product .schooly-virtual-fitting-button {
  position: absolute;
  right: 12px;
  left: 12px;
  bottom: 12px;
  z-index: 8;
  width: auto;
  min-height: 58px;
  margin: 0;
  padding: 0 18px;
  border: 0;
  border-radius: 0 0 18px 18px;
  background: rgba(233, 240, 255, .96);
  color: #2f64d6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  font-family: Cairo, Arial, sans-serif;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  box-shadow: 0 14px 26px rgba(15, 23, 42, .12);
  backdrop-filter: blur(8px);
}

body.single-product .schooly-virtual-fitting-button i:first-child {
  font-size: 28px;
}

body.single-product .schooly-virtual-fitting-button i:last-child {
  font-size: 24px;
}

body.single-product .schooly-virtual-fitting-button span {
  flex: 1;
  text-align: right;
}

body.single-product .schooly-virtual-fitting-button:hover,
body.single-product .schooly-virtual-fitting-button:focus-visible {
  background: #dce8ff;
  color: #1f56c9;
  outline: none;
}

@media (max-width: 575px) {
  body.single-product .schooly-virtual-fitting-button {
    right: 10px;
    left: 10px;
    bottom: 10px;
    min-height: 50px;
    padding: 0 14px;
    border-radius: 0 0 14px 14px;
    font-size: 17px;
    gap: 10px;
  }

  body.single-product .schooly-virtual-fitting-button i:first-child,
  body.single-product .schooly-virtual-fitting-button i:last-child {
    font-size: 20px;
  }
}

/* ── Sale badge shared style ── */
body.single-product .woocommerce span.onsale,
body.single-product span.onsale,
body.single-product .schooly-badge {
  min-width: 0 !important;
  min-height: 0 !important;
  padding: 6px 14px !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: var(--sp-red) !important;
  color: #fff !important;
  font-size: .76rem !important;
  font-weight: 900 !important;
  line-height: 1.25 !important;
  box-shadow: 0 6px 18px rgba(190, 18, 60, .28) !important;
}

/* Badge: top of main image on the LEFT side (away from thumbnails on the right)
   In RTL: inset-inline-end = physical LEFT = main image area */
body.single-product .sp-gallery-col > span.onsale,
body.single-product div.product div.images > span.onsale,
body.single-product .woocommerce-product-gallery span.onsale {
  position: absolute !important;
  top: 62px !important;          /* Below the zoom trigger (38px tall at top:24px) */
  inset-inline-end: 22px !important;   /* RTL: physical LEFT = main image side */
  inset-inline-start: auto !important;
  left: auto !important;
  right: auto !important;
  z-index: 9 !important;
}

/* Summary */
body.single-product .woocommerce div.product .summary.entry-summary,
body.single-product div.product .summary.entry-summary {
  float: none !important;
  clear: none !important;
  width: 100% !important;
  max-width: 100% !important;
  min-height: 100% !important;
  margin: 0 !important;
  padding: clamp(22px, 2.2vw, 30px) !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 14px !important;
}

body.single-product .woocommerce div.product .product_title,
body.single-product div.product .product_title {
  margin: 0 !important;
  padding: 0 !important;
  color: var(--sp-ink) !important;
  font-size: clamp(1.35rem, 2vw, 1.85rem) !important;
  line-height: 1.3 !important;
  font-weight: 900 !important;
  letter-spacing: 0 !important;
}

body.single-product .schooly-product-codes {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: -2px 0 18px;
}

body.single-product .schooly-product-codes span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 7px 12px;
  border: 1px solid #dbe4f0;
  border-radius: 8px;
  background: #f8fafc;
  color: #1f2937;
  font-size: 13px;
  font-weight: 800;
}

body.single-product .schooly-product-codes strong {
  color: #64748b;
  font-weight: 800;
}

/* Stock alerts (single product) */
body.single-product .schooly-stock-alert {
  margin: 0 !important;
  padding: 12px 14px !important;
  border-radius: 14px !important;
  border: 1px solid #fecaca !important;
  background: #fff1f2 !important;
  color: #991b1b !important;
  display: flex;
  gap: 10px !important;
  align-items: flex-start !important;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transform: translateY(-10px);
  margin-bottom: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  border-color: transparent !important;
  pointer-events: none;
  transition:
    max-height .38s cubic-bezier(.22, .61, .36, 1),
    opacity .28s ease,
    transform .38s cubic-bezier(.22, .61, .36, 1),
    margin .38s ease,
    padding .38s ease,
    border-color .28s ease;
}

body.single-product .schooly-stock-alert.is-visible {
  max-height: 140px;
  opacity: 1;
  transform: translateY(0);
  margin-bottom: 12px !important;
  padding: 12px 14px !important;
  border-color: #fecaca !important;
  pointer-events: auto;
}

body.single-product .schooly-stock-alert.is-hidden {
  display: none !important;
}

@media (prefers-reduced-motion: reduce) {
  body.single-product .schooly-stock-alert {
    transition-duration: .01ms !important;
  }
}

body.single-product .schooly-stock-alert i {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #fee2e2;
  color: #b91c1c;
  flex: 0 0 auto;
  margin-top: 1px;
}

body.single-product .schooly-stock-alert__body strong {
  display: block;
  font-weight: 900;
  color: #7f1d1d;
  margin-bottom: 2px;
}

body.single-product .schooly-stock-alert__body span {
  display: block;
  font-size: 13px;
  line-height: 1.7;
  color: #9f1239;
}

body.single-product .woocommerce div.product p.price,
body.single-product .woocommerce div.product span.price,
body.single-product div.product p.price,
body.single-product div.product span.price {
  margin: 0 !important;
  padding: 0 !important;
  color: var(--sp-blue) !important;
  font-size: clamp(1.18rem, 1.55vw, 1.45rem) !important;
  line-height: 1.25 !important;
  font-weight: 900 !important;
  letter-spacing: 0 !important;
}

body.single-product .woocommerce div.product p.price ins,
body.single-product .woocommerce div.product span.price ins,
body.single-product div.product p.price ins,
body.single-product div.product span.price ins {
  color: var(--sp-blue) !important;
  text-decoration: none !important;
}

body.single-product .woocommerce div.product p.price del,
body.single-product .woocommerce div.product span.price del,
body.single-product div.product p.price del,
body.single-product div.product span.price del {
  color: #6b7fa3 !important;
  font-size: .92em !important;
  font-weight: 800 !important;
  opacity: .82 !important;
}

body.single-product .woocommerce-product-details__short-description {
  margin: 0 !important;
  padding: 0 !important;
  max-width: 62ch !important;
  color: var(--sp-text) !important;
  font-size: .92rem !important;
  line-height: 1.75 !important;
}

body.single-product .schooly-single-catalog-meta {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px 12px !important;
  margin: 0 0 14px !important;
  padding: 12px 14px !important;
  border: 1px solid #dbe3ef !important;
  border-radius: 12px !important;
  background: #f8fafc !important;
}

body.single-product .schooly-single-catalog-meta__item {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 6px 10px !important;
  border-radius: 999px !important;
  background: #fff !important;
  border: 1px solid #e2e8f0 !important;
  color: #334155 !important;
  font-size: 13px !important;
  line-height: 1.4 !important;
}

body.single-product .schooly-single-catalog-meta__item strong {
  color: #0f172a !important;
  font-weight: 700 !important;
}

body.single-product .woocommerce-product-rating {
  display: flex !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  margin: 0 !important;
}

body.single-product .woocommerce .star-rating,
body.single-product .star-rating {
  color: #f59e0b !important;
}

body.single-product .woocommerce div.product .stock {
  align-self: flex-start !important;
  margin: 0 !important;
  padding: 5px 11px !important;
  border-radius: 999px !important;
  background: #edf4ff !important;
  color: var(--sp-green) !important;
  font-size: .78rem !important;
  font-weight: 800 !important;
}

body.single-product .woocommerce div.product .stock.out-of-stock {
  background: #fff1f2 !important;
  color: var(--sp-red) !important;
}

/* Variations and add to cart */
body.single-product .woocommerce div.product form.cart,
body.single-product div.product form.cart {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 12px !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

body.single-product .woocommerce div.product form.cart table.variations,
body.single-product div.product form.cart table.variations {
  display: block !important;
  width: 100% !important;
  margin: 0 !important;
  border: 0 !important;
  border-collapse: collapse !important;
}

body.single-product .woocommerce div.product form.cart table.variations tbody,
body.single-product div.product form.cart table.variations tbody {
  display: grid !important;
  gap: 9px !important;
}

body.single-product .woocommerce div.product form.cart table.variations tr,
body.single-product div.product form.cart table.variations tr {
  display: grid !important;
  grid-template-columns: 126px minmax(180px, 300px) !important;
  justify-content: start !important;
  align-items: center !important;
  gap: 12px !important;
}

body.single-product .woocommerce div.product form.cart table.variations th,
body.single-product .woocommerce div.product form.cart table.variations td,
body.single-product div.product form.cart table.variations th,
body.single-product div.product form.cart table.variations td {
  display: block !important;
  width: auto !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}

body.single-product .woocommerce div.product form.cart table.variations label {
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  color: var(--sp-ink) !important;
  font-size: .84rem !important;
  font-weight: 900 !important;
  white-space: nowrap !important;
}

body.single-product .woocommerce div.product form.cart table.variations select,
body.single-product div.product form.cart table.variations select {
  width: 100% !important;
  max-width: 300px !important;
  height: 40px !important;
  min-height: 40px !important;
  padding: 0 12px !important;
  border: 1px solid var(--sp-line) !important;
  border-radius: var(--sp-radius-sm) !important;
  background: #fbfdff !important;
  color: var(--sp-ink) !important;
  font-size: .9rem !important;
  font-weight: 700 !important;
  box-shadow: 0 2px 8px rgba(15, 43, 91, .035) !important;
  appearance: auto !important;
}

body.single-product .woocommerce div.product form.cart table.variations select:focus {
  border-color: var(--sp-blue) !important;
  box-shadow: 0 0 0 3px rgba(21, 80, 172, .12) !important;
  outline: 0 !important;
}

body.single-product .woocommerce div.product .reset_variations {
  display: inline-flex !important;
  margin-top: 6px !important;
  color: var(--sp-muted) !important;
  font-size: .78rem !important;
  font-weight: 700 !important;
  text-decoration: none !important;
}

body.single-product .woocommerce div.product form.cart .single_variation_wrap,
body.single-product div.product form.cart .single_variation_wrap {
  width: 100% !important;
}

body.single-product .woocommerce div.product form.cart .woocommerce-variation-add-to-cart,
body.single-product div.product form.cart .woocommerce-variation-add-to-cart {
  display: flex !important;
  flex-direction: row !important;
  align-items: stretch !important;
  gap: 12px !important;
  justify-content: start !important;
  width: 100% !important;
  max-width: 100% !important;
  margin-top: 4px !important;
}

body.single-product .woocommerce div.product form.cart:not(.variations_form) {
  display: flex !important;
  flex-direction: row !important;
  align-items: stretch !important;
  justify-content: start !important;
  gap: 12px !important;
}

body.single-product form.cart div.quantity,
body.single-product div.quantity.sp-qty-wrapper {
  width: 96px !important;
  height: var(--sp-control-h) !important;
  min-width: 96px !important;
  flex-shrink: 0 !important;
  display: flex !important;
  align-items: stretch !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  border: 1px solid var(--sp-line) !important;
  border-radius: var(--sp-radius) !important;
  background: linear-gradient(180deg, #fff 0%, #f8fbff 100%) !important;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.8), 0 7px 18px rgba(15, 43, 91, .06) !important;
}

body.single-product div.quantity.sp-qty-wrapper .sp-qty-btn {
  width: 30px !important;
  height: 100% !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border: 0 !important;
  background: transparent !important;
  color: var(--sp-ink) !important;
  font-size: 1rem !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  cursor: pointer !important;
}

body.single-product div.quantity.sp-qty-wrapper .sp-qty-btn:hover {
  background: var(--sp-blue-soft) !important;
  color: var(--sp-blue) !important;
}

body.single-product form.cart div.quantity input.qty,
body.single-product div.quantity.sp-qty-wrapper input.qty {
  flex: 1 1 auto !important;
  width: 36px !important;
  height: 100% !important;
  min-height: 0 !important;
  padding: 0 3px !important;
  border: 0 !important;
  border-inline: 1px solid var(--sp-line) !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: var(--sp-ink) !important;
  font-size: .95rem !important;
  font-weight: 900 !important;
  text-align: center !important;
  box-shadow: none !important;
  -moz-appearance: textfield !important;
  appearance: textfield !important;
}

body.single-product div.quantity.sp-qty-wrapper input.qty::-webkit-inner-spin-button,
body.single-product div.quantity.sp-qty-wrapper input.qty::-webkit-outer-spin-button {
  -webkit-appearance: none !important;
}

body.single-product .woocommerce div.product form.cart .single_add_to_cart_button,
body.single-product div.product form.cart .single_add_to_cart_button {
  flex: 0 1 210px !important;
  width: 210px !important;
  min-width: 180px !important;
  height: var(--sp-control-h) !important;
  min-height: var(--sp-control-h) !important;
  padding: 0 22px !important;
  border: 0 !important;
  border-radius: var(--sp-radius) !important;
  background: var(--sp-blue) !important;
  color: #fff !important;
  font-size: .95rem !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  letter-spacing: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 9px 20px rgba(21, 80, 172, .22) !important;
  cursor: pointer !important;
  transition: background .16s ease, box-shadow .16s ease, transform .16s ease !important;
}

body.single-product .woocommerce div.product form.cart .single_add_to_cart_button:hover {
  background: var(--sp-blue-dark) !important;
  box-shadow: 0 12px 24px rgba(21, 80, 172, .28) !important;
  transform: translateY(-1px) !important;
}

body.single-product .woocommerce div.product form.cart .single_add_to_cart_button.loading,
body.single-product .woocommerce div.product form.cart .single_add_to_cart_button.disabled,
body.single-product .woocommerce div.product form.cart .single_add_to_cart_button:disabled {
  opacity: .62 !important;
  cursor: not-allowed !important;
  transform: none !important;
  box-shadow: none !important;
}

body.single-product .schooly-wishlist-button--single {
  width: 160px !important;
  max-width: 100% !important;
  flex: 0 0 160px !important;
  align-self: flex-start !important;
  height: var(--sp-control-h) !important;
  min-height: var(--sp-control-h) !important;
  margin: 0 !important;
  padding: 0 18px !important;
  border: 1px solid #f3b8c7 !important;
  border-radius: var(--sp-radius) !important;
  background: #fff8fa !important;
  color: var(--sp-red) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 9px !important;
  font-size: .92rem !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  box-shadow: 0 3px 10px rgba(190, 18, 60, .06) !important;
  cursor: pointer !important;
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease, transform .16s ease !important;
}

body.single-product .schooly-wishlist-button--single i {
  color: var(--sp-red) !important;
  font-size: 1rem !important;
}

body.single-product .schooly-wishlist-button--single.is-wishlisted i,
body.single-product .schooly-wishlist-button--single.is-active i {
  color: var(--sp-red) !important;
}

body.single-product .schooly-wishlist-button--single:hover,
body.single-product .schooly-wishlist-button--single.is-active,
body.single-product .schooly-wishlist-button--single.is-wishlisted {
  border-color: var(--sp-red) !important;
  background: #fff1f5 !important;
  box-shadow: 0 8px 18px rgba(190, 18, 60, .12) !important;
  transform: translateY(-1px) !important;
}

body.single-product .wishlist-btn .fa-heart,
body.single-product .box-icon .fa-heart,
body.single-product .schooly-wishlist-button .fa-heart {
  color: var(--sp-red) !important;
}

/* ── "عرض السلة" / View Cart link (WooCommerce adds after AJAX cart add) ── */
body.single-product .woocommerce div.product form.cart a.added_to_cart,
body.single-product div.product form.cart a.added_to_cart,
body.single-product a.added_to_cart.wc-forward {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: var(--sp-control-h) !important;
  min-height: var(--sp-control-h) !important;
  padding: 0 18px !important;
  border: 1.5px solid var(--sp-blue) !important;
  border-radius: var(--sp-radius) !important;
  background: transparent !important;
  color: var(--sp-blue) !important;
  font-size: .88rem !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  text-decoration: none !important;
  white-space: nowrap !important;
  cursor: pointer !important;
  transition: background .16s ease, color .16s ease, box-shadow .16s ease !important;
}

body.single-product a.added_to_cart.wc-forward:hover {
  background: var(--sp-blue-soft) !important;
  box-shadow: 0 4px 14px rgba(21, 80, 172, .14) !important;
}

/* Features intentionally sit below add-to-cart and wishlist buttons. */
body.single-product .schooly-single-features {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 9px !important;
  margin: 0 !important;
}

body.single-product .schooly-single-feature {
  min-height: 40px !important;
  padding: 8px 11px !important;
  border: 1px solid var(--sp-line-soft) !important;
  border-radius: var(--sp-radius-sm) !important;
  background: #f8fbff !important;
  color: var(--sp-ink) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 8px !important;
  font-size: .82rem !important;
  font-weight: 800 !important;
}

body.single-product .schooly-single-feature i {
  color: var(--sp-blue) !important;
  font-size: .88rem !important;
}

body.single-product .woocommerce div.product .product_meta {
  margin: 0 !important;
  padding-top: 12px !important;
  border-top: 1px solid var(--sp-line-soft) !important;
  color: var(--sp-muted) !important;
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 7px 14px !important;
  font-size: .82rem !important;
  line-height: 1.7 !important;
}

body.single-product .woocommerce div.product .product_meta > span {
  display: inline-flex !important;
  gap: 5px !important;
  margin: 0 !important;
}

body.single-product .woocommerce div.product .product_meta a {
  color: var(--sp-ink) !important;
  font-weight: 700 !important;
  text-decoration: none !important;
}

/* Notices, tabs, related products */
body.single-product .woocommerce-message,
body.single-product .woocommerce-info,
body.single-product .woocommerce-error {
  margin-bottom: 18px !important;
  padding: 12px 16px !important;
  border: 0 !important;
  border-radius: var(--sp-radius) !important;
  background: var(--sp-card) !important;
  box-shadow: var(--sp-shadow-soft) !important;
}

body.single-product .woocommerce div.product .woocommerce-tabs,
body.single-product div.product .woocommerce-tabs {
  clear: both !important;
  margin-top: 24px !important;
}

body.single-product .woocommerce div.product .woocommerce-tabs .panel,
body.single-product div.product .woocommerce-tabs .panel {
  margin: 0 !important;
  color: var(--sp-text) !important;
  line-height: 1.85 !important;
}

body.single-product .woocommerce table.shop_attributes {
  border: 1px solid var(--sp-line) !important;
  border-radius: var(--sp-radius) !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  overflow: hidden !important;
}

body.single-product .woocommerce table.shop_attributes th,
body.single-product .woocommerce table.shop_attributes td {
  padding: 12px 14px !important;
  border-color: var(--sp-line-soft) !important;
}

body.single-product .related.products,
body.single-product .upsells.products {
  clear: both !important;
  margin-top: 28px !important;
}

body.single-product .related.products ul.products,
body.single-product .upsells.products ul.products {
  align-items: stretch !important;
}

body.single-product .related.products .schooly-product-card,
body.single-product .upsells.products .schooly-product-card {
  background: #ffffff !important;
}


body.single-product .related.products .schooly-product-card:hover,
body.single-product .upsells.products .schooly-product-card:hover {
  box-shadow: none !important;
}

body.single-product .related.products h2,
body.single-product .upsells.products h2 {
  margin-bottom: 18px !important;
  color: var(--sp-ink) !important;
  font-size: clamp(1.25rem, 2vw, 1.65rem) !important;
  font-weight: 900 !important;
}

@media (max-width: 991px) {
  body.single-product .woocommerce div.product .summary.entry-summary,
  body.single-product div.product .summary.entry-summary {
    padding: 22px !important;
  }

  body.single-product .woocommerce-product-gallery .woocommerce-product-gallery__image,
  body.single-product .woocommerce-product-gallery .woocommerce-product-gallery__image > a,
  body.single-product .woocommerce-product-gallery .flex-viewport img:not(.zoomImg) {
    min-height: clamp(340px, 72vw, 480px) !important;
    height: clamp(340px, 72vw, 480px) !important;
  }

  body.single-product .woocommerce-product-gallery .flex-control-thumbs {
    max-height: clamp(340px, 72vw, 480px) !important;
  }
}

@media (max-width: 767px) {
  body.single-product .woocommerce-product-gallery {
    flex-direction: column !important;
  }

  body.single-product .woocommerce-product-gallery .flex-control-thumbs {
    order: 2 !important;
    width: 100% !important;
    max-height: none !important;
    flex: 0 0 auto !important;
    flex-direction: row !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
  }

  body.single-product .woocommerce div.product form.cart table.variations tr,
  body.single-product div.product form.cart table.variations tr {
    grid-template-columns: 1fr !important;
    justify-content: stretch !important;
    gap: 6px !important;
  }

  body.single-product .woocommerce div.product form.cart table.variations select,
  body.single-product div.product form.cart table.variations select {
    max-width: 100% !important;
  }

  body.single-product .woocommerce div.product form.cart .woocommerce-variation-add-to-cart,
  body.single-product div.product form.cart .woocommerce-variation-add-to-cart,
  body.single-product .woocommerce div.product form.cart:not(.variations_form) {
    display: grid !important;
    grid-template-columns: 1fr !important;
  }

  body.single-product div.quantity.sp-qty-wrapper,
  body.single-product .woocommerce div.product form.cart div.quantity:not(.sp-qty-wrapper),
  body.single-product .woocommerce div.product form.cart .single_add_to_cart_button,
  body.single-product div.product form.cart .single_add_to_cart_button,
  body.single-product .woocommerce div.product form.cart .schooly-wishlist-button--single,
  body.single-product div.product form.cart .schooly-wishlist-button--single {
    width: 100% !important;
    min-width: 0 !important;
    flex: 0 0 auto !important;
  }

  body.single-product .schooly-single-features {
    grid-template-columns: 1fr !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.single-product *,
  body.single-product *::before,
  body.single-product *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* Tabs content polish: CSS only, WooCommerce tab logic remains untouched. */
@keyframes schoolyTabPanelIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes schoolyTabPanelOut {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(8px);
  }
}

body.single-product .woocommerce-tabs .panel.sp-panel-enter {
  animation: schoolyTabPanelIn .34s cubic-bezier(.22, .61, .36, 1) both !important;
}

body.single-product .woocommerce-tabs .panel.sp-panel-exit {
  animation: schoolyTabPanelOut .18s ease both !important;
}

body.single-product .woocommerce div.product .woocommerce-tabs,
body.single-product div.product .woocommerce-tabs {
  overflow: hidden !important;
  padding: 0 !important;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%) !important;
}

/* Tab bar header */
body.single-product .woocommerce div.product .woocommerce-tabs ul.tabs,
body.single-product div.product .woocommerce-tabs ul.tabs {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  justify-content: flex-start !important;
  align-items: center !important;
  gap: 6px !important;
  margin: 0 !important;
  padding: 16px 20px 0 !important;
  border: 0 !important;
  list-style: none !important;
  background: transparent !important;
  overflow: visible !important;
}

/* Kill all WooCommerce tab pseudo-elements that add spacing */
body.single-product .woocommerce div.product .woocommerce-tabs ul.tabs::before,
body.single-product div.product .woocommerce-tabs ul.tabs::before,
body.single-product .woocommerce div.product .woocommerce-tabs ul.tabs li::before,
body.single-product div.product .woocommerce-tabs ul.tabs li::before,
body.single-product .woocommerce div.product .woocommerce-tabs ul.tabs li::after,
body.single-product div.product .woocommerce-tabs ul.tabs li::after {
  display: none !important;
  content: none !important;
}

/* Separator line below tab row */
body.single-product .woocommerce div.product .woocommerce-tabs ul.tabs::after,
body.single-product div.product .woocommerce-tabs ul.tabs::after {
  content: "" !important;
  display: block !important;
  flex: 0 0 100% !important;
  height: 1px !important;
  margin-top: 12px !important;
  background: var(--sp-line) !important;
}

/* Tab <li> — must NOT grow/shrink */
body.single-product .woocommerce div.product .woocommerce-tabs ul.tabs li,
body.single-product div.product .woocommerce-tabs ul.tabs li {
  flex: 0 0 auto !important;
  width: auto !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  float: none !important;
  position: static !important;
}

/* Tab <a> pill */
body.single-product .woocommerce div.product .woocommerce-tabs ul.tabs li a,
body.single-product div.product .woocommerce-tabs ul.tabs li a {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  white-space: nowrap !important;
  min-height: 34px !important;
  padding: 5px 14px !important;
  border: 1px solid var(--sp-line) !important;
  border-radius: 999px !important;
  background: var(--sp-soft) !important;
  color: var(--sp-text) !important;
  font-size: .82rem !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  text-decoration: none !important;
  box-shadow: none !important;
  cursor: pointer !important;
  transition: background .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease !important;
}

body.single-product .woocommerce div.product .woocommerce-tabs ul.tabs li a i,
body.single-product div.product .woocommerce-tabs ul.tabs li a i {
  font-size: .78rem !important;
  flex-shrink: 0 !important;
}

/* Active tab */
body.single-product .woocommerce div.product .woocommerce-tabs ul.tabs li.active a,
body.single-product div.product .woocommerce-tabs ul.tabs li.active a {
  border-color: var(--sp-blue) !important;
  background: var(--sp-blue) !important;
  color: #fff !important;
  box-shadow: 0 4px 14px rgba(21, 80, 172, .22) !important;
}

/* Hover (non-active) */
body.single-product .woocommerce div.product .woocommerce-tabs ul.tabs li:not(.active) a:hover,
body.single-product div.product .woocommerce-tabs ul.tabs li:not(.active) a:hover {
  border-color: var(--sp-blue) !important;
  background: var(--sp-blue-soft) !important;
  color: var(--sp-blue) !important;
}

body.single-product .woocommerce div.product .woocommerce-tabs .panel,
body.single-product div.product .woocommerce-tabs .panel {
  padding: clamp(22px, 3vw, 34px) !important;
  color: var(--sp-text) !important;
  font-size: .95rem !important;
  line-height: 1.9 !important;
}

body.single-product .woocommerce div.product .woocommerce-tabs .panel > h2:first-child,
body.single-product div.product .woocommerce-tabs .panel > h2:first-child {
  margin: 0 0 14px !important;
  color: var(--sp-ink) !important;
  font-size: clamp(1.25rem, 2vw, 1.7rem) !important;
  line-height: 1.35 !important;
  font-weight: 900 !important;
}

body.single-product .woocommerce div.product .woocommerce-tabs .panel p,
body.single-product div.product .woocommerce-tabs .panel p {
  max-width: 78ch !important;
  margin: 0 0 13px !important;
}

body.single-product .woocommerce div.product .woocommerce-tabs .panel p:last-child,
body.single-product div.product .woocommerce-tabs .panel p:last-child {
  margin-bottom: 0 !important;
}

body.single-product .schooly-size-chart-content,
body.single-product .schooly-size-chart-content p {
  max-width: 100% !important;
}

body.single-product .schooly-size-chart-content img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  border-radius: 8px;
}

body.single-product .woocommerce div.product .woocommerce-tabs .panel ul,
body.single-product .woocommerce div.product .woocommerce-tabs .panel ol {
  max-width: 78ch !important;
  margin: 12px 0 0 !important;
  padding-inline-start: 22px !important;
}

body.single-product .woocommerce div.product .woocommerce-tabs .panel li {
  margin-bottom: 7px !important;
}

body.single-product .woocommerce table.shop_attributes {
  width: 100% !important;
  margin: 0 !important;
  overflow: hidden !important;
  border: 1px solid var(--sp-line) !important;
  border-radius: var(--sp-radius) !important;
  background: #fff !important;
}

body.single-product .woocommerce table.shop_attributes th,
body.single-product .woocommerce table.shop_attributes td {
  padding: 14px 16px !important;
  border-color: var(--sp-line-soft) !important;
  background: transparent !important;
  font-size: .9rem !important;
  line-height: 1.7 !important;
}

body.single-product .woocommerce table.shop_attributes th {
  width: 220px !important;
  color: var(--sp-ink) !important;
  font-weight: 900 !important;
}

body.single-product #reviews {
  display: grid !important;
  grid-template-columns: minmax(0, .9fr) minmax(320px, 1.1fr) !important;
  gap: 24px !important;
  align-items: start !important;
}

body.single-product #reviews #comments,
body.single-product #reviews #review_form_wrapper {
  min-width: 0 !important;
}

body.single-product #reviews #comments h2,
body.single-product #review_form #reply-title {
  margin: 0 0 12px !important;
  color: var(--sp-ink) !important;
  font-size: 1.15rem !important;
  font-weight: 900 !important;
}

body.single-product #reviews #comments ol.commentlist {
  margin: 0 !important;
  padding: 0 !important;
}

body.single-product #reviews #comments ol.commentlist li {
  margin: 0 0 12px !important;
  padding: 16px !important;
  border: 1px solid var(--sp-line-soft) !important;
  border-radius: var(--sp-radius) !important;
  background: #f8fbff !important;
}

body.single-product #reviews #comments ol.commentlist li img.avatar {
  width: 42px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: #fff !important;
}

body.single-product #reviews #comments ol.commentlist li .comment-text {
  margin-inline-start: 58px !important;
  padding: 0 !important;
  border: 0 !important;
}

body.single-product #review_form_wrapper {
  padding: 18px !important;
  border: 1px solid var(--sp-line-soft) !important;
  border-radius: var(--sp-radius) !important;
  background: #fff !important;
  box-shadow: var(--sp-shadow-soft) !important;
}

body.single-product #review_form #commentform {
  display: grid !important;
  gap: 12px !important;
}

body.single-product #review_form #commentform p {
  margin: 0 !important;
}

body.single-product #review_form #commentform label {
  margin-bottom: 6px !important;
  color: var(--sp-ink) !important;
  font-size: .85rem !important;
  font-weight: 800 !important;
}

body.single-product #review_form #respond textarea,
body.single-product #review_form #respond input[type="text"],
body.single-product #review_form #respond input[type="email"] {
  width: 100% !important;
  min-height: 44px !important;
  padding: 10px 12px !important;
  border: 1px solid var(--sp-line) !important;
  border-radius: var(--sp-radius-sm) !important;
  background: #f8fbff !important;
  color: var(--sp-ink) !important;
  box-shadow: none !important;
  outline: 0 !important;
}

body.single-product #review_form #respond textarea {
  min-height: 118px !important;
  resize: vertical !important;
}

body.single-product #review_form #respond textarea:focus,
body.single-product #review_form #respond input[type="text"]:focus,
body.single-product #review_form #respond input[type="email"]:focus {
  border-color: var(--sp-blue) !important;
  background: #fff !important;
  box-shadow: 0 0 0 3px rgba(21, 80, 172, .10) !important;
}

body.single-product #review_form #respond .form-submit input {
  min-height: 44px !important;
  padding: 0 22px !important;
  border: 0 !important;
  border-radius: var(--sp-radius-sm) !important;
  background: var(--sp-blue) !important;
  color: #fff !important;
  font-weight: 900 !important;
}

@media (max-width: 767px) {
  body.single-product .woocommerce div.product .woocommerce-tabs ul.tabs,
  body.single-product div.product .woocommerce-tabs ul.tabs {
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    padding: 14px 14px 0 !important;
    scrollbar-width: none !important;
  }

  body.single-product .woocommerce div.product .woocommerce-tabs ul.tabs::-webkit-scrollbar,
  body.single-product div.product .woocommerce-tabs ul.tabs::-webkit-scrollbar {
    display: none !important;
  }

  body.single-product .woocommerce div.product .woocommerce-tabs .panel,
  body.single-product div.product .woocommerce-tabs .panel {
    padding: 20px 16px !important;
  }

  body.single-product #reviews {
    grid-template-columns: 1fr !important;
  }

  body.single-product #reviews #comments ol.commentlist li .comment-text {
    margin-inline-start: 0 !important;
    margin-top: 10px !important;
  }
}
