/* ═══════════════════════════════════════════════════════════
   SUNCONNECT — Product Detail Page Styles
   ═══════════════════════════════════════════════════════════ */

/* ── PRODUCT DETAIL LAYOUT ── */
.product-detail { padding: 16px 16px 0; }

/* ── IMAGE GALLERY ── */
.gallery { position: relative; background: var(--gray-card); border-radius: var(--radius); overflow: hidden; margin-bottom: 12px; }
.gallery-main { aspect-ratio: 1 / 1; overflow: hidden; position: relative; }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.4s ease; }
.gallery-main img:hover { transform: scale(1.03); }
.gallery-badge { position: absolute; top: 14px; left: 14px; padding: 4px 11px; border-radius: 50px; font-size: 11px; font-weight: 700; background: var(--orange); color: var(--white); z-index: 2; letter-spacing: 0.02em; }
.gallery-actions { position: absolute; top: 10px; right: 10px; display: flex; gap: 8px; z-index: 2; }
.gallery-wishlist { width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,0.9); border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 15px; color: var(--text-muted); transition: all 0.15s; }
.gallery-wishlist:hover, .gallery-wishlist.active { color: #e11d48; background: var(--white); }
.gallery-thumbs { display: flex; gap: 8px; }
.gallery-thumb { flex: 1; aspect-ratio: 1 / 1; border-radius: 10px; overflow: hidden; cursor: pointer; border: 2px solid transparent; transition: border-color 0.15s; background: var(--gray-card); }
.gallery-thumb.active { border-color: var(--blue); }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ── PRODUCT INFO ── */
.product-info-block { padding: 20px 0 0; }
.product-meta-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.product-category-label { font-size: 11px; font-weight: 700; color: var(--blue); text-transform: uppercase; letter-spacing: 0.07em; }
.product-rating { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--text-secondary); font-weight: 600; }
.product-rating .stars { color: #f59e0b; font-size: 11px; letter-spacing: 1px; }
.product-title { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; color: var(--text-primary); margin-bottom: 10px; }
.product-price-row { display: flex; align-items: baseline; gap: 10px; margin-bottom: 16px; }
.detail-price { font-size: 26px; font-weight: 800; color: var(--orange); letter-spacing: -0.02em; }
.detail-price-old { font-size: 15px; font-weight: 500; color: var(--text-muted); text-decoration: line-through; }
.detail-saving { font-size: 12px; font-weight: 700; color: var(--blue); background: var(--blue-light); padding: 3px 9px; border-radius: 50px; }
.stock-badge { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 50px; letter-spacing: 0.02em; }
.stock-badge.stock-in { background: #dcfce7; color: #166534; }
.stock-badge.stock-low { background: #fef3c7; color: #92400e; }
.stock-badge.stock-out { background: #fee2e2; color: #991b1b; }
.btn-add-cart:disabled,
.btn-buy-now:disabled,
.btn-layby.is-disabled { opacity: 0.55; cursor: not-allowed; pointer-events: none; }
.btn-layby { text-decoration: none; }
.qty-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.divider { height: 1px; background: var(--border); margin: 16px 0; }

/* ── VARIANTS ── */
.variant-label { font-size: 12px; font-weight: 700; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 10px; }
.color-options { display: flex; gap: 10px; margin-bottom: 16px; }
.color-swatch { width: 28px; height: 28px; border-radius: 50%; cursor: pointer; border: 2.5px solid transparent; transition: border-color 0.15s, transform 0.15s; outline: 2px solid transparent; outline-offset: 2px; }
.color-swatch:hover { transform: scale(1.1); }
.color-swatch.active { outline-color: var(--blue); }
.colour-options-row { margin-bottom: 16px; display: flex; gap: 10px; flex-wrap: wrap; }
.color-swatch-image { width: 36px; height: 36px; padding: 0; overflow: hidden; }
.color-swatch-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.color-swatch-plain { background: var(--gray-card); }
.selected-colour-name { color: var(--text-primary); font-weight: 700; }
.storage-options { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.storage-btn { padding: 7px 16px; border-radius: 50px; border: 1.5px solid var(--border); background: var(--white); font-size: 13px; font-weight: 600; color: var(--text-secondary); cursor: pointer; font-family: inherit; transition: all 0.15s; }
.storage-btn.active { background: var(--blue); border-color: var(--blue); color: var(--white); }
.storage-btn:hover:not(.active) { border-color: var(--orange); color: var(--orange); }

/* ── CONDITION DROPDOWN (eBay-style) ── */
.condition-dropdown { position: relative; margin-bottom: 14px; max-width: 280px; }
.condition-dropdown-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  background: var(--white);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.condition-dropdown-trigger:hover { border-color: var(--blue); }
.condition-dropdown.is-open .condition-dropdown-trigger {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-light);
}
.condition-dropdown-value { flex: 1; line-height: 1.25; }
.condition-dropdown-chevron { font-size: 11px; color: var(--text-muted); transition: transform 0.2s; flex-shrink: 0; }
.condition-dropdown.is-open .condition-dropdown-chevron { transform: rotate(180deg); }
.condition-dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 200; /* below toast (300) */
  list-style: none;
  margin: 0;
  padding: 4px;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
  max-height: 160px;
  overflow-y: auto;
}
.condition-dropdown-menu[hidden] { display: none; }
.condition-dropdown-option {
  display: block;
  width: 100%;
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
  line-height: 1.25;
  transition: background 0.15s;
}
a.condition-dropdown-option:hover { background: var(--blue-light); color: var(--blue-dark); }
.condition-dropdown-option.is-active { background: var(--gray-card); color: var(--text-primary); }
.condition-dropdown-option.is-out-of-stock { color: var(--text-muted); cursor: default; }
.condition-dropdown-option.is-active.is-out-of-stock { background: #f9fafb; }

/* ── USED PHONE INFO CARD ── */
.used-info-card { border: 1.5px solid var(--border); border-radius: var(--radius); padding: 16px; margin-bottom: 20px; background: var(--white); }
.used-info-title { font-size: 15px; font-weight: 800; color: var(--text-primary); margin-bottom: 12px; }
.used-info-table { width: 100%; border-collapse: collapse; }
.used-info-table tr { border-bottom: 1px solid var(--border); }
.used-info-table tr:last-child { border-bottom: none; }
.used-info-table td { padding: 10px 0; font-size: 13px; vertical-align: top; }
.used-info-table td:first-child { width: 42%; color: var(--text-muted); font-weight: 600; padding-right: 12px; }
.used-info-table td:last-child { color: var(--text-primary); font-weight: 500; }
.used-grade-badge { display: inline-block; padding: 3px 10px; border-radius: 50px; font-size: 12px; font-weight: 700; background: var(--blue-light); color: var(--blue-dark); }

/* ── QTY + CTA ── */
.cta-row { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.qty-control { display: flex; align-items: center; border: 1.5px solid var(--border); border-radius: 50px; overflow: hidden; }
.qty-btn { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border: none; background: none; cursor: pointer; font-size: 14px; color: var(--text-secondary); transition: background 0.15s, color 0.15s; font-family: inherit; }
.qty-btn:hover { background: var(--gray-card); color: var(--orange); }
.qty-display { width: 36px; text-align: center; font-size: 14px; font-weight: 700; color: var(--text-primary); border: none; background: none; pointer-events: none; user-select: none; }
.btn-add-cart { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 20px; background: var(--blue); color: var(--white); border: none; border-radius: 50px; font-size: 14px; font-weight: 700; cursor: pointer; font-family: inherit; transition: background 0.15s, transform 0.15s; }
.btn-add-cart:hover { background: var(--blue-dark); transform: translateY(-1px); }
.btn-add-cart:active { transform: translateY(0); }
.btn-buy-now { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 20px; background: var(--orange); color: var(--white); border: none; border-radius: 50px; font-size: 14px; font-weight: 700; cursor: pointer; font-family: inherit; transition: background 0.15s, transform 0.15s; }
.btn-buy-now:hover { background: var(--orange-dark); transform: translateY(-1px); }

/* ── TRUST BADGES ── */
.trust-row { display: flex; border: 1.5px solid var(--border); border-radius: var(--radius); overflow: hidden; margin-bottom: 20px; }
.trust-item { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 12px 6px; text-align: center; border-right: 1px solid var(--border); font-size: 10px; font-weight: 600; color: var(--text-secondary); }
.trust-item:last-child { border-right: none; }
.trust-item i { font-size: 16px; color: var(--blue); }

/* ── TABS ── */
.tabs { margin: 0 -16px; border-top: 1px solid var(--border); }
.tabs-nav { display: flex; overflow-x: auto; scrollbar-width: none; padding: 0 16px; border-bottom: 1px solid var(--border); }
.tabs-nav::-webkit-scrollbar { display: none; }
.tab-btn { flex-shrink: 0; padding: 13px 18px; font-size: 13px; font-weight: 700; color: var(--text-muted); border: none; background: none; cursor: pointer; font-family: inherit; border-bottom: 2.5px solid transparent; transition: color 0.15s, border-color 0.15s; margin-bottom: -1px; }
.tab-btn.active { color: var(--blue); border-bottom-color: var(--blue); }
.tab-btn:hover:not(.active) { color: var(--text-primary); }
.tab-panel { display: none; padding: 20px 16px; }
.tab-panel.active { display: block; }
.description-text { font-size: 14px; color: var(--text-secondary); line-height: 1.7; margin-bottom: 16px; }
.feature-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.feature-list li { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; color: var(--text-secondary); }
.feature-list li i { color: var(--blue); font-size: 13px; margin-top: 2px; flex-shrink: 0; }

/* ── SPECS TABLE ── */
.specs-table { width: 100%; border-collapse: collapse; }
.specs-table tr { border-bottom: 1px solid var(--border); }
.specs-table tr:last-child { border-bottom: none; }
.specs-table td { padding: 11px 0; font-size: 13px; vertical-align: top; }
.specs-table td:first-child { width: 42%; color: var(--text-muted); font-weight: 600; padding-right: 12px; }
.specs-table td:last-child { color: var(--text-primary); font-weight: 500; }

/* ── REVIEWS ── */
.reviews-summary { display: flex; gap: 20px; align-items: center; padding: 16px; background: var(--gray-card); border-radius: var(--radius); margin-bottom: 20px; }
.review-score { text-align: center; flex-shrink: 0; }
.review-score .big-num { font-size: 40px; font-weight: 800; color: var(--text-primary); line-height: 1; letter-spacing: -0.03em; }
.review-score .stars-row { color: #f59e0b; font-size: 14px; letter-spacing: 2px; margin: 4px 0 2px; }
.review-score .count { font-size: 11px; color: var(--text-muted); font-weight: 500; }
.review-bars { flex: 1; display: flex; flex-direction: column; gap: 5px; }
.bar-row { display: flex; align-items: center; gap: 7px; }
.bar-label { font-size: 11px; color: var(--text-muted); font-weight: 600; width: 12px; text-align: right; flex-shrink: 0; }
.bar-track { flex: 1; height: 5px; background: var(--border); border-radius: 50px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--blue); border-radius: 50px; }
.bar-pct { font-size: 10px; color: var(--text-muted); width: 24px; text-align: right; flex-shrink: 0; }
.review-card { border-bottom: 1px solid var(--border); padding: 16px 0; }
.review-card:last-child { border-bottom: none; }
.review-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.reviewer-name { font-size: 13px; font-weight: 700; color: var(--text-primary); }
.review-date { font-size: 11px; color: var(--text-muted); }
.review-stars { color: #f59e0b; font-size: 12px; letter-spacing: 1px; margin-bottom: 6px; }
.review-text { font-size: 13px; color: var(--text-secondary); line-height: 1.6; }
.review-verified { font-size: 10px; color: var(--blue); font-weight: 700; display: flex; align-items: center; gap: 4px; margin-top: 6px; }

/* ── SIMILAR / RELATED PRODUCTS ── */
.related-section { padding: 24px 16px; border-top: 1px solid var(--border); }
.similar-match-badge { position: absolute; bottom: 6px; left: 6px; background: rgba(59,189,175,0.90); color: #fff; font-size: 9px; font-weight: 700; padding: 2px 7px; border-radius: 50px; letter-spacing: 0.04em; text-transform: uppercase; white-space: nowrap; max-width: calc(100% - 12px); overflow: hidden; text-overflow: ellipsis; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.section-header h2 { font-size: 17px; font-weight: 800; letter-spacing: -0.02em; }
.btn-see-all { background: var(--blue-light); color: var(--blue); border: none; padding: 6px 14px; border-radius: 50px; font-size: 12px; font-weight: 600; cursor: pointer; font-family: inherit; text-decoration: none; display: inline-block; }
.related-scroll { display: flex; gap: 12px; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
.related-scroll::-webkit-scrollbar { display: none; }
.related-card { flex-shrink: 0; width: 140px; background: var(--gray-card); border-radius: var(--radius); overflow: hidden; cursor: pointer; transition: transform 0.2s, box-shadow 0.2s; text-decoration: none; }
.related-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,0.1); }
.related-img { aspect-ratio: 1 / 1; overflow: hidden; }
.related-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.related-info { padding: 9px 11px 11px; }
.related-cat { font-size: 9px; color: var(--text-muted); font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 2px; }
.related-name { font-size: 12px; font-weight: 700; color: var(--text-primary); margin-bottom: 3px; line-height: 1.3; }
.related-price { font-size: 12px; font-weight: 700; color: var(--orange); }



/* ── ADD-TO-CART ANIMATION ── */
@keyframes pop { 0% { transform: scale(1); } 50% { transform: scale(1.06); } 100% { transform: scale(1); } }
.btn-add-cart.added { animation: pop 0.25s ease; background: var(--orange); }

/* ── REVIEWS ── */
.review-summary { display: grid; gap: 16px; margin: 20px 0; padding: 16px; background: var(--gray-card); border-radius: 14px; }
.review-summary-score { text-align: center; }
.review-stars, .review-card-stars { color: #f59e0b; font-size: 14px; }
.review-star-muted { color: #d1d5db; }
.review-summary-average { font-size: 28px; font-weight: 800; margin-top: 4px; }
.review-summary-count { font-size: 13px; color: var(--text-muted); }
.review-breakdown-row { display: grid; grid-template-columns: 36px 1fr 40px; gap: 8px; align-items: center; font-size: 12px; margin-bottom: 6px; }
.review-breakdown-bar { height: 8px; background: #e5e7eb; border-radius: 999px; overflow: hidden; }
.review-breakdown-fill { display: block; height: 100%; background: #f59e0b; width: var(--review-pct, 0%); }
.review-breakdown-pct { text-align: right; color: var(--text-muted); }
.reviews-empty { color: var(--text-muted); font-size: 14px; }
.reviews-list { display: flex; flex-direction: column; gap: 12px; }
.review-card { padding: 14px; background: var(--gray-card); border-radius: 12px; }
.review-card-header { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; }
.review-card-meta { font-size: 12px; color: var(--text-muted); }
.review-card-comment { font-size: 14px; line-height: 1.5; }
.reviews-pagination { margin-top: 12px; }
.reviews-page-btn { font-size: 13px; font-weight: 700; color: var(--blue); text-decoration: none; }
.reviews-page-btn.disabled { color: var(--text-muted); }

/* ── DESKTOP ── */
@media (max-width: 639px) {
  .cta-row { display: grid; grid-template-columns: 1fr 1fr; }
  .qty-control { grid-column: 1 / -1; justify-self: start; }
  .btn-add-cart,
  .btn-buy-now { flex: none; }
}
@media (min-width: 640px) {
  .breadcrumb { padding: 20px 32px 0; }
  .product-detail { padding: 24px 32px 0; display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
  .gallery-col { position: static; }
  .tabs { margin: 0; }
  .tabs-nav { padding: 0; }
  .tab-panel { padding: 20px 0; }
  .related-section { padding: 24px 32px; }
}
@media (min-width: 1024px) {
  .breadcrumb { padding: 24px 48px 0; }
  .product-detail { padding: 32px 48px 0; gap: 60px; }
  .related-section { padding: 32px 48px; }
}
