/* TBLL — Product detail (aligned with store-home) */

.pd-page {
  background: #f8f8f8;
  border-top: 1px solid #f0f0f0;
  padding-bottom: 40px;
}

.pd-page .store-container {
  max-width: var(--store-max-width, 1400px);
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 48px);
}

/* Main grid */
.pd-hero {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(320px, 1.05fr);
  gap: clamp(24px, 4vw, 48px);
  padding: 12px 0 36px;
  align-items: start;
}
@media (max-width: 900px) {
  .pd-hero {
    grid-template-columns: 1fr;
    gap: 22px;
    padding-bottom: 28px;
  }
}

.pd-gallery {
  position: sticky;
  top: 88px;
  align-self: start;
}
@media (max-width: 900px) {
  .pd-gallery {
    position: relative;
    top: auto;
  }
}

.pd-main-img {
  position: relative;
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid #ededed;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.25s ease;
}
.pd-main-img:hover {
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
}
.pd-main-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: clamp(12px, 3vw, 28px);
  filter: grayscale(12%) brightness(0.98);
  transition:
    filter 0.35s ease,
    transform 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.pd-main-img:hover img {
  filter: grayscale(0%) brightness(1.02);
  transform: scale(1.02);
}
.pd-emoji-fallback {
  font-size: clamp(4rem, 12vw, 6rem);
  line-height: 1;
}

.pd-badge-disc {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  background: linear-gradient(135deg, #dc2626, #ef4444);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 5px 11px;
  border-radius: 100px;
  letter-spacing: 0.3px;
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.35);
}

.pd-thumbs {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.pd-thumb {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid #ededed;
  background: #fff;
  padding: 0;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}
.pd-thumb.active,
.pd-thumb:hover {
  border-color: var(--orange);
  box-shadow: 0 4px 16px rgba(255, 105, 0, 0.2);
}
.pd-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Buy column */
.pd-buy {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 4px;
}

.pd-cat-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 105, 0, 0.1);
  color: var(--orange);
  font-size: 0.65rem;
  font-weight: 800;
  padding: 6px 14px;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 0.85px;
  align-self: flex-start;
  border: 1px solid rgba(255, 105, 0, 0.2);
}

.pd-title {
  font-size: clamp(1.35rem, 2.8vw, 1.85rem);
  font-weight: 900;
  color: #0a0a0a;
  line-height: 1.2;
  letter-spacing: -0.4px;
  margin: 0;
}

.pd-rating-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 0.88rem;
}
.pd-stars {
  letter-spacing: 1px;
}
.pd-rating-num {
  font-weight: 800;
  color: #111;
}
.pd-rating-dot {
  color: #ddd;
}
.pd-reviews {
  color: #888;
  font-size: 0.82rem;
}

.pd-price-block {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 12px 16px;
  padding: 18px 0 4px;
  border-top: 1px solid #f0f0f0;
  border-bottom: 1px solid #f0f0f0;
}
.pd-price {
  font-size: clamp(1.65rem, 3vw, 2.1rem);
  font-weight: 900;
  color: #111;
  letter-spacing: -0.03em;
}
.pd-old-price {
  font-size: 1rem;
  color: #bbb;
  text-decoration: line-through;
  font-weight: 600;
}

.pd-desc {
  color: #555;
  font-size: 0.9rem;
  line-height: 1.65;
  margin: 4px 0 0;
}

.pd-actions {
  display: flex;
  align-items: stretch;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.pd-qty-wrap {
  display: inline-flex;
  align-items: center;
  border: 1.5px solid #ededed;
  border-radius: 100px;
  overflow: hidden;
  height: 52px;
  background: #fff;
}
.pd-qty-btn {
  width: 48px;
  height: 100%;
  background: #f8f8f8;
  border: none;
  font-size: 1.15rem;
  cursor: pointer;
  color: #333;
  font-weight: 800;
  transition:
    background 0.15s,
    color 0.15s;
}
.pd-qty-btn:hover {
  background: #111;
  color: #fff;
}
.pd-qty-val {
  width: 44px;
  text-align: center;
  border: none;
  font-weight: 800;
  font-size: 1rem;
  background: transparent;
  color: #111;
}

.pd-add-cart {
  flex: 1;
  min-width: min(100%, 220px);
  background: #111;
  color: #fff;
  border: none;
  border-radius: 100px;
  padding: 0 28px;
  height: 52px;
  font-weight: 800;
  font-size: 0.9rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  letter-spacing: 0.2px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.15);
  transition:
    background 0.2s,
    transform 0.2s,
    box-shadow 0.2s;
}
.pd-add-cart i {
  font-size: 0.88rem;
}
.pd-add-cart:hover {
  background: var(--orange);
  transform: translateY(-1px);
  box-shadow: 0 12px 36px rgba(255, 105, 0, 0.35);
}

.pd-trust-mini {
  list-style: none;
  margin: 16px 0 0;
  padding: 16px 0 0;
  border-top: 1px solid #f0f0f0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
}
.pd-trust-mini li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.76rem;
  font-weight: 600;
  color: #666;
}
.pd-trust-mini i {
  color: var(--orange);
  font-size: 0.85rem;
}

/* ── Product Detail / Description Section ── */
.pd-detail-section {
  background: #fff;
  border-radius: 16px;
  border: 1.5px solid #ededed;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
  margin: 0 0 32px;
  overflow: hidden;
}

.pd-detail-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1.5px solid #f0f0f0;
  padding: 0 24px;
}
.pd-detail-tab {
  background: none;
  border: none;
  padding: 16px 20px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #999;
  cursor: pointer;
  position: relative;
  transition: color 0.2s;
  font-family: inherit;
}
.pd-detail-tab:hover {
  color: #555;
}
.pd-detail-tab.active {
  color: #111;
}
.pd-detail-tab.active::after {
  content: '';
  position: absolute;
  bottom: -1.5px;
  left: 16px;
  right: 16px;
  height: 2.5px;
  background: var(--orange, #f97316);
  border-radius: 2px;
}

.pd-detail-panel {
  display: none;
}
.pd-detail-panel.active {
  display: block;
}

.pd-detail-body {
  padding: 28px clamp(20px, 4vw, 36px);
  font-size: 0.92rem;
  line-height: 1.75;
  color: #444;
  max-width: 800px;
}
.pd-detail-body p {
  margin: 0 0 14px;
}
.pd-detail-body b,
.pd-detail-body strong {
  color: #222;
  font-weight: 700;
}
.pd-detail-body br + br {
  display: none;
}
.pd-detail-body img {
  display: none;
}

/* Fallback description when supplier didn't provide one */
.pd-desc-fallback h3 {
  margin: 0 0 16px;
  font-size: 1.05rem;
  color: #1e293b;
}
.pd-specs-table {
  width: 100%;
  border-collapse: collapse;
}
.pd-specs-table th,
.pd-specs-table td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.9rem;
}
.pd-specs-table th {
  color: #64748b;
  font-weight: 500;
  width: 140px;
}
.pd-specs-table td {
  color: #1e293b;
}

/* Short description in buy column */
.pd-desc--short {
  color: #666;
  font-size: 0.88rem;
  line-height: 1.65;
  margin: 4px 0 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Gallery panel */
.pd-detail-gallery {
  padding: 24px clamp(20px, 4vw, 36px);
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.pd-detail-gallery-item {
  border-radius: 12px;
  overflow: hidden;
  background: #f8f8f8;
  border: 1px solid #ededed;
}
.pd-detail-gallery-item img {
  width: 100%;
  height: auto;
  display: block;
}

@media (max-width: 600px) {
  .pd-detail-tabs {
    padding: 0 16px;
  }
  .pd-detail-tab {
    padding: 12px 14px;
    font-size: 0.8rem;
  }
  .pd-detail-gallery {
    grid-template-columns: 1fr;
  }
}

.pd-page .perks-strip {
  margin-top: 8px;
}
