/* Shops directory and one shop (templates/items/shops_directory.html, shop_detail.html).
   the noticeboard redesign: shops three across (one on phones); one shop is a wooden sign, a
   banner sheet and price-tag grids whose tags open today's buy / sell popups. */

/* ---- Directory ---- */
.shop-bulletin{ padding:0; overflow:visible; gap:0; }
.shop-cover{ position:relative; display:flex; align-items:center; justify-content:center; height:190px; overflow:hidden;
  border-radius:11px 11px 0 0; background:var(--tint-butter); border-bottom:2px solid var(--line); }
.shop-cover img{ width:100%; height:100%; object-fit:cover; }
.shop-cover-ph{ font-size:54px; }
.shop-stamp{ position:absolute; top:50%; left:50%; transform:translate(-50%, -50%) rotate(-8deg);
  font-family:"Fredoka"; font-weight:700; font-size:24px; letter-spacing:.12em; text-transform:uppercase;
  color:var(--ink); background:var(--card); border:3px solid var(--ink-soft); border-radius:10px; padding:2px 16px; }
.shop-body{ display:flex; flex-direction:column; gap:8px; padding:12px 16px 16px; }
.shop-body h2{ font-size:20px; margin:0; line-height:1.2; }
.shop-body h2 a{ color:var(--ink); text-decoration:none; }
.shop-body h2 a:hover{ color:var(--rose-ink); text-decoration:underline; }
.shop-body .meta{ margin:0; }
.shop-visit{ align-self:flex-start; min-height:44px; display:inline-flex; align-items:center; }
.shop-closed-note{ margin:0; font-size:13px; padding:4px 10px; }

/* ---- One shop ---- */
.shop-page{ display:flex; flex-direction:column; gap:30px; }
.shop-banner{ padding:0; }
.shop-banner-art{ display:flex; align-items:center; justify-content:center; max-height:260px; overflow:hidden;
  background:var(--tint-butter); border-bottom:2px solid var(--line); border-radius:11px 11px 0 0; }
.shop-banner-art img{ width:100%; max-height:260px; object-fit:cover; }
.shop-banner-text{ padding:16px 22px 18px; }
.shop-banner-text > :last-child{ margin-bottom:0; }
.shop-banner-text .message{ margin:10px 0 0; }
.shop-banner-text :is(.hidden-marker, .mod-edit-link){ margin-left:6px; }
.shop-section .section-label{ margin-bottom:16px; }

/* Each tag sits in an <li> with its popup beside it, so the popup is never inside a
   rotated element (a transform would trap position:fixed). Tilt by cell, not by tag. */
.pt-list{ list-style:none; margin:0; padding:0; }
.pt-cell{ min-width:0; }
.pt-cell > .price-tag{ width:100%; transform:none; }
.pt-cell:nth-child(odd) > .price-tag{ transform:rotate(-1deg); }
.pt-cell:nth-child(even) > .price-tag{ transform:rotate(1.2deg); }
.price-tag .pt-img .thumb-placeholder, .price-tag .pt-img .pt-ph{ font-size:30px; }
.price-tag b{ overflow-wrap:anywhere; }
.price-tag .cost{ flex-wrap:wrap; gap:4px 6px; }
.price-tag .pt-badges{ display:flex; flex-wrap:wrap; gap:4px; }
.price-tag .pt-badges .badge{ font-size:10.5px; }
.shop-empty{ margin:0; }

/* The buy / sell popups reuse today's modal content classes (site.css). */
.modal-paper .modal-close{ position:absolute; }
.modal-paper .modal-item-header{ padding-right:34px; }
.modal-paper .shop-buy-form{ display:flex; flex-wrap:wrap; gap:10px 14px; align-items:flex-end; justify-content:flex-start; }
.modal-paper .shop-buy-form label{ display:block; font-weight:800; font-size:14px; margin-bottom:4px; }
.modal-paper .qty-input{ min-height:44px; max-width:120px; }
.modal-paper .button{ min-height:44px; }
/* Quantity: −/+ steppers either side of the number box, each a 44px target. */
.qty-stepper{ display:inline-flex; align-items:stretch; gap:6px; }
.qty-stepper .qty-input{ width:4.5rem; text-align:center; -moz-appearance:textfield; appearance:textfield; }
.qty-stepper .qty-input::-webkit-inner-spin-button, .qty-stepper .qty-input::-webkit-outer-spin-button{ -webkit-appearance:none; margin:0; }
.qty-step{ min-width:44px; min-height:44px; padding:0; font:700 20px/1 "Fredoka", sans-serif; cursor:pointer;
  color:var(--ink); background:var(--parch-2); border:2px solid var(--line); border-radius:10px; }
.qty-step:hover:not(:disabled){ border-color:var(--rose-deep); }
.qty-step:disabled{ opacity:.45; cursor:not-allowed; }
.qty-step:focus-visible{ outline:3px solid var(--accent-dark); outline-offset:2px; }
.shop-cant-afford{ margin:0 0 8px; }

@media (max-width:480px){
  .shop-cover{ height:150px; }
  .shop-banner-text{ padding:14px 14px 16px; }
}
@media (prefers-reduced-motion: reduce){
  .shop-bulletin:hover{ transform:none; }
}

/* ---- Your wallet (items/_shop_wallet.html) ----
   First thing under the nav on both shop pages, at every width: on phones the nav hides
   the wallet inside the user menu, and a shop is where you need it. */
.shop-wallet{ display:flex; flex-wrap:wrap; align-items:center; gap:6px 8px; width:fit-content; max-width:100%;
  margin:0 0 18px; padding:8px 14px; background:var(--card); border:2px solid var(--line); border-radius:999px;
  box-shadow:0 2px 0 rgba(0,0,0,.08); }
.shop-wallet-label{ font-family:"Fredoka"; font-weight:600; font-size:14px; color:var(--ink); margin-right:2px; }
.shop-wallet .nav-currency{ font-size:0.9rem; border-color:var(--line); }
.shop-wallet-name{ font-weight:600; color:var(--ink-soft); }
@media (max-width:640px){ .shop-wallet{ border-radius:14px; } }
