/**
 * Single product page — gallery, details, tabs, reviews, sidebar bundle list,
 * also-like grid, seller profile, video lightbox, cart-blocked notice.
 * Conditionally enqueued on is_product() / single product.
 *
 * Note: .btn-add-cart and .btn-continue button styles live in base.css
 * because the cart drawer (which renders on every page) reuses them.
 */

/* BREADCRUMB */
.breadcrumb { max-width: 1340px; margin: 0 auto; padding: 36px 48px 16px; font-size: 11px; color: var(--charcoal); letter-spacing: 0.02em; }
.breadcrumb a { transition: color 0.15s; }
.breadcrumb a:hover { color: var(--ink); }
.breadcrumb .sep { margin: 0 6px; opacity: 0.4; }

/* PRODUCT HERO */
.product-hero { max-width: 1500px; margin: 0 auto; padding: 0 48px 56px; display: grid; grid-template-columns: 1.3fr 1fr; gap: 48px; align-items: start; animation: fadeUp 0.6s var(--ease-out) both; }
.product-gallery { display: grid; grid-template-columns: 84px 1fr; gap: 10px; align-items: stretch; }
/* height:0 + min-height:100% keeps the thumb column out of the row-height
 * calculation, so the square main image sets the height and a long gallery
 * scrolls inside the column instead of stretching (and cropping) the image. */
.product-thumbs { display: flex; flex-direction: column; gap: 8px; grid-row: 1; grid-column: 1; overflow-x: hidden; overflow-y: auto; scrollbar-width: none; height: 0; min-height: 100%; align-self: stretch; position: relative; }
.product-thumbs::-webkit-scrollbar { display: none; }
.thumb-more { width: 84px; height: 28px; display: flex; align-items: center; justify-content: center; color: var(--stone); font-size: 11px; cursor: pointer; transition: color 0.2s; margin-top: -4px; flex-shrink: 0; position: sticky; bottom: 0; background: var(--white, #fff); }
.thumb-more:hover { color: var(--ink); }
.product-main-image { max-width: 100%; aspect-ratio: 1/1; background: linear-gradient(145deg, #E8E0D8, #D4C8BC); border-radius: 8px; overflow: hidden; position: relative; grid-row: 1; grid-column: 2; align-self: stretch; }
.product-main-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* Creator-intro video block now uses the shared `.seller-welcome-video`
   markup from inc/vendor-video.php — styles live in assets/css/video-banner.css. */
.bundle-includes { padding-top: 28px; margin-top: 20px; grid-column: 1/-1; }
.gallery-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,0.85); backdrop-filter: blur(4px); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 14px; color: var(--ink); cursor: pointer; transition: all 0.2s var(--ease-out); z-index: 2; }
.gallery-nav:hover { background: #fff; box-shadow: var(--shadow-sm); }
.gallery-nav.prev { left: 12px; }
.gallery-nav.next { right: 12px; }
.product-thumb { width: 84px; height: 84px; border-radius: 6px; overflow: hidden; border: 2px solid transparent; cursor: pointer; transition: all 0.2s var(--ease-out); flex-shrink: 0; background: linear-gradient(145deg, #E0D8CC, #D0C8B8); }
.product-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.product-thumb.active { border-color: var(--ink); }
.product-thumb:hover { border-color: var(--dust); }

/* PRODUCT DETAILS */
.product-details { position: sticky; top: calc(var(--nav-h, 64px) + 24px); }
/* Wishlist heart docked to the top-right of the product-details column.
 * Reuses the .shop-product-wishlist visual language so the card-grid heart
 * and the single-product heart feel like the same control. */
.product-details-wishlist {
	position: absolute;
	top: 0;
	right: 0;
	z-index: 2;
}
.product-details-wishlist .shop-product-wishlist {
	position: static;
	opacity: 1;
	width: 44px;
	height: 44px;
	font-size: 18px;
	border: 1px solid #ECE7E0;
	background: #fff;
	box-shadow: 0 2px 8px rgba(28,26,24,0.06);
}
.product-details-wishlist .shop-product-wishlist:hover { color: var(--terra); transform: scale(1.05); border-color: var(--terra); }
.product-details-wishlist .shop-product-wishlist.is-active {
	background: var(--terra);
	color: #fff;
	border-color: var(--terra);
	box-shadow: 0 4px 14px rgba(196,115,90,0.3);
}
.product-details-wishlist .shop-product-wishlist.is-active:hover { background: var(--terra-hover); color: #fff; }

/* Tooltip — content is read from data-tip-add or data-tip-remove on the
 * button depending on current wishlist state, so the label flips
 * automatically without any JS. The tip floats above the heart so it never
 * collides with the page title or column edge. */
.product-details-wishlist .shop-product-wishlist {
	position: relative; /* anchor for ::after / ::before */
}
.product-details-wishlist .shop-product-wishlist::after {
	content: attr(data-tip-add);
	position: absolute;
	bottom: calc(100% + 10px);
	left: 50%;
	transform: translateX(-50%) translateY(4px);
	background: var(--ink, #1C1A18);
	color: #fff;
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	padding: 7px 12px;
	border-radius: 6px;
	white-space: nowrap;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.18s ease, transform 0.18s ease;
	box-shadow: 0 4px 14px rgba(28,26,24,0.18);
	z-index: 5;
}
.product-details-wishlist .shop-product-wishlist::before {
	content: '';
	position: absolute;
	bottom: calc(100% + 4px);
	left: 50%;
	transform: translateX(-50%) rotate(45deg);
	width: 8px;
	height: 8px;
	background: var(--ink, #1C1A18);
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.18s ease;
	z-index: 5;
}
.product-details-wishlist .shop-product-wishlist:hover::after,
.product-details-wishlist .shop-product-wishlist:focus-visible::after {
	opacity: 1;
	transform: translateX(-50%) translateY(1px);
}
.product-details-wishlist .shop-product-wishlist:hover::before,
.product-details-wishlist .shop-product-wishlist:focus-visible::before { opacity: 1; }
/* When the product is already saved, switch the tooltip label by overriding
 * the content with the data-tip-remove value. */
.product-details-wishlist .shop-product-wishlist.is-active::after { content: attr(data-tip-remove); }
.product-category { font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase; font-weight: 600; color: var(--mascot); margin-bottom: 8px; }
.product-title { font-family: 'Inter', sans-serif; font-size: 30px; font-weight: 700; letter-spacing: -0.05em; color: var(--charcoal); line-height: 1.1; margin-bottom: 6px; padding-right: 56px; }
.product-seller-link { font-size: 12px; color: var(--stone); margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.product-seller-link .seller-av { width: 22px; height: 22px; border-radius: 50%; background: var(--gold-light); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 10px; flex-shrink: 0; overflow: hidden; }
.product-seller-link .seller-av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.product-seller-link .seller-av i { color: var(--brown); }
.product-seller-link a { color: var(--mascot); font-weight: 500; transition: color 0.15s; }
.product-seller-link a:hover { color: var(--mascot); }
.product-price-display { font-size: 24px; font-weight: 600; color: var(--charcoal); margin-bottom: 4px; }
.product-price-display del { color: var(--stone); font-weight: 400; margin-right: 8px; opacity: 0.7; }
.product-price-display ins { text-decoration: none; }
.seller-welcome-video{ margin-bottom: 20px; }
/* 28px more room above the product video ("Meet the Creator" / preview). */
.product-details .seller-welcome-video { margin-top: 28px; }
.product-payment-note { font-size: 11px; color: var(--stone); margin-bottom: 16px; }
.product-stars { display: flex; align-items: center; gap: 3px; margin-bottom: 8px; } /* now sits above the title */
.product-stars .star { color: var(--gold); font-size: 14px; }
.product-stars .star.empty { color: var(--dust); }
.product-stars .review-count { font-size: 12px; color: var(--stone); margin-left: 6px; }
.product-actions { display: flex; flex-direction: column; gap: 8px; margin-bottom: 24px; }
.product-actions form.cart { margin: 0; }
/* 2.0: square cart buttons; add-to-cart hovers to dana-point (base.css keeps
 * the pill/charcoal defaults for the cart drawer). */
.product-actions .btn-add-cart,
.product-actions .single_add_to_cart_button { border-radius: 4px; padding: 16px 28px; box-shadow: 0 4px 16px rgba(28,26,24,0.22); }
.product-actions .btn-add-cart:hover,
.product-actions .single_add_to_cart_button:hover { background: var(--mascot); }
.product-actions .btn-continue { border-radius: 4px; }

/* CART BLOCKED NOTICE (own product / not purchasable / oos) */
.ts-cart-blocked {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--ivory);
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold);
  border-radius: 8px;
  font-size: 13px;
  color: var(--ink);
  line-height: 1.5;
  flex-wrap: wrap;
}
.ts-cart-blocked > i { font-size: 20px; color: var(--gold); flex-shrink: 0; }
.ts-cart-blocked > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ts-cart-blocked strong { font-weight: 600; color: var(--charcoal); }
.ts-cart-blocked span { color: var(--stone); font-size: 12.5px; }
.ts-cart-blocked .btn-continue { padding: 8px 16px; font-size: 12px; flex-shrink: 0; width: auto; }

/* DESCRIPTION */
.product-desc-wrap { margin-bottom: 24px; padding-top: 20px; }
.product-desc { font-size: 13.5px; color: var(--ink); line-height: 1.7; max-height: 96px; overflow: hidden; transition: max-height 0.4s var(--ease-out); }
.product-desc.expanded { max-height: none; }
.product-desc p { margin-bottom: 12px; }
.product-desc p:last-child { margin-bottom: 0; }
/* Seller formatting from the product editor. */
.product-desc ul, .product-desc ol { margin: 0 0 12px; padding-left: 20px; }
.product-desc ul { list-style: disc; }
.product-desc ol { list-style: decimal; }
.product-desc li { margin-bottom: 4px; }
.product-desc h2, .product-desc h3, .product-desc h4 { font-family: var(--ff-body); font-size: 15px; font-weight: 700; line-height: 1.4; margin: 16px 0 8px; }
.product-desc > :first-child { margin-top: 0; }
.product-desc strong, .product-desc b { font-weight: 700; }
.product-desc a { color: var(--mascot); text-decoration: underline; text-underline-offset: 2px; }
.read-more-btn { font-size: 12px; font-weight: 600; color: var(--gold); margin-top: 8px; display: flex; align-items: center; gap: 4px; cursor: pointer; transition: color 0.15s; background: none; border: none; padding: 0; font-family: var(--ff-body); }
.read-more-btn:hover { color: var(--brown); }
.read-more-btn .arrow { transition: transform 0.3s var(--ease-out); display: inline-block; }
.read-more-btn.open .arrow { transform: rotate(180deg); }
.read-more-btn .arrow.ri-arrow-down-s-line { transition: transform 0.3s var(--ease-out); }
.read-more-btn.open .arrow.ri-arrow-down-s-line { transform: rotate(180deg); }

/* TABS */
.product-tabs { margin-bottom: 24px; }
.tab-headers { display: flex; border-bottom: 1.5px solid var(--border); margin-bottom: 16px; }
.tab-header { padding: 10px 0; margin-right: 28px; font-size: 12px; font-weight: 500; letter-spacing: 0.04em; color: var(--stone); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1.5px; transition: all 0.2s; background: none; border-left: none; border-right: none; border-top: none; font-family: var(--ff-body); }
.tab-header.active { color: var(--ink); border-bottom-color: var(--ink); }
.tab-header:hover { color: var(--ink); }
.tab-content { display: none; }
.tab-content.active { display: block; }
/* Why It Matters + FAQ tabs (Parts 5 / 6 of the X-Sellerator listing). The
 * four tab labels stay on one row on phones — the row scrolls sideways. */
.tab-headers { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.tab-headers::-webkit-scrollbar { display: none; }
.tab-header { white-space: nowrap; flex-shrink: 0; background: none; border-top: 0; border-left: 0; border-right: 0; font-family: inherit; }
@media (max-width: 600px) { .tab-header { margin-right: 20px; } }
.tab-matters { font-size: 13.5px; line-height: 1.7; color: var(--ink); margin: 0; }
.tab-faq { display: flex; flex-direction: column; }
.tab-faq details { border-bottom: 1px solid var(--border); }
.tab-faq details:first-child { border-top: 1px solid var(--border); }
.tab-faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; font-size: 13.5px; font-weight: 600; color: var(--ink); }
.tab-faq summary::-webkit-details-marker { display: none; }
.tab-faq summary::after { content: "+"; font-size: 18px; font-weight: 400; color: var(--stone); line-height: 1; }
.tab-faq details[open] summary::after { content: "–"; }
.tab-faq details p { margin: 0 0 14px; font-size: 13px; line-height: 1.65; color: var(--ink); }
.tab-features { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 24px; }
.tab-feature { font-size: 12.5px; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.tab-feature .check { color: var(--sage); font-size: 13px; }

/* BUNDLE / ALSO-LIKE SIDEBAR LIST */
.bundle-includes-title { font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; font-weight: 600; color: var(--charcoal); margin-bottom: 14px; }
.bundle-includes-desc { font-size: 11px; color: var(--stone); margin-bottom: 14px; }
.bundle-item { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.bundle-item:last-child { border-bottom: none; }
.bundle-item-inner { display: flex; align-items: center; gap: 14px; flex: 1; min-width: 0; } /* lets long titles truncate instead of pushing the + button out */
.bundle-item-thumb { width: 56px; height: 56px; border-radius: 6px; background: linear-gradient(145deg, #E4DDD4, #D8CEC2); flex-shrink: 0; overflow: hidden; }
.bundle-item-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bundle-item-info { flex: 1; min-width: 0; }
.bundle-item-tag { font-size: 9px; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 600; color: var(--gold); margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bundle-item-name { font-size: 12.5px; font-weight: 500; color: var(--ink); line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bundle-item-price { font-size: 11px; color: var(--stone); margin-top: 1px; }
.bundle-item-price .original { text-decoration: line-through; opacity: 0.5; margin-right: 4px; }
.bundle-item-price .sale-badge { font-size: 9px; background: var(--terra-light); color: var(--terra); padding: 1px 6px; border-radius: 3px; font-weight: 600; margin-left: 4px; }
.bundle-item-add { width: 32px; height: 32px; border-radius: 50%; background: var(--charcoal); color: #fff; font-size: 16px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; cursor: pointer; transition: all 0.2s var(--ease-out); border: none; text-decoration: none; }
.bundle-item-add:hover { background: #333; transform: scale(1.08); color: #fff; }

/* REVIEWS */
.reviews-section { background: var(--white); border-top: 1px solid var(--border); padding: 56px 48px; }
.reviews-inner { max-width: 1000px; margin: 0 auto; }
.reviews-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; gap: 16px; flex-wrap: wrap; }
.reviews-title { font-family: 'Inter', sans-serif; font-size: 26px; font-weight: 700; letter-spacing: -0.05em; color: var(--charcoal); }
.reviews-title span { color: var(--gold); font-size: 14px; margin-left: 8px; letter-spacing: 1px; }
.btn-leave-review { background: transparent; color: var(--ink); border: 1.5px solid var(--border); border-radius: var(--radius-btn); padding: 9px 20px; font-size: 11px; font-weight: 500; letter-spacing: 0.04em; transition: all 0.2s var(--ease-out); cursor: pointer; font-family: var(--ff-body); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.btn-leave-review:hover { border-color: var(--ink); }
.reviews-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 28px; }
.review-card { background: var(--bg); border-radius: 12px; padding: 24px; transition: all 0.2s var(--ease-out); }
.review-card:hover { box-shadow: var(--shadow-sm); }
.review-stars { color: var(--gold); font-size: 12px; letter-spacing: 2px; margin-bottom: 10px; }
.review-text { font-size: 13px; color: var(--stone); line-height: 1.7; margin-bottom: 14px; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.review-author { display: flex; align-items: center; gap: 10px; }
.review-avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--gold-light); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 13px; flex-shrink: 0; overflow: hidden; color: var(--brown); }
.review-avatar img { width: 100%; height: 100%; object-fit: cover; }
.review-avatar i { font-size: 15px; line-height: 1; display: inline-flex; }
.review-name { font-size: 12px; font-weight: 500; color: var(--ink); }
.review-date { font-size: 10px; color: var(--dust); }
.reviews-load-more { text-align: center; }
.btn-load-more { font-size: 12px; font-weight: 500; color: var(--stone); display: inline-flex; align-items: center; gap: 6px; cursor: pointer; transition: color 0.2s; letter-spacing: 0.02em; background: none; border: none; font-family: var(--ff-body); text-decoration: none; }
.btn-load-more:hover { color: var(--ink); }
/* Empty-state — icon + headline + CTA, vertically stacked on a soft card. */
.reviews-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 48px 24px;
  /* background: var(--bg); */
  border: 1px dashed var(--border);
  border-radius: 16px;
  text-align: center;
}
.reviews-empty-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  /* background: var(--gold-light); */
  border: 1px solid var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  font-size: 28px;
}
.reviews-empty-icon i { display: inline-flex; line-height: 1; }
.reviews-empty-text {
  font-size: 14px;
  color: var(--stone);
  margin: 0;
  line-height: 1.6;
  max-width: 360px;
}
.reviews-empty-cta {
  background: var(--ink);
  color: #fff;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius-btn);
  padding: 10px 22px;
  font-family: var(--ff-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s var(--ease-out);
  text-decoration: none;
  margin-top: 4px;
}
.reviews-empty-cta:hover { background: var(--terra); border-color: var(--terra); transform: translateY(-1px); box-shadow: 0 4px 14px rgba(196,115,90,0.25); color: #fff; }
.reviews-empty-cta i { font-size: 14px; display: none; }

/* Read More toggle — JS injects the button after .review-text whenever the
 * content overflows the line-clamp. Adding .is-expanded to the card removes
 * the clamp so the full review reads. */
.review-card.is-expanded .review-text {
  -webkit-line-clamp: unset;
  line-clamp: unset;
  display: block;
  overflow: visible;
}
.review-readmore {
  background: none;
  border: none;
  padding: 0;
  margin: -6px 0 14px;
  font-family: var(--ff-body);
  font-size: 12px;
  font-weight: 600;
  color: var(--terra);
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: color 0.15s;
  align-self: flex-start;
  transform: translateY(-10px);
  margin-bottom: 0;
}
.review-readmore:hover { color: var(--terra-hover); }

/* Load More button — while the AJAX request is in flight the JS swaps the
 * chevron for a loader icon, which spins here, and the button dims. */
.btn-load-more.is-loading { opacity: 0.6; cursor: progress; }
.btn-load-more.is-loading i { animation: tsIconSpin 0.9s linear infinite; }

/* ── REVIEW MODAL ──
 * Centered overlay-style modal that holds the themed review form. Same
 * open/close conventions as the cart drawer: hidden by default, .is-open
 * activates pointer-events + visibility, and body.ts-modal-open locks scroll. */
.ts-review-modal {
  position: fixed;
  inset: 0;
  z-index: 1100;
  pointer-events: none;
  visibility: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.ts-review-modal.is-open { pointer-events: auto; visibility: visible; }
.ts-review-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(28, 26, 24, 0.55);
  opacity: 0;
  transition: opacity 0.25s var(--ease-out);
  cursor: pointer;
}
.ts-review-modal.is-open .ts-review-modal-overlay { opacity: 1; }
.ts-review-modal-panel {
  position: relative;
  width: 100%;
  max-width: 560px;
  max-height: calc(100vh - 48px);
  background: var(--white);
  border-radius: 18px;
  box-shadow: 0 24px 80px rgba(28,26,24,0.28);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: translateY(16px) scale(0.98);
  opacity: 0;
  transition: transform 0.3s var(--ease-out), opacity 0.25s var(--ease-out);
}
.ts-review-modal.is-open .ts-review-modal-panel { transform: translateY(0) scale(1); opacity: 1; }
.ts-review-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--ink);
  font-size: 18px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s var(--ease-out);
  z-index: 2;
}
.ts-review-modal-close:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.ts-review-modal-close i { line-height: 1; }
.ts-review-modal-header {
  padding: 16px 26px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  padding-right: 64px;
}
.ts-review-modal-title {
  font-family: var(--ff-display);
  font-size: 22px;
  font-weight: 400;
  color: var(--charcoal);
  line-height: 1.2;
  margin: 0 0 4px;
}
.ts-review-modal-intro { font-size: 13px; color: var(--stone); margin: 0; line-height: 1.55; }
.ts-review-modal-body { padding: 22px 26px 26px; overflow-y: auto; flex: 1; }

body.ts-review-modal-open { overflow: hidden; }

.ts-review-form-wrap { padding: 0; background: transparent; border: 0; box-shadow: none; }
.ts-review-form-title { font-family: var(--ff-display); font-size: 22px; font-weight: 400; color: var(--charcoal); margin: 0 0 6px; line-height: 1.2; }
.ts-review-intro { font-size: 13px; color: var(--stone); margin: 0 0 22px; line-height: 1.6; }
.ts-review-form { display: flex; flex-direction: column; gap: 18px; }
.ts-review-label { display: block; font-size: 11px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--charcoal); margin-bottom: 5px; }
.ts-review-req { color: var(--terra); margin-left: 2px; }

/* Rating picker — five star buttons fed into a hidden <input name="rating">. */
.ts-review-rating-row { display: flex; flex-direction: column; gap: 6px; }
.ts-rating-stars { display: inline-flex; gap: 4px; margin-top: -6px; }
.ts-rating-star { background: none; border: none; padding: 4px; margin: 0; cursor: pointer; line-height: 1; color: var(--dust); transition: color 0.15s var(--ease-out), transform 0.15s var(--ease-out); font-family: var(--ff-body); }
.ts-rating-star i { font-size: 24px; display: inline-flex; }
.ts-rating-star:hover { transform: translateY(-1px); }
.ts-rating-star.is-active,
.ts-rating-star.is-hover { color: var(--gold); }
.ts-rating-star:focus-visible { outline: 2px solid var(--terra); outline-offset: 2px; border-radius: 4px; }

/* Inputs / textareas. */
.ts-review-field { display: flex; flex-direction: column; }
.ts-review-field input[type="text"],
.ts-review-field input[type="email"],
.ts-review-field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  font-family: var(--ff-body);
  font-size: 13.5px;
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s var(--ease-out), background-color 0.15s var(--ease-out), box-shadow 0.15s var(--ease-out);
}
.ts-review-field textarea { resize: vertical; min-height: 120px; line-height: 1.6; font-family: var(--ff-body); }
.ts-review-field input:focus,
.ts-review-field textarea:focus { border-color: var(--ink); background: var(--white); box-shadow: 0 0 0 3px rgba(196,115,90,0.08); }
.ts-review-field input::placeholder,
.ts-review-field textarea::placeholder { color: var(--dust); }
.ts-review-help { font-size: 11px; color: var(--stone); margin-top: 6px; }

/* All field blocks (author, email, rating, textarea, cookies) live inside
 * comment_field, so comment_form() wraps them in a single .comment-form-comment
 * <p>. Reset the wrapper margin so spacing comes from the form's own gap. */
.ts-review-form .comment-form-comment { margin: 0; }

/* WordPress / WooCommerce inject a duplicate cookies-consent checkbox via the
 * `comment_form_fields` filter even when we pass `fields => array()` to
 * comment_form(). Hide it — our themed checkbox lives inside .comment-form-comment
 * and covers the same functional input (#wp-comment-cookies-consent).
 * Same treatment for the "Logged in as ..." line and any leftover "Required
 * fields are marked *" notice that gets injected for logged-in users. */
.ts-review-form-wrap .comment-form-cookies-consent,
.ts-review-form-wrap .logged-in-as,
.ts-review-form-wrap .required-field-message { display: none !important; }

/* Cookie consent + checkbox. */
.ts-review-checkbox { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--stone); cursor: pointer; line-height: 1.5; }
.ts-review-checkbox input { width: 14px; height: 14px; accent-color: var(--terra); cursor: pointer; }
.ts-review-form-wrap .logged-in-as { font-size: 12px; color: var(--stone); margin: 0 0 6px; }
.ts-review-form-wrap .logged-in-as a { color: var(--terra); }
.ts-review-form-wrap .logged-in-as a:hover { color: var(--terra-hover); }

/* Submit row — full-width, centered. */
.ts-review-actions { display: flex; flex-direction: column; align-items: stretch; gap: 12px; margin-top: 6px; }
.ts-review-submit { width: 100%; padding: 14px 26px; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.ts-review-submit i { font-size: 15px; }

/* Inline status notice rendered above the submit row by the AJAX handler.
 * Three variants: info (submitting…), success (review accepted), error
 * (validation/server error). */
.ts-review-notice {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.5;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--ink);
  animation: tsReviewNoticeIn 0.2s var(--ease-out) both;
}
.ts-review-notice i { font-size: 18px; line-height: 1; flex-shrink: 0; }
.ts-review-notice span { flex: 1; }
.ts-review-notice.is-info { background: rgba(196,115,90,0.06); border-color: rgba(196,115,90,0.35); }
.ts-review-notice.is-info i { color: var(--terra); }
.ts-review-notice.is-success { background: rgba(143,170,114,0.12); border-color: rgba(143,170,114,0.55); color: var(--charcoal); }
.ts-review-notice.is-success i { color: #5a8c4f; }
.ts-review-notice.is-error { background: rgba(196,115,90,0.10); border-color: var(--terra); color: var(--charcoal); }
.ts-review-notice.is-error i { color: var(--terra); }
@keyframes tsReviewNoticeIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }

/* Spinner used by the .is-info notice icon while the AJAX request is in flight. */
.ts-icon-spin { animation: tsIconSpin 0.9s linear infinite; display: inline-flex; }
@keyframes tsIconSpin { to { transform: rotate(360deg); } }

/* Disabled state for the submit button while submitting. */
.ts-review-submit:disabled { opacity: 0.6; cursor: progress; }

/* Logged-out gate. */
.ts-review-must-login { font-size: 13px; color: var(--stone); padding: 16px 18px; background: var(--bg); border: 1px dashed var(--border); border-radius: 10px; margin: 0; }
.ts-review-must-login a { color: var(--terra); font-weight: 600; }
.ts-review-must-login a:hover { color: var(--terra-hover); }

@media (max-width: 560px) {
  .ts-review-modal { padding: 0; align-items: flex-end; }
  .ts-review-modal-panel { max-width: 100%; max-height: 92vh; border-radius: 18px 18px 0 0; transform: translateY(40px); }
  .ts-review-modal.is-open .ts-review-modal-panel { transform: translateY(0); }
  .ts-review-modal-header { padding: 20px 22px 14px; }
  .ts-review-modal-body { padding: 20px 22px 24px; }
  .ts-review-actions { justify-content: stretch; }
  .ts-review-submit { width: 100%; min-width: 0; }
  .reviews-empty { padding: 36px 18px; }
}

/* EMAIL OPTIN — 2.0 dark bar */
.email-optin { background: var(--ink); border: none; padding: 28px 48px; }
.email-inner { max-width: 1000px; margin: 0 auto; display: flex; align-items: center; justify-content: center; gap: 24px; flex-wrap: wrap; }
.email-seller-av { width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,0.12); border: 2px solid rgba(255,255,255,0.2); display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; overflow: hidden; color: #fff; }
.email-seller-av img { width: 100%; height: 100%; object-fit: cover; }
.email-eyebrow { display: none; }
.email-headline { font-family: 'Inter', sans-serif; font-size: 22px; font-weight: 700; letter-spacing: -0.05em; color: #fff; white-space: nowrap; }
.email-headline em { font-style: normal; }
.email-form { display: flex; gap: 0; }
.email-input { padding: 11px 18px; border-radius: 0; border: none; background: #fff; font-family: var(--ff-body); font-size: 12px; color: var(--ink); outline: none; width: 240px; transition: all 0.2s var(--ease-out); }
/* .email-input:focus { box-shadow: 0 0 0 2px var(--dana-point); } */
.email-input:focus { box-shadow: 0 0 0 2px var(--dana-point); }
.email-input::placeholder { color: var(--border); }
.email-subscribe-btn { background: var(--terra); color: #fff; border: none; border-radius: 0; padding: 11px 22px; font-family: var(--ff-body); font-size: 12px; font-weight: 600; letter-spacing: 0.04em; cursor: pointer; white-space: nowrap; transition: background 0.2s var(--ease-out); }
/* .email-subscribe-btn:hover { background: var(--dana-point); } */
.email-subscribe-btn:hover { background: var(--mascot); }

/* YOU MAY ALSO LIKE / RELATED PRODUCTS */
.also-like { background: var(--bg); border-bottom: 1px solid var(--border); padding: 56px 48px; }
.also-like-inner { max-width: 1000px; margin: 0 auto; }
.also-like-header { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 24px; }
.also-like-title { font-family: var(--ff-display); font-size: 26px; font-weight: 500; color: var(--charcoal); }
.also-like-link { font-size: 12px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--terra); transition: color 0.15s; }
.also-like-link:hover { color: var(--terra-hover); }
.also-like-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }

/* Product cards site-wide use .shop-product-card from shop.css — rendered via
 * ts_render_product_card(). The legacy .product-card / .pc-* rules that lived
 * here have been retired now that the inline closure is gone. */

/* SELLER PROFILE 30/70 */
.seller-profile { background: var(--white); padding: 64px 48px; }
.seller-profile-inner { max-width: 1100px; max-width: 80%; margin: 0 auto; display: grid; grid-template-columns: 1fr 2.4fr; gap: 64px; align-items: start; }
.seller-profile.is-solo .seller-profile-inner { grid-template-columns: 1fr; max-width: 720px; }
.sp-avatar { width: 80px; height: 80px; border-radius: 50%; background: var(--gold-light); border: 2px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 32px; margin-bottom: 14px; overflow: hidden; }
.sp-avatar img { width: 100%; height: 100%; object-fit: cover; }
.sp-avatar i { color: var(--brown); font-size: 32px; }
.sp-store-row { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.sp-store { font-family: 'Inter', sans-serif; font-size: 22px; font-weight: 700; color: var(--charcoal); margin-bottom: 4px; }
.sp-store em { font-style: italic; }
.sp-stars { display: flex; align-items: center; gap: 3px; margin-bottom: 10px; }
.sp-stars .star { color: var(--gold); font-size: 12px; }
.sp-stars .star.empty { color: var(--dust); }
.sp-stars .sp-rating { font-size: 11px; color: var(--stone); margin-left: 4px; }
.sp-bio { font-size: 13px; color: var(--ink); line-height: 1.7; margin-bottom: 18px; }
.sp-bio p { margin: 0 0 8px; }
.sp-bio p:last-of-type { margin-bottom: 0; }
/* "Read more" — only when the bio is longer than the 160-character preview. */
.sp-bio-toggle {
	display: inline-block; margin-top: 4px; padding: 0; border: 0; background: none;
	font: inherit; font-size: 12px; font-weight: 600; color: var(--mascot);
	text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
.sp-bio-toggle:hover { color: var(--ink); }
.sp-actions { display: flex; flex-direction: row; gap: 10px; }
.sp-right { display: flex; flex-direction: column; gap: 16px; }
.sp-right-header { display: flex; align-items: baseline; justify-content: space-between; }
.sp-right-title { font-family: 'Inter', sans-serif; font-size: 20px; font-weight: 700; color: var(--ink); }
.sp-right-link { font-size: 11px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; transition: color 0.15s; }
.sp-right-link:hover { color: var(--terra-hover); }
.sp-product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }

/* Social row sits directly under the action buttons and ABOVE the divider — the
 * rule that used to be here now belongs to .sp-optin below, so the column reads
 * actions → socials → rule → newsletter, as in both reference files. */
.sp-social-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
/* Plain black icons, no background (both tiers — issue 16 / commit 5096ddb). */
.social-pill { display: inline-flex; align-items: center; justify-content: center; padding: 4px; cursor: pointer; transition: all 0.2s; text-decoration: none; flex-shrink: 0; background: none; border: none; box-shadow: none; }
.social-pill i { font-size: 20px; line-height: 1; color: var(--ink); transition: color 0.25s, filter 0.25s; }

/* TIER SPLIT: Gold marks a PRO seller, Mascot a Standard one. It runs through
 * every interactive element in this column — social pills, Follow, Shop My
 * Store, and the newsletter Submit — so the tier reads consistently wherever
 * the cursor lands, rather than from the badge alone.
 *
 * Deviates from the reference on two counts, both deliberate:
 *   - the pills invert on hover (tier-coloured fill, white glyph) instead of
 *     going white-on-tier-colour;
 *   - Follow / Shop My Store hover Gold on PRO, where the reference hovers
 *     Mascot on both tiers. Don't "restore" that — it's the tier signal.
 *
 * Scoped under .seller-profile: `.social-pill` is shared with the Dokan
 * storefront, whose own rules live under `.ts-storefront` in storefront.css. */
/* Hover: the icon itself changes colour — Standard Mascot with a soft glow (as
 * before), PRO Gold (--gold, the ✦ PRO badge gold) with no glow. */
.seller-profile .social-pill:hover { background: none; box-shadow: none; transform: translateY(-3px); }
.seller-profile .social-pill:hover i { color: var(--mascot); filter: drop-shadow(0 2px 6px rgba(180,137,112,0.45)); }
.seller-profile.is-pro .social-pill:hover i { color: var(--gold); filter: none; }

.sp-follow-btn { background: transparent; border: 1px solid var(--charcoal); color: var(--ink); padding: 8px 18px; border-radius: var(--radius-btn); font-family: var(--ff-body); font-size: 11px; letter-spacing: 0.06em; font-weight: 600; cursor: pointer; transition: all 0.2s var(--ease-out); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.sp-follow-btn:hover { background: var(--mascot); border-color: var(--mascot); color: #fff; transform: translateY(-1px); }
.sp-shop-btn { background: var(--charcoal); border: 1px solid var(--charcoal); color: #fff; padding: 8px 18px; border-radius: var(--radius-btn); font-family: var(--ff-body); font-size: 11px; letter-spacing: 0.06em; font-weight: 600; cursor: pointer; transition: all 0.2s var(--ease-out); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.sp-shop-btn:hover { background: var(--mascot); border-color: var(--mascot); color: #fff; transform: translateY(-1px); }
.seller-profile.is-pro .sp-follow-btn:hover,
.seller-profile.is-pro .sp-shop-btn:hover { background: var(--gold); border-color: var(--gold); color: #fff; }

/* ── STORE NEWSLETTER (seller column) ──
 * Owns the divider that separates it from the socials above. Input and button
 * sit flush (gap:0, radius:0), so neither carries its own rounding. */
.sp-optin { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--border); }
.sp-optin-title { font-size: 16px; font-weight: 700; color: var(--ink); line-height: 1.3; margin-bottom: 10px; }
.sp-optin-form { display: flex; gap: 0; }
/* min-width:0 lets the input actually shrink inside the flex row — without it a
 * long placeholder floors its width and pushes Submit out of the column. */
.sp-optin-input { flex: 1; min-width: 0; padding: 10px 14px; border: 1px solid var(--border); border-right: none; border-radius: 0; background: #fff; font-family: var(--ff-body); font-size: 12px; color: var(--ink); outline: none; transition: border-color 0.2s var(--ease-out); }
.sp-optin-input::placeholder { color: var(--dust); }
.sp-optin-input:focus { border-color: var(--charcoal); }
.sp-optin-btn { padding: 10px 18px; background: var(--ink); color: #fff; border: 1px solid var(--ink); border-radius: 0; font-family: var(--ff-body); font-size: 12px; font-weight: 600; letter-spacing: 0.04em; cursor: pointer; white-space: nowrap; transition: background 0.2s var(--ease-out), border-color 0.2s var(--ease-out); }
.sp-optin-btn:hover { background: var(--mascot); border-color: var(--mascot); }
.seller-profile.is-pro .sp-optin-btn:hover { background: var(--gold); border-color: var(--gold); }

/* Video lightbox styles moved to assets/css/video-banner.css. */

/* ── REMIX ICON helpers (single-product specific buttons) ── */
.btn-leave-review i, .btn-load-more i, .read-more-btn i,
.sp-follow-btn i, .sp-shop-btn i,
.bundle-item-add i {
  font-style: normal;
  display: inline-flex;
  align-items: center;
  line-height: 1;
}
.btn-leave-review i, .btn-load-more i, .read-more-btn i { font-size: 14px; }
.sp-follow-btn i, .sp-shop-btn i { font-size: 14px; }
.bundle-item-add i { font-size: 18px; }

/* SINGLE PRODUCT — RESPONSIVE */
@media (max-width: 1300px) {
  .product-hero { gap: 40px; }
}
@media (max-width: 1100px) {
  .product-hero { grid-template-columns: 1fr; padding: 0 40px 48px; }
  .product-details { position: static; }
  .also-like-grid { grid-template-columns: repeat(3, 1fr); }
  .email-inner { gap: 12px; flex-wrap: wrap; justify-content: center; }
  .email-eyebrow, .email-headline { white-space: normal; text-align: center; }
}
@media (max-width: 900px) {
  .product-hero { padding: 0 20px 40px; }
  .product-gallery { grid-template-columns: 1fr; grid-template-rows: auto auto; }
  .product-thumbs { flex-direction: row; grid-row: 2; grid-column: 1; overflow-x: auto; }
  .product-main-image { grid-row: 1; grid-column: 1; }
  .also-like-grid { grid-template-columns: repeat(2, 1fr); }
  /* minmax(0, 1fr) so the seller column can't outgrow the 20px gutters. */
  .seller-profile-inner { grid-template-columns: minmax(0, 1fr); gap: 32px; max-width: 100%; }
  .sp-product-grid { grid-template-columns: repeat(2, 1fr); }
  .reviews-grid { grid-template-columns: 1fr; }
  .reviews-section, .also-like, .seller-profile, .email-optin { padding-left: 20px; padding-right: 20px; }
  .breadcrumb { padding: 28px 20px 12px; }
}
/* Tablet / phone order (2.1, same as the bundle pages): image → thumbnails
 * row → details → included list. The gallery dissolves (display: contents) so
 * its children become flex items of .product-hero and can interleave with
 * .product-details. Before this the two-column gallery overflowed and the page
 * scrolled sideways on phones. Ported from single-product-page-*.html. */
@media (max-width: 1100px) {
  .product-hero { display: flex; flex-direction: column; gap: 0; }
  .product-gallery { display: contents; }
  .product-main-image { order: 1; width: 100%; max-width: 640px; margin: 0 auto 10px; }
  .product-thumbs { order: 2; width: 100%; max-width: 640px; margin: 0 auto 28px; flex-direction: row; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; height: auto; min-height: 0; }
  .product-thumbs .thumb-more { position: static; }
  .product-thumbs::-webkit-scrollbar { display: none; }
  .product-thumbs .product-thumb { width: 72px; height: 72px; }
  .product-details { order: 3; width: 100%; max-width: 640px; margin: 0 auto 32px; }
  .bundle-includes { order: 4; width: 100%; max-width: 640px; margin: 0 auto; }
  /* The heart now sits at the screen edge, so a centred tooltip hung ~70px
   * past it (invisible, but still widened the page). Right-align it to the
   * heart instead; the arrow stays centred above the icon. */
  .product-details-wishlist .shop-product-wishlist::after { left: auto; right: 0; transform: translateY(4px); }
  .product-details-wishlist .shop-product-wishlist:hover::after,
  .product-details-wishlist .shop-product-wishlist:focus-visible::after { transform: translateY(1px); }
}
/* "What Teachers Are Saying" on phones: 20px gutters like the rest of the
 * page, and the heading on its own line with the stars under it and the
 * Leave a Review button below — it used to be squeezed beside the button. */
@media (max-width: 600px) {
  .reviews-section { padding: 44px 20px; }
  .reviews-header { flex-direction: column; align-items: flex-start; gap: 14px; margin-bottom: 22px; }
  .reviews-title { font-size: 26px; line-height: 1.2; }
  .reviews-title span { display: block; margin: 6px 0 0; }
  /* Email opt-in: the 240px input + button ran 6px past the gutter. */
  .email-form { width: 100%; }
  .email-input { flex: 1; min-width: 0; width: auto; }
}
@media (max-width: 560px) {
  .also-like-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .product-title { font-size: 26px; }
  .sp-product-grid { grid-template-columns: 1fr 1fr; }
  .tab-features { grid-template-columns: 1fr; }
}

/* ── REVIEWS — UGC photos, verified badge, rating breakdown, lightbox ── */

/* Real Verified-Purchase badge (only shown on WC-verified reviews). */
.review-verified { display: inline-flex; align-items: center; gap: 4px; margin-left: 6px; color: var(--sage); font-weight: 600; }
.review-verified i { font-size: 12px; }

/* Customer photo thumbnails on a review card. */
.review-photos { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.review-photo { width: 56px; height: 56px; padding: 0; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; cursor: pointer; background: var(--bg); transition: border-color 0.2s var(--ease-out), transform 0.2s var(--ease-out); }
.review-photo:hover { border-color: var(--ink); transform: translateY(-1px); }
.review-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Rating-distribution summary (avg score + per-star bars). */
.reviews-summary { display: flex; align-items: center; gap: 40px; flex-wrap: wrap; padding: 24px 28px; margin-bottom: 28px; background: var(--bg); border: 1px solid var(--border); border-radius: 16px; }
.reviews-summary-score { text-align: center; flex-shrink: 0; }
.reviews-summary-avg { font-family: 'Inter', sans-serif; font-size: 48px; font-weight: 800; line-height: 1; letter-spacing: -0.04em; color: var(--charcoal); }
.reviews-summary-stars { color: var(--gold); font-size: 15px; letter-spacing: 2px; margin: 6px 0 4px; }
.reviews-summary-count { font-size: 12px; color: var(--stone); }
.reviews-summary-bars { flex: 1; min-width: 240px; display: flex; flex-direction: column; gap: 7px; }
.reviews-bar-row { display: flex; align-items: center; gap: 12px; }
.reviews-bar-label { display: inline-flex; align-items: center; gap: 3px; width: 34px; font-size: 12px; font-weight: 500; color: var(--ink); flex-shrink: 0; }
.reviews-bar-label i { color: var(--gold); font-size: 11px; }
.reviews-bar-track { flex: 1; height: 8px; background: #E8E4DE; border-radius: 100px; overflow: hidden; }
.reviews-bar-fill { display: block; height: 100%; background: var(--gold); border-radius: 100px; transition: width 0.5s var(--ease-out); }
.reviews-bar-pct { width: 38px; text-align: right; font-size: 12px; color: var(--stone); flex-shrink: 0; }

/* Review form — photo upload field + previews. */
.ts-review-optional { color: var(--dust); font-weight: 400; }
.ts-review-photo-drop { display: inline-flex; align-items: center; gap: 8px; padding: 12px 18px; border: 1.5px dashed var(--border); border-radius: 10px; color: var(--stone); font-size: 12px; cursor: pointer; transition: border-color 0.2s, color 0.2s; align-self: flex-start; }
.ts-review-photo-drop:hover { border-color: var(--ink); color: var(--ink); }
.ts-review-photo-drop i { font-size: 16px; }
.ts-review-photo-preview { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.ts-review-preview-item { position: relative; width: 60px; height: 60px; border-radius: 8px; overflow: hidden; border: 1px solid var(--border); }
.ts-review-preview-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ts-review-preview-remove { position: absolute; top: 2px; right: 2px; width: 18px; height: 18px; border-radius: 50%; background: rgba(28,26,24,0.72); color: #fff; font-size: 14px; line-height: 1; display: flex; align-items: center; justify-content: center; cursor: pointer; border: none; padding: 0; }
.ts-review-preview-remove:hover { background: var(--terra); }

/* Photo lightbox. */
.ts-review-lightbox { position: fixed; inset: 0; z-index: 100000; display: none; align-items: center; justify-content: center; padding: 40px; background: rgba(20,18,16,0.86); }
.ts-review-lightbox.is-open { display: flex; }
.ts-review-lightbox-img { max-width: 90vw; max-height: 88vh; object-fit: contain; border-radius: 8px; box-shadow: 0 12px 48px rgba(0,0,0,0.5); }
.ts-review-lightbox-close { position: absolute; top: 20px; right: 24px; width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,0.12); color: #fff; font-size: 22px; display: flex; align-items: center; justify-content: center; cursor: pointer; border: none; transition: background 0.2s; }
.ts-review-lightbox-close:hover { background: rgba(255,255,255,0.25); }

/* PDF preview — a single line under the preview video, opening the PDF in a lightbox. */
.product-pdf-preview { display: flex; align-items: center; gap: 10px; width: 100%; margin: 0 0 16px; padding: 12px 16px; background: var(--white, #fff); border: 1px solid var(--border); border-radius: 8px; font: inherit; font-size: 14px; font-weight: 500; color: var(--ink); text-align: left; cursor: pointer; transition: border-color 0.2s, box-shadow 0.2s; }
.product-pdf-preview > i:first-child { font-size: 20px; color: #C0392B; }
.product-pdf-preview span { flex: 1; }
.product-pdf-preview-arrow { font-size: 16px; color: var(--stone); transition: transform 0.2s var(--ease-out); }
.product-pdf-preview:hover { border-color: var(--ink); box-shadow: var(--shadow-sm); }
.product-pdf-preview:hover .product-pdf-preview-arrow { transform: translate(2px, -2px); color: var(--ink); }
.ts-pdf-lightbox { position: fixed; inset: 0; z-index: 100000; display: none; align-items: center; justify-content: center; padding: 32px; background: rgba(20,18,16,0.86); }
.ts-pdf-lightbox.is-open { display: flex; }
.ts-pdf-lightbox-panel { display: flex; flex-direction: column; width: min(1000px, 100%); height: min(90vh, 100%); background: var(--white, #fff); border-radius: 10px; overflow: hidden; box-shadow: 0 12px 48px rgba(0,0,0,0.5); }
.ts-pdf-lightbox-bar { display: flex; align-items: center; gap: 16px; padding: 10px 12px 10px 18px; border-bottom: 1px solid var(--border); }
.ts-pdf-lightbox-title { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ts-pdf-lightbox-title i { color: #C0392B; }
.ts-pdf-lightbox-close { width: 36px; height: 36px; border-radius: 50%; border: none; background: transparent; color: var(--ink); font-size: 20px; display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; }
.ts-pdf-lightbox-close:hover { background: rgba(0,0,0,0.06); }
.ts-pdf-lightbox-frame { flex: 1; width: 100%; border: 0; background: #525659; }
@media (max-width: 600px) {
  .ts-pdf-lightbox { padding: 0; }
  .ts-pdf-lightbox-panel { width: 100%; height: 100%; border-radius: 0; }
}
body.ts-lightbox-open { overflow: hidden; }

@media (max-width: 560px) {
  .reviews-summary { gap: 20px; padding: 20px; }
  .reviews-summary-avg { font-size: 38px; }
}

/* ── Cart button by viewer (#69, viewer-state.js in the reference) ──
   owner → "⬇ Download" (ink) · already bought → "✓ You own it" (cream) */
.btn-add-cart.is-owner { background: var(--ink); color: #fff; text-decoration: none; }
.btn-add-cart.is-owned { background: var(--cream, #FAF7F2); color: var(--ink); border: 1px solid var(--border, #D8D4CE); box-shadow: none; text-decoration: none; }
.btn-add-cart.is-owned:hover { background: var(--ivory, #F3EDE3); color: var(--ink); transform: none; box-shadow: none; }
.ts-owner-dl { position: relative; }
.ts-owner-dl > summary { list-style: none; cursor: pointer; }
.ts-owner-dl > summary::-webkit-details-marker { display: none; }
.ts-owner-dl-menu { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 20; background: #fff; border: 1px solid var(--border, #D8D4CE); border-radius: 8px; padding: 6px; box-shadow: 0 10px 30px rgba(28, 26, 24, .12); }
.ts-owner-dl-menu a { display: block; padding: 10px 12px; border-radius: 6px; font-size: 13px; font-weight: 500; color: var(--ink); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ts-owner-dl-menu a:hover { background: var(--cream, #FAF7F2); }

/* #88 — product reviews: optional headline + the seller's public reply. */
.review-title { font-weight: 700; font-size: 15px; color: var(--ink); margin: 6px 0 4px; }
.review-reply { margin-top: 14px; padding: 12px 14px; background: #FAF7F2; border-left: 3px solid var(--mascot, #B48970); border-radius: 0 6px 6px 0; font-size: 13px; line-height: 1.5; color: var(--ink); }
.review-reply b { display: block; font-size: 12.5px; margin-bottom: 2px; }

/* ── Seller coupon, under the price ──
   The button itself is in base.css; this is only its placement and the line
   that works out what the price becomes. */
.ts-coupon-wrap { margin: 2px 0 16px; }

.ts-coupon-note {
	margin: 6px 0 0;
	font-size: 12.5px;
	color: var(--stone);
	line-height: 1.5;
}

.ts-coupon-note strong { color: var(--ink); }

/* #46: "Added to cart ✓ … applied", shown after Add to Cart. */
.ts-coupon-applied { margin: 6px 0 0; font-size: 12.5px; font-weight: 600; color: var(--ink); line-height: 1.5; }
.ts-coupon-applied[hidden] { display: none; }

/* ── FORMAT (after the description, above the tabs) ──
 * Plain text with commas, from the product form's Format field. */
.product-format { margin-bottom: 24px; }
.product-format-label { font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; font-weight: 600; color: var(--ink); margin-bottom: 10px; }
.product-format-list { font-size: 13px; line-height: 1.5; color: #55514D; }
.product-format-none { color: var(--stone); }


/* Review brought over from TpT with the product (inc/tpt-import.php). */
.review-imported { display: inline-block; margin-left: 8px; font-size: 11px; font-weight: 600; letter-spacing: .02em; color: var(--stone); background: #F3EDE3; border-radius: 4px; padding: 1px 7px; }

/* TS-BUNDLE-LIST v1 + "Also in a bundle" (#48, design single-product-bundle-page-*.html). */
.bundle-inc-value { font-size: 12px; color: var(--ink); margin: -6px 0 14px; }
.bundle-inc-value strong { color: #3E6B55; }
.bundle-inc-value s { color: var(--stone); }
.bundle-includes .bundle-item[hidden] { display: none !important; }
.bundle-more { display: block; width: 100%; margin-top: 12px; padding: 11px 14px; border: 1px solid var(--ink); border-radius: 6px; background: var(--white, #fff); color: var(--ink); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.bundle-more:hover { background: var(--ink); color: #fff; }
.bm-overlay { position: fixed; inset: 0; background: rgba(28,26,24,.45); z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 20px; }
.bm-overlay[hidden] { display: none; }
.bm { background: #fff; border-radius: 14px; width: min(680px, 100%); max-height: min(88vh, 860px); display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.bm-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 20px 22px 12px; border-bottom: 1px solid var(--border); }
.bm-title { font-size: 18px; font-weight: 700; letter-spacing: -.03em; color: var(--ink); margin: 0; }
.bm-sub { font-size: 12px; color: var(--stone); margin: 4px 0 0; }
.bm-close { border: 0; background: none; font-size: 20px; cursor: pointer; color: var(--ink); padding: 4px 8px; border-radius: 6px; }
.bm-close:hover { background: #F3EDE3; }
.bm-search { margin: 12px 22px 0; border: 1px solid var(--border); border-radius: 6px; padding: 9px 12px; font: inherit; font-size: 13px; }
.bm-body { overflow-y: auto; padding: 4px 22px 8px; flex: 1; }
.bm-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 12px 22px; border-top: 1px solid var(--border); font-size: 12px; color: var(--stone); }
.bm-pages { display: flex; gap: 6px; }
.bm-pages button { border: 1px solid var(--border); background: #fff; border-radius: 6px; padding: 5px 10px; font: inherit; font-size: 12px; color: var(--ink); cursor: pointer; }
.bm-pages button:disabled { opacity: .35; cursor: default; }
.ts-in-bundle { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; margin: -6px 0 16px; font-size: 12.5px; color: var(--ink) !important; text-decoration: none !important; }
.ts-in-bundle-k { font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--mascot); }
.ts-in-bundle-v strong { font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.ts-in-bundle:hover .ts-in-bundle-v strong { color: #bc886d; }

/* ── Merch (#6): colour / size buttons + Add to Cart on variable products ──
 * template-parts/merch-picker.php. Buttons ("chips") like most shops, in the
 * product page's own look: small uppercase label with the chosen value, cream
 * fill + ink ring on the chosen chip, and the same dark Add to Cart as every
 * other product (product-actions rules above). WooCommerce's selects stay in
 * the form, hidden, and carry the choice. */
.ts-variable-cart { width: 100%; }
.ts-var-form { margin: 0; }
.ts-var-options { display: flex; flex-direction: column; gap: 18px; margin: 4px 0 18px; }
.ts-var-label { margin: 0 0 10px; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--stone); }
.ts-var-chosen { margin-left: 8px; font-weight: 600; letter-spacing: 0; text-transform: none; font-size: 13px; color: var(--ink); }
.ts-var-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ts-chip {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-width: 52px; min-height: 42px; padding: 0 14px;
	border: 1px solid var(--border, #D8D4CE); border-radius: 4px; background: var(--cream, #FAF7F2);
	font-family: var(--ff-body); font-size: 13px; font-weight: 600; color: var(--ink); line-height: 1.2;
	cursor: pointer; transition: border-color .15s var(--ease-out), background .15s var(--ease-out), color .15s var(--ease-out);
}
/* Same family as the subject / grade chips in the product form: light cream
 * chips, tan on hover; the chosen one is solid ink with white text. */
.ts-chip:hover { border-color: var(--ink); background: var(--mascot-light, #E6D7CE); }
.ts-chip:focus-visible { outline: 2px solid var(--mascot); outline-offset: 2px; }
.ts-chip[aria-checked="true"],
.ts-chip[aria-checked="true"]:hover { border-color: var(--ink); background: var(--ink); color: #fff; }
.ts-chip[aria-checked="true"] .ts-chip-dot { border-color: rgba(255,255,255,.7); }
.ts-chip.is-off { color: var(--stone); background: var(--cream, #FAF7F2); border-style: dashed; opacity: .6; }
.ts-chip.is-off .ts-chip-text { text-decoration: line-through; }
.ts-chip-dot { width: 16px; height: 16px; flex: 0 0 16px; border-radius: 50%; border: 1px solid rgba(28,26,24,.22); }
.ts-var-row.is-missing .ts-chip { border-color: var(--mascot); }
.ts-var-row.is-missing .ts-var-label { color: var(--mascot); }
.ts-var-select { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; padding: 0; margin: -1px; }
.ts-var-need { margin: 0 0 10px; font-size: 13px; color: #9A5B3E; }
.ts-var-form .single_variation_wrap .woocommerce-variation-price { margin: 0 0 12px; font-size: 18px; font-weight: 700; color: var(--ink); }
.ts-var-form .woocommerce-variation-availability,
.ts-var-form .woocommerce-variation-description { font-size: 12.5px; color: var(--stone); margin: 0 0 10px; }
.ts-var-form .woocommerce-variation-add-to-cart { display: block; }
/* WooCommerce adds .disabled until a choice is made: dimmed, no lift. */
.product-actions .ts-var-form .single_add_to_cart_button.disabled { opacity: .5; cursor: not-allowed; transform: none; }
.product-actions .ts-var-form .single_add_to_cart_button.disabled:hover { background: var(--charcoal); transform: none; }
@media (max-width: 600px) {
	.ts-chip { min-height: 44px; padding: 0 12px; }
}
