/* YTKI Shop Bridge — Produkt-Grid + Mini-Warenkorb
   Scoped unter .ytshop-* damit es sich nicht mit dem Grav-Theme beißt. */

.ytshop-grid {
  --ytshop-cols: 4;
  --ytshop-accent: #5b9bd5;
  --ytshop-accent-dark: #3f7fb8;
  --ytshop-ink: #1d1d1b;
  --ytshop-muted: #8a8f98;
  --ytshop-star: #f5b301;
  display: grid;
  grid-template-columns: repeat(var(--ytshop-cols), minmax(0, 1fr));
  gap: 28px 22px;
  margin: 24px 0;
  font-family: inherit;
}

@media (max-width: 1100px) { .ytshop-grid { --ytshop-cols: 3 !important; } }
@media (max-width: 820px)  { .ytshop-grid { --ytshop-cols: 2 !important; } }
@media (max-width: 520px)  { .ytshop-grid { --ytshop-cols: 1 !important; } }

.ytshop-card {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.ytshop-card__media {
  display: block;
  aspect-ratio: 1 / 1;
  background: #fff;
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
}
.ytshop-card__media img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.ytshop-card__brand {
  margin: 14px 0 4px;
  font-size: 13px;
  color: var(--ytshop-muted);
}
.ytshop-card__name {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 700;
  color: var(--ytshop-ink);
  line-height: 1.3;
}
.ytshop-card__name a { color: inherit; text-decoration: none; }
.ytshop-card__name a:hover { text-decoration: underline; }

.ytshop-card__price {
  font-size: 20px;
  font-weight: 800;
  color: var(--ytshop-ink);
}
.ytshop-card__tax { font-size: 12px; color: var(--ytshop-muted); margin: 2px 0 0; }

.ytshop-card__avail {
  font-size: 13px;
  margin: 6px 0 0;
  color: #2e8b57;
}
.ytshop-card__avail--off { color: #c0392b; }

.ytshop-stars { margin: 6px 0 0; font-size: 14px; letter-spacing: 1px; color: var(--ytshop-star); }
.ytshop-stars__count { color: var(--ytshop-muted); font-size: 12px; margin-left: 4px; }

.ytshop-card__cta {
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 11px 14px;
  border: 0;
  border-radius: 6px;
  background: var(--ytshop-accent);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s ease;
}
.ytshop-card__cta:hover { background: var(--ytshop-accent-dark); }
.ytshop-card__cta[disabled] { background: #cfd4da; cursor: not-allowed; }
.ytshop-card__cta.is-added { background: #2e8b57; }

.ytshop-grid__msg { grid-column: 1 / -1; color: var(--ytshop-muted); padding: 20px 0; }

/* ── Floating-Button + Drawer ─────────────────────────────────────────── */
.ytshop-fab {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 9998;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 0;
  background: var(--ytshop-accent, #5b9bd5);
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0,0,0,.22);
  display: none;
  align-items: center;
  justify-content: center;
}
.ytshop-fab.is-visible { display: flex; }
.ytshop-fab__badge {
  position: absolute;
  top: -4px; right: -4px;
  min-width: 22px; height: 22px;
  padding: 0 6px;
  border-radius: 11px;
  background: #e3051b;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

.ytshop-drawer-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 9999;
  opacity: 0; visibility: hidden;
  transition: opacity .2s ease, visibility .2s ease;
}
.ytshop-drawer-backdrop.is-open { opacity: 1; visibility: visible; }

.ytshop-drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(420px, 92vw);
  background: #fff;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform .25s ease;
  box-shadow: -8px 0 28px rgba(0,0,0,.18);
  font-family: inherit;
  color: var(--ytshop-ink, #1d1d1b);
}
.ytshop-drawer.is-open { transform: translateX(0); }

.ytshop-drawer__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid #eee;
}
.ytshop-drawer__head h3 { margin: 0; font-size: 18px; }
.ytshop-drawer__close { background: none; border: 0; font-size: 24px; cursor: pointer; line-height: 1; color: #555; }

.ytshop-drawer__body { flex: 1; overflow-y: auto; padding: 8px 20px; }
.ytshop-drawer__empty { color: #8a8f98; padding: 32px 0; text-align: center; }

.ytshop-line {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid #f1f1f1;
}
.ytshop-line__img { width: 56px; height: 56px; object-fit: contain; background: #fafafa; border-radius: 4px; }
.ytshop-line__name { font-size: 14px; font-weight: 600; margin: 0 0 4px; }
.ytshop-line__price { font-size: 13px; color: #8a8f98; }
.ytshop-line__qty { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; }
.ytshop-line__qty button {
  width: 26px; height: 26px; border: 1px solid #ddd; background: #fff;
  border-radius: 4px; cursor: pointer; font-size: 16px; line-height: 1;
}
.ytshop-line__qty span { min-width: 22px; text-align: center; font-size: 14px; }
.ytshop-line__remove { background: none; border: 0; color: #c0392b; cursor: pointer; font-size: 12px; margin-top: 4px; }

.ytshop-drawer__foot { padding: 16px 20px 22px; border-top: 1px solid #eee; }
.ytshop-drawer__total { display: flex; justify-content: space-between; font-size: 16px; font-weight: 700; margin-bottom: 12px; }
.ytshop-drawer__checkout {
  display: block; width: 100%; padding: 13px; border: 0; border-radius: 6px;
  background: var(--ytshop-accent, #5b9bd5); color: #fff; font-size: 15px; font-weight: 700; cursor: pointer;
}
.ytshop-drawer__checkout:hover { background: var(--ytshop-accent-dark, #3f7fb8); }
.ytshop-drawer__checkout[disabled] { background: #cfd4da; cursor: not-allowed; }
.ytshop-drawer__b2b {
  display: block; text-align: center; margin-top: 12px; font-size: 13px;
  color: #3f7fb8; text-decoration: none;
}
.ytshop-drawer__b2b:hover { text-decoration: underline; }
.ytshop-drawer__hint { font-size: 11px; color: #aaa; text-align: center; margin-top: 8px; }
