/* ================================================================
   pet-specs.css — Hello Child Theme
   Full UI compatibility with Redlight101 theme system
   Syncs: fonts · colors · shadows · buttons · links · radius · motion
   ================================================================ */

/* ── Token bridge — all ps-* vars inherit from rl-* theme vars ── */
:root {
  /* ── Brand ── */
  --ps-accent:          var(--rl-primary,            #FF6B35);
  --ps-accent-light:    var(--rl-primary-light,       #FF8C42);
  --ps-accent-dark:     var(--rl-primary-dark,        #D64420);
  --ps-gradient:        var(--rl-gradient-primary,    linear-gradient(135deg,#FF6B35 0%,#FF8C42 100%));

  /* ── Surfaces ── */
  --ps-white:           var(--rl-bg-white,            #ffffff);
  --ps-bg:              var(--rl-bg-light,            #fafafa);
  --ps-bg-section:      var(--rl-bg-section,          #f5f5f5);
  --ps-border:          var(--rl-border,              #e0e0e0);

  /* ── Text ── */
  --ps-ink:             var(--rl-text-primary,        #2a2a2a);
  --ps-ink-mid:         var(--rl-text-secondary,      #4a4a4a);
  --ps-ink-soft:        var(--rl-text-muted,          #888888);
  --ps-ink-disabled:    var(--rl-text-disabled,       #b0b0b0);

  /* ── Status ── */
  --ps-success:         var(--rl-success,             #00C851);
  --ps-error:           var(--rl-error,               #ff4444);
  --ps-warning:         var(--rl-warning,             #ffbb33);
  --ps-info:            var(--rl-info,                #33b5e5);

  /* ── Tinted surfaces (accent opacity layers) ── */
  --ps-accent-bg:       rgba(255,107,53,.07);
  --ps-accent-mid:      rgba(255,107,53,.28);
  --ps-success-bg:      rgba(0,200,81,.08);
  --ps-error-bg:        rgba(255,68,68,.07);
  --ps-warning-bg:      rgba(255,187,51,.10);
  --ps-info-bg:         rgba(51,181,229,.10);

  /* ── Shape — match theme's 15px / 25px system ── */
  --ps-radius:          15px;
  --ps-radius-sm:       8px;
  --ps-radius-pill:     25px;

  /* ── Shadows — lifted straight from theme ── */
  --ps-shadow-sm:       0 2px 10px rgba(0,0,0,.05);
  --ps-shadow-md:       0 5px 20px rgba(255,107,53,.10);
  --ps-shadow-hover:    0 6px 20px rgba(255,107,53,.40);
  --ps-shadow-btn:      0 4px 15px rgba(255,107,53,.20);

  /* ── Motion — match theme's 0.3s ease ── */
  --ps-transition:      .30s ease;

  /* ── Typography — inherit theme stack ── */
  --ps-font:            var(--rl-font-body,  -apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif);
  --ps-font-head:       var(--rl-font-heading,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif);
}

/* ================================================================
   BASE
   ================================================================ */

.product,
.woocommerce-tabs {
  font-family: var(--ps-font);
  color: var(--ps-ink-mid);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ================================================================
   1. VARIATION SWITCH PILLS
   Match theme button shape (border-radius:25px) + gradient + shadow
   ================================================================ */

/* Table → block 上下結構 */
.variations_form .variations,
.variations_form .variations tbody,
.variations_form .variations tr {
  display: block;
  width: 100%;
  border: none;
  margin-bottom: 0;
}
.variations_form .variations select,
.variations_form select,
form.variations_form select,
.woocommerce .variations_form .variations select {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  width: 0 !important;
  position: absolute !important;
  pointer-events: none !important;
}

.variations_form .variations,
.variations_form .variations tbody,
.variations_form .variations tr,
.variations_form .variations th,
.variations_form .variations td {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.variations_form .variations tr {
  margin-bottom: 16px;
}

.variations_form .variations th.label {
  display: block;
  width: 100%;
  padding: 0 0 8px 0;
  font-family: var(--ps-font-head);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ps-ink-soft);
  border: none;
  white-space: nowrap;
  text-align: left;
}

.variations_form .variations td.value {
  display: block;
  width: 100%;
  padding: 0 0 4px 0;
  border: none;
}

/* Pills 自然平鋪換行 */
.ps-switch-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  width: 100%;
}

/* Group wrapper */
.ps-switch-pill {
  position: relative;
  cursor: pointer;
  user-select: none;
}

.ps-switch-pill input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

/* Default pill — mirrors theme's outline secondary button */
.ps-switch-pill__label {
  display: flex;
  align-items: left;
  gap: 8px;
  padding: 12px 24px;
  border: 2px solid var(--ps-border);
  border-radius: var(--ps-radius-pill);
  font-family: var(--ps-font);
  font-size: .9rem;
  font-weight: 600;
  color: var(--ps-ink-mid);
  background: var(--ps-white);
  transition: all var(--ps-transition);
  line-height: 1;
  box-shadow: none;
  text-align: left;        /* ← 加這一行 */
}

.ps-switch-pill__label::before {
  /* content: '';
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--ps-border);
  background: var(--ps-white);
  flex-shrink: 0;
  transition: all var(--ps-transition); */
}

/* Hover — matches theme's secondary button hover */
.ps-switch-pill:hover .ps-switch-pill__label {
  border-color: var(--ps-accent);
  background: var(--ps-accent-bg);
  color: var(--ps-accent);
  transform: translateY(-2px);
  box-shadow: var(--ps-shadow-btn);
}

.ps-switch-pill:hover .ps-switch-pill__label::before {
  border-color: var(--ps-accent);
}

/* Checked — mirrors theme's primary gradient button */
.ps-switch-pill input:checked + .ps-switch-pill__label {
  border-color: transparent;
  background: var(--ps-gradient);
  color: #fff;
  box-shadow: var(--ps-shadow-btn);
  transform: translateY(-2px);
}

.ps-switch-pill input:checked + .ps-switch-pill__label::before {
  background: rgba(255,255,255,.85);
  border-color: rgba(255,255,255,.5);
}

.ps-switch-pill__price {
  font-size: .78rem;
  font-weight: 600;
  opacity: .85;
  margin-left: 2px;
}

/* Variation description */
.woocommerce-variation-description {
  font-size: .875rem;
  color: var(--ps-ink-soft);
  background: var(--ps-bg-section);
  border: 1px solid var(--ps-border);
  border-left: 3px solid var(--ps-accent);
  padding: 12px 15px;
  border-radius: 0 var(--ps-radius-sm) var(--ps-radius-sm) 0;
  margin: 8px 0 14px;
  line-height: 1.6;
  animation: ps-fade-in .3s ease;
}

.woocommerce-variation-price {
  font-family: var(--ps-font-head);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--ps-accent);
  margin-bottom: 10px;
  animation: ps-fade-in .3s ease;
}

.woocommerce-variation-price del {
  font-size: 1.05rem;
  color: var(--ps-ink-soft);
  font-weight: 400;
  margin-right: 8px;
}

/* ================================================================
   2. PRODUCT TABS — vertical sidebar + theme typography
   ================================================================ */

.woocommerce-tabs.wc-tabs-wrapper {
  margin-top: 48px;
  clear: both;
  display: block;
}

/* Nav hidden via functions.php — no styles needed */
.woocommerce-tabs .tabs.wc-tabs {
  display: none !important;
}

/* Each panel stacks vertically */
.woocommerce-tabs .woocommerce-Tabs-panel {
  display: block !important;
  padding: 0 0 32px 0;
  border: none;
  border-bottom: 1px solid var(--ps-border);
  margin-bottom: 8px;
  animation: ps-fade-in .3s ease;
}

.woocommerce-tabs .woocommerce-Tabs-panel:last-child {
  border-bottom: none;
}

/* Panel heading — acts as section title */
.woocommerce-tabs .woocommerce-Tabs-panel h2 {
  font-family: var(--ps-font-head);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ps-ink);
  margin: 0 0 20px;
  padding: 28px 0 16px;
  border-bottom: 2px solid var(--ps-accent-mid);
}

/* Clearfix helper */
.ps-clearfix { clear: both; }

/* ================================================================
   3. CARDS & CONTAINERS
   Matches theme: white bg · 1px border · 15px radius · 0 2px 10px shadow
   ================================================================ */

.ps-section { padding: 4px 0 20px; }

/* ── Block title ── */
.ps-block { margin-bottom: 32px; }

.ps-block-title {
  font-family: var(--ps-font-head);
  font-size: 1rem;
  font-weight: 700;
  color: var(--ps-ink);
  margin: 0 0 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--ps-border);
}

.ps-block--danger .ps-block-title  { color: var(--ps-error);   border-color: rgba(255,68,68,.25); }
.ps-block--caution .ps-block-title { color: var(--ps-warning); border-color: rgba(255,187,51,.35); }

/* ── KV / striped tables ── */
.ps-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 24px;
  font-size: .9rem;
  background: var(--ps-white);
  border: 1px solid var(--ps-border);
  border-radius: var(--ps-radius);
  overflow: hidden;
  box-shadow: var(--ps-shadow-sm);
}

.ps-table th,
.ps-table td {
  padding: 12px 16px;
  border: none;
  border-bottom: 1px solid var(--ps-border);
  text-align: left;
  vertical-align: top;
  line-height: 1.6;
  font-size: 1em;
  color: var(--ps-ink-mid);
}

.ps-table tr:last-child th,
.ps-table tr:last-child td { border-bottom: none; }

.ps-table--kv th {
  background: transparent !important;
  width: 38%;
  font-weight: 600;
  color: var(--ps-ink);
  font-size: .875rem;
}

/* .ps-table--kv td { background: var(--ps-white); } */

.ps-table--striped thead th {
  background: var(--ps-ink);
  color: #fff;
  font-family: var(--ps-font-head);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  padding: 12px 16px;
}

.ps-table--striped tbody tr:nth-child(odd)  td { background: var(--ps-white); }
.ps-table--striped tbody tr:nth-child(even) td { background: var(--ps-bg); }

.ps-table--striped tbody tr:hover td {
  background: var(--ps-accent-bg);
  transition: background var(--ps-transition);
}

/* ── Badges ── */
.ps-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--ps-radius-pill);
  font-size: .75rem;
  font-weight: 600;
}

.ps-badge--nm {
  background: rgba(0,200,81,.12);
  color: #005520;
  border: 1px solid rgba(0,200,81,.30);
}

.ps-badge--evidence {
  background: var(--ps-info-bg);
  color: #005577;
  border: 1px solid rgba(51,181,229,.30);
}

/* ── Chips — theme outline button style ── */
.ps-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  background: transparent;
  border: 2px solid var(--ps-border);
  border-radius: var(--ps-radius-pill);
  font-size: .82rem;
  font-weight: 600;
  margin: 3px 4px 3px 0;
  color: var(--ps-ink-mid);
  text-decoration: none;
  transition: all var(--ps-transition);
}

.ps-chip:hover {
  background: var(--ps-accent-bg);
  border-color: var(--ps-accent);
  color: var(--ps-accent);
  transform: translateY(-2px);
  box-shadow: var(--ps-shadow-btn);
}

.ps-yes { color: var(--ps-success); font-weight: 600; }
.ps-no  { color: var(--ps-ink-soft); }

/* ── Irradiance cards — theme card style ── */
.ps-irradiance-grid { display: flex; gap: 16px; flex-wrap: wrap; }

.ps-irradiance-card {
  flex: 1;
  min-width: 100px;
  background: var(--ps-white);
  border: 1px solid var(--ps-border);
  border-radius: var(--ps-radius);
  padding: 20px 14px;
  text-align: center;
  box-shadow: var(--ps-shadow-sm);
  transition: all var(--ps-transition);
}

.ps-irradiance-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--ps-shadow-md);
}

.ps-irradiance-val {
  display: block;
  font-family: var(--ps-font-head);
  font-size: 2rem;
  font-weight: 700;
  color: var(--ps-accent);
  line-height: 1.1;
}

.ps-irradiance-unit { display: block; font-size: .75rem; color: var(--ps-ink-soft); margin: 3px 0 6px; }
.ps-irradiance-dist { display: block; font-size: .82rem; color: var(--ps-ink); font-weight: 600; }

/* ── Indication cards ── */
.ps-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 15px;
}

.ps-indication-card {
  background: var(--ps-white);
  border: 1px solid var(--ps-border);
  border-radius: var(--ps-radius);
  padding: 20px;
  box-shadow: var(--ps-shadow-sm);
  transition: all var(--ps-transition);
}

.ps-indication-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--ps-shadow-md);
}

.ps-indication-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.ps-indication-header strong {
  font-family: var(--ps-font-head);
  font-weight: 700;
  font-size: .95rem;
  color: var(--ps-ink);
}

.ps-indication-desc {
  font-size: .875rem;
  color: var(--ps-ink-soft);
  margin: 0;
  line-height: 1.6;
}

/* ── Steps ── */
.ps-steps { list-style: none; padding: 0; margin: 0; }

.ps-step {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
  align-items: flex-start;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--ps-border);
}

.ps-step:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }

/* Step number — primary gradient circle */
.ps-step-number {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 50%;
  background: var(--ps-gradient);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--ps-font-head);
  font-weight: 700;
  font-size: .9rem;
  box-shadow: var(--ps-shadow-btn);
  flex-shrink: 0;
}

.ps-step-body { display: flex; gap: 14px; align-items: flex-start; flex: 1; }

.ps-step-img {
  width: 88px;
  height: 88px;
  object-fit: cover;
  border-radius: var(--ps-radius-sm);
  flex-shrink: 0;
  box-shadow: var(--ps-shadow-sm);
}

.ps-step-text strong {
  display: block;
  font-family: var(--ps-font-head);
  font-weight: 700;
  font-size: .95rem;
  color: var(--ps-ink);
  margin-bottom: 4px;
}

.ps-step-text p {
  font-size: .875rem;
  color: var(--ps-ink-soft);
  margin: 0;
  line-height: 1.6;
}

/* ── Links — match theme a { color: var(--rl-primary) } ── */
.ps-section a,
.woocommerce-tabs a:not(.ps-video-btn):not(.ps-chip) {
  color: var(--rl-bg-light)!important;
  text-decoration: none;
  transition: color var(--ps-transition);
}

.ps-section a:hover,
.woocommerce-tabs a:not(.ps-video-btn):not(.ps-chip):hover {
  color: var(--rl-bg-white)!important;
}

/* ── Video / CTA button — exact theme primary button ── */
.ps-video-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 30px;
  background: var(--ps-gradient);
  border: none;
  color: #fff;
  border-radius: var(--ps-radius-pill);
  font-family: var(--ps-font);
  font-size: 1em;
  font-weight: 600;
  text-decoration: none;
  box-shadow: var(--ps-shadow-btn);
  transition: all var(--ps-transition);
}

.ps-video-btn:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: var(--ps-shadow-hover);
  background: var(--ps-gradient);
}

.ps-video-btn--sm { padding: 10px 25px; font-size: .9em; margin-top: 12px; }

/* ── Cert download link — subtle accent link ── */
.ps-cert-dl {
  font-size: .85rem;
  color: var(--ps-accent);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--ps-transition);
}

.ps-cert-dl:hover { color: var(--ps-accent-light); }

/* ── Safety lists ── */
.ps-warning-list,
.ps-precaution-list { padding-left: 0; margin: 0; list-style: none; }

.ps-warning-list li,
.ps-precaution-list li {
  padding: 10px 14px 10px 38px;
  position: relative;
  font-size: .9rem;
  line-height: 1.6;
  border-radius: var(--ps-radius-sm);
  margin-bottom: 6px;
}

.ps-warning-list li {
  background: var(--ps-error-bg);
  color: #8b0000;
  border-left: 3px solid rgba(255,68,68,.40);
}

.ps-warning-list li::before {
  content: '✕';
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  font-weight: 700;
  font-size: .78rem;
  color: var(--ps-error);
}

.ps-precaution-list li {
  background: var(--ps-warning-bg);
  color: #6b3d00;
  border-left: 3px solid rgba(255,187,51,.55);
}

.ps-precaution-list li::before {
  content: '!';
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-weight: 800;
  font-size: .82rem;
  color: var(--ps-warning);
}

/* Vet notice — success theme */
.ps-vet-notice {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--ps-success-bg);
  border: 1px solid rgba(0,200,81,.25);
  border-radius: var(--ps-radius);
  padding: 15px 20px;
  color: #004d1a;
  font-weight: 600;
  font-size: .9rem;
  margin-top: 20px;
  box-shadow: var(--ps-shadow-sm);
}

.ps-vet-notice svg { color: var(--ps-success); flex-shrink: 0; }

/* ── Cert cards — theme card ── */
.ps-cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 15px;
}

.ps-cert-card {
  background: var(--ps-white);
  border: 1px solid var(--ps-border);
  border-radius: var(--ps-radius);
  padding: 20px;
  display: flex;
  gap: 14px;
  align-items: center;
  box-shadow: var(--ps-shadow-sm);
  transition: all var(--ps-transition);
}

.ps-cert-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--ps-shadow-md);
}

.ps-cert-badge img { width: 52px; height: 52px; object-fit: contain; border-radius: var(--ps-radius-sm); }
.ps-cert-info      { display: flex; flex-direction: column; gap: 4px; }

.ps-cert-info strong {
  font-family: var(--ps-font-head);
  font-weight: 700;
  font-size: .9rem;
  color: var(--ps-ink);
}

.ps-cert-num { font-size: .8rem; color: var(--ps-ink-soft); }

/* ── Testimonials ── */
.ps-testimonial {
  background: var(--ps-white);
  border: 1px solid var(--ps-border);
  border-radius: var(--ps-radius);
  padding: 24px 28px;
  margin-bottom: 16px;
  box-shadow: var(--ps-shadow-sm);
  position: relative;
  overflow: hidden;
  transition: all var(--ps-transition);
}

.ps-testimonial::before {
  content: '"';
  position: absolute;
  top: -4px;
  right: 18px;
  font-family: var(--ps-font-head);
  font-size: 5.5rem;
  font-weight: 700;
  color: var(--ps-accent);
  opacity: .12;
  line-height: 1;
  pointer-events: none;
}

.ps-testimonial:hover {
  transform: translateY(-2px);
  box-shadow: var(--ps-shadow-md);
}

.ps-testimonial-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 14px;
  gap: 16px;
  flex-wrap: wrap;
}

.ps-testimonial-meta { display: flex; flex-direction: column; gap: 4px; }

.ps-testimonial-name {
  font-family: var(--ps-font-head);
  font-weight: 700;
  font-size: 1rem;
  color: var(--ps-ink);
}

.ps-testimonial-pet,
.ps-testimonial-condition { font-size: .82rem; color: var(--ps-ink-soft); }

.ps-testimonial-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }

.ps-stars    { font-size: 1.1rem; white-space: nowrap; letter-spacing: 1px; line-height: 1; }
.ps-star          { color: #d1d5db !important; }
.ps-star.ps-star--on { color: #FF6B35 !important; }

.ps-verified {
  font-size: .75rem;
  background: var(--ps-success-bg);
  color: #004d1a;
  padding: 3px 10px;
  border-radius: var(--ps-radius-pill);
  font-weight: 600;
  border: 1px solid rgba(0,200,81,.25);
}

.ps-testimonial-text {
  font-size: .9rem;
  color: var(--ps-ink-mid);
  line-height: 1.6;
  border-left: 3px solid var(--ps-accent-mid);
  padding-left: 16px;
  margin: 0 0 14px;
  font-style: italic;
}

.ps-before-after { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }

.ps-before-after img {
  width: 110px;
  height: 110px;
  object-fit: cover;
  border-radius: var(--ps-radius-sm);
  border: 1px solid var(--ps-border);
  box-shadow: var(--ps-shadow-sm);
}

/* ================================================================
   4. PRODUCT SUMMARY — price + add to cart
   Full theme compatibility
   ================================================================ */

.product .price {
  font-family: var(--ps-font-head) !important;
  font-size: 1.65rem !important;
  font-weight: 700 !important;
  color: var(--ps-accent) !important;
}

.product .price del {
  font-size: 1.1rem !important;
  font-weight: 400 !important;
  color: var(--ps-ink-soft) !important;
  margin-right: 8px !important;
}

/* Add to cart — exact theme primary button */
.single_add_to_cart_button.button.alt {
  background: var(--ps-gradient) !important;
  border: none !important;
  color: #fff !important;
  padding: 12px 30px !important;
  border-radius: var(--ps-radius-pill) !important;
  font-family: var(--ps-font) !important;
  font-size: 1em !important;
  font-weight: 600 !important;
  box-shadow: var(--ps-shadow-btn) !important;
  transition: all var(--ps-transition) !important;
  text-transform: none !important;
  letter-spacing: normal !important;
}

.single_add_to_cart_button.button.alt:hover {
  transform: translateY(-2px) !important;
  box-shadow: var(--ps-shadow-hover) !important;
  background: var(--ps-gradient) !important;
}

/* ================================================================
   5. FORM INPUTS inside tabs — match theme input style
   ================================================================ */

.woocommerce-tabs input[type="text"],
.woocommerce-tabs input[type="email"],
.woocommerce-tabs textarea,
.woocommerce-tabs select {
  background: var(--ps-white) !important;
  border: 1px solid var(--ps-border) !important;
  color: var(--ps-ink) !important;
  padding: 12px 15px;
  border-radius: var(--ps-radius-sm);
  font-size: 1em;
  font-family: var(--ps-font);
  transition: all var(--ps-transition);
}

.woocommerce-tabs input:focus,
.woocommerce-tabs textarea:focus,
.woocommerce-tabs select:focus {
  border-color: var(--ps-accent) !important;
  box-shadow: 0 0 0 3px rgba(255,107,53,.10) !important;
  outline: none;
}

/* Force vertical layout on existing WooCommerce meta */
/* ── Product Meta: vertical layout ── */
.product_meta {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  margin-top: 16px !important;
  padding-top: 16px !important;
  border-top: 1px solid var(--rl-border, #e0e0e0) !important;
}

.product_meta .sku_wrapper,
.product_meta .posted_in,
.product_meta .tagged_as {
  display: flex !important;
  align-items: baseline !important;
  gap: 10px !important;
  font-size: .875rem !important;
  flex-wrap: wrap !important;
  width: 100% !important;
}

.product_meta .sku_wrapper span:first-child,
.product_meta .posted_in span:first-child,
.product_meta .tagged_as span:first-child {
  font-weight: 700 !important;
  color: var(--rl-text-primary, #2a2a2a) !important;
  min-width: 90px !important;
  font-size: .78rem !important;
  text-transform: uppercase !important;
  letter-spacing: .06em !important;
  flex-shrink: 0 !important;
}

.product_meta .sku,
.product_meta .posted_in a,
.product_meta .tagged_as a {
  color: var(--rl-text-secondary, #4a4a4a) !important;
  text-decoration: none !important;
  transition: color .3s ease !important;
}

.product_meta .posted_in a:hover,
.product_meta .tagged_as a:hover {
  color: var(--rl-primary, #FF6B35) !important;
}
/* ── Quantity input ── */
.woocommerce .quantity .qty {
  width: 15em !important;
  text-align: center;
  font-size: 1rem;
  font-weight: 600;
  color: var(--rl-text-primary, #2a2a2a);
  border: 1px solid var(--rl-border, #e0e0e0) !important;
  border-radius: var(--ps-radius-sm, 8px) !important;
  padding: 10px 40px !important;
  background: var(--rl-bg-white, #fff) !important;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: textfield;
}

.woocommerce .quantity .qty:focus {
  border-color: var(--rl-primary, #FF6B35) !important;
  box-shadow: 0 0 0 3px rgba(255,107,53,.10) !important;
  outline: none;
}

/* Remove default browser spinner */
.woocommerce .quantity .qty::-webkit-outer-spin-button,
.woocommerce .quantity .qty::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* ── Quantity wrapper — position context for custom buttons ── */
.woocommerce .quantity {
  position: relative;
  display: inline-flex;
  align-items: center;
}

/* ── Custom +/- buttons injected by JS ── */
.rl-qty-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 6px;
  background: var(--rl-bg-section, #f5f5f5);
  color: var(--rl-text-primary, #2a2a2a);
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .3s ease;
  user-select: none;
  z-index: 1;
}

.rl-qty-btn:hover {
  background: var(--rl-primary, #FF6B35);
  color: #fff;
  box-shadow: 0 2px 8px rgba(255,107,53,.30);
}

.rl-qty-btn:active {
  transform: translateY(-50%) scale(.92);
}

.rl-qty-btn--minus { left: 6px; }
.rl-qty-btn--plus  { right: 6px; }
/* ================================================================
   WooCommerce Product Add-Ons — match variation pill style
   ================================================================ */

/* ── Container ── */
.wc-pao-addons-container {
  margin: 20px 0;
  padding: 20px 0 0;
  border-top: 1px solid var(--rl-border, #e0e0e0);
}

/* ── Each addon group ── */
.wc-pao-addon-container {
  margin-bottom: 20px;
}

/* ── Fieldset reset ── */
.wc-pao-fieldset {
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* ── Group title (legend / label) — match variation th.label ── */
.wc-pao-addon-name,
.wc-pao-legend {
  display: block !important;
  width: 100% !important;
  padding: 0 0 8px 0 !important;
  font-family: var(--ps-font-head) !important;
  font-size: .75rem !important;
  font-weight: 700 !important;
  letter-spacing: .08em !important;
  text-transform: uppercase !important;
  color: var(--ps-ink-soft) !important;
  border: none !important;
  float: none !important;
  text-align: left !important;
}

/* ── Description (印錯包賠) ── */
.wc-pao-addon-description {
  font-size: .78rem;
  color: var(--ps-ink-soft);
  margin: -4px 0 8px;
}

.wc-pao-addon-description p {
  margin: 0;
  color: var(--rl-primary, #FF6B35);
  font-weight: 600;
}

/* ── Wrap row ── */
.wc-pao-addon-wrap {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 10px !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* ── Each option item — becomes a pill ── */
.wc-pao-addon-wrap > div[class*="wc-pao-addon-"] {
  display: flex !important;
  align-items: center !important;
  padding: 0 !important;
}

/* ── Hide native checkbox ── */
.wc-pao-addon-checkbox {
  position: absolute !important;
  opacity: 0 !important;
  width: 0 !important;
  height: 0 !important;
  pointer-events: none !important;
}

/* ── Label becomes pill — match .ps-switch-pill__label ── */
.wc-pao-addon-wrap label {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 10px 20px !important;
  border: 2px solid var(--rl-border, #e0e0e0) !important;
  border-radius: var(--ps-radius-pill, 25px) !important;
  font-family: var(--ps-font) !important;
  font-size: .875rem !important;
  font-weight: 600 !important;
  color: var(--ps-ink-mid) !important;
  background: var(--ps-white, #fff) !important;
  cursor: pointer !important;
  transition: all .3s ease !important;
  line-height: 1 !important;
  margin: 0 !important;
  user-select: none !important;
  white-space: nowrap !important;
}

/* ── Label hover ── */
.wc-pao-addon-wrap label:hover {
  border-color: var(--rl-primary, #FF6B35) !important;
  color: var(--rl-primary, #FF6B35) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 15px rgba(255,107,53,.15) !important;
}

/* ── Checked state — match .ps-switch-pill input:checked ── */
.wc-pao-addon-checkbox:checked + label {
  border-color: var(--rl-primary, #FF6B35) !important;
  color: var(--rl-primary, #FF6B35) !important;
  box-shadow: 0 4px 15px rgba(255,107,53,.20) !important;
  transform: translateY(-2px) !important;
}

/* ── Price badge inside label ── */
.wc-pao-addon-price {
  font-size: .75rem !important;
  font-weight: 600 !important;
  opacity: .80 !important;
  margin-left: 2px !important;
}

/* ── Total price row ── */
#product-addons-total {
  margin-top: 12px;
  font-size: .875rem;
  color: var(--ps-ink-mid);
}

/* ── Validation message ── */
.validation_message.woocommerce-info {
  font-size: .8rem;
  margin-top: 8px;
  padding: 8px 12px;
  border-radius: var(--ps-radius-sm, 8px);
}

/* ── Plug Type — currently empty, hide until configured ── */
#wc-pao-addon-242-1774074423:empty,
#wc-pao-addon-242-1774074423:not(:has(*)) {
  display: none;
}
/* ================================================================
   6. ANIMATION
   ================================================================ */

@keyframes ps-fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ================================================================
   7. RESPONSIVE
   ================================================================ */

@media (max-width: 768px) {
  /* Collapse to top horizontal tabs */
  .woocommerce-tabs.wc-tabs-wrapper { flex-direction: column; }

  .woocommerce-tabs .tabs.wc-tabs {
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--ps-border);
    position: static;
  }

  .woocommerce-tabs .tabs.wc-tabs::-webkit-scrollbar { display: none; }
  .woocommerce-tabs .tabs.wc-tabs li { width: auto; flex-shrink: 0; }

  .woocommerce-tabs .tabs.wc-tabs li a {
    border-right: none;
    border-bottom: 3px solid transparent;
    margin-right: 0;
    margin-bottom: -1px;
    border-radius: 0;
    padding: 10px 12px;
    font-size: .75rem;
  }

  .woocommerce-tabs .tabs.wc-tabs li.active a {
    border-right-color: transparent;
    border-bottom-color: var(--ps-accent);
    background: var(--ps-accent-bg);
  }

  .woocommerce-tabs .woocommerce-Tabs-panel { padding: 24px 0; }

  /* Stack KV table rows */
  .ps-table--kv { display: block; }
  .ps-table--kv thead { display: none; }
  .ps-table--kv tbody, .ps-table--kv tr { display: block; }
  .ps-table--kv th { background: var(--ps-bg-section); border-bottom: none; padding-bottom: 4px; display: block; width: 100%; }
  .ps-table--kv td { padding-top: 4px; display: block; width: 100%; }

  .ps-irradiance-grid { gap: 10px; }
  .ps-irradiance-card { min-width: 80px; padding: 14px 8px; }
  .ps-cert-grid, .ps-card-grid { grid-template-columns: 1fr; }
  .ps-step-body { flex-direction: column; }
  .ps-testimonial::before { font-size: 3.5rem; }
}

@media (max-width: 480px) {
  .ps-switch-group { flex-direction: column; }
  .ps-switch-pill__label { justify-content: center; width: 100%; }
  .woocommerce-tabs .woocommerce-Tabs-panel h2 { font-size: 1.5rem; }
}

/* ================================================================
   8. PRINT
   ================================================================ */

@media print {
  .woocommerce-tabs .tabs.wc-tabs { display: none; }
  .woocommerce-tabs .woocommerce-Tabs-panel { padding: 0; }
  .ps-video-btn, .ps-cert-dl { display: none; }
}