/* ================================================================
   PRODUCT PAGE — WooCommerce single product (single-product.php)
   Styles moved out of the template (no inline <style>). Tokens: tcn-base.css §0.
   ================================================================ */
/* Type badge colors — matches global style.css */
.type-badge--video  { background:rgba(13,148,136,.15);color:#0d9488 }
.type-badge--audio  { background:rgba(192,132,252,.15);color:#c084fc }
.type-badge--episode{ background:rgba(251,191,36,.15);color:#fbbf24 }
.type-badge--article{ background:rgba(52,211,153,.15);color:#34d399 }
.type-badge--code   { background:rgba(244,114,182,.15);color:#f472b6 }
.type-badge--ticket { background:rgba(251,146,60,.15);color:#fb923c }
.type-badge--product{ background:rgba(251,146,60,.15);color:#fb923c }
.type-badge--photo  { background:rgba(96,165,250,.15);color:#60a5fa }
.type-badge--drop   { background:rgba(255,140,0,.15);color:#ff8c00 }

.tcn-product-page { --clr-bg: var(--paper); --clr-invert-text: var(--ink); --clr-invert-text-muted: var(--muted); min-height: 100vh; background: var(--clr-bg); color: var(--clr-text-main); padding-top: 80px; }
.tcn-product-page .tcn-lift-grid { padding: 8px 5vw 48px; max-width: 1200px; }
.tcn-product-page .tcn-faq { padding: 8px 5vw 48px; }
.tcn-prod-body { max-width: 1200px; margin: 0 auto; padding: 40px 5vw 60px; }
.tcn-prod-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }

.tcn-prod-main-img {
  background: var(--clr-surface, #f7f7f8); border-radius: var(--radius-md); overflow: hidden; var(--line));
}
.tcn-prod-main-img img { width: 100%; display: block; object-fit: contain; max-height: 550px; }
.tcn-prod-thumbs { display: flex; gap: 8px; margin-top: 12px; }
.tcn-prod-thumb {
  width: 64px; height: 64px; border-radius: var(--radius-sm); overflow: hidden; cursor: pointer;
  border: 2px solid transparent; transition: border-color 0.2s; flex-shrink: 0;
}
.tcn-prod-thumb.active { border-color: #0d9488; }
.tcn-prod-thumb img { width: 100%; height: 100%; object-fit: cover; }

.tcn-prod-title-row {
  display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px;
}
.tcn-prod-badges { display: flex; gap: 8px; flex-wrap: wrap; }
.tcn-prod-badge {
  display: inline-block; padding: 4px 14px; border-radius: 6px; font-size: 0.6rem;
  font-weight: 800; letter-spacing: 0.1em;
  white-space: nowrap; width: fit-content;
}
.tcn-prod-badge--out { background: rgba(248,113,113,0.15); color: #f87171; }
.tcn-prod-badge--sale { background: rgba(255,77,77,0.15); color: #ff4d4d; }
.tcn-prod-info-title {
  font-family:var(--dp-serif);
  font-size: clamp(1.3rem, 2.4vw, 1.8rem); margin: 0; color: var(--clr-text-main); line-height: 1.2; text-transform: uppercase; }
.tcn-prod-collection {
  color: #0d9488; font-size: 0.8rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; margin: 0;
}
.tcn-prod-divider {
  border: none; var(--line); margin: 0 0 16px;
}

.tcn-prod-price { font-size: 1.8rem; font-weight: 900; color: #0d9488; margin-bottom: 12px; }
.tcn-prod-price del { color:var(--muted); font-size: 1.2rem; margin-right: 8px; }
.tcn-prod-price ins { text-decoration: none; color: #0d9488; }
.tcn-prod-stock { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; margin-bottom: 20px; }
.tcn-prod-stock-in { color: #34d399; }
.tcn-prod-stock-out { color: #f87171; }
.tcn-prod-short-desc { color:var(--muted); font-size: 0.9rem; line-height: 1.6; margin-bottom: 24px; }
.tcn-prod-sku { font-size: 0.75rem; color:var(--muted); margin-bottom: 20px; }
.tcn-prod-sku span { font-weight: 700; }

.tcn-prod-cart-form { margin-bottom: 28px; }
.tcn-prod-qty-row { margin-bottom: 16px; }
.tcn-prod-qty-row label {
  display: block; font-size: 0.7rem; font-weight: 700; color:var(--muted);
  letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 8px;
}
.tcn-prod-qty-wrap { display: flex; align-items: center; gap: 0; width: fit-content; }
.tcn-qty-btn {
  width: 40px; height: 44px; background: rgba(0,0,0,0.06); var(--line);
  color: var(--clr-text-main); font-size: 1.2rem; cursor: pointer; transition: background 0.15s; display: flex;
  align-items: center; justify-content: center;
}
.tcn-qty-btn:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.tcn-qty-btn:last-child { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.tcn-qty-btn:hover { background: rgba(0,0,0,0.12); }
.tcn-qty-input {
  width: 56px; height: 44px; text-align: center; background: rgba(0,0,0,0.04);
  var(--line); border-left: none; border-right: none;
  color: var(--clr-text-main); font-size: 1rem; font-weight: 700; -moz-appearance: textfield;
}
.tcn-qty-input::-webkit-inner-spin-button,
.tcn-qty-input::-webkit-outer-spin-button { -webkit-appearance: none; }

.tcn-prod-add-btn {
  display: block; width: 100%; padding: 16px; font-size: 1rem; font-weight: 800;
  letter-spacing: 0.08em; color:var(--inverse); background: var(--clr-text-main); border: none;
  border-radius: var(--radius-md); cursor: pointer; transition: background 0.15s;
}
.tcn-prod-add-btn:hover { background: var(--clr-primary); }
.tcn-prod-unavailable {
  padding: 20px; background: rgba(248,113,113,0.08); border: 1px solid rgba(248,113,113,0.2);
  border-radius: var(--radius-md); color: #f87171; text-align: center; font-weight: 600;
}

.tcn-prod-meta-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 16px; padding: 20px; background: rgba(0,0,0,0.02); var(--line);
  border-radius: var(--radius-md); margin-bottom: 20px;
}
.tcn-prod-meta-label {
  display: block; font-size: 0.6rem; font-weight: 800; color:var(--muted);
  letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 4px;
}
.tcn-prod-meta-value { color: var(--clr-text-main); font-size: 0.85rem; font-weight: 600; }

.tcn-prod-actions { display: flex; gap: 8px; }
.tcn-prod-share-btn {
  padding: 10px 20px; background: rgba(0,0,0,0.04); var(--line);
  border-radius: var(--radius-sm); color: var(--clr-text-muted); cursor: pointer; font-size: 0.8rem; font-weight: 700;
  letter-spacing: 0.1em; transition: background 0.2s, color 0.2s;
}
.tcn-prod-share-btn:hover { background: rgba(0,0,0,0.08); color: var(--clr-text-main); }

.tcn-prod-full-desc { margin-top: 48px; padding-top: 32px; var(--line); }
.tcn-prod-full-desc h3 {
  font-family: var(--ff-heading, 'Dela Gothic One', sans-serif);
  font-size: 1.2rem; color: var(--clr-text-main); margin: 0 0 16px; text-transform: uppercase; }
.tcn-prod-desc-content { color:var(--muted); font-size: 0.9rem; line-height: 1.7; }

.tcn-prod-related { margin-top: 48px; padding-top: 32px; var(--line); }
.tcn-prod-related h3 {
  font-family: var(--ff-heading, 'Dela Gothic One', sans-serif);
  font-size: 1.2rem; color: var(--clr-text-main); margin: 0 0 20px; text-transform: uppercase; }
.tcn-prod-related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.tcn-prod-rel-wrap { display: flex; flex-direction: column; }
.tcn-prod-related-card {
  background: rgba(0,0,0,0.03); var(--line);
  border-radius: var(--radius-md); overflow: hidden; text-decoration: none; transition: border-color 0.2s;
  flex: 1; display: flex; flex-direction: column;
}
.tcn-prod-related-card:hover { border-color: rgba(13,148,136,0.3); }
.tcn-prod-rel-img-wrap { position: relative; aspect-ratio: 1; overflow: hidden; background: rgba(0,0,0,0.02); }
.tcn-prod-rel-img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.tcn-prod-related-card:hover .tcn-prod-rel-img { transform: scale(1.05); }
.tcn-prod-rel-placeholder { width:100%;height:100%;display:flex;align-items:center;justify-content:center;font-size:2.5rem;color:var(--faint) }
.tcn-prod-rel-img-wrap .tsshop-type-badge { position:absolute;top:10px;left:10px;padding:3px 10px;border-radius:4px;font-size:.55rem;font-weight:800;letter-spacing:.08em;text-transform:uppercase;z-index:2 }
.tcn-prod-rel-info { padding: 14px 16px 16px; display: flex; flex-direction: column; }
.tcn-prod-rel-name { font-family:var(--dp-serif); color: var(--clr-text-main); font-size: 0.75rem; margin: 0 0 4px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-transform: uppercase; }
.tcn-prod-rel-collection { color: #0d9488; font-size: 0.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; margin: 0 0 8px; }
.tcn-prod-rel-divider { border: none; var(--line); margin: 0 0 8px; }
.tcn-prod-rel-price { color: #0d9488; font-size: 0.9rem; font-weight: 800; }
.tcn-prod-rel-price del { color:var(--muted); font-size: 0.75rem; }
.tcn-prod-rel-price ins { text-decoration: none; color: #0d9488; }
.tcn-prod-rel-cat { color:var(--muted); font-size: 0.6rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; margin: 4px 0 0; }

@media (max-width: 900px) { .tcn-prod-grid { grid-template-columns: 1fr; gap: 32px; } }
@media (max-width: 600px) {
  .tcn-product-page { padding-top: 60px; }
  .tcn-prod-body { padding: 24px 4vw 40px; }
  .tcn-prod-info-title { font-size: 1.3rem; }
  .tcn-prod-price { font-size: 1.5rem; }
  .tcn-prod-title-row { flex-wrap: wrap; }
  .tcn-prod-related-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}

/* WooCommerce variable product form styling */
.tcn-prod-info .variations_form { margin-bottom: 28px; }
.tcn-prod-info .variations { width: 100%; margin-bottom: 16px; }
.tcn-prod-info .variations td { padding: 8px 0; vertical-align: middle; }
.tcn-prod-info .variations .label label {
  font-size: 0.7rem; font-weight: 700; color:var(--muted);
  letter-spacing: 0.08em; text-transform: uppercase;
}
.tcn-prod-info .variations .value select {
  background: rgba(0,0,0,0.06); var(--line);
  color: var(--clr-text-main); padding: 10px 14px; border-radius: var(--radius-sm); font-size: 0.9rem;
  width: 100%; max-width: 300px; cursor: pointer;
}
.tcn-prod-info .variations .value select option { background: var(--panel); color: var(--clr-text-main); }
.tcn-prod-info .variations .reset_variations { color: #0d9488; font-size: 0.8rem; margin-left: 8px; }
.tcn-prod-info .woocommerce-variation-price .price {
  font-size: 1.4rem; font-weight: 900; color: #0d9488; margin-bottom: 8px;
}
.tcn-prod-info .woocommerce-variation-description { color:var(--muted); font-size: 0.85rem; margin-bottom: 12px; }
.tcn-prod-info .woocommerce-variation-add-to-cart { display: flex; align-items: center; gap: 12px; }
.tcn-prod-info .woocommerce-variation-add-to-cart .qty {
  width: 56px; height: 44px; text-align: center; background: rgba(0,0,0,0.04);
  var(--line); color: var(--clr-text-main); font-size: 1rem; font-weight: 700;
  border-radius: var(--radius-sm); -moz-appearance: textfield;
}
.tcn-prod-info .woocommerce-variation-add-to-cart .qty::-webkit-inner-spin-button,
.tcn-prod-info .woocommerce-variation-add-to-cart .qty::-webkit-outer-spin-button { -webkit-appearance: none; }
.tcn-prod-info .single_add_to_cart_button,
.tcn-prod-info .single_add_to_cart_button.button.alt {
  flex: 1; padding: 14px 24px !important; font-size: 1rem !important; font-weight: 800 !important;
  letter-spacing: 0.08em; color:var(--inverse) !important; background: var(--clr-text-main) !important;
  border: none !important; border-radius: var(--radius-md) !important; cursor: pointer;
  transition: background 0.15s; text-transform: uppercase;
}
.tcn-prod-info .single_add_to_cart_button:hover,
.tcn-prod-info .single_add_to_cart_button.button.alt:hover { background: var(--clr-primary) !important; }
.tcn-prod-info .woocommerce-variation-availability { font-size: 0.8rem; margin-top: 8px; }
.tcn-prod-info .stock.in-stock { color: #34d399; }
.tcn-prod-info .stock.out-of-stock { color: #f87171; }


/* WooCommerce notices */
.tcn-prod-body .woocommerce-message {
  background: rgba(13,148,136,0.1); border: 1px solid rgba(13,148,136,0.3);
  border-radius: var(--radius-md); padding: 16px 20px; margin-bottom: 24px;
  color: #0d9488; font-weight: 600; font-size: 0.9rem; display: flex; align-items: center; justify-content: space-between;
}
.tcn-prod-body .woocommerce-message a.button {
  background: var(--clr-text-main); color:var(--inverse); padding: 8px 18px; border-radius: var(--radius-sm);
  text-decoration: none; font-weight: 800; font-size: 0.8rem; letter-spacing: 0.05em;
}
.tcn-prod-body .woocommerce-error {
  background: rgba(248,113,113,0.1); border: 1px solid rgba(248,113,113,0.3);
  border-radius: var(--radius-md); padding: 16px 20px; margin-bottom: 24px;
  color: #f87171; font-weight: 600; font-size: 0.9rem; list-style: none;
}

/* skin */
/* single product: hard-coded black-alpha text -> muted ivory */
body .tcn-prod-info li, body .tcn-prod-info strong, body .tcn-prod-info label,
body .tcn-prod-meta-label, body .tcn-prod-rel-cat, body .tcn-prod-info p { color: var(--muted); }
body .tcn-prod-info-title { font-family: var(--dp-serif); font-weight: 400; letter-spacing: .015em; font-size: clamp(40px, 5vw, 72px); line-height: .95; text-transform: none; }
body .tcn-prod-add-btn, body .install-btn, body .tcn-product-page button[class*="btn"] { background: var(--ink); color: var(--inverse); border-radius: 999px; }
body .tcn-prod-add-btn:hover, body .install-btn:hover { background: var(--accent); color: var(--on-accent); }
