/* Cửa hàng trong Trung Tâm Thương Mại: Tiệm Thú Cưng (pet-shop.mjs, .swp-*) + Phòng Thử Đồ (outfit-shop.mjs, .swo-*); khung chung .swg-* ở tour.css */
.swp-dialog { width: min(600px, 100%); }
.swp-hero { background: linear-gradient(135deg, rgba(251, 146, 60, .42), rgba(244, 114, 182, .26) 55%, rgba(250, 204, 21, .22)); }
.swp-hero .swg-badge { color: #ffedd5; }
.swp-x { position: absolute; top: 12px; right: 12px; z-index: 1; }
.swp-hero .swg-globe { right: 52px; }
.swp-list { display: grid; gap: 10px; padding: 18px 22px 0; }
.swp-tabs { display: flex; gap: 8px; padding: 16px 22px 0; }
.swp-tabs[hidden] { display: none; }
.swp-tabs button { flex: 1; height: 40px; border: 0; border-radius: 12px; background: rgba(255, 255, 255, .06); color: var(--swg-mute); font: 650 13.5px/1 inherit; cursor: pointer; transition: background .15s, color .15s; }
.swp-tabs button span { margin-left: 4px; font: 650 11px/1 ui-monospace, Consolas, monospace; opacity: .75; }
.swp-tabs button:hover { background: rgba(255, 255, 255, .11); color: #fff; }
.swp-tabs button.is-on { background: linear-gradient(135deg, rgba(251, 146, 60, .35), rgba(244, 114, 182, .28)); color: #fff; box-shadow: inset 0 0 0 1px rgba(251, 146, 60, .55); }
.swp-pic-cubefox { background-color: rgba(250, 204, 21, .3); }
.swp-pic-reddragon { background-color: rgba(220, 38, 38, .32); }
.swp-pic-blackdragon { background-color: rgba(76, 29, 149, .4); }
.swp-tabs.is-many { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.swp-tabs.is-many button { font-size: 12.5px; padding: 0 4px; white-space: nowrap; }
.swp-empty { padding: 26px 10px; text-align: center; }
.swp-empty b { display: block; font-size: 16px; color: #fde68a; }
.swp-empty span { display: block; margin-top: 6px; font-size: 13px; color: var(--swg-mute); }
.swp-card { display: flex; gap: 14px; align-items: center; padding: 12px; border-radius: 18px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .07);
  transition: border-color .2s, background .2s; }
.swp-card.is-active { background: linear-gradient(135deg, rgba(52, 211, 153, .12), rgba(34, 211, 238, .06)); border-color: rgba(52, 211, 153, .45); }
.swp-pic { flex: 0 0 auto; width: 74px; height: 74px; border-radius: 20px; display: flex; align-items: center; justify-content: center; font-size: 40px;
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, .28), rgba(255, 255, 255, .04) 70%); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); }
.swp-pic span { filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .35)); transition: transform .25s; }
.swp-pic img { width: 100%; height: 100%; object-fit: contain; padding: 4px; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .35)); transition: transform .25s; }
.swp-card:hover .swp-pic img { transform: translateY(-3px) scale(1.05); }
.swp-card:hover .swp-pic span { transform: translateY(-3px) rotate(-6deg); }
.swp-pic-shiba { background-color: rgba(234, 140, 60, .32); }
.swp-pic-husky { background-color: rgba(125, 160, 210, .3); }
.swp-pic-fox { background-color: rgba(240, 100, 40, .3); }
.swp-pic-corgi { background-color: rgba(245, 170, 70, .32); }
.swp-pic-pug { background-color: rgba(210, 150, 80, .3); }
.swp-pic-chihuahua { background-color: rgba(250, 190, 140, .3); }
.swp-pic-shepherd { background-color: rgba(120, 90, 60, .38); }
.swp-pic-cur { background-color: rgba(170, 90, 60, .32); }
.swp-info { flex: 1; min-width: 0; }
.swp-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.swp-head b { font-size: 16px; color: #fff; }
.swp-info small { display: block; margin-top: 3px; font-size: 12.5px; line-height: 1.45; color: var(--swg-mute); }
.swp-tag { display: inline-flex; align-items: center; padding: 3px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; background: rgba(255, 255, 255, .08); color: var(--swg-mute); }
.swp-tag.is-on { background: rgba(52, 211, 153, .16); color: #6ee7b7; }
.swp-tag.is-price { background: rgba(251, 191, 36, .16); color: #fde68a; }
.swp-actions { display: flex; gap: 8px; margin-top: 9px; flex-wrap: wrap; align-items: center; }
.swp-note { font-size: 12.5px; color: #fde68a; }
.swp-name { width: 100%; }
.swp-name label { display: block; font-size: 12px; font-weight: 650; color: #fde68a; margin-bottom: 5px; }
.swp-name-row { display: flex; gap: 8px; }
.swp-name input { flex: 1; min-width: 0; height: 32px; padding: 0 11px; border-radius: 9px; border: 1px solid rgba(255, 255, 255, .16); background: rgba(0, 0, 0, .3);
  color: #fff; font: 600 14px/1 inherit; outline: none; }
.swp-name input:focus { border-color: var(--swg-acc); box-shadow: 0 0 0 3px rgba(52, 211, 153, .2); }
.swp-link { margin-top: 4px; border: 0; background: none; color: var(--swg-mute); font-size: 12px; cursor: pointer; padding: 2px 0; }
.swp-link:hover { color: #fff; text-decoration: underline; }
.swp-modal.is-busy .swp-card { opacity: .6; pointer-events: none; }
@media (max-width: 520px) {
  .swp-pic { width: 58px; height: 58px; font-size: 32px; border-radius: 16px; }
  .swp-list { padding: 14px 14px 0; }
}
@media (max-height: 520px) {
  .swp-hero { padding: 16px 22px 12px; }
  .swp-hero p { display: none; }
  .swp-hero h2 { margin: 8px 0 0; font-size: 20px; }
  .swp-hero .swg-globe { font-size: 36px; top: 12px; }
}

/* ---------- Phòng Thử Đồ (outfit-shop.mjs): khung bên phải, nhân vật đứng giữa màn hình ---------- */
.swo-panel { position: fixed; top: calc(68px + env(safe-area-inset-top, 0px)); right: calc(16px + env(safe-area-inset-right, 0px)); bottom: 16px; z-index: 40; width: min(380px, calc(100% - 32px));
  display: flex; flex-direction: column; border-radius: 22px; overflow: hidden; color: var(--swg-text); pointer-events: auto;
  background: rgba(13, 20, 33, .93); border: 1px solid rgba(255, 255, 255, .1); box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .8); backdrop-filter: blur(10px);
  animation: swo-in .3s cubic-bezier(.2, .9, .3, 1.1); }
@keyframes swo-in { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
.swo-hd { position: relative; padding: 16px 18px 12px; background: linear-gradient(135deg, rgba(236, 72, 153, .34), rgba(139, 92, 246, .26) 60%, rgba(34, 211, 238, .16)); }
.swo-hd .swg-badge { color: #fce7f3; }
.swo-hd h2 { margin: 9px 0 4px; font-size: 19px; font-weight: 800; color: #fff; }
.swo-hd p { margin: 0; font-size: 12.5px; line-height: 1.5; color: rgba(232, 238, 247, .85); padding-right: 18px; }
.swo-x { position: absolute; top: 10px; right: 10px; }
.swo-tabs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; padding: 12px 14px 4px; }
.swo-tabs button { height: 54px; border: 0; border-radius: 12px; background: rgba(255, 255, 255, .05); color: var(--swg-mute); font: 650 12px/1 inherit; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; transition: background .15s, color .15s; }
.swo-tabs button i { font-style: normal; font-size: 18px; }
.swo-tabs button:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.swo-tabs button.is-on { background: linear-gradient(135deg, rgba(236, 72, 153, .3), rgba(139, 92, 246, .3)); color: #fff; box-shadow: inset 0 0 0 1px rgba(244, 114, 182, .5); }
.swo-body { flex: 1; min-height: 0; overflow: auto; padding: 8px 14px 12px; }
.swo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.swo-item { position: relative; border: 0; border-radius: 14px; padding: 6px 4px 8px; cursor: pointer; color: var(--swg-text);
  background: radial-gradient(circle at 50% 35%, rgba(255, 255, 255, .13), rgba(255, 255, 255, .03) 70%); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07);
  display: flex; flex-direction: column; align-items: center; gap: 2px; transition: transform .12s, box-shadow .15s; }
.swo-item:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2); }
.swo-item img { width: 100%; aspect-ratio: 1; object-fit: contain; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .35)); }
.swo-none { width: 100%; aspect-ratio: 1; display: flex; align-items: center; justify-content: center; font-style: normal; font-size: 30px; opacity: .55; }
.swo-item span { font-size: 11.5px; font-weight: 600; color: var(--swg-mute); }
.swo-item.is-on { box-shadow: inset 0 0 0 2px #f472b6, 0 8px 20px -10px rgba(244, 114, 182, .8); }
.swo-item.is-on span { color: #fbcfe8; }
.swo-item.is-on::after { content: '✓'; position: absolute; top: 6px; right: 6px; width: 18px; height: 18px; border-radius: 50%; background: #f472b6; color: #2a0b1c;
  font-size: 11px; font-weight: 900; display: flex; align-items: center; justify-content: center; }
.swo-panel.is-loading .swo-item.is-on::after { content: ''; border: 2px solid #2a0b1c; border-top-color: transparent; width: 10px; height: 10px; animation: swo-spin .7s linear infinite; }
@keyframes swo-spin { to { transform: rotate(360deg); } }
.swo-empty { padding: 28px 10px; text-align: center; }
.swo-empty b { display: block; color: #fff; font-size: 15px; }
.swo-empty span { display: block; margin-top: 6px; font-size: 13px; line-height: 1.5; color: var(--swg-mute); }
.swo-ft { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 14px 14px; border-top: 1px solid rgba(255, 255, 255, .07); }
.swo-state { flex: 1; font-size: 12px; color: var(--swg-mute); }
.swo-state.is-short { color: #fca5a5; }
/* giá trên ô đồ (admin đặt): ⭐ N chưa mua, ✓ đã mua — góc trái (góc phải là dấu đang mặc) */
.swo-tag { position: absolute; top: 6px; left: 6px; padding: 1px 6px; border-radius: 999px; font-size: 10.5px; font-style: normal; font-weight: 700;
    background: rgba(251, 191, 36, .92); color: #3b2300; box-shadow: 0 2px 6px rgba(0, 0, 0, .35); }
.swo-tag.is-own { background: rgba(52, 211, 153, .9); color: #052e1c; }
.swo-row { display: flex; gap: 8px; width: 100%; }
.swo-row .swg-btn { flex: 1; }
.swo-row .swg-btn:disabled { opacity: .45; cursor: default; filter: grayscale(.4); }
@media (max-width: 700px) {
  .swo-panel { top: auto; left: 8px; right: 8px; bottom: 8px; width: auto; height: min(58%, 460px); }
  .swo-hd p { display: none; }
  .swo-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-height: 520px) {
  .swo-panel { top: 8px; bottom: 8px; }
  .swo-hd p, .swo-hd h2 { display: none; }
  .swo-tabs button { height: 40px; }
}
