/**
 * biXci Single Product Page - Master CSS Stylesheet
 * Brand Colors: Yellow #FFDB00, Royal Blue #0359B3, Neutral #F8FAFC, Success #00A650
 */

:root {
  --bixci-primary: #0359b3;
  --bixci-primary-hover: #024792;
  --bixci-primary-light: #f0f7ff;
  --bixci-yellow: #ffdb00;
  --bixci-yellow-dark: #e6c800;
  --bixci-green: #00a650;
  --bixci-green-light: #e6f7ee;
  --bixci-red: #e63946;
  --bixci-bg-app: #f8fafc;
  --bixci-bg-card: #ffffff;
  --bixci-text-main: #0f172a;
  --bixci-text-muted: #64748b;
  --bixci-border: #e2e8f0;
  --bixci-radius-card: 16px;
  --bixci-radius-btn: 10px;
  --bixci-shadow-card: 0 4px 16px -2px rgba(15, 23, 42, 0.06);
  --bixci-shadow-hover: 0 10px 30px -4px rgba(3, 89, 179, 0.16);
}

/* Fix legacy theme clearfix (Astra/WooCommerce ::before) occupying Grid Cell 1 */
ul.products::before,
ul.products::after,
.products::before,
.products::after,
.related.products::before,
.up-sells.products::before {
  display: none !important;
  content: none !important;
}

/* Master Reset & Wrapper */
.bixci-single-wrapper {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  color: var(--bixci-text-main);
  max-width: 1240px;
  margin: 0 auto;
  padding: 16px;
  box-sizing: border-box;
}

/* 1. DYNAMIC FREE SHIPPING PROGRESS BAR */
.bixci-single-shipping-bar {
  background: #ffffff;
  border: 1px solid var(--bixci-border);
  border-left: 5px solid var(--bixci-yellow);
  border-radius: var(--bixci-radius-card);
  padding: 12px 18px;
  margin-bottom: 20px;
  box-shadow: var(--bixci-shadow-card);
}

.bixci-single-shipping-bar-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  margin-bottom: 8px;
}

.bixci-single-shipping-icon { font-size: 18px; }
.bixci-single-shipping-text { flex: 1; color: var(--bixci-text-main); }

.bixci-single-shipping-pct {
  background: var(--bixci-yellow);
  color: #000;
  font-weight: 800;
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 12px;
}

.bixci-single-progress-track {
  width: 100%;
  height: 8px;
  background: var(--bixci-border);
  border-radius: 4px;
  overflow: hidden;
}

.bixci-single-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--bixci-yellow) 0%, var(--bixci-green) 100%);
  border-radius: 4px;
  transition: width 0.4s ease-in-out;
}

/* 2. MAIN SINGLE PRODUCT GRID */
.bixci-single-main-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-bottom: 30px;
}

@media (min-width: 900px) {
  .bixci-single-main-grid {
    grid-template-columns: 1.1fr 1fr;
    gap: 36px;
  }
}

/* LEFT COLUMN: MEDIA & GALLERY */
.bixci-single-gallery-column {
  position: relative;
}

.bixci-single-gallery-wrapper {
  position: sticky;
  top: 20px;
}

.bixci-single-badges-top {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.bixci-single-badge {
  font-size: 11px;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.bixci-badge-discount { background: var(--bixci-yellow); color: #000; }
.bixci-badge-shipping { background: var(--bixci-green-light); color: var(--bixci-green); border: 1px solid var(--bixci-green); }
.bixci-badge-stock { background: #fff0f0; color: var(--bixci-red); }

.bixci-single-main-media {
  background: #ffffff;
  border: 1px solid var(--bixci-border);
  border-radius: var(--bixci-radius-card);
  overflow: hidden;
  position: relative;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--bixci-shadow-card);
}

.bixci-single-main-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.bixci-single-main-media:hover .bixci-single-main-img {
  transform: scale(1.04);
}

.bixci-single-thumbnails-list {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.bixci-single-thumb {
  width: 70px;
  height: 70px;
  min-width: 70px;
  border: 2px solid var(--bixci-border);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  background: #ffffff;
  transition: all 0.2s ease;
}

.bixci-single-thumb.active,
.bixci-single-thumb:hover {
  border-color: var(--bixci-primary);
  box-shadow: 0 0 0 2px var(--bixci-primary-light);
}

.bixci-single-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* RIGHT COLUMN: BUY BOX & SALES ACCELERATOR */
.bixci-single-buybox-column {
  background: #ffffff;
  border: 1px solid var(--bixci-border);
  border-radius: var(--bixci-radius-card);
  padding: 24px;
  box-shadow: var(--bixci-shadow-card);
  display: flex;
  flex-direction: column;
}

.bixci-single-brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.bixci-single-brand-tag {
  font-size: 12px;
  font-weight: 800;
  color: var(--bixci-primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.bixci-single-sku-tag {
  font-size: 11px;
  color: var(--bixci-text-muted);
}

.bixci-single-title {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.3;
  margin: 0 0 10px 0;
  color: var(--bixci-text-main);
}

.bixci-single-rating-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.bixci-single-stars { color: var(--bixci-yellow-dark); letter-spacing: -1px; }
.bixci-single-rating-num { font-weight: 800; }
.bixci-single-rating-count { color: var(--bixci-text-muted); }
.bixci-single-sep { color: var(--bixci-border); }
.bixci-single-sales-count { color: var(--bixci-green); font-weight: 600; }

.bixci-single-urgency-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  background: #f1f5f9;
  padding: 8px 12px;
  border-radius: 8px;
  margin-bottom: 16px;
  color: var(--bixci-text-main);
}

.bixci-single-pulse-dot {
  width: 8px;
  height: 8px;
  background: var(--bixci-green);
  border-radius: 50%;
  box-shadow: 0 0 0 rgba(0, 166, 80, 0.4);
  animation: singlePulse 1.8s infinite;
}

@keyframes singlePulse {
  0% { box-shadow: 0 0 0 0 rgba(0, 166, 80, 0.7); }
  70% { box-shadow: 0 0 0 8px rgba(0, 166, 80, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 166, 80, 0); }
}

/* PRICING BLOCK */
.bixci-single-price-block {
  border-top: 1px solid var(--bixci-border);
  border-bottom: 1px solid var(--bixci-border);
  padding: 16px 0;
  margin-bottom: 16px;
}

.bixci-single-price-original {
  font-size: 13px;
  color: var(--bixci-text-muted);
  text-decoration: line-through;
  display: block;
}

.bixci-single-price-main {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.bixci-single-currency { font-size: 20px; font-weight: 700; }
.bixci-single-amount { font-size: 32px; font-weight: 900; line-height: 1; }

.bixci-single-price-discount-tag {
  background: var(--bixci-yellow);
  color: #000;
  font-weight: 800;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 6px;
}

.bixci-single-financing-card {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-size: 13px;
  color: var(--bixci-green);
}

/* FULFILLMENT & TRUST CARD */
.bixci-single-fulfillment-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--bixci-primary-light);
  border: 1px solid rgba(3, 89, 179, 0.15);
  border-radius: var(--bixci-radius-card);
  padding: 14px;
  margin-bottom: 20px;
}

.bixci-single-ful-item {
  display: flex;
  gap: 10px;
  font-size: 12px;
}

.bixci-single-ful-icon { font-size: 16px; }

.bixci-single-ful-info strong { display: block; color: var(--bixci-text-main); }
.bixci-single-ful-info span { color: var(--bixci-text-muted); }

/* VARIATION PILLS */
.bixci-single-variations-form {
  margin-bottom: 20px;
}

.bixci-single-attr-group {
  margin-bottom: 14px;
}

.bixci-single-attr-title {
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 8px;
}

.bixci-single-selected-val { color: var(--bixci-primary); }

.bixci-single-attr-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.bixci-single-attr-pill {
  background: #ffffff;
  border: 1px solid var(--bixci-border);
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.bixci-single-attr-pill.selected {
  border-color: var(--bixci-primary);
  background: var(--bixci-primary-light);
  color: var(--bixci-primary);
  font-weight: 800;
  box-shadow: 0 0 0 1px var(--bixci-primary);
}

/* QUANTITY & ACTION BUTTONS */
.bixci-single-actions-wrapper {
  margin-top: auto;
}

.bixci-single-qty-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.bixci-single-qty-label { font-size: 13px; font-weight: 700; }

.bixci-single-qty-box {
  display: inline-flex;
  border: 1px solid var(--bixci-border);
  border-radius: 8px;
  overflow: hidden;
}

.bixci-single-qty-btn {
  background: #f1f5f9;
  border: none;
  width: 34px;
  height: 34px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

.bixci-single-qty-input {
  width: 44px;
  border: none;
  text-align: center;
  font-weight: 700;
  font-size: 14px;
}

.bixci-single-stock-status {
  font-size: 12px;
  font-weight: 600;
  color: var(--bixci-green);
}

.bixci-single-buttons-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bixci-single-btn {
  width: 100%;
  padding: 14px;
  border-radius: var(--bixci-radius-btn);
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  box-sizing: border-box;
  transition: all 0.2s ease;
}

.bixci-btn-buy-now {
  background: var(--bixci-yellow);
  color: #000000;
}

.bixci-btn-buy-now:hover {
  background: var(--bixci-yellow-dark);
}

.bixci-btn-add-cart {
  background: var(--bixci-primary);
  color: #ffffff;
}

.bixci-btn-add-cart:hover {
  background: var(--bixci-primary-hover);
}

.bixci-btn-whatsapp {
  background: #25D366;
  color: #ffffff;
}

.bixci-btn-whatsapp:hover {
  background: #1eb956;
}

/* 3. TABS CONTAINER */
.bixci-single-tabs-container {
  background: #ffffff;
  border: 1px solid var(--bixci-border);
  border-radius: var(--bixci-radius-card);
  padding: 20px;
  margin-bottom: 30px;
  box-shadow: var(--bixci-shadow-card);
}

.bixci-single-tabs-header {
  display: flex;
  gap: 8px;
  border-bottom: 2px solid var(--bixci-border);
  padding-bottom: 2px;
  margin-bottom: 20px;
  overflow-x: auto;
}

.bixci-single-tab-btn {
  background: none;
  border: none;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 700;
  color: var(--bixci-text-muted);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -3px;
  white-space: nowrap;
}

.bixci-single-tab-btn.active {
  color: var(--bixci-primary);
  border-bottom-color: var(--bixci-primary);
}

.bixci-single-tab-pane {
  display: none;
}

.bixci-single-tab-pane.active {
  display: block;
}

.bixci-single-specs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.bixci-single-specs-table td {
  padding: 10px;
  border-bottom: 1px solid var(--bixci-border);
}

.bixci-single-specs-table td:first-child {
  font-weight: 600;
  color: var(--bixci-text-muted);
  width: 30%;
}

/* 4. FIXED STICKY MOBILE BOTTOM BUY BAR */
.bixci-single-sticky-mobile-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #ffffff;
  border-top: 1px solid var(--bixci-border);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 9999;
  box-shadow: 0 -4px 16px rgba(0,0,0,0.1);
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.bixci-single-sticky-mobile-bar.active {
  transform: translateY(0);
}

@media (min-width: 900px) {
  .bixci-single-sticky-mobile-bar {
    display: none !important;
  }
}

.bixci-single-sticky-thumb img {
  width: 42px;
  height: 42px;
  object-fit: cover;
  border-radius: 6px;
}

.bixci-single-sticky-info { flex: 1; }
.bixci-single-sticky-title { font-size: 12px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 180px; }
.bixci-single-sticky-price { font-size: 15px; font-weight: 900; color: var(--bixci-text-main); }

.bixci-single-sticky-btn {
  background: var(--bixci-yellow);
  color: #000;
  border: none;
  border-radius: 8px;
  padding: 10px 18px;
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
}
