/* ============================================================
   TTRPG SHOP GENERATOR — tool-specific styles
   Loads after tool-page.css
   ============================================================ */

/* Ambient mood — warm amber/sepia */
body::after {
  background:
    radial-gradient(ellipse 130% 55% at 50% -8%,  rgba(180,120,40,0.18)  0%, transparent 60%),
    radial-gradient(ellipse 55%  45% at  4% 95%,  rgba(140,80,30,0.12)   0%, transparent 55%),
    radial-gradient(ellipse 45%  40% at 96% 88%,  rgba(100,60,160,0.07)  0%, transparent 55%),
    radial-gradient(ellipse 70%  35% at 50% 110%, rgba(180,130,40,0.07)  0%, transparent 50%);
}

/* ---- Tool section wrapper ---- */
.tool-section { width: 100%; padding: 0; }

/* ---- Shop grid ---- */
.shop-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 22px;
  width: 100%;
  padding: 0 10px;
}

/* ---- Shop card ---- */
.shop-card {
  width: clamp(280px, 26vw, 460px);
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow:
    0 6px 28px rgba(0,0,0,.55),
    inset 0 1px 0 rgba(255,255,255,.055),
    inset 0 -1px 0 rgba(0,0,0,.3);
  transition: transform .38s cubic-bezier(.34,1.56,.64,1), box-shadow .28s ease;
  position: relative;
  font-size: clamp(13px, 0.85vw, 20px);
  display: flex;
  flex-direction: column;
}
.shop-card:hover {
  transform: translateY(-10px) scale(1.016);
  box-shadow:
    0 24px 60px rgba(0,0,0,.7),
    0 0 0 1.5px var(--shop-accent),
    0 0 28px color-mix(in srgb, var(--shop-accent) 22%, transparent),
    inset 0 1px 0 rgba(255,255,255,.07);
}

/* Quality-colored top accent bar */
.shop-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: var(--shop-accent);
  z-index: 2;
  box-shadow: 0 0 14px var(--shop-accent), 0 0 4px rgba(255,255,255,.4);
}

/* Canvas sign area */
.shop-sign-wrap {
  width: 100%;
  background: #0c0908;
  position: relative;
}
.shop-sign-wrap canvas {
  display: block;
  width: 100%;
  height: auto;
}

/* Info area */
.shop-info {
  padding: 0.9em 1.1em 1.15em;
  display: flex;
  flex-direction: column;
  gap: .55rem;
  flex: 1;
  background: inherit;
}

/* Header */
.shop-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .5rem;
  flex-wrap: wrap;
}
.shop-name {
  font-family: var(--font-d);
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.25;
}
.shop-type-badge {
  flex-shrink: 0;
  font-size: .58rem;
  font-weight: 700;
  letter-spacing: .10em;
  text-transform: uppercase;
  padding: .18rem .55rem;
  border-radius: 20px;
  border: 1px solid var(--shop-accent);
  color: var(--shop-accent);
  white-space: nowrap;
  margin-top: 3px;
  line-height: 1.4;
}

/* Badge row */
.shop-badges {
  display: flex;
  gap: .4rem;
  flex-wrap: wrap;
}
.shop-badge {
  font-size: .62rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .12rem .48rem;
  border-radius: 12px;
  background: var(--bg4);
  border: 1px solid var(--border);
  color: var(--muted);
}
.shop-badge.quality { color: var(--shop-accent); border-color: var(--shop-accent); background: rgba(0,0,0,0.3); }

/* Address line */
.shop-address {
  font-size: .75rem;
  color: var(--muted);
  font-style: italic;
  letter-spacing: .02em;
}

/* Sections */
.shop-section {
  background: var(--bg4);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: .55rem .75rem;
}
.shop-section-label {
  font-size: .60rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: .28rem;
  font-weight: 700;
}

/* NPC rows */
.shop-npc {
  display: flex;
  flex-direction: column;
  gap: .18rem;
  font-size: .82rem;
}
.shop-npc-name {
  color: var(--text2);
  font-weight: 600;
}
.shop-npc-desc {
  color: var(--muted);
  font-size: .77rem;
  line-height: 1.45;
}

/* Description text */
.shop-desc-text {
  font-size: .82rem;
  color: var(--muted);
  line-height: 1.6;
}

/* Wares/services items */
.shop-items {
  display: flex;
  flex-direction: column;
  gap: .22rem;
}
.shop-item {
  display: flex;
  justify-content: space-between;
  gap: .4rem;
  font-size: .79rem;
  line-height: 1.4;
}
.shop-item-name { color: var(--text2); flex: 1; min-width: 0; }
.shop-item-price {
  color: var(--muted);
  flex-shrink: 0;
  font-size: .74rem;
  white-space: nowrap;
}

/* Special highlights */
.shop-item.service .shop-item-name { color: var(--text2); }
.shop-item.note { margin-top: .15rem; }
.shop-item.note .shop-item-name { color: var(--muted); font-style: italic; font-size: .75rem; }

/* Rumour / special sections */
.shop-rumour {
  font-size: .81rem;
  color: var(--muted);
  font-style: italic;
  line-height: 1.55;
  padding-left: .6rem;
  border-left: 2px solid var(--shop-accent);
}
.shop-special {
  font-size: .81rem;
  color: var(--text2);
  line-height: 1.55;
  padding-left: .6rem;
  border-left: 2px solid #a855f7;
}
.shop-blessing {
  background: rgba(212,175,55,.07);
  border-left: 2px solid #d4af37;
  padding: .35rem .6rem;
  border-radius: 0 6px 6px 0;
  font-size: .79rem;
  color: #fde68a;
  line-height: 1.5;
}
.shop-curse {
  background: rgba(220,38,38,.08);
  border-left: 2px solid #dc2626;
  padding: .35rem .6rem;
  border-radius: 0 6px 6px 0;
  font-size: .79rem;
  color: #f87171;
  line-height: 1.5;
}

/* ---- Card entrance animation ---- */
@keyframes shopIn {
  from { opacity: 0; transform: translateY(22px) scale(.96); }
  to   { opacity: 1; transform: translateY(0)    scale(1);   }
}
.shop-card.anim { animation: shopIn .48s cubic-bezier(.34,1.56,.64,1) both; }

/* ---- Print ---- */
@media print {
  .shop-grid { display: grid !important; grid-template-columns: repeat(2, 1fr); gap: 1rem; justify-content: unset !important; }
  .shop-card { background: #fff !important; border: 1px solid #ccc !important; box-shadow: none !important; break-inside: avoid; font-size: 12px !important; }
  .shop-name, .shop-item-name, .shop-npc-name { color: #000 !important; }
  .shop-address, .shop-desc-text, .shop-item-price, .shop-npc-desc { color: #444 !important; }
  .shop-section { background: #f8f7f0 !important; border-color: #ccc !important; }
  .shop-rumour { border-left-color: #8a7a00 !important; color: #555 !important; }
  .shop-blessing { background: #fffde7 !important; color: #7a6a00 !important; border-color: #c9a800 !important; }
  .shop-curse { background: #fff1f0 !important; color: #cc2200 !important; border-color: #cc2200 !important; }
  .shop-sign-wrap canvas { width: 100% !important; }
}

/* ---- Responsive ---- */
@media (max-width: 600px) {
  .shop-grid { flex-direction: column; align-items: center; }
  .shop-card { width: 92vw; max-width: 400px; font-size: 14px; }
}
