/* ════════════════════════════════════════════════════════════════════
   Shop 페이지 — 자체 상품 카탈로그 (Smart Store deep link 매핑)
   ════════════════════════════════════════════════════════════════════ */

.shop-main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

.shop-head {
  margin: 0 0 28px;
}
.shop-title {
  font-size: 32px;
  font-weight: var(--fw-heading);
  letter-spacing: -0.02em;
  margin: 0 0 8px;
}
.shop-sub {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-muted);
  margin: 0;
  max-width: 720px;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
.shop-store-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 14px;
  font-size: 13px;
  font-weight: var(--fw-heading);
  letter-spacing: 0.04em;
  color: var(--text-muted);
  text-decoration: none;
  border-bottom: 1px solid var(--text-dim, var(--border));
  padding-bottom: 2px;
  transition: color .15s, border-color .15s;
}
.shop-store-link:hover {
  color: var(--text);
  border-bottom-color: var(--text);
}
.shop-store-arrow {
  font-size: 11px;
}

.shop-more-cta {
  margin: 48px auto 0;
  padding: 32px 24px;
  max-width: 720px;
  text-align: center;
  background: var(--bg-sub);
  border-radius: 6px;
}
.shop-more-cta-text {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0 0 14px;
  line-height: 1.6;
}
.shop-more-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  background: #03c75a;
  color: #fff !important;
  font-weight: var(--fw-heading);
  font-size: 14px;
  letter-spacing: 0.02em;
  border-radius: 4px;
  text-decoration: none;
  transition: opacity .15s;
}
.shop-more-cta-btn:hover { opacity: 0.9; }

.shop-toolbar {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 22px 0 22px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.shop-chips {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}
.shop-chips .ft-chip {
  flex: 0 0 auto;
}

.shop-empty {
  padding: 60px 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
  background: var(--bg-sub);
  border-radius: 6px;
}

.shop-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
@media (max-width: 1100px) { .shop-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 720px)  { .shop-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; } }

/* ── 상품 카드 ── */
.shop-card {
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
  background: var(--bg);
  border: none;
  padding: 0;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: opacity .15s;
}
.shop-card:hover { opacity: var(--card-hover-opacity, 0.85); }
.shop-card:focus-visible { outline: 2px solid var(--text); outline-offset: 4px; }

.shop-card-thumb {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--bg-sub);
  overflow: hidden;
  margin-bottom: 12px;
}
.shop-card-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.shop-card-cat {
  position: absolute;
  left: 10px; top: 10px;
  font-size: 10px;
  font-weight: var(--fw-heading);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 8px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  border-radius: 2px;
}
[data-theme="dark"] .shop-card-cat {
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
}
/* 품절 — 카드는 그대로 두되 시각적으로만 차별화 (상품 존재 정보 보존) */
.shop-card-soldout {
  position: absolute;
  top: 10px; right: 10px;
  background: var(--text);
  color: var(--bg);
  font-size: 10px;
  font-weight: var(--fw-heading);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 2px;
}
.shop-card.is-soldout .shop-card-thumb img {
  filter: grayscale(1);
  opacity: 0.7;
  transition: filter .2s, opacity .2s;
}
.shop-card.is-soldout:hover .shop-card-thumb img {
  opacity: 0.85;
}
.shop-card.is-soldout .shop-card-title,
.shop-card.is-soldout .shop-card-price,
.shop-card.is-soldout .shop-card-price-original {
  color: var(--text-muted);
}
.shop-card-body {
  padding: 0;
}
.shop-card-title {
  font-size: 16px;
  font-weight: var(--fw-heading);
  letter-spacing: -0.015em;
  line-height: 1.35;
  margin: 0 0 6px;
  color: var(--text);
  word-break: keep-all;
  overflow-wrap: anywhere;
  /* 두 줄까지 자르고 …처리 — 긴 제목 안전 */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.shop-card-excerpt {
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-muted);
  margin: 0 0 10px;
  word-break: keep-all;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.shop-card-price-row {
  font-size: 15px;
  line-height: 1.4;
  color: var(--text);
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: auto;
}
.shop-card-price {
  color: var(--text);
  font-weight: var(--fw-heading);
  font-variant-numeric: tabular-nums;
}
.shop-card-price-original {
  color: var(--text-muted);
  text-decoration: line-through;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

/* ── 상세 모달 ── */
.shop-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  padding: 40px 16px;
}
.shop-modal[hidden] { display: none; }
.shop-modal-close {
  position: fixed;
  top: 16px; right: 16px;
  width: 40px; height: 40px;
  border: none;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  z-index: 1001;
}
.shop-modal-close:hover { background: rgba(0, 0, 0, 0.8); }

.shop-modal-panel {
  background: var(--bg);
  color: var(--text);
  max-width: 960px;
  width: 100%;
  border-radius: 6px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  overflow: hidden;
}
@media (max-width: 720px) {
  .shop-modal-panel { grid-template-columns: 1fr; }
}

.shop-modal-images {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: var(--bg-sub);
  max-height: 80vh;
  overflow-y: auto;
}
.shop-modal-img img {
  width: 100%;
  display: block;
}
.shop-modal-img-empty {
  aspect-ratio: 1 / 1;
}

.shop-modal-info {
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.shop-modal-cat {
  font-size: 11px;
  font-weight: var(--fw-heading);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.shop-modal-title {
  font-size: 22px;
  font-weight: var(--fw-heading);
  letter-spacing: -0.02em;
  line-height: 1.3;
  margin: 0;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
.shop-modal-price-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-top: 4px;
}
.shop-modal-price {
  font-size: 22px;
  font-weight: var(--fw-heading);
  font-variant-numeric: tabular-nums;
}
.shop-modal-excerpt {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
.shop-modal-desc {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text);
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.shop-buy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  background: #03c75a; /* Naver green */
  color: #fff !important;
  font-weight: var(--fw-heading);
  font-size: 15px;
  letter-spacing: 0.02em;
  border-radius: 4px;
  border: none;
  text-decoration: none;
  cursor: pointer;
  transition: opacity .15s;
  margin-top: 8px;
}
.shop-buy-btn:hover { opacity: 0.9; }
.shop-buy-btn.is-disabled {
  background: var(--border);
  color: var(--text-muted) !important;
  cursor: not-allowed;
}
.shop-buy-arrow { font-size: 12px; }

.shop-modal-note {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0;
  text-align: center;
  line-height: 1.5;
}
.shop-modal-note strong {
  color: var(--text);
  font-weight: var(--fw-heading);
}
.shop-modal-checked {
  font-size: 11px;
  opacity: 0.7;
}
