/* ── Shop hero ── */
.shop-hero {
  text-align: center;
  padding: 80px 0 20px;
}

.shop-hero h1 { margin-bottom: 14px; }

.shop-hero .lead {
  max-width: 520px;
  margin-inline: auto;
}

/* ── Layout: main + sidebar ── */
.shop-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 28px;
  align-items: start;
  padding-bottom: 80px;
}

.shop-section-title {
  font-family: 'Cinzel', serif;
  font-size: 1.1rem;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

/* ── Products grid ── */
.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.product-card {
  background: linear-gradient(180deg, rgba(23, 12, 38, 0.85), rgba(12, 6, 22, 0.92));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.product-card:hover {
  transform: translateY(-4px);
  border-color: rgba(163, 77, 255, 0.4);
}

.product-inner {
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
}

.product-inner-discord {
  min-height: 268px;
}

.product-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: linear-gradient(135deg, var(--purple), var(--pink));
  color: #fff;
  font-size: 0.68rem;
  font-family: 'Cinzel', serif;
  padding: 4px 10px;
  border-radius: 999px;
  letter-spacing: 0.05em;
}

.product-img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  margin-bottom: 12px;
  filter: drop-shadow(0 4px 12px rgba(163, 77, 255, 0.3));
}

.product-img-discord {
  width: 88px;
  height: 88px;
}

.product-title {
  font-family: 'Cinzel', serif;
  font-size: 0.95rem;
  margin-bottom: 4px;
  color: var(--text);
}

.product-points {
  color: var(--gold);
  font-size: 0.78rem;
  margin-bottom: 12px;
}

.product-price {
  font-family: 'Cinzel', serif;
  font-size: 1.3rem;
  color: #fff;
  margin-bottom: 16px;
}

.discord-price-label {
  color: var(--text);
  font-size: 1rem;
}

.product-add-btn {
  width: 100%;
  padding: 11px 16px;
  font-size: 0.82rem;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(213, 173, 255, 0.22);
  color: var(--text);
  box-shadow: none;
}

.product-add-btn:hover {
  background: linear-gradient(135deg, var(--purple) 0%, #b357ff 45%, #f1c1ff 100%);
  color: #fff;
  box-shadow: 0 18px 40px rgba(134, 57, 255, 0.34);
}

.product-add-btn:focus,
.product-add-btn:focus-visible,
.product-add-btn:active {
  background: linear-gradient(135deg, var(--purple) 0%, #b357ff 45%, #f1c1ff 100%);
  color: #fff;
  box-shadow: 0 18px 40px rgba(134, 57, 255, 0.34);
}

/* ── Sidebar panels ── */
.sidebar-panel {
  background: linear-gradient(180deg, rgba(23, 12, 38, 0.85), rgba(12, 6, 22, 0.92));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 20px;
  margin-bottom: 20px;
}

.panel-title {
  font-family: 'Cinzel', serif;
  font-size: 1rem;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
  color: var(--text);
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.sidebar-muted {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.6;
  margin: 0;
}

/* ── Cart ── */
.cart-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.88rem;
}

.cart-item-row:last-child { border-bottom: none; }

.ci-title {
  color: var(--text);
  flex: 1;
  margin-right: 8px;
}

.ci-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.ci-price { color: var(--gold); font-weight: 600; }

.ci-remove {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.75rem;
  padding: 2px 4px;
  border-radius: 4px;
  transition: color 0.2s ease;
}

.ci-remove:hover { color: #ff8a8a; }

.cart-total {
  text-align: right;
  font-family: 'Cinzel', serif;
  font-size: 0.95rem;
  color: var(--text);
  margin: 14px 0;
}

.cart-total span { color: var(--gold); }

/* ── Checkout fields ── */
.checkout-field { margin-bottom: 16px; }

.shop-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(201, 153, 255, 0.28);
  border-radius: 12px;
  padding: 12px 16px;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
  box-sizing: border-box;
}

.shop-input::placeholder { color: rgba(202, 184, 232, 0.45); }

.shop-input:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(163, 77, 255, 0.15);
}

.field-hint {
  color: var(--muted);
  font-size: 0.78rem;
  margin-top: 6px;
  line-height: 1.5;
}

.terms-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 4px 0 18px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
  cursor: pointer;
}

.terms-check input {
  margin-top: 2px;
  accent-color: var(--purple);
}

.osrs-login-note {
  margin-bottom: 12px;
}

.pay-card-osrs {
  align-items: center;
}

.osrs-pay-actions {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.osrs-required-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 82px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 145, 196, 0.28);
  background: rgba(255, 145, 196, 0.08);
  color: #ffd4ef;
  font-family: 'Cinzel', serif;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.osrs-required-tag.is-linked {
  border-color: rgba(74, 199, 120, 0.3);
  background: rgba(74, 199, 120, 0.1);
  color: #b5f0cc;
}

.osrs-discord-btn {
  min-width: 188px;
  padding: 10px 14px;
  text-align: center;
  white-space: nowrap;
}

.osrs-discord-btn.disabled {
  pointer-events: none;
  opacity: 0.75;
}

.checkout-btn:disabled {
  opacity: 0.52;
  cursor: not-allowed;
  box-shadow: none;
}

/* ── Payment methods ── */
.payment-label {
  font-family: 'Cinzel', serif;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 10px;
}

.payment-methods {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
}

.pay-option { cursor: pointer; }
.pay-option input { display: none; }

.pay-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  transition: border-color 0.2s ease, background 0.2s ease;
  min-height: 62px;
}

.pay-option.selected .pay-card {
  border-color: var(--purple);
  background: rgba(163, 77, 255, 0.1);
}

.pay-card:hover { border-color: rgba(163, 77, 255, 0.4); }

.pay-icon {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pay-icon-img {
  width: 34px;
  height: 34px;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.22));
}

.pay-name {
  display: flex;
  flex-direction: column;
  font-family: 'Cinzel', serif;
  font-size: 0.85rem;
  color: var(--text);
  line-height: 1.2;
  min-width: 0;
}

.pay-name small {
  font-family: 'Inter', sans-serif;
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 400;
  margin-top: 2px;
}

.checkout-btn { width: 100%; margin-top: 4px; }

.checkout-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 28px;
  align-items: start;
  padding-bottom: 80px;
}

.checkout-actions {
  margin: 18px 0 0;
}

.checkout-summary {
  min-height: 100%;
}

.checkout-account {
  color: var(--muted);
  font-size: 0.88rem;
  margin-bottom: 18px;
}

.checkout-account strong {
  color: var(--text);
}

.checkout-item-main {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.checkout-item-img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  flex-shrink: 0;
}

.error-msg {
  color: #ff8a8a;
  font-size: 0.82rem;
  margin-bottom: 10px;
  display: none;
}

.error-msg.visible { display: block; }

/* ── Donor ranks ── */
.ranks-list { display: flex; flex-direction: column; gap: 8px; }

.rank-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255,255,255,0.02);
}

.rank-threshold { color: var(--muted); font-size: 0.82rem; }

.rank-name {
  font-family: 'Cinzel', serif;
  font-size: 0.82rem;
  font-weight: 600;
}

/* ── Top donators ── */
.donator-list { display: flex; flex-direction: column; gap: 8px; }

.donator-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.02);
  font-size: 0.88rem;
}

.donator-row.rank-gold   { border-color: rgba(255, 214, 0, 0.3);   background: rgba(255, 214, 0, 0.06); }
.donator-row.rank-silver { border-color: rgba(180, 180, 180, 0.3); background: rgba(180,180,180,0.06); }
.donator-row.rank-bronze { border-color: rgba(200, 120, 50, 0.3);  background: rgba(200,120,50,0.06); }

.donator-pos { font-size: 1rem; flex-shrink: 0; }
.donator-name { color: var(--text); }

/* ── Responsive ── */
@media (max-width: 1100px) {
  .shop-layout { grid-template-columns: 1fr 280px; }
  .products-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 820px) {
  .shop-layout { grid-template-columns: 1fr; }
  .shop-sidebar { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .shop-sidebar .sidebar-panel { margin-bottom: 0; }
  .checkout-layout { grid-template-columns: 1fr; }
  .osrs-pay-actions {
    width: 100%;
    margin-left: 0;
    margin-top: 12px;
    justify-content: space-between;
  }
  .pay-card-osrs {
    flex-wrap: wrap;
    align-items: flex-start;
  }
  .osrs-discord-btn {
    min-width: 0;
    width: 100%;
  }
}

@media (max-width: 560px) {
  .products-grid { grid-template-columns: 1fr; }
  .shop-sidebar { grid-template-columns: 1fr; }
}
