/* Misaki Shop - 前台选品页「贴纸册」卡片
   只在 body.selection-view 生效，不影响后台选品墙与提交详情页（那两处仍用 selection-card.css）。

   图片策略：API 返回原图宽高，卡片用 --ar 把图框撑成图片自己的比例（极端横条/竖条夹在 0.6 ~ 1.75），
   图片一律 object-fit: contain，永远完整显示不裁切；
   图框 flex:1 吸收同排卡片的富余高度，所以 tag / 价格 / 备注 / 按钮始终紧贴。 */

/* 等高网格：同一行卡片严格等高，行与行之间也一致 */
.selection-view .album-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 18px 12px;
  padding-top: 8px;
}
@media (min-width: 680px) {
  .selection-view .album-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px 16px; }
}
@media (min-width: 1000px) {
  .selection-view .album-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px 18px; }
}

.selection-view .album-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 8px 8px 0;
  border-radius: 14px;
  background: #fffdf8;
  box-shadow: 0 1px 0 rgba(59, 43, 50, .05), 0 14px 24px -16px rgba(150, 50, 85, .5);
  transform: rotate(var(--tilt, 0deg));
  transition: transform .3s cubic-bezier(.22, 1, .36, 1), box-shadow .3s cubic-bezier(.22, 1, .36, 1);
  animation: album-pop .45s cubic-bezier(.22, 1, .36, 1) both;
  animation-delay: calc(var(--i, 0) * 35ms);
}
.selection-view .album-card:nth-child(4n+1) { --tilt: -1.1deg; }
.selection-view .album-card:nth-child(4n+2) { --tilt: .7deg; }
.selection-view .album-card:nth-child(4n+3) { --tilt: .9deg; }
.selection-view .album-card:nth-child(4n+4) { --tilt: -.7deg; }
@media (hover: hover) {
  .selection-view .album-card:hover {
    transform: rotate(0) translateY(-6px);
    box-shadow: 0 1px 0 rgba(59, 43, 50, .05), 0 26px 34px -18px rgba(150, 50, 85, .55);
    z-index: 3;
  }
}
@keyframes album-pop {
  from { opacity: 0; transform: rotate(var(--tilt, 0deg)) translateY(14px) scale(.97); }
  to   { opacity: 1; transform: rotate(var(--tilt, 0deg)) translateY(0) scale(1); }
}

/* 和纸胶带 */
.selection-view .album-tape {
  position: absolute;
  top: -9px;
  left: 50%;
  z-index: 4;
  width: 58px;
  height: 17px;
  transform: translateX(-50%) rotate(-4deg);
  border-radius: 2px;
  background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .42) 0 4px, rgba(255, 255, 255, 0) 4px 9px), var(--mint);
  box-shadow: 0 1px 2px rgba(59, 43, 50, .16);
  pointer-events: none;
}
.selection-view .album-card:nth-child(3n) .album-tape {
  background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .4) 0 4px, rgba(255, 255, 255, 0) 4px 9px), var(--lemon);
  transform: translateX(-50%) rotate(5deg);
}
.selection-view .album-card:nth-child(3n+2) .album-tape {
  background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .42) 0 4px, rgba(255, 255, 255, 0) 4px 9px), #ffd3e2;
}

/* 图框：比例跟图片走，多余高度由它吸收 */
/* 图区固定高度（沿用原版高度），contain 保证任何比例都完整可见，
   横条/竖条空出的部分由同图模糊衬底补满 */
.selection-view .album-plate {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  height: clamp(170px, 26vw, 230px);
  border: 1px solid rgba(59, 43, 50, .07);
  border-radius: 9px;
  overflow: hidden;
  background: #fff9f4;
  cursor: zoom-in;
}
@media (max-width: 560px) {
  .selection-view .album-plate { height: clamp(150px, 42vw, 200px); }
}
/* 完整显示：主图 contain，永不裁切 */
.selection-view .album-plate .album-photo {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform .35s cubic-bezier(.22, 1, .36, 1);
}
/* 衬底：同一张图放大模糊后铺满图框，横条/竖条留下的边缘变成照片的柔光，而不是死白 */
.selection-view .album-plate .album-bleed {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  object-fit: cover;
  filter: blur(18px) saturate(1.15);
  transform: scale(1.18);
  opacity: .48;
  pointer-events: none;
}
@media (hover: hover) {
  .selection-view .album-card:hover .album-plate .album-photo { transform: scale(1.03); }
}
.selection-view .album-plate:focus-visible { outline: 2.5px solid var(--cherry); outline-offset: 2px; }

/* ===== 多图轮播：横向 scroll-snap，手指左右滑，点下面圆点切换 ===== */
.selection-view .album-track {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  touch-action: pan-x pan-y pinch-zoom;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.selection-view .album-track::-webkit-scrollbar { display: none; }
.selection-view .album-slide {
  position: relative;
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  scroll-snap-align: center;
  scroll-snap-stop: always;
}
/* 多图时品类/价格上移，给底部圆点让位 */
.selection-view .album-plate.has-multi .album-chips { bottom: 30px; }
.selection-view .album-dots {
  position: absolute;
  left: 50%;
  bottom: 9px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(53, 35, 49, .3);
  backdrop-filter: blur(4px);
  transform: translateX(-50%);
}
.selection-view .album-dot {
  width: 6px;
  height: 6px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, .62);
  cursor: pointer;
  transition: width .2s ease, background .2s ease;
}
.selection-view .album-dot.is-on { width: 15px; background: #fff; }

/* 角标 */
.selection-view .album-flag {
  position: absolute;
  top: 7px;
  left: 7px;
  z-index: 3;
  padding: 3px 8px;
  border: 1.5px solid var(--cherry);
  border-radius: 999px;
  background: #fff;
  color: var(--cherry);
  font-family: var(--font-display);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .06em;
}
.selection-view .album-flag.is-out {
  border-color: transparent;
  background: rgba(59, 43, 50, .72);
  color: #fff;
  letter-spacing: .08em;
}
.selection-view .album-check {
  position: absolute;
  top: 7px;
  right: 7px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--cherry);
  color: #fff;
  font-size: 13px;
  opacity: 0;
  transform: scale(.4) rotate(-20deg);
  transition: all .28s cubic-bezier(.34, 1.56, .64, 1);
}
.selection-view .album-card.is-picked { box-shadow: 0 0 0 2px var(--cherry), 0 18px 28px -16px rgba(150, 50, 85, .55); }
.selection-view .album-card.is-picked .album-check { opacity: 1; transform: scale(1) rotate(-8deg); }
.selection-view .album-card.is-soldout .album-plate .album-photo { filter: grayscale(.85) opacity(.55); }
.selection-view .album-card.is-soldout .album-plate .album-bleed { filter: blur(18px) grayscale(.9); opacity: .28; }
.selection-view .album-card.is-soldout .album-plate,
.selection-view .album-card.is-soldout .album-add { cursor: not-allowed; }

/* ===== 图片底部：品类（宽度随文字）+ 价格 ===== */
.selection-view .album-chips {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  pointer-events: none;   /* 底下的图片仍可点开大图 */
}
/* 品类：粉色大写小字，宽度只跟文字走；太长时末尾省略，永远不挤价格 */
.selection-view .album-cat {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
  padding: 4px 10px;
  border: 1px solid rgba(152, 36, 79, .16);
  border-radius: 999px;
  background: rgba(255, 244, 248, .93);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: var(--cherry);
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .12em;
  line-height: 1.5;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 2px 10px rgba(59, 43, 50, .12);
}
/* 价格：粉色渐变胶囊 + SVG 金额图标 + 数字 */
.selection-view .album-price-pill {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: .38em;
  padding: .42em .72em .42em .55em;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff8fbb, #d63c78);
  color: #fff;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: .01em;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(207, 47, 108, .3);
}
.selection-view .album-price-pill .ic { width: 1.05em; height: 1.05em; flex: none; display: block; }

/* ===== 商品名 ===== */
.selection-view .album-name { padding: 9px 3px 0; min-width: 0; }
.selection-view .album-name h3 {
  display: block;
  margin: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -.01em;
  color: var(--ink);
}

/* ===== 客户可见备注（有才显示，不占位） ===== */
.selection-view .album-note-line { padding: 4px 3px 0; min-width: 0; }
.selection-view .album-name + .album-note-line { padding-top: 2px; }
.selection-view .album-note {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
  cursor: pointer;
}
.selection-view .album-note:hover { color: var(--cherry); }
/* 文字下面接按钮时收紧上边距，让文字上下留白一致 */
.selection-view .album-name + .album-act,
.selection-view .album-note-line + .album-act { padding-top: 3px; }

/* 底部操作：始终紧跟文字 */
.selection-view .album-act { margin-top: auto; padding: 8px 0 9px; }
.selection-view .album-add {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 100%;
  min-height: 36px;
  border: 1.5px dashed rgba(152, 36, 79, .4);
  border-radius: 9px;
  background: #fff;
  color: var(--cherry);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 800;
  transition: all .18s cubic-bezier(.22, 1, .36, 1);
}
.selection-view .album-add:hover {
  border-style: solid;
  border-color: var(--cherry);
  background: var(--cherry);
  color: #fff;
  transform: translateY(-1px);
}
.selection-view .album-add:active { transform: scale(.97); }
.selection-view .album-add[disabled] {
  border-color: var(--line);
  background: #faf6f8;
  color: #b3a5ad;
  transform: none;
  cursor: not-allowed;
}
.selection-view .album-step {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  padding: 2px;
  border: 1.5px solid var(--cherry);
  border-radius: 9px;
  background: var(--rose-100);
}
.selection-view .album-card.is-picked .album-add { display: none; }
.selection-view .album-card.is-picked .album-step { display: flex; }
.selection-view .album-step button {
  display: grid;
  place-items: center;
  width: 32px;
  height: 30px;
  border: none;
  border-radius: 7px;
  background: #fff;
  color: var(--cherry);
  font-size: 15px;
  font-weight: 900;
  transition: transform .14s ease;
}
.selection-view .album-step button:active { transform: scale(.9); }
.selection-view .album-step output {
  min-width: 22px;
  text-align: center;
  color: var(--cherry);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 800;
}

/* 空态与结束标记 */
.selection-view .album-empty {
  grid-column: 1 / -1;
  padding: 56px 16px;
  text-align: center;
  color: var(--muted);
  font-weight: 800;
}
.selection-view .album-empty strong {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.15rem;
}
.selection-view .album-end {
  margin: 34px auto 0;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.selection-view .album-end::before,
.selection-view .album-end::after {
  content: "";
  display: inline-block;
  width: 46px;
  height: 1px;
  margin: 0 10px;
  vertical-align: middle;
  background: var(--line);
}

@media (prefers-reduced-motion: reduce) {
  .selection-view .album-card,
  .selection-view .album-plate img,
  .selection-view .album-check,
  .selection-view .album-add,
  .selection-view .album-step button { animation: none !important; transition: none !important; }
  .selection-view .album-card { transform: none; }
  .selection-view .album-card:hover { transform: none; }
}

/* ---------- 底部购物车条（替代原来的圆形 FAB） ---------- */
.selection-view .album-dock {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 40;
  padding: 10px 16px calc(12px + env(safe-area-inset-bottom));
}
.selection-view .album-dock-in {
  max-width: 880px;   /* 与商品栏 .selection-page 同宽，左右边缘对齐 */
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  background: #fffdf8;
  box-shadow: 4px 4px 0 rgba(59, 43, 50, .12);
}
.selection-view .album-dock-thumbs { display: flex; flex-shrink: 0; }
.selection-view .album-dock-thumbs img {
  width: 34px; height: 34px;
  margin-left: -9px;
  border: 2px solid #fffdf8;
  border-radius: 8px;
  background: var(--rose-100);
  object-fit: cover;
  cursor: pointer;   /* 和右侧 Review 按钮同效：点开 My Picks */
  transition: transform .15s ease;
}
.selection-view .album-dock-thumbs img:hover { transform: translateY(-2px) scale(1.06); }
.selection-view .album-dock-thumbs img:first-child { margin-left: 0; }
.selection-view .album-dock-txt { flex: 1; min-width: 0; }
.selection-view .album-dock-txt b {
  display: block;
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 800;
  line-height: 1.2;
  color: var(--ink);
}
.selection-view .album-dock-txt span {
  display: block;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.selection-view .album-dock-btn {
  flex-shrink: 0;
  min-height: 42px;
  padding: 0 18px;
  border: none;
  border-radius: 999px;
  background: var(--cherry);
  color: #fff;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 3px 0 rgba(150, 30, 70, .45);
  transition: transform .16s cubic-bezier(.22, 1, .36, 1), box-shadow .16s;
}
.selection-view .album-dock-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 0 rgba(150, 30, 70, .45); }
.selection-view .album-dock-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(150, 30, 70, .45); }
.selection-view .album-dock-btn[disabled] {
  background: #e7dde2;
  color: #a2939c;
  box-shadow: 0 3px 0 rgba(59, 43, 50, .1);
  cursor: not-allowed;
  transform: none;
}
