/* elPortalO Coin Shop für Händler
   Bewusst zurückhaltend: das Theme des Händlers soll führen.
   Farben laufen über Variablen, die ein Händler im Theme überschreiben kann. */

.elpo-shop {
  --elpo-accent: #D91400;
  --elpo-ok: #1B6B50;
  --elpo-err: #B01100;
  --elpo-line: rgba(128, 116, 112, .28);
  --elpo-radius: 10px;
  max-width: 1100px;
  margin: 0 auto;
}

.elpo-title { margin: 0 0 .3em; line-height: 1.15; }
.elpo-sub { margin: 0 0 1.6em; opacity: .8; max-width: 60ch; }

.elpo-closed {
  border: 1px solid var(--elpo-err);
  background: rgba(176, 17, 0, .07);
  padding: 14px 16px;
  border-radius: var(--elpo-radius);
  margin-bottom: 20px;
  display: flex; flex-direction: column; gap: 3px;
}

/* ---- ID-Eingabe ---- */
.elpo-id-panel {
  border: 1px solid var(--elpo-line);
  border-radius: var(--elpo-radius);
  padding: 16px 18px;
  margin-bottom: 26px;
  display: flex; flex-direction: column; gap: 8px;
  max-width: 520px;
}
.elpo-id-panel label { font-weight: 600; font-size: .95em; }
.elpo-id-panel input[type="text"] {
  width: 100%;
  padding: 11px 13px;
  font-size: 1.05em;
  border: 1px solid var(--elpo-line);
  border-radius: 6px;
  background: transparent;
  color: inherit;
}
.elpo-id-panel input[type="text"]:focus {
  outline: 2px solid var(--elpo-accent);
  outline-offset: 1px;
  border-color: var(--elpo-accent);
}
.elpo-id-result { font-size: .92em; opacity: .9; min-height: 1.4em; }
.elpo-loading { opacity: .7; }
.elpo-ok  { color: var(--elpo-ok);  line-height: 1.5; }
.elpo-err { color: var(--elpo-err); line-height: 1.5; }

/* ---- Produktraster ---- */
.elpo-products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 16px;
  align-items: stretch;
}

.elpo-card {
  position: relative;
  border: 1px solid var(--elpo-line);
  border-radius: var(--elpo-radius);
  padding: 18px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: center;
}
.elpo-card.is-out { opacity: .5; }

.elpo-badge {
  position: absolute; top: 10px; right: 10px;
  background: var(--elpo-accent); color: #fff;
  font-size: .72em; font-weight: 700; letter-spacing: .04em;
  padding: 3px 8px; border-radius: 4px;
}

.elpo-img { margin: 0 auto; max-width: 130px; }
.elpo-img img { display: block; width: 100%; height: auto; border-radius: 6px; }

.elpo-coins { font-weight: 700; font-size: 1.12em; line-height: 1.25; }

.elpo-prices { display: flex; gap: 8px; justify-content: center; align-items: baseline; flex-wrap: wrap; }
.elpo-price { font-size: 1.05em; font-weight: 600; }
.elpo-price-old { opacity: .55; text-decoration: line-through; font-size: .9em; }

/* ---- Menge ---- */
.elpo-qty {
  display: flex; align-items: stretch; justify-content: center;
  border: 1px solid var(--elpo-line); border-radius: 6px; overflow: hidden;
  align-self: center;
}
.elpo-qty button {
  width: 38px; border: 0; background: transparent; color: inherit;
  font-size: 1.15em; line-height: 1; cursor: pointer; padding: 8px 0;
}
.elpo-qty button:hover { background: rgba(128, 116, 112, .12); }
.elpo-qty-input {
  width: 52px; text-align: center; border: 0;
  border-left: 1px solid var(--elpo-line); border-right: 1px solid var(--elpo-line);
  background: transparent; color: inherit; font-size: 1em; padding: 8px 0;
  -moz-appearance: textfield;
}
.elpo-qty-input::-webkit-outer-spin-button,
.elpo-qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* ---- Kaufen ---- */
.elpo-buy {
  margin-top: auto;
  border: 0; border-radius: 6px;
  padding: 12px 14px;
  font-weight: 700; font-size: .92em; letter-spacing: .03em;
  cursor: pointer;
  background: var(--elpo-accent); color: #fff;
}
.elpo-buy[disabled] { opacity: .4; cursor: not-allowed; }
.elpo-buy:not([disabled]):hover { filter: brightness(1.08); }
.elpo-buy:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }

.elpo-unavailable {
  margin-top: auto;
  padding: 12px 10px;
  font-size: .88em;
  border: 1px dashed var(--elpo-line);
  border-radius: 6px;
  opacity: .8;
}

.elpo-card-error {
  font-size: .85em;
  color: var(--elpo-err);
  line-height: 1.4;
  margin-top: 2px;
}

@media (max-width: 480px) {
  .elpo-products { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
  .elpo-card { padding: 14px 12px 12px; }
}

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