.promo-codes {
  padding: 28px 0;
  color: #171717;
}

.promo-codes h2 { margin: 0 0 20px; }

.promo-codes-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: start;
  gap: 22px;
}

.promo-code-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #e5e1df;
  border-radius: 10px;
  background: #fff;
}

.promo-code-image {
  position: relative;
  aspect-ratio: 8 / 5;
  overflow: hidden;
  background: #f5f3f2;
}

.promo-code-image img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.promo-code-image-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  max-width: calc(100% - 20px);
  box-sizing: border-box;
  overflow: hidden;
  padding: 3px 8px;
  border-radius: 999px;
  background: #fff;
  font-size: 11px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.promo-code-body { padding: 16px; }

.promo-code-description {
  display: -webkit-box;
  overflow: hidden;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  height: 4.2em;
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.4;
  -webkit-line-clamp: 3;
}

.promo-code-capsule {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-height: 36px;
  padding: 3px 3px 3px 12px;
  border: 1px dashed #bdb9b7;
  border-radius: 999px;
}

.promo-code-value {
  min-width: 0;
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.promo-code-copy {
  --shop-text-size: 12px;
  --shop-text-line-height: 1.2;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 106px;
  min-height: 28px;
  padding: 0 9px;
  border: 0;
  border-radius: 999px;
  background: #101010;
  color: #fff;
  font: inherit;
  cursor: pointer;
}

.promo-code-copy span { font-weight: 700; }
.promo-code-copy:focus-visible { outline-offset: 1px; }

.promo-code-conditions {
  margin-top: 12px;
  border-top: 1px solid #e9e6e4;
}

.promo-code-conditions summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 40px;
  list-style: none;
  font-size: 14px;
  cursor: pointer;
}

.promo-code-conditions summary::-webkit-details-marker { display: none; }

.promo-code-conditions summary::after {
  width: 7px;
  height: 7px;
  margin-right: 3px;
  border-right: 1px solid;
  border-bottom: 1px solid;
  transform: rotate(45deg);
  content: "";
}

.promo-code-conditions[open] summary::after { transform: rotate(225deg); }

.promo-code-conditions div {
  padding: 12px;
  border-radius: 6px;
  background: #f5f4f3;
  font-size: 14px;
  line-height: 1.45;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.promo-codes[hidden], .promo-code-card[hidden] { display: none; }

@media (max-width: 1050px) {
  .promo-codes-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
  .promo-codes-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .promo-code-copy { min-height: 44px; padding-inline: 12px; }
  .promo-code-conditions summary { min-height: 44px; }
}
