/* =============================================
   GOVEE-STYLE SINGLE PRODUCT PAGE
   Govee Theme — Luckystar Lighting
   ============================================= */

/* ── Variables ── */
:root {
  --sp-bg: #080812;
  --sp-surface: rgba(255,255,255,0.04);
  --sp-border: rgba(255,255,255,0.08);
  --sp-border-hover: rgba(124,77,255,0.5);
  --sp-accent: #7c4dff;
  --sp-accent2: #00e5ff;
  --sp-accent-green: #22cc95;
  --sp-text: #fff;
  --sp-text-muted: rgba(255,255,255,0.55);
  --sp-text-dim: rgba(255,255,255,0.4);
  --sp-radius: 16px;
  --sp-radius-sm: 10px;
  --sp-gap: 40px;
}

/* ── Page Layout ── */
.govee-product-page {
  background: var(--sp-bg);
  color: var(--sp-text);
  min-height: 100vh;
  padding: 40px 24px 80px;
}

.govee-product-inner {
  max-width: 1280px;
  margin: 0 auto;
}

/* ── Breadcrumb ── */
.govee-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--sp-text-dim);
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.govee-breadcrumb a {
  color: var(--sp-text-dim);
  text-decoration: none;
  transition: color 0.2s;
}
.govee-breadcrumb a:hover { color: var(--sp-accent2); }
.govee-breadcrumb span { opacity: 0.4; }

/* ── Main Grid: Gallery + Purchase Box ── */
.govee-product-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-gap);
  align-items: start;
  margin-bottom: 60px;
}
@media (max-width: 900px) {
  .govee-product-grid { grid-template-columns: 1fr; }
}

/* ── Gallery ── */
.govee-product-gallery { position: sticky; top: 24px; }

.govee-gallery-main {
  position: relative;
  border-radius: var(--sp-radius);
  overflow: hidden;
  background: var(--sp-surface);
  border: 1px solid var(--sp-border);
  aspect-ratio: 1;
  margin-bottom: 12px;
}
.govee-gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 20px;
  box-sizing: border-box;
  cursor: zoom-in;
  transition: transform 0.3s;
}
.govee-gallery-main:hover img { transform: scale(1.02); }

.govee-gallery-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  background: linear-gradient(135deg, var(--sp-accent), var(--sp-accent2));
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 20px;
  letter-spacing: 0.5px;
}

.govee-gallery-nav {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 4px;
}
.govee-gallery-nav::-webkit-scrollbar { display: none; }

.govee-gallery-thumb {
  flex-shrink: 0;
  width: 72px;
  height: 72px;
  border-radius: var(--sp-radius-sm);
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s;
  background: var(--sp-surface);
}
.govee-gallery-thumb.active {
  border-color: var(--sp-accent);
  transform: scale(1.05);
}
.govee-gallery-thumb:hover { border-color: var(--sp-accent); }
.govee-gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ── Purchase Box ── */
.govee-purchase-box {
  background: var(--sp-surface);
  border: 1px solid var(--sp-border);
  border-radius: var(--sp-radius);
  padding: 32px 28px;
  position: relative;
  overflow: hidden;
}
.govee-purchase-box::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 260px; height: 260px;
  background: radial-gradient(circle, rgba(124,77,255,0.1) 0%, transparent 65%);
  pointer-events: none;
}

.govee-product-title {
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 800;
  line-height: 1.2;
  margin: 0 0 12px;
  letter-spacing: -0.5px;
}

.govee-product-price {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 20px;
}
.govee-price-current {
  font-size: 28px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--sp-accent2), var(--sp-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.govee-price-compare {
  font-size: 16px;
  color: var(--sp-text-dim);
  text-decoration: line-through;
}
.govee-price-save {
  font-size: 12px;
  font-weight: 700;
  color: var(--sp-accent-green);
  background: rgba(34,204,149,0.1);
  border: 1px solid rgba(34,204,149,0.3);
  padding: 2px 8px;
  border-radius: 6px;
}

/* SKU + Stock */
.govee-product-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  font-size: 13px;
  color: var(--sp-text-dim);
}
.govee-product-sku { font-weight: 600; color: var(--sp-text-muted); }
.govee-product-stock {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--sp-accent-green);
  font-weight: 600;
}
.govee-product-stock .stock-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--sp-accent-green);
  box-shadow: 0 0 6px var(--sp-accent-green);
  animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* Variant Selectors */
.govee-variant-group {
  margin-bottom: 20px;
}
.govee-variant-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--sp-text-dim);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.govee-variant-label .selected-value {
  color: var(--sp-text);
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
}

/* Color swatches */
.govee-color-swatches {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.govee-swatch {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  outline: none;
}
.govee-swatch:hover { transform: scale(1.1); }
.govee-swatch.active {
  border-color: var(--sp-accent);
  box-shadow: 0 0 0 3px rgba(124,77,255,0.4);
}
.govee-swatch[data-color="white"] { background: #f5f5f7; border-color: rgba(255,255,255,0.3); }
.govee-swatch[data-color="black"] { background: #1a1a1a; border-color: rgba(255,255,255,0.2); }

/* Dropdown variants */
.govee-variant-dropdown {
  position: relative;
}
.govee-variant-select {
  width: 100%;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--sp-border);
  border-radius: var(--sp-radius-sm);
  padding: 12px 40px 12px 16px;
  color: var(--sp-text);
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  outline: none;
  appearance: none;
  transition: border-color 0.3s;
  box-sizing: border-box;
}
.govee-variant-select:focus { border-color: var(--sp-accent); }
.govee-variant-dropdown::after {
  content: '';
  position: absolute;
  right: 14px; top: 50%;
  transform: translateY(-50%);
  width: 0; height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid rgba(255,255,255,0.4);
  pointer-events: none;
}
.govee-variant-select option { background: #1a1a2e; color: #fff; }

.govee-variant-divider {
  height: 1px;
  background: var(--sp-border);
  margin: 20px 0;
}

/* Quantity + Add to Cart */
.govee-cart-row {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 20px;
}

.govee-qty-control {
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--sp-border);
  border-radius: var(--sp-radius-sm);
  overflow: hidden;
  flex-shrink: 0;
}
.govee-qty-btn {
  width: 40px; height: 44px;
  background: transparent;
  border: none;
  color: var(--sp-text);
  font-size: 18px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s;
}
.govee-qty-btn:hover { background: rgba(255,255,255,0.08); }
.govee-qty-input {
  width: 44px; height: 44px;
  background: transparent;
  border: none;
  border-left: 1px solid var(--sp-border);
  border-right: 1px solid var(--sp-border);
  color: var(--sp-text);
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  font-family: inherit;
  outline: none;
}

.govee-add-to-cart {
  flex: 1;
  background: linear-gradient(135deg, var(--sp-accent), #00b4d8);
  border: none;
  border-radius: var(--sp-radius-sm);
  padding: 14px 24px;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  letter-spacing: 0.5px;
  transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
  box-shadow: 0 4px 24px rgba(124,77,255,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.govee-add-to-cart:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(124,77,255,0.5);
}
.govee-add-to-cart:active { transform: translateY(0); }
.govee-add-to-cart.added {
  background: var(--sp-accent-green);
  box-shadow: 0 4px 24px rgba(34,204,149,0.35);
}
.govee-add-to-cart.loading { opacity: 0.7; pointer-events: none; }

/* Buy Now / Wishlist row */
.govee-secondary-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}
.govee-btn-outline {
  flex: 1;
  background: transparent;
  border: 1px solid var(--sp-border);
  border-radius: var(--sp-radius-sm);
  padding: 12px 16px;
  color: var(--sp-text);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s;
}
.govee-btn-outline:hover {
  border-color: var(--sp-accent);
  color: var(--sp-accent);
  background: rgba(124,77,255,0.08);
}

/* Product highlights */
.govee-highlights {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.govee-highlights li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--sp-text-muted);
}
.govee-highlights li .check-icon {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: rgba(34,204,149,0.15);
  border: 1px solid rgba(34,204,149,0.4);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.govee-highlights li .check-icon svg { width: 10px; height: 10px; }

/* ── Tab Navigation ── */
.govee-tabs-nav {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--sp-border);
  margin-bottom: 40px;
  overflow-x: auto;
  scrollbar-width: none;
}
.govee-tabs-nav::-webkit-scrollbar { display: none; }

.govee-tab-btn {
  padding: 14px 24px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--sp-text-dim);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
  letter-spacing: 0.3px;
}
.govee-tab-btn:hover { color: var(--sp-text); }
.govee-tab-btn.active {
  color: var(--sp-accent);
  border-bottom-color: var(--sp-accent);
}

/* ── Tab Content Panels ── */
.govee-tab-panel {
  display: none;
  animation: fadeInUp 0.4s ease;
}
.govee-tab-panel.active { display: block; }

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

/* Description panel */
.govee-description-content {
  max-width: 900px;
}
.govee-description-content p {
  font-size: 15px;
  line-height: 1.7;
  color: var(--sp-text-muted);
  margin: 0 0 16px;
}
.govee-description-content ul {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.govee-description-content ul li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: var(--sp-text-muted);
  line-height: 1.5;
}
.govee-description-content ul li::before {
  content: '✓';
  color: var(--sp-accent-green);
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}

/* Specifications panel */
.govee-specs-table {
  width: 100%;
  border-collapse: collapse;
  max-width: 700px;
}
.govee-specs-table tr {
  border-bottom: 1px solid var(--sp-border);
}
.govee-specs-table tr:last-child { border-bottom: none; }
.govee-specs-table td {
  padding: 12px 0;
  font-size: 14px;
  vertical-align: top;
}
.govee-specs-table td:first-child {
  color: var(--sp-text-dim);
  width: 40%;
  font-weight: 600;
  padding-right: 20px;
}
.govee-specs-table td:last-child { color: var(--sp-text-muted); }

/* Reviews panel */
.govee-reviews-placeholder {
  text-align: center;
  padding: 48px 24px;
  background: var(--sp-surface);
  border: 1px solid var(--sp-border);
  border-radius: var(--sp-radius);
}
.govee-reviews-placeholder p {
  color: var(--sp-text-dim);
  font-size: 14px;
  margin: 12px 0 0;
}

/* FAQ panel */
.govee-faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 700px;
}
.govee-faq-item {
  background: var(--sp-surface);
  border: 1px solid var(--sp-border);
  border-radius: var(--sp-radius-sm);
  overflow: hidden;
  transition: border-color 0.2s;
}
.govee-faq-item:hover { border-color: rgba(124,77,255,0.3); }
.govee-faq-item.open { border-color: rgba(124,77,255,0.4); }
.govee-faq-question {
  width: 100%;
  background: transparent;
  border: none;
  padding: 16px 20px;
  color: var(--sp-text);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: color 0.2s;
}
.govee-faq-question:hover { color: var(--sp-accent2); }
.govee-faq-question::after {
  content: '+';
  font-size: 18px;
  font-weight: 300;
  color: var(--sp-text-dim);
  transition: transform 0.3s;
  flex-shrink: 0;
}
.govee-faq-item.open .govee-faq-question::after { transform: rotate(45deg); }
.govee-faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.2s;
}
.govee-faq-item.open .govee-faq-answer {
  max-height: 300px;
}
.govee-faq-answer-inner {
  padding: 0 20px 16px;
  font-size: 13px;
  color: var(--sp-text-muted);
  line-height: 1.6;
}

/* ── Related Products ── */
.govee-related-section {
  margin-top: 80px;
  border-top: 1px solid var(--sp-border);
  padding-top: 60px;
}
.govee-section-title {
  font-size: 24px;
  font-weight: 800;
  margin: 0 0 28px;
  letter-spacing: -0.5px;
}
.govee-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

/* ── WooCommerce Override Helpers ── */
.woocommerce-product-gallery { opacity: 1 !important; }
.woocommerce div.product div.images { margin-bottom: 0; }
.woocommerce div.product div.summary { margin-bottom: 0; float: none; width: 100%; }
.woocommerce div.product .product_title { display: none; } /* We render our own */
.woocommerce div.product p.price { display: none; } /* We render our own */
.woocommerce div.product form.cart { display: none; } /* We render our own */

/* ── Responsive ── */
@media (max-width: 768px) {
  .govee-product-page { padding: 20px 16px 60px; }
  .govee-purchase-box { padding: 24px 20px; }
  .govee-gallery-main { aspect-ratio: 4/3; }
  .govee-cart-row { flex-direction: column; align-items: stretch; }
  .govee-qty-control { width: 100%; justify-content: center; }
  .govee-add-to-cart { width: 100%; }
  .govee-secondary-actions { flex-direction: column; }
}
