/* === MERCH SEKCE === */

.merch {
  background: #050505;
  padding: 56px 24px;
  border-top: 1px solid rgba(225, 225, 225, 0.18);
}

.merch__inner {
  max-width: 960px;
  margin: 0 auto;
}

/* Hlavička sekce */
.merch__header {
  text-align: center;
  margin-bottom: 48px;
}

.merch__header h2 {
  font-family: "Times", serif;
  font-size: 38px;
  color: #fff;
  margin: 0 0 10px;
  letter-spacing: 0.04em;
}

.merch__subtitle {
  font-family: "Roboto", sans-serif;
  font-size: 13px;
  color: #aaa;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 0;
}

/* Zpětná vazba (ok / error) */
.merch-feedback {
  font-family: "Roboto", sans-serif;
  font-size: 14px;
  padding: 14px 18px;
  margin-bottom: 36px;
  line-height: 1.5;
  text-align: left;
  box-sizing: border-box;
}

.merch-feedback--ok {
  color: #6c6;
  border: 1px solid #3a5a3a;
  background: #0d1a0d;
}

.merch-feedback--err {
  color: #e66;
  border: 1px solid #5a2a2a;
  background: #1a0d0d;
}

/* === MŘÍŽKA PRODUKTŮ === */

.merch__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 56px;
}

/* === KARTA PRODUKTU === */

.merch-card {
  background: #101010;
  border: 1px solid rgba(225, 225, 225, 0.18);
  display: flex;
  flex-direction: column;
  position: relative;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.32);
}

.merch-card:hover {
  border-color: #bfa16a;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.45);
}

.merch-card--sold-out {
  opacity: 0.65;
}

/* Obrázek karty */
.merch-card__img {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #050505;
  overflow: hidden;
  flex-shrink: 0;
}

.merch-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
  will-change: transform;
  transform: translateZ(0);
  backface-visibility: hidden;
}

.merch-card:hover .merch-card__img img {
  transform: scale(1.04) translateZ(0);
}

.merch-card__img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Badge (vyprodáno) */
.merch-card__badge {
  position: absolute;
  top: 12px;
  right: 12px;
  font-family: "Roboto", sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 10px;
}

.merch-card__badge--sold-out {
  background: #000;
  color: #888;
  border: 1px solid rgba(225, 225, 225, 0.28);
}

/* Tělo karty */
.merch-card__body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Stretched-link — celá karta je klikatelná */
.merch-card__name a {
  color: inherit;
  text-decoration: none;
}

.merch-card__name a::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
}

/* Interaktivní prvky zůstanou nad stretched-linkem */
.merch-card__variants,
.merch-card__footer {
  position: relative;
  z-index: 2;
}

.merch-card__name {
  font-family: "Times", serif;
  font-size: 21px;
  color: #fff;
  margin: 0;
  line-height: 1.2;
}

.merch-card__desc {
  font-family: "Roboto", sans-serif;
  font-size: 13px;
  color: #bbb;
  margin: 0;
  line-height: 1.6;
}

/* Variant picker */
.merch-card__variants {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.merch-card__variant-btn {
  font-family: "Roboto", sans-serif;
  font-size: 12px;
  letter-spacing: 0.04em;
  padding: 6px 13px;
  background: transparent;
  border: 1px solid rgba(225, 225, 225, 0.28);
  color: #bbb;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background-color 0.15s;
  min-width: 42px;
  text-align: center;
  line-height: 1;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
}

.merch-card__variant-btn:hover:not(.is-sold-out) {
  border-color: #bfa16a;
  color: #bfa16a;
}

.merch-card__variant-btn.is-active {
  border-color: #bfa16a;
  color: #fff;
  background: rgba(191, 161, 106, 0.16);
}

.merch-card__variant-btn.is-sold-out {
  opacity: 0.3;
  cursor: default;
  text-decoration: line-through;
}

.merch-card__variant-btn:focus-visible {
  outline: 2px solid #888;
  outline-offset: 2px;
}

/* Patička karty: cena + CTA */
.merch-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  flex-wrap: wrap;
}

.merch-card__price {
  font-family: "Times", serif;
  font-size: 24px;
  color: #fff;
  white-space: nowrap;
  line-height: 1;
}

.merch-card__cta {
  display: inline-block;
  padding: 10px 22px;
  background: #000;
  color: #fff;
  font-family: "Roboto", sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  border: 1px solid #bfa16a;
  border-radius: 0;
  transition: background-color 0.15s, color 0.15s;
  line-height: 1;
  box-sizing: border-box;
}

.merch-card__cta:visited {
  color: #fff;
}

.merch-card__cta:hover {
  background: rgba(191, 161, 106, 0.16);
  color: #bfa16a;
  padding: 10px 22px;
}

.merch-card__cta:focus-visible {
  outline: 2px solid #888;
  outline-offset: 2px;
}

.merch-card__cta--disabled {
  display: inline-block;
  padding: 10px 22px;
  background: transparent;
  border: 1px solid #2a2a2a;
  color: #444;
  font-family: "Roboto", sans-serif;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  line-height: 1;
  cursor: default;
  border-radius: 0;
  box-sizing: border-box;
}

/* === INFO BAR (platba / doručení) === */

.merch__info-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 40px;
  flex-wrap: wrap;
  padding: 24px 0;
  border-top: 1px solid rgba(225, 225, 225, 0.18);
  border-bottom: 1px solid rgba(225, 225, 225, 0.18);
  margin-bottom: 56px;
}

.merch__info-item {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: "Roboto", sans-serif;
  font-size: 13px;
  color: #aaa;
  white-space: nowrap;
}

.merch__info-icon {
  color: #888;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

/* === OBJEDNÁVKOVÝ FORMULÁŘ === */

.merch-order {
  max-width: 520px;
}

.merch-order h3 {
  font-family: "Times", serif;
  font-size: 28px;
  color: #fff;
  margin: 0 0 10px;
}

.merch-order__intro {
  font-family: "Roboto", sans-serif;
  font-size: 13px;
  color: #aaa;
  line-height: 1.6;
  margin: 0 0 28px;
}

/* Info o vybraném produktu */
.merch-form__selected-info {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-family: "Roboto", sans-serif;
  font-size: 13px;
  padding: 11px 14px;
  background: #101010;
  border-left: 2px solid #bfa16a;
  margin-bottom: 4px;
}

.merch-form__selected-label {
  color: #888;
  white-space: nowrap;
  flex-shrink: 0;
}

.merch-form__selected-value {
  color: #bbb;
}

/* Formulář */
.merch-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.merch-form__field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.merch-form__field label {
  font-family: "Roboto", sans-serif;
  font-size: 13px;
  color: #fff;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.merch-form__field input,
.merch-form__field select {
  background: #000;
  border: 1px solid rgba(225, 225, 225, 0.18);
  color: #fff;
  font-family: "Roboto", sans-serif;
  font-size: 14px;
  padding: 11px 13px;
  transition: border-color 0.15s, background-color 0.15s;
  width: 100%;
  box-sizing: border-box;
  border-radius: 0;
  -webkit-appearance: none;
  appearance: none;
}

.merch-form__field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7' viewBox='0 0 12 7'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23aaa' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  background-color: #000;
  padding-right: 38px;
  cursor: pointer;
}

.merch-form__field input:focus,
.merch-form__field select:focus {
  border-color: #bfa16a;
  background: #0b0b0b;
  outline: none;
}

.merch-form__field input:focus-visible,
.merch-form__field select:focus-visible {
  outline: 2px solid rgba(191, 161, 106, 0.45);
  outline-offset: -1px;
}

.merch-form__field input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

/* Poznámka */
.merch-form__note {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 14px 16px;
  background: rgba(191, 161, 106, 0.16);
  border: 1px solid rgba(225, 225, 225, 0.18);
  border-radius: 0;
}

.merch-form__note p {
  font-family: "Roboto", sans-serif;
  font-size: 13px;
  color: #ccc;
  line-height: 1.7;
  margin: 0;
}

/* Tlačítko odeslat */
.merch-form__submit {
  align-self: flex-start;
  padding: 13px 30px;
  background: #000;
  color: #fff;
  border: 1px solid #bfa16a;
  border-radius: 0;
  font-family: "Roboto", sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s;
  line-height: 1;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
}

.merch-form__submit:hover {
  background: rgba(191, 161, 106, 0.16);
  color: #bfa16a;
}

.merch-form__submit:focus-visible {
  outline: 2px solid rgba(191, 161, 106, 0.7);
  outline-offset: 2px;
}

/* Přístupnost — skrytý text */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* === RESPONZIVITA === */

/* Tablet (max 768px) */
@media (max-width: 768px) {
  .merch {
    padding: 40px 18px;
  }

  .merch__header {
    margin-bottom: 36px;
  }

  .merch__header h2 {
    font-size: 30px;
  }

  .merch__grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 18px;
    margin-bottom: 40px;
  }

  .merch__info-bar {
    gap: 24px;
    margin-bottom: 40px;
  }

  .merch-order {
    max-width: 100%;
  }

  .merch-order h3 {
    font-size: 24px;
  }
}

/* Malý tablet / velký mobil (max 600px) */
@media (max-width: 600px) {
  .merch__grid {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }

  .merch-card__body {
    padding: 14px;
    gap: 10px;
  }

  .merch-card__name {
    font-size: 17px;
  }

  .merch-card__price {
    font-size: 20px;
  }

  .merch-card__cta,
  .merch-card__cta--disabled {
    padding: 9px 14px;
    font-size: 11px;
  }

  .merch-card__cta:hover {
    padding: 9px 14px;
  }
}

/* Mobil (max 480px) */
@media (max-width: 480px) {
  .merch {
    padding: 32px 12px;
  }

  .merch__header {
    margin-bottom: 28px;
  }

  .merch__header h2 {
    font-size: 26px;
  }

  .merch__subtitle {
    font-size: 11px;
  }

  .merch__grid {
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 36px;
  }

  .merch-card__body {
    padding: 16px;
    gap: 12px;
  }

  .merch-card__name {
    font-size: 20px;
  }

  .merch-card__footer {
    flex-wrap: wrap;
  }

  .merch-card__cta,
  .merch-card__cta--disabled {
    width: 100%;
    text-align: center;
    padding: 12px 20px;
    font-size: 12px;
  }

  .merch-card__cta:hover {
    padding: 12px 20px;
  }

  .merch__info-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    padding: 20px 0;
    margin-bottom: 36px;
  }

  .merch__info-item {
    white-space: normal;
  }

  .merch-order h3 {
    font-size: 22px;
  }

  .merch-order__intro {
    font-size: 13px;
  }

  .merch-form__submit {
    width: 100%;
    text-align: center;
    padding: 14px 20px;
  }

  .merch-form__field input,
  .merch-form__field select {
    font-size: 16px; /* prevent iOS zoom */
  }
}
