/* CraftNet CMS – Shop addon styles */

/* ── SHOP GRID ───────────────────────────────────────────────────────────── */
.shop-category { margin-bottom: 44px; }
.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

/* ── SHOP CARD ───────────────────────────────────────────────────────────── */
.shop-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  display: flex; flex-direction: column;
  position: relative;
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
.shop-card:hover {
  border-color: var(--border-l);
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,.5);
}
.shop-card-featured {
  border-color: rgba(245,197,24,.35);
  box-shadow: 0 0 20px rgba(245,197,24,.08);
}
.shop-card-featured:hover { border-color: rgba(245,197,24,.6); }

.shop-card-badge {
  position: absolute; top: 10px; right: 10px;
  font-size: 10px; font-weight: 700; letter-spacing: .5px;
  padding: 3px 9px; border-radius: 99px; z-index: 2;
}
.shop-card-badge.featured { background: rgba(245,197,24,.15); color: var(--gold); border: 1px solid rgba(245,197,24,.3); }
.shop-card-badge.sale     { background: rgba(217,59,59,.15);  color: #F87171;     border: 1px solid rgba(217,59,59,.3); top: 40px; }

.shop-card-img {
  width: 100%; aspect-ratio: 16/9;
  background: var(--bg3);
  overflow: hidden; position: relative;
}
.shop-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.shop-card:hover .shop-card-img img { transform: scale(1.04); }
.shop-card-img-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 48px;
  background: linear-gradient(135deg, var(--bg2) 0%, var(--bg3) 100%);
}

.shop-card-body { padding: 16px; flex: 1; display: flex; flex-direction: column; }
.shop-card-name {
  font-size: 14px; font-weight: 700; color: var(--text);
  margin-bottom: 7px; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.shop-card-desc {
  font-size: 12px; color: var(--muted); line-height: 1.6; flex: 1; margin-bottom: 14px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.shop-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }

/* ── PRICES ──────────────────────────────────────────────────────────────── */
.shop-price { display: flex; flex-direction: column; }
.shop-price-old { font-size: 12px; color: var(--dim); text-decoration: line-through; }
.shop-price-main { font-size: 18px; font-weight: 800; color: var(--grass-l); }

/* ── BUY BUTTON ──────────────────────────────────────────────────────────── */
.shop-buy-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: linear-gradient(135deg, var(--grass), var(--grass-l));
  color: #fff; font-size: 13px; font-weight: 700;
  padding: 8px 16px; border-radius: 8px; border: none; cursor: pointer;
  transition: opacity .15s, transform .1s;
  box-shadow: 0 0 14px rgba(123,189,82,.2);
  white-space: nowrap;
}
.shop-buy-btn:hover { opacity: .9; transform: translateY(-1px); }

/* ── TOAST ───────────────────────────────────────────────────────────────── */
.shop-toast {
  max-width: 1160px; margin: 12px auto 0;
  padding: 13px 20px; border-radius: 8px; border: 1px solid;
  font-size: 14px; font-weight: 500;
}
.shop-toast.success { background: rgba(93,138,60,.12); color: var(--grass-l); border-color: rgba(93,138,60,.35); }
.shop-toast.error   { background: rgba(217,59,59,.1);  color: #F87171;        border-color: rgba(217,59,59,.3); }

/* ── MODAL ───────────────────────────────────────────────────────────────── */
.shop-modal-backdrop {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.8); z-index: 500;
  align-items: center; justify-content: center; padding: 20px;
}
.shop-modal-backdrop.open { display: flex; }
.shop-modal {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; width: 440px; max-width: 100%;
  position: relative; overflow: hidden;
  box-shadow: 0 24px 60px rgba(0,0,0,.6);
}
.shop-modal-close {
  position: absolute; top: 12px; right: 14px;
  background: transparent; border: none; color: var(--muted);
  font-size: 18px; cursor: pointer; padding: 4px 8px; border-radius: 6px;
  transition: background .15s, color .15s;
}
.shop-modal-close:hover { background: var(--surface2); color: var(--text); }
.shop-modal-header {
  padding: 22px 24px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg2);
}
.shop-modal-body { padding: 22px 24px; }

@media(max-width:640px){
  .shop-grid{ grid-template-columns: 1fr 1fr; }
}
@media(max-width:420px){
  .shop-grid{ grid-template-columns: 1fr; }
}
