/* Merch section + modal (append to public.css) */

.merch .section-head { margin-bottom: 24px; }
.merch-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
@media (min-width: 768px) {
  .merch-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
}

.merch-card {
  border: 1px solid #EDEDED;
  background: #fff;
  border-radius: 8px;
  padding: 0;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 150ms ease, box-shadow 150ms ease;
}
.merch-card:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(0,0,0,0.06); }
.merch-card:focus-visible { outline: 2px solid #0B0B0C; outline-offset: 2px; }

.merch-card-media { width: 100%; aspect-ratio: 1 / 1; background: #f6f6f6; }
.merch-card-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.merch-card-placeholder { width: 100%; height: 100%; background: linear-gradient(135deg, #f3f3f3, #eaeaea); }

.merch-card-body { padding: 12px; display:flex; gap:6px; flex-direction: column; }
.merch-card-title { font-weight: 600; color: #0B0B0C; }
.merch-card-price { color: #2A2A2E; font-size: 14px; }

/* Modal */
.modal { position: fixed; inset: 0; display: none; z-index: 9999; }
.modal.is-open { display: block; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.45); }
.modal-panel {
  position: relative;
  width: min(980px, 92vw);
  max-height: 90vh;
  margin: 5vh auto;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0,0,0,0.25);
}
.modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 40px;
  height: 40px;
  border: 0;
  background: rgba(255,255,255,0.85);
  border-radius: 999px;
  cursor: pointer;
  font-size: 26px;
  line-height: 1;
}
body.modal-open { overflow: hidden; }

.merch-modal { display: grid; grid-template-columns: 1fr; }
@media (min-width: 768px) {
  .merch-modal { grid-template-columns: 1.1fr 0.9fr; }
}

.merch-modal-gallery { padding: 16px; border-bottom: 1px solid #EDEDED; }
@media (min-width: 768px) {
  .merch-modal-gallery { border-bottom: 0; border-right: 1px solid #EDEDED; }
}
.merch-modal-main { width: 100%; aspect-ratio: 1 / 1; background: #f6f6f6; border-radius: 8px; overflow: hidden; }
.merch-modal-main img { width: 100%; height: 100%; object-fit: cover; display: block; }

.merch-modal-thumbs { margin-top: 12px; display:flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.merch-thumb { border: 1px solid #EDEDED; border-radius: 8px; padding: 0; width: 64px; height: 64px; background:#fff; cursor:pointer; flex: 0 0 auto; overflow:hidden; }
.merch-thumb img { width:100%; height:100%; object-fit: cover; display:block; }

.merch-modal-form { padding: 16px; }
.merch-modal-title { margin: 0 0 6px; font-size: 22px; }
.merch-modal-price { margin-bottom: 12px; font-weight: 700; }

.btn-block { width: 100%; }
.hint { font-size: 13px; color: #2A2A2E; margin-top: 8px; }

.form-msg { margin-top: 10px; font-size: 14px; }
.form-msg.success { color: #0B7A3B; }
.form-msg.error { color: #B00020; }
