.shop-page {
  min-height: 100vh;
}

.shop-hero {
  min-height: calc(100vh - 110px);
  padding-bottom: 28px;
}

.shop-layout {
  display: grid;
  grid-template-columns: minmax(230px, 300px) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.shop-now-playing,
.store-panel {
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 22px;
  background: rgba(4, 4, 7, .72);
  box-shadow: 0 20px 50px rgba(0,0,0,.28);
  backdrop-filter: blur(16px);
}

.shop-now-playing {
  position: sticky;
  top: 86px;
  padding: 20px;
  text-align: center;
}

.shop-cover-wrap {
  aspect-ratio: 1 / 1;
  width: 100%;
  margin: 14px 0 16px;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.05);
}

.shop-cover-wrap img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.shop-now-playing h2 {
  margin: 0 0 6px;
  font-size: clamp(19px, 2vw, 26px);
  line-height: 1.15;
}

.shop-now-playing p {
  margin: 0;
  color: rgba(255,255,255,.72);
}

.shop-play {
  width: 100%;
  justify-content: center;
  margin-top: 18px;
}

.audio-note {
  display: block;
  margin-top: 12px;
  color: rgba(255,255,255,.6);
  line-height: 1.4;
}

.store-panel {
  padding: 22px;
}

.store-heading,
.format-title-row,
.destination-bar {
  display: flex;
  align-items: center;
}

.store-heading {
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.store-heading h2 {
  margin: 5px 0 0;
  font-size: clamp(24px, 3vw, 38px);
}

.refresh-store-btn {
  flex: 0 0 auto;
}

.destination-bar {
  gap: 12px;
  flex-wrap: wrap;
  padding: 13px;
  margin-bottom: 12px;
  border-radius: 14px;
  background: rgba(255,255,255,.055);
  border: 1px solid rgba(255,255,255,.1);
}

.destination-bar label {
  display: grid;
  gap: 5px;
  min-width: 120px;
  flex: 1 1 140px;
}

.destination-bar label span {
  font-size: 12px;
  color: rgba(255,255,255,.65);
}

.destination-bar input {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  color: #fff;
  background: rgba(0,0,0,.35);
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 10px;
  outline: none;
}

.destination-bar input:focus {
  border-color: rgba(243,223,18,.8);
  box-shadow: 0 0 0 3px rgba(243,223,18,.12);
}

.affiliate-disclosure {
  margin: 0 0 14px;
  padding: 10px 12px;
  border-left: 4px solid #f3df12;
  border-radius: 8px;
  background: rgba(243,223,18,.08);
  color: rgba(255,255,255,.88);
  font-size: 13px;
  line-height: 1.45;
}

.store-status,
.store-warnings,
.empty-format {
  border-radius: 12px;
  padding: 12px 14px;
}

.store-status {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 16px;
  background: rgba(255,255,255,.065);
  color: rgba(255,255,255,.82);
}

.store-status.success {
  background: rgba(41,178,94,.13);
}

.store-status.error {
  background: rgba(204,49,59,.18);
}

.store-status[hidden] {
  display: none;
}

.store-warnings {
  margin-bottom: 16px;
  background: rgba(255,152,0,.12);
  border: 1px solid rgba(255,152,0,.22);
  color: rgba(255,255,255,.84);
  font-size: 13px;
}

.store-warnings p {
  margin: 4px 0;
}

.format-sections {
  display: grid;
  gap: 22px;
}

.format-section {
  padding-top: 4px;
}

.format-title-row {
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 9px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}

.format-title-row h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 22px;
}

.format-title-row h3 i {
  color: #f3df12;
}

.format-count {
  display: grid;
  place-items: center;
  min-width: 34px;
  height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.09);
  font-weight: 800;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(205px, 1fr));
  gap: 14px;
}

.product-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.055);
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.product-card:hover {
  transform: translateY(-2px);
  border-color: rgba(243,223,18,.42);
  background: rgba(255,255,255,.075);
}

.product-image-wrap {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: rgba(0,0,0,.3);
}

.product-image-wrap img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 9px;
  padding: 13px;
}

.product-title {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  font-size: 15px;
  line-height: 1.32;
}

.product-meta {
  display: grid;
  gap: 5px;
  font-size: 12px;
  color: rgba(255,255,255,.68);
}

.product-meta span {
  display: flex;
  align-items: center;
  gap: 7px;
}

.product-price-block {
  display: grid;
  gap: 4px;
  margin-top: auto;
  padding-top: 7px;
}

.price-line {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
}

.price-line strong {
  color: #fff;
}

.price-line.total-line {
  margin-top: 3px;
  padding-top: 7px;
  border-top: 1px solid rgba(255,255,255,.1);
  font-size: 15px;
}

.buy-affiliate-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  margin-top: 3px;
  border: 0;
  border-radius: 12px;
  color: #111;
  background: #f3df12;
  font-weight: 900;
  text-decoration: none;
  letter-spacing: .02em;
}

.buy-affiliate-btn:hover {
  filter: brightness(1.06);
}

.buy-affiliate-btn.disabled {
  pointer-events: none;
  opacity: .45;
}

.affiliate-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: fit-content;
  font-size: 10px;
  color: rgba(255,255,255,.54);
}

.empty-format {
  grid-column: 1 / -1;
  background: rgba(255,255,255,.04);
  color: rgba(255,255,255,.68);
  text-align: center;
}

.shop-footer {
  padding: 12px 20px 18px;
  text-align: center;
}

.terms-copy p {
  line-height: 1.6;
}

@media (max-width: 900px) {
  .shop-layout {
    grid-template-columns: 1fr;
  }

  .shop-now-playing {
    position: static;
    display: grid;
    grid-template-columns: 130px minmax(0, 1fr);
    gap: 16px;
    text-align: left;
  }

  .shop-now-playing .now-label,
  .shop-now-playing .shop-play,
  .shop-now-playing .audio-note {
    grid-column: 1 / -1;
  }

  .shop-cover-wrap {
    grid-row: 2 / span 2;
    margin: 0;
  }
}

@media (max-width: 620px) {
  .shop-hero,
  .store-panel,
  .shop-now-playing {
    padding-left: 14px;
    padding-right: 14px;
  }

  .shop-now-playing {
    grid-template-columns: 95px minmax(0, 1fr);
  }

  .store-heading {
    align-items: flex-start;
  }

  .refresh-store-btn span {
    display: none;
  }

  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .product-title {
    font-size: 13px;
  }

  .product-body {
    padding: 10px;
  }
}

@media (max-width: 430px) {
  .product-grid {
    grid-template-columns: 1fr;
  }
}
