/* ========== PDP ========== */

.pdp-section {
  padding-block: 3rem 5rem;
}

.pdp-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.pdp-gallery-wrap {
  position: sticky;
  top: calc(40px + var(--header-height) + 24px);
}

.pdp-main-img {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pdp-main-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.pdp-img-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: linear-gradient(135deg, #32322d, #3f3f3a);
}

.pdp-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: box-shadow 0.2s;
}
.pdp-arrow:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  opacity: 1;
}
.pdp-arrow svg {
  width: 18px;
  height: 18px;
  display: block;
}
.pdp-arrow--prev { left: 8px; }
.pdp-arrow--next { right: 8px; }

.pdp-thumbs {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}
.pdp-thumb {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  padding: 0;
  background: #f0f0f0;
  transition: border-color 0.2s;
}
.pdp-thumb.active,
.pdp-thumb:hover {
  border-color: var(--color-primary, #A89F84);
}
.pdp-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pdp-info {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.pdp-category {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-accent);
  font-weight: 600;
  margin: 0;
}

.pdp-title {
  font-family: var(--font-heading);
  font-size: clamp(24px, 3vw, 36px);
  margin: 0;
  line-height: 1.15;
}

.pdp-price-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.pdp-price {
  font-size: 28px;
  font-weight: 700;
  color: var(--color-primary-dark);
}
.pdp-old-price {
  font-size: 18px;
  color: #999;
  text-decoration: line-through;
}

.pdp-sku {
  font-size: 13px;
  color: var(--color-text-light);
  margin-bottom: 8px;
}
.pdp-desc {
  font-size: 14px;
  line-height: 1.6;
  color: var(--color-text-light);
}
.pdp-desc p {
  margin: 0 0 8px;
}
.pdp-attributes {
  margin: 16px 0;
}
.pdp-attributes table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.pdp-attributes th,
.pdp-attributes td {
  padding: 6px 8px;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}
.pdp-attributes th {
  font-weight: 600;
  color: var(--color-text);
  width: 40%;
  white-space: nowrap;
}
.pdp-attributes td {
  color: var(--color-text-light);
}
.pdp-stock {
  margin-top: 12px;
  font-size: 13px;
  font-weight: 600;
}
.pdp-stock .in-stock {
  color: #2e7d32;
}
.pdp-stock .out-of-stock {
  color: #c62828;
}

.pdp-variants {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.pdp-variant-row label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
  color: var(--color-primary-dark);
}
.pdp-variant-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.pdp-chip {
  padding: 8px 16px;
  border: 1.5px solid #ddd;
  border-radius: 0;
  background: #fff;
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}
.pdp-chip:hover {
  border-color: var(--color-primary, #A89F84);
}
.pdp-chip.active {
  border-color: var(--color-primary, #A89F84);
  background: var(--color-primary, #A89F84);
  color: #fff;
}

.pdp-actions-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.pdp-qty {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
}
.pdp-qty-btn {
  width: 40px;
  height: 40px;
  border: none;
  background: #f5f5f5;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.pdp-qty-btn:hover { background: #e0e0e0; }
.pdp-qty-btn svg { width: 16px; height: 16px; }
.pdp-qty-val {
  width: 44px;
  text-align: center;
  font-size: 16px;
  font-weight: 600;
  border-left: 1px solid #ddd;
  border-right: 1px solid #ddd;
  line-height: 40px;
}

.pdp-add-btn {
  flex: 1;
  padding: 14px 28px;
  background: var(--color-primary, #A89F84);
  color: #fff;
  border: none;
  border-radius: 0;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: filter 0.3s, transform 0.3s, background 0.2s;
}
.pdp-add-btn:hover { filter: brightness(1.25); transform: translateY(-2px); }
.pdp-add-btn.added {
  background: #4caf50;
  pointer-events: none;
}

.pdp-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--color-text-light);
  text-decoration: none;
  margin-top: 4px;
}
.pdp-back-link svg { width: 16px; height: 16px; }
.pdp-back-link:hover { color: var(--color-primary); }

.pdp-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  border-top: 1px solid var(--border, #eee);
  padding-top: 20px;
  margin-top: 8px;
}
.pdp-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--color-text-light);
}
.pdp-meta-item svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .pdp-layout { grid-template-columns: 1fr; gap: 24px; }
  .pdp-gallery-wrap { position: static; }
}
@media (max-width: 480px) {
  .pdp-thumb { width: 48px; height: 48px; }
  .pdp-arrow { width: 32px; height: 32px; }
  .pdp-arrow svg { width: 16px; height: 16px; }
}
