/* Item details page, the same design as elon.pro catalog details
   (elon static/css/catalog/details.css, its colour variables written out). */

/* White and blue page, as the home page; only the item page loads this file */
body {
  background-color: #EEF4FB;
}

.pdp {
  --pdp-dark: #1d262c;
  --pdp-charcoal: #36454F;
  --pdp-cream: #f1ecda;
  --pdp-gold: #D4AF37;
  --pdp-teal-dark: #0A6E6E;
  max-width: 560px;
  margin: 1.5rem auto 3rem;
  color: var(--pdp-dark);
}

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

.pdp__media {
  aspect-ratio: 4 / 3;
  background: var(--pdp-charcoal);
  border-bottom: 2px solid var(--pdp-dark);
  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(--pdp-teal-dark);
}
.pdp__name {
  margin: 0;
  font: 400 1.5rem/1.15 'Roboto', sans-serif;
  color: var(--pdp-dark);
}

.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(--pdp-dark);
}
.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(--pdp-dark);
}
.pdp__delta.increase { color: #a11414; background: #f7dede; }

/* A discount is the main accent: red price, red badge, the old price
   crossed out in red */
.pdp__prices--discount .pdp__price {
  color: #D62828;
}
.pdp__prices--discount .pdp__old {
  font-weight: 700;
  color: var(--pdp-dark);
  text-decoration-color: #D62828;
  text-decoration-thickness: 2px;
}
.pdp__discount {
  font: 700 1.1rem/1 'Roboto', sans-serif;
  color: #fff;
  background: #D62828;
  padding: 4px 8px;
}

.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(--pdp-charcoal);
  background: var(--pdp-cream);
  border: 1px solid var(--pdp-dark);
  padding: 1px 6px;
}
.pdp__stock {
  font: 700 0.875rem/1.4 'Roboto', sans-serif;
  border: 1px solid var(--pdp-dark);
  padding: 1px 6px;
}
.pdp__stock.in { color: #0d6a2f; background: #d9f2e0; }
.pdp__stock.out { color: #a11414; background: #f7dede; }

.pdp__actions {
  display: flex;
  gap: 0.55rem;
  margin-top: 0.25rem;
}
.pdp__back {
  width: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  font: 700 1.5rem/1 'Roboto', sans-serif;
  color: var(--pdp-charcoal);
  background: #fff;
  border: 2px solid var(--pdp-dark);
  text-decoration: none;
}
.pdp__back:hover { background: var(--pdp-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 (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 standing alone: wider, as there is no + button beside it */
.pdp__back.pdp__back--wide { width: auto; padding: 0.5rem 1rem; }
