/* static/css/catalog/details.css
   The product page's own styles, moved out of the page unchanged. */

.pdp {
  --pdp-green: #00693e;
  max-width: 560px;
  margin: 1.5rem auto 3rem;
  color: var(--dark-surface);
}

.pdp__card {
  background: #fff;
  border: 2px solid var(--dark-surface);
  display: flex;
  flex-direction: column;
}

.pdp__media {
  aspect-ratio: 4 / 3;
  background: var(--bg-footer);
  border-bottom: 2px solid var(--dark-surface);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pdp__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pdp__body {
  padding: 1rem 1.1rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.pdp__cat {
  font: 700 0.875rem/1 'Roboto', sans-serif;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-teal-dark);
}
.pdp__name {
  margin: 0;
  font: 400 1.5rem/1.15 'Roboto', sans-serif;
  color: var(--dark-surface);
}

.pdp__prices {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.55rem;
}
.pdp__price {
  font: 700 1.4rem/1 'Roboto', sans-serif;
  color: var(--dark-surface);
}
.pdp__old {
  font: 400 0.95rem/1 'Roboto', sans-serif;
  color: #7a8590;
  text-decoration: line-through;
}
.pdp__delta {
  font: 700 0.875rem/1 'Roboto', sans-serif;
  padding: 2px 6px;
  border: 1px solid var(--dark-surface);
}
.pdp__delta.decrease { color: #0d6a2f; background: #d9f2e0; }
.pdp__delta.increase { color: #a11414; background: #f7dede; }

.pdp__chips {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.pdp__pid {
  font: 700 0.875rem/1.4 ui-monospace, 'SFMono-Regular', Menlo, monospace;
  letter-spacing: 0.04em;
  color: var(--bg-footer);
  background: var(--cream);
  border: 1px solid var(--dark-surface);
  padding: 1px 6px;
}
.pdp__stock {
  font: 700 0.875rem/1.4 'Roboto', sans-serif;
  border: 1px solid var(--dark-surface);
  padding: 1px 6px;
}
.pdp__stock.in { color: #0d6a2f; background: #d9f2e0; }
.pdp__stock.out { color: #a11414; background: #f7dede; }

/* Two buttons: + dominant, ← quiet */
.pdp__actions {
  display: flex;
  gap: 0.55rem;
  margin-top: 0.25rem;
}
.pdp__actions form { flex: 1; display: flex; }
.pdp__add {
  flex: 1;
  font: 700 1.5rem/1 'Roboto', sans-serif;
  color: #fff;
  background: var(--pdp-green);
  border: 2px solid var(--dark-surface);
  padding: 0.5rem 1rem;
  cursor: pointer;
  transition: background 0.15s ease;
}
.pdp__add:hover,
.pdp__add:active { background: #009c5c; }
.pdp__add:focus-visible { outline: 3px solid var(--accent-gold); outline-offset: 2px; }
.pdp__add:disabled { background: #9aa4ac; cursor: not-allowed; }
.pdp__back {
  width: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  font: 700 1.5rem/1 'Roboto', sans-serif;
  color: var(--bg-footer);
  background: #fff;
  border: 2px solid var(--dark-surface);
  text-decoration: none;
}
.pdp__back:hover { background: var(--cream); }

.pdp__desc {
  font: 400 0.95rem/1.55 'Roboto', sans-serif;
  color: #2c353b;
  margin-top: 0.25rem;
}
.pdp__meta {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  font: 700 0.875rem/1.3 'Roboto', sans-serif;
  color: #4a5560;
  border-top: 2px solid #e6e0cd;
  padding-top: 0.6rem;
  margin-top: 0.35rem;
}

@media (prefers-reduced-motion: reduce) {
  .pdp__add { transition: none; }
}

@media (max-width: 480px) {
  .pdp { margin: 0.5rem auto 1.5rem; }
  .pdp__body { padding: 2px; gap: 0.45rem; }
  .pdp__name { font-size: 1.3rem; }
}

/* the back arrow on "No product found": wider, as it stands alone */
.pdp__back.pdp__back--wide { width: auto; padding: 0 1rem; }
