/* Merch mağazası ortak stilleri (issue #512). Renk/yarıçap --ics-* token'larından gelir. */

/* KDV notu: fiyatın yanında/altında küçük ibare. nowrap: EN "VAT included" iki satıra bölünmesin. */
.merch-vat-note {
  font-size: 12px;
  font-weight: 500;
  color: var(--ics-muted);
  white-space: nowrap;
}

/* Görsel çerçevesi: kare çerçeve sabit kalır, görsel kırpılmadan (contain) ortalanır. */
.merch-img-frame {
  background: var(--ics-surface);
  overflow: hidden;
}
.merch-img-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Ürün sayfası ana görsel: lightbox tetikleyicisi olan düğme. */
.merch-main-image {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}
.merch-main-image:focus-visible,
.merch-thumb:focus-visible {
  outline: 3px solid var(--ics-blue);
  outline-offset: -3px;
}
.merch-main-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.merch-thumbs {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.merch-thumb {
  width: 64px;
  height: 64px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: var(--ics-r-xs);
  background: var(--ics-surface);
  overflow: hidden;
  cursor: pointer;
}
.merch-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.merch-thumb.is-active {
  border-color: var(--ics-blue);
}

/* Ürün açıklaması: sayfanın altında tam genişlik satır. */
.merch-description-row {
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid var(--ics-line);
}
.merch-description-row h2 {
  margin: 0 0 16px;
  font-size: 22px;
}
.merch-description {
  max-width: 75ch;
  font-size: 16px;
  line-height: 1.7;
  color: var(--ics-text-2);
  overflow-wrap: anywhere;
}
.merch-description > :first-child { margin-top: 0; }
.merch-description > :last-child { margin-bottom: 0; }
.merch-description p,
.merch-description ul,
.merch-description ol { margin: 0 0 1em; }
.merch-description ul,
.merch-description ol { padding-left: 1.5em; }
.merch-description li { margin-bottom: .25em; }
.merch-description h3,
.merch-description h4 {
  margin: 1.4em 0 .5em;
  line-height: 1.3;
  color: var(--ics-text);
}
/* Bölüm başlığı (.merch-description-row h2) 22px; açıklama içi başlıklar ondan küçük kalır (h3 20px, h4 17px). */
.merch-description h3 { font-size: 1.25em; }
.merch-description h4 { font-size: 1.05em; }
.merch-description a { color: var(--ics-blue); text-decoration: underline; }

/* Lightbox (merch-lightbox.js). z-index: header (50) ve Bootstrap modal (1055) üstünde. */
.merch-lb {
  position: fixed;
  inset: 0;
  z-index: 1100;
  overscroll-behavior: contain;
  display: none;
  flex-direction: column;
  background: var(--ics-overlay);
}
.merch-lb.is-open { display: flex; }
.merch-lb-stage {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  overscroll-behavior: contain;
  touch-action: pan-y;
}
.merch-lb-stage.is-zoomed {
  display: block;
  overflow: auto;
  touch-action: auto;
  -webkit-overflow-scrolling: touch;
}
.merch-lb-img:focus-visible { outline: 3px solid var(--ics-white); outline-offset: -3px; }
.merch-lb-img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  cursor: zoom-in;
  user-select: none;
  -webkit-user-drag: none;
}
.merch-lb-stage.is-zoomed .merch-lb-img {
  max-width: none;
  max-height: none;
  cursor: zoom-out;
}
.merch-lb-btn {
  position: absolute;
  z-index: 2;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: var(--ics-r-pill);
  background: var(--ics-overlay-ctl);
  color: var(--ics-white);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}
.merch-lb-btn:hover { background: var(--ics-overlay-ctl-hover); }
.merch-lb-btn:focus-visible { outline: 3px solid var(--ics-white); outline-offset: 2px; }
.merch-lb-close { top: 12px; right: 12px; }
.merch-lb-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.merch-lb-next { right: 12px; top: 50%; transform: translateY(-50%); }
.merch-lb-counter {
  position: absolute;
  z-index: 2;
  top: 20px;
  left: 16px;
  padding: 4px 10px;
  border-radius: var(--ics-r-pill);
  background: var(--ics-overlay-ctl);
  color: var(--ics-white);
  font-size: 14px;
  font-weight: 600;
}
.merch-lb[data-single] .merch-lb-prev,
.merch-lb[data-single] .merch-lb-next,
.merch-lb[data-single] .merch-lb-counter { display: none; }

@media (max-width: 480px) {
  .merch-lb-prev { left: 6px; }
  .merch-lb-next { right: 6px; }
  .merch-lb-close { top: 8px; right: 8px; }
}

html.merch-lb-lock { overflow: hidden; }

/* Bilet sonrası "fuarda teslim al" şeridi (issue #571). Result 720px'lik kap: masaüstünde 3-4, 320-375px'te 2 kolon. */
.merch-offer {
  margin-top: 24px;
  padding: 20px;
}
.merch-offer-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
}
.merch-offer-grid .merch-card-title {
  margin: 0 0 6px;
  font-size: 15px;
  overflow-wrap: anywhere;
}
.merch-offer-grid .merch-card-body {
  padding: 10px 12px 14px;
}
/* Fiyat sayı ile para birimi arasında bölünmesin (QA #571, 320px'te "TL" alta düşüyordu). */
.merch-offer-price {
  font-size: 16px;
  white-space: nowrap;
}
@media (max-width: 480px) {
  /* 320-375px: 140px asgari kolon genişliği tek kolona düşürürdü; iki kolon sabitlenir. */
  .merch-offer { padding: 14px; }
  .merch-offer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .merch-offer-price { font-size: 14px; }
}
