/* Product detail page
   Mobile-first, responsive and accessible styles.
*/

:root {
  --pd-accent: #2e4f20;
  --pd-accent-strong: #1f3a16;
  --pd-accent-warm: #ff9900;
  --pd-accent-warm-strong: #d97706;
  --pd-accent-deep: #163414;
  --pd-accent-olive: #28461d;
  --pd-danger: #b91c1c;
  --pd-text: #111827;
  --pd-muted: #4b5563;
  --pd-muted-2: #6b7280;
  --pd-bg: #ffffff;
  --pd-bg-soft: #f6f7f8;
  --pd-bg-soft-2: #f3f4f6;
  --pd-border: rgba(17, 24, 39, 0.12);
  --pd-border-strong: rgba(17, 24, 39, 0.2);
  --pd-shadow-soft: 0 8px 24px rgba(0, 0, 0, 0.08);
  --pd-shadow-panel: 0 14px 36px rgba(0, 0, 0, 0.12);
  --pd-radius-sm: 10px;
  --pd-radius-md: 12px;
  --pd-radius-lg: 16px;
  --pd-gap-1: 8px;
  --pd-gap-2: 12px;
  --pd-gap-3: 16px;
  --pd-gap-4: 20px;
  --pd-gap-5: 24px;
  --pd-max: 1300px;
  --pd-tap: 44px;
  --pd-focus-outline: 2px solid #2e4f20;
  --pd-focus-shadow: 0 0 0 3px rgba(46, 79, 32, 0.18);
  --pd-sticky-top: 16px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

.pd-wrap {
  max-width: var(--pd-max);
  margin: 0 auto;
  padding: 14px 12px 34px;
  color: var(--pd-text);
}

.pd-wrap :where(img, svg, video, canvas) {
  max-width: 100%;
  height: auto;
}

.pd-wrap :where(a, button, input, select, textarea) {
  font: inherit;
}

.pd-wrap :where(a) {
  color: inherit;
}

.pd-wrap :where(button) {
  -webkit-tap-highlight-color: transparent;
}

.pd-wrap :where(a, button, input, select, textarea):focus-visible {
  outline: var(--pd-focus-outline);
  outline-offset: 3px;
  box-shadow: var(--pd-focus-shadow);
}

.pd-empty {
  margin: 0;
  color: var(--pd-muted);
}

.pd-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 5px 0 10px;
  font-size: 14px;
  line-height: 1.4;
}

.pd-breadcrumb a {
  color: var(--pd-accent);
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 2px;
}

.pd-sep {
  color: var(--pd-muted-2);
}

.pd-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: var(--pd-gap-2);
  margin: 0 0 10px;
}

.pd-title {
  margin: 0;
  font-size: clamp(1.375rem, 1.15rem + 1.1vw, 1.75rem);
  line-height: 1.2;
  letter-spacing: 0.01em;
  max-width: 100%;
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
  text-wrap: balance;
}

.pd-share-wrap {
  width: auto;
  display: grid;
  gap: 8px;
  justify-items: start;
  align-self: flex-start;
  margin: 0;
}

.pd-header-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 8px;
  width: auto;
  margin: 0;
}

.pd-fav-btn,
.pd-share-btn,
.pd-price-alert-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  margin: 0;
  border: 1px solid var(--pd-border);
  border-radius: 999px;
  background: #fff;
  color: var(--pd-text);
  text-align: center;
  font-size: 0;
  line-height: 1;
  cursor: pointer;
}

.pd-fav-btn svg,
.pd-share-btn svg,
.pd-price-alert-btn svg,
.pd-fav-icon,
.pd-share-icon,
.pd-price-alert-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.pd-fav-btn span,
.pd-share-btn span,
.pd-price-alert-btn span {
  display: none;
}

.pd-fav-btn:hover,
.pd-share-btn:hover,
.pd-price-alert-btn:hover {
  background: var(--pd-bg-soft);
  border-color: var(--pd-border-strong);
}

.pd-fav-btn.is-active {
  border-color: #d21f3c;
  color: #d21f3c;
  background: #fff6f8;
}

.pd-fav-btn[disabled],
.pd-share-btn[disabled],
.pd-price-alert-btn[disabled] {
  opacity: 0.65;
  cursor: not-allowed;
}

.pd-fav-status,
.pd-share-status,
.pd-price-alert-status {
  margin: 0;
  min-height: 1em;
  font-size: 12px;
  line-height: 1.35;
  color: var(--pd-muted);
}
