/* ============================================================
   BREADCRUMB BAR
============================================================ */
.breadcrumb-bar {
  background: var(--light-bg);
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
}

.breadcrumb-bar .breadcrumb { margin: 0; }

.breadcrumb-bar .breadcrumb-item a {
  color: var(--text-muted);
  font-size: 0.82rem;
  transition: color var(--transition);
}

.breadcrumb-bar .breadcrumb-item a:hover { color: var(--accent); }
.breadcrumb-bar .breadcrumb-item.active { color: var(--primary); font-size: 0.82rem; font-weight: 500; }
.breadcrumb-bar .breadcrumb-item + .breadcrumb-item::before { color: #ccc; }

/* ============================================================
   GALLERY
============================================================ */
.product-gallery { position: sticky; top: 80px; }

.gallery-main {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: var(--light-bg);
  cursor: zoom-in;
  aspect-ratio: 1 / 1;
}

.gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
  display: block;
}

.gallery-main:hover img { transform: scale(1.04); }

.gallery-badge {
  position: absolute;
  top: 14px; left: 14px;
  background: var(--accent);
  color: white;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 4px;
  z-index: 2;
}

.zoom-hint {
  position: absolute;
  bottom: 12px; right: 12px;
  background: rgba(0,0,0,0.55);
  color: white;
  font-size: 0.72rem;
  padding: 4px 10px;
  border-radius: 20px;
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity var(--transition);
}

.gallery-main:hover .zoom-hint { opacity: 1; }

/* Gallery arrows */
.gallery-arrow {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,0.9);
  border: none;
  width: 38px; height: 38px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  color: var(--primary);
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0,0,0,0.12);
  opacity: 0;
  transition: opacity var(--transition), transform var(--transition);
  z-index: 3;
}

.gallery-prev { left: 12px; }
.gallery-next { right: 12px; }
.gallery-main:hover .gallery-arrow { opacity: 1; }
.gallery-arrow:hover { background: var(--accent); color: white; }

/* Thumbnails */
.gallery-thumbs {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.thumb {
  width: 72px; height: 72px;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid transparent;
  padding: 0;
  cursor: pointer;
  background: var(--light-bg);
  transition: border-color var(--transition), transform var(--transition);
  flex-shrink: 0;
}

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

.thumb:hover { transform: scale(1.05); border-color: var(--primary); }
.thumb.active { border-color: var(--accent); }

/* ============================================================
   PRODUCT DETAIL INFO
============================================================ */
.pd-category-tag {
  display: inline-block;
  background: #fff0f1;
  color: var(--accent);
  border: 1px solid #fdd;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 4px;
  transition: background var(--transition);
}

.pd-category-tag:hover { background: var(--accent); color: white; }

.pd-badge-in-stock {
  font-size: 0.75rem;
  font-weight: 600;
  color: #2a9d8f;
  background: #e9f7f5;
  padding: 3px 10px;
  border-radius: 4px;
  border: 1px solid #c3e9e5;
}

.pd-product-name {
  font-size: clamp(1.3rem, 3vw, 1.85rem);
  font-weight: 800;
  line-height: 1.2;
  color: var(--primary);
  margin-bottom: 12px;
}

/* Rating row */
.pd-rating-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.pd-stars { color: #ffd166; font-size: 1rem; }
.pd-rating-count { font-size: 0.85rem; color: var(--text-muted); }
.pd-rating-sep { color: var(--border); }
.pd-sold-count { font-size: 0.82rem; color: var(--text-muted); }

/* Price */
.pd-price-block {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding: 14px 16px;
  background: var(--light-bg);
  border-radius: 10px;
  border-left: 4px solid var(--accent);
}

.pd-price-current {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--accent);
}

.pd-price-original {
  font-size: 1rem;
  color: var(--text-muted);
  text-decoration: line-through;
}

.pd-price-save {
  font-size: 0.78rem;
  font-weight: 600;
  color: #2a9d8f;
  background: #e9f7f5;
  padding: 2px 8px;
  border-radius: 4px;
}

.pd-price-badge {
  font-size: 0.78rem;
  font-weight: 700;
  color: white;
  background: var(--accent);
  padding: 2px 8px;
  border-radius: 4px;
}

.pd-short-desc {
  font-size: 0.9rem;
  color: #555;
  line-height: 1.7;
  margin-bottom: 0;
}

.pd-divider {
  border-color: var(--border);
  margin: 20px 0;
}

/* Option groups */
.pd-option-group { margin-bottom: 20px; }

.pd-option-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.pd-option-value {
  font-weight: 700;
  color: var(--accent);
}

/* Color options (shop-style swatches) */
.pd-color-options {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.pd-color-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color var(--transition), transform var(--transition);
  position: relative;
}

.pd-color-btn:hover { transform: scale(1.15); }

.pd-color-btn.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px white, 0 0 0 4px var(--accent);
}

.pd-color-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px white, 0 0 0 4px var(--accent);
}

/* Size buttons */
.pd-size-btns { display: flex; gap: 8px; flex-wrap: wrap; }

.pd-size-btn {
  min-width: 52px;
  padding: 8px 12px;
  border: 2px solid var(--border);
  border-radius: 8px;
  background: white;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
}

.pd-size-btn:hover {
  border-color: var(--primary);
  background: var(--primary);
  color: white;
}

.pd-size-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.pd-size-guide-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: 1px dashed var(--border);
  border-radius: 6px;
  font-size: 0.78rem;
  color: var(--accent);
  font-weight: 600;
  cursor: pointer;
  padding: 5px 10px;
  margin-top: 10px;
  transition: background var(--transition), border-color var(--transition);
}

.pd-size-guide-btn:hover {
  background: #fff0f1;
  border-color: var(--accent);
}

/* Inline size guide */
.pd-inline-sizeguide {
  display: none;
  margin-top: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.size-guide-inline-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.size-guide-inline-table th {
  background: var(--primary);
  color: white;
  padding: 8px 14px;
  text-align: center;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.size-guide-inline-table td {
  padding: 8px 14px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  color: var(--primary);
}

.size-guide-inline-table tr:last-child td { border-bottom: none; }
.size-guide-inline-table tr:hover td { background: var(--light-bg); }

.size-guide-note {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-style: italic;
  padding: 7px 14px;
  background: var(--light-bg);
  border-top: 1px solid var(--border);
  margin: 0;
}

/* Qty + Cart row */
.pd-qty-cart-row {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
}

.pd-qty-stepper {
  display: flex;
  align-items: center;
  border: 2px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
}

.qty-btn {
  background: var(--light-bg);
  border: none;
  width: 38px; height: 42px;
  font-size: 1.1rem;
  cursor: pointer;
  color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  transition: background var(--transition), color var(--transition);
}

.qty-btn:hover { background: var(--primary); color: white; }

.qty-input {
  width: 50px; height: 42px;
  border: none;
  text-align: center;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--primary);
  outline: none;
  background: white;
}

.qty-input::-webkit-inner-spin-button,
.qty-input::-webkit-outer-spin-button { -webkit-appearance: none; }

/* Cart button */
.pd-btn-cart {
  flex: 1;
  background: var(--primary);
  color: white;
  border: 2px solid var(--primary);
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
  display: flex; align-items: center; justify-content: center;
}

.pd-btn-cart:hover { background: white; color: var(--primary); }

/* Buy Now */
.pd-btn-buynow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  background: var(--accent);
  color: white;
  border: 2px solid var(--accent);
  padding: 12px;
  border-radius: 8px;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}

.pd-btn-buynow:hover { background: var(--accent-hover); border-color: var(--accent-hover); }

/* Share */
.pd-actions-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  padding-top: 4px;
}

.pd-share-btns { display: flex; align-items: center; gap: 8px; }

.pd-share-label { font-size: 0.8rem; color: var(--text-muted); }

.pd-share-icon {
  width: 32px; height: 32px;
  background: var(--light-bg);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.88rem;
  color: var(--primary);
  transition: background var(--transition), color var(--transition);
}

.pd-share-icon:hover { background: var(--primary); color: white; }

/* Trust badges */
.pd-trust-row {
  display: flex;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 18px;
}

.pd-trust-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 12px 6px;
  font-size: 0.72rem;
  color: var(--primary);
  line-height: 1.4;
  border-right: 1px solid var(--border);
  gap: 5px;
}

.pd-trust-item:last-child { border-right: none; }

.pd-trust-item i {
  font-size: 1.1rem;
  color: var(--accent);
}

.pd-trust-item small { color: var(--text-muted); font-size: 0.65rem; }

/* Meta */
.pd-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.8rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  padding-top: 14px;
}

.pd-meta a { color: var(--accent); }
.pd-meta a:hover { text-decoration: underline; }

/* ============================================================
   TABS
============================================================ */
.pd-tabs-section {
  border-top: 1px solid var(--border);
  padding: 0 0 60px;
}

.pd-tabs {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0;
  border-bottom: 2px solid var(--border);
  overflow-x: auto;
  white-space: nowrap;
  gap: 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.pd-tabs::-webkit-scrollbar { display: none; }

.pd-tab {
  background: none;
  border: none;
  padding: 16px 24px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  position: relative;
  transition: color var(--transition);
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
}

.pd-tab::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0; right: 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform var(--transition);
}

.pd-tab.active { color: var(--accent); }
.pd-tab.active::after { transform: scaleX(1); }
.pd-tab:hover { color: var(--primary); }

.tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  min-width: 18px; height: 18px;
  border-radius: 20px;
  padding: 0 5px;
  margin-left: 5px;
  vertical-align: middle;
}

.pd-tab-pane {
  display: none;
  padding: 36px 0 0;
}

.pd-tab-pane.active { display: block; }

.tab-heading {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 14px;
}

.tab-feature-list {
  list-style: none;
  padding: 0;
  margin: 0 0 12px;
}

.tab-feature-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  color: var(--primary);
}

.tab-feature-list li:last-child { border-bottom: none; }

.tab-feature-list i { color: #2a9d8f; font-size: 0.85rem; }

.tab-care-icons { display: flex; gap: 12px; flex-wrap: wrap; }

.care-icon {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  background: var(--light-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 5px 10px;
  color: var(--primary);
}

.tab-detail-img {
  width: 100%;
  border-radius: 12px;
  object-fit: cover;
  height: 280px;
}

/* Size chart */
.size-chart-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.size-chart-table th {
  background: var(--primary);
  color: white;
  padding: 10px 16px;
  text-align: center;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.size-chart-table td {
  padding: 10px 16px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  color: var(--primary);
}

.size-chart-table tr:hover td { background: var(--light-bg); }

.size-tip {
  background: #fff9e6;
  border: 1px solid #ffe5a0;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.82rem;
  color: #7a5c00;
  display: flex;
  align-items: center;
}

.size-tip i { color: #f4a261; flex-shrink: 0; }

/* Shipping cards */
.shipping-card {
  background: var(--light-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  height: 100%;
}

.shipping-icon {
  width: 44px; height: 44px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.shipping-card h6 { font-size: 0.88rem; font-weight: 700; margin-bottom: 4px; }
.shipping-card p  { font-size: 0.78rem; color: var(--text-muted); margin-bottom: 6px; line-height: 1.5; }

.shipping-price {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--primary);
  background: white;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 8px;
  display: inline-block;
}

.shipping-price.free { color: #2a9d8f; border-color: #c3e9e5; background: #e9f7f5; }

/* ============================================================
   REVIEWS
============================================================ */
.review-summary {
  background: var(--light-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  text-align: center;
}

.review-avg {
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 8px;
}

.review-stars-lg { font-size: 1.3rem; color: #ffd166; margin-bottom: 6px; }
.review-total-count { font-size: 0.82rem; color: var(--text-muted); }

.review-bars { text-align: left; }

.review-bar-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.review-bar-row > span:first-child { min-width: 28px; text-align: right; }
.review-bar-row > span:last-child  { min-width: 28px; }

.review-bar-track {
  flex: 1;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}

.review-bar-fill {
  height: 100%;
  background: #ffd166;
  border-radius: 3px;
  transition: width 0.8s ease;
}

.reviews-list { display: flex; flex-direction: column; gap: 0; }

.review-item {
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}

.review-item:last-child { border-bottom: none; }

.review-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.review-avatar {
  width: 36px; height: 36px;
  background: var(--accent);
  color: white;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.review-meta { flex: 1; }
.review-name { font-size: 0.88rem; font-weight: 700; color: var(--primary); }
.review-date { font-size: 0.75rem; color: var(--text-muted); }
.review-stars { color: #ffd166; font-size: 0.82rem; }

.review-verified {
  font-size: 0.72rem;
  color: #2a9d8f;
  font-weight: 600;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
}

.review-body {
  font-size: 0.85rem;
  color: #555;
  line-height: 1.65;
  margin: 0;
}

.pd-btn-review {
  background: white;
  border: 2px solid var(--primary);
  color: var(--primary);
  padding: 10px 24px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
}

.pd-btn-review:hover { background: var(--primary); color: white; }

/* ============================================================
   STICKY CART BAR
============================================================ */
.sticky-cart-bar {
  position: fixed;
  bottom: -90px;
  left: 0; right: 0;
  background: white;
  border-top: 2px solid var(--border);
  box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
  z-index: 999;
  padding: 10px 0;
  transition: bottom 0.35s cubic-bezier(.4,0,.2,1);
}

.sticky-cart-bar.visible { bottom: 0; }

.sticky-cart-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.sticky-product-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sticky-product-info img {
  width: 50px; height: 50px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--light-bg);
}

.sticky-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--primary);
  max-width: 200px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sticky-price {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--accent);
}

.sticky-price span {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-decoration: line-through;
  font-weight: 400;
  margin-left: 6px;
}

.sticky-actions { display: flex; align-items: center; gap: 10px; }

.sticky-qty { border-radius: 6px; }
.sticky-qty .qty-btn { height: 38px; }
.sticky-qty .qty-input { height: 38px; width: 44px; }

.sticky-add-btn {
  flex: none !important;
  padding: 10px 28px !important;
  white-space: nowrap;
}

/* ============================================================
   ZOOM MODAL
============================================================ */
.zoom-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}

.zoom-modal.open { opacity: 1; pointer-events: all; }

.zoom-modal img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 8px;
  object-fit: contain;
}

.zoom-modal-close {
  position: absolute;
  top: 20px; right: 20px;
  background: rgba(255,255,255,0.12);
  border: none;
  color: white;
  width: 42px; height: 42px;
  border-radius: 50%;
  font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background var(--transition);
}

.zoom-modal-close:hover { background: var(--accent); }

/* ============================================================
   RESPONSIVE
============================================================ */
@media (max-width: 991px) {
  .product-gallery { position: static; }
  .pd-trust-row { flex-wrap: wrap; }
  .pd-trust-item { min-width: 45%; }
  .sticky-product-info { display: none; }
  .sticky-cart-inner { justify-content: flex-end; }
}

@media (max-width: 767px) {
  .pd-price-current { font-size: 1.4rem; }
  .pd-qty-cart-row { flex-direction: column; align-items: stretch; }
  .pd-qty-stepper { width: fit-content; }
  .pd-tab { padding: 12px 16px; font-size: 0.82rem; }
  .tab-detail-img { height: 200px; }
  .review-bars { display: none; }
  .sticky-actions { width: 100%; }
  .sticky-add-btn { flex: 1 !important; }
}

@media (max-width: 575px) {
  .pd-trust-row { flex-direction: column; }
  .pd-trust-item { border-right: none; border-bottom: 1px solid var(--border); }
  .pd-trust-item:last-child { border-bottom: none; }
  .gallery-thumbs .thumb { width: 56px; height: 56px; }
}
