/* 商品卡（像 Etsy）、商品详情页 #/shop/<编号>、好评页 #/reviews。数据在 js/etsy-data.js，渲染在 js/shop.js */

/* 商店页和好评页用宽一点的纸 */
.frame-sheet.is-wide {
  width: min(1060px, 100%);
}

/* ---------- 档案标签 + 商品网格 ---------- */
.product-shelf + .product-shelf {
  margin-top: 34px;
}
.shelf-label {
  display: inline-block;
  margin: 0 0 14px;
  padding: 2px 9px 1px;
  background: var(--cream);
  border: 1px solid rgba(71, 111, 150, 0.45);
  color: var(--blue-dark);
  font:
    600 10px/1.4 'Avenir Next',
    sans-serif;
  letter-spacing: 0.18em;
  transform: rotate(-1.5deg);
}
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 24px 16px;
}
.product-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  color: var(--ink);
  text-decoration: none;
}
.product-photo {
  display: block;
  aspect-ratio: 5 / 4; /* 和 Etsy 商品列表的小图一样 */
  overflow: hidden;
  background: var(--cream);
  border-radius: 3px;
  box-shadow: 0 2px 8px rgba(40, 30, 20, 0.12);
}
.product-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s;
}
.product-card:hover .product-photo img {
  transform: scale(1.04);
}
.product-name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font:
    400 15px/1.35 Georgia,
    'Songti SC',
    serif;
}
.product-card:hover .product-name {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.product-meta {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.product-meta b {
  font:
    600 15px/1 'Avenir Next',
    'Helvetica Neue',
    sans-serif;
}
.product-meta small {
  color: var(--blue-dark);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
}
.product-card.is-sold-out .product-photo img {
  filter: grayscale(0.6);
  opacity: 0.7;
}
.product-card.is-sold-out .product-meta small {
  padding: 2px 7px;
  border: 1.5px dashed #8a939c;
  color: #8a939c;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

/* 来信查看页里：卡片居中，最多三张一排 */
.letter-products {
  width: 100%;
}
.letter-products:empty {
  display: none;
}
.letter-products .product-shelf {
  text-align: center;
}
.letter-products .product-grid {
  grid-template-columns: repeat(auto-fit, minmax(150px, 180px));
  justify-content: center;
  text-align: left;
}

/* ---------- 商店页顶上的好评入口 ---------- */
.shop-reviews-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 26px;
  color: var(--blue-dark);
  font-size: 14px;
  text-decoration: none;
  border-bottom: 1px dotted currentColor;
}
.stars {
  color: #c98a2b;
  letter-spacing: 1px;
}

/* ---------- 商品详情页 ---------- */
.product-detail {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 36px;
  align-items: start;
  margin: 6px 0 36px;
}
.product-main {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: #f6f0e4;
  cursor: zoom-in;
}
.product-main img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
}
.product-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.product-thumbs button {
  width: 60px;
  height: 60px;
  padding: 0;
  border: 2px solid transparent;
  background: none;
  cursor: pointer;
}
.product-thumbs button.is-active {
  border-color: var(--blue-dark);
}
.product-thumbs img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.product-info h1 {
  margin: 8px 0 10px;
  font-size: clamp(26px, 3.2vw, 36px);
  line-height: 1.2;
}
.product-price {
  margin: 0 0 18px;
  font:
    600 22px/1 'Avenir Next',
    'Helvetica Neue',
    sans-serif;
}
.product-buy {
  display: inline-block;
  padding: 11px 20px 10px;
  font-size: 14px;
}
.product-buy:hover,
.product-buy:focus-visible {
  background: var(--blue-dark);
  color: #fff;
  transform: rotate(0deg);
}
.product-includes {
  margin: 24px 0 0;
  padding: 14px 16px;
  background: #f6f0e4;
}
.product-includes b {
  color: var(--blue-dark);
  font-size: 11px;
  letter-spacing: 0.12em;
}
.product-includes ul {
  margin: 8px 0 0;
  padding-left: 18px;
  color: #3d4a5a;
  font-size: 14px;
  line-height: 1.65;
}
.product-desc {
  margin-top: 22px;
  color: #3d4a5a;
  font-size: 14px;
  line-height: 1.7;
  white-space: pre-line;
}
.product-reviews {
  margin: 0 0 30px;
}

/* ---------- 评价 ---------- */
.reviews-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin: 0 0 26px;
  color: #3d4a5a;
}
.reviews-summary .stars {
  font-size: 18px;
}
.reviews-summary a {
  color: var(--blue-dark);
  font-size: 14px;
}
.review-wall {
  columns: 3 240px;
  column-gap: 18px;
}
.review-card {
  position: relative;
  break-inside: avoid;
  margin: 0 0 18px;
  padding: 16px 16px 13px;
  background: var(--paper);
  box-shadow: 0 2px 8px rgba(40, 30, 20, 0.1);
}
.review-card::after {
  content: '';
  position: absolute;
  inset: 1px;
  border: 1.2px solid rgba(71, 111, 150, 0.45);
  filter: url(#hand-drawn);
  pointer-events: none;
}
.review-text {
  margin: 8px 0 12px;
  font:
    400 15px/1.55 Georgia,
    'Songti SC',
    serif;
  white-space: pre-line;
}
.review-photos {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 12px;
}
.review-photos button {
  position: relative;
  z-index: 1;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
}
.review-photos img {
  display: block;
  height: 120px;
  width: auto;
}
.review-by {
  margin: 0;
  font:
    600 12px/1.4 'Avenir Next',
    sans-serif;
  letter-spacing: 0.04em;
}
.review-item {
  position: relative;
  z-index: 1;
  margin: 3px 0 0;
  color: #66717d;
  font-size: 12px;
  line-height: 1.5;
}
.review-item a {
  color: var(--blue-dark);
}

@media (max-width: 700px) {
  .product-detail {
    grid-template-columns: 1fr;
    gap: 22px;
  }
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 12px;
  }
  .letter-products .product-grid {
    grid-template-columns: repeat(auto-fit, minmax(130px, 160px));
  }
  .review-photos img {
    height: 96px;
  }
}

/* ---------- 订阅页 #/subscribe ---------- */
.plan-lead {
  max-width: 640px;
  margin: 0 0 30px;
  color: #3d4a5a;
  font:
    400 18px/1.6 Georgia,
    'Songti SC',
    serif;
}
.plan-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px;
  align-items: stretch;
}
.plan-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  box-shadow: 0 6px 22px rgba(30, 42, 56, 0.12);
}
.plan-card::after {
  content: '';
  position: absolute;
  inset: 2px;
  border: 1.4px solid rgba(71, 111, 150, 0.5);
  filter: url(#hand-drawn);
  pointer-events: none;
}
.plan-card.is-featured {
  box-shadow:
    0 0 0 2px rgba(199, 93, 82, 0.35),
    0 10px 30px rgba(30, 42, 56, 0.16);
}
/* 「Most popular」红色邮戳 */
.plan-badge {
  position: absolute;
  z-index: 2;
  top: 14px;
  right: 14px;
  padding: 7px 12px 6px;
  border: 2px solid var(--red);
  border-radius: 3px;
  box-shadow:
    inset 0 0 0 2px var(--paper),
    inset 0 0 0 3px rgba(199, 93, 82, 0.6);
  background: rgba(255, 253, 247, 0.92);
  color: var(--red);
  font:
    700 11px/1 'Avenir Next',
    sans-serif;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transform: rotate(6deg);
}
.plan-photo {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  padding: 0;
  border: 0;
  overflow: hidden;
  background: #efe6d4;
  cursor: zoom-in;
}
.plan-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
}
/* Honey Bun：明信片斜放在纸上 */
.plan-photo.is-postcard {
  display: grid;
  place-items: center;
  cursor: default;
  background:
    linear-gradient(rgba(96, 148, 190, 0.14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(96, 148, 190, 0.14) 1px, transparent 1px),
    #f6f0e4;
  background-size: 24px 24px;
}
.plan-photo.is-postcard img {
  width: 72%;
  height: auto;
  object-fit: contain;
  transform: rotate(-3deg);
  box-shadow: 0 12px 24px rgba(30, 42, 56, 0.22);
}
.plan-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 22px 24px 24px;
}
.plan-name {
  margin: 0;
  font:
    400 30px/1.15 Georgia,
    'Songti SC',
    serif;
}
.plan-price {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin: 8px 0 10px;
}
.plan-price b {
  font:
    600 30px/1 'Avenir Next',
    'Helvetica Neue',
    sans-serif;
}
.plan-price span {
  color: #66717d;
  font-size: 14px;
}
.plan-pitch {
  margin: 0 0 18px;
  color: #3d4a5a;
  font-size: 15px;
  line-height: 1.55;
}
.plan-join {
  align-self: flex-start;
  display: inline-block;
  padding: 11px 20px 10px;
  font-size: 14px;
}
.plan-join:hover,
.plan-join:focus-visible {
  background: var(--blue-dark);
  color: #fff;
  transform: rotate(0deg);
}
.plan-card.is-featured .plan-join {
  background: var(--blue-dark);
  color: #fff;
  box-shadow:
    inset 0 0 0 2px var(--blue-dark),
    inset 0 0 0 3px rgba(255, 255, 255, 0.55);
}
.plan-includes {
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px dashed rgba(71, 111, 150, 0.35);
}
.plan-includes b {
  color: var(--blue-dark);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.plan-includes ul {
  margin: 8px 0 0;
  padding-left: 18px;
  color: #3d4a5a;
  font-size: 14px;
  line-height: 1.7;
}
.plan-note {
  margin: 16px 0 0;
  color: #5d6a78;
  font-size: 13px;
  text-align: center;
}
.plan-section {
  margin: 46px 0 0;
}
.issue-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.issue-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--ink);
  text-decoration: none;
}
.issue-photo {
  display: block;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  margin-bottom: 6px;
  background: var(--cream);
  box-shadow: 0 2px 8px rgba(40, 30, 20, 0.12);
}
.issue-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s;
}
.issue-card:hover .issue-photo img {
  transform: scale(1.04);
}
.issue-month {
  color: var(--blue-dark);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
}
.issue-title {
  font:
    400 17px/1.3 Georgia,
    'Songti SC',
    serif;
}
.issue-open {
  color: #66717d;
  font-size: 12px;
}
.plan-final {
  margin: 40px 0 34px;
  text-align: center;
}
@media (max-width: 760px) {
  .plan-grid {
    grid-template-columns: 1fr;
  }
  .plan-card.is-featured {
    order: -1;
  }
  .issue-row {
    grid-template-columns: repeat(3, minmax(120px, 1fr));
    overflow-x: auto;
  }
  .plan-lead {
    font-size: 16px;
  }
}
