/* ═══════════════════════════════════════════════════════════════════
   Cosmetic Shop — Styles
   Matches Battle Pass design language
   ═══════════════════════════════════════════════════════════════════ */

/* ── Header Button ─────────────────────────────────────────────── */

.btn-shop-header {
  position: relative;
  background: linear-gradient(135deg, #5a3e1b, #7a5a30);
  color: #f5deb3;
  border: 1px solid #c6a84b;
  border-radius: 6px;
  padding: 6px 14px;
  cursor: pointer;
  font-size: 0.9rem;
  font-family: inherit;
  transition: all 0.2s ease;
}

.btn-shop-header:hover {
  background: linear-gradient(135deg, #7a5a30, #9a7a48);
  box-shadow: 0 0 8px rgba(198, 168, 75, 0.4);
}

.shop-btn-label {
  margin-left: 2px;
}

/* ── Overlay / Modal ───────────────────────────────────────────── */

.shop-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.shop-modal {
  background: linear-gradient(180deg, #1a120b 0%, #2b1810 40%, #1a120b 100%);
  border: 2px solid #c6a84b;
  border-radius: 12px;
  width: 100%;
  max-width: 900px;
  max-height: 85vh;
  overflow-y: auto;
  color: #f5deb3;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(198, 168, 75, 0.15);
}

/* ── Header ────────────────────────────────────────────────────── */

.shop-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px 12px;
  border-bottom: 1px solid rgba(198, 168, 75, 0.2);
}

.shop-header h2 {
  margin: 0;
  font-size: 1.4rem;
  color: #c6a84b;
}

.shop-close-btn {
  background: none;
  border: none;
  color: #f5deb3;
  font-size: 1.8rem;
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background 0.2s;
}

.shop-close-btn:hover {
  background: rgba(198, 168, 75, 0.15);
}

/* ── Silver Balance Bar ────────────────────────────────────────── */

.shop-balance-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-bottom: 1px solid rgba(198, 168, 75, 0.15);
  background: rgba(0, 0, 0, 0.2);
}

.shop-silver-icon {
  font-size: 1.3rem;
}

.shop-silver-amount {
  font-size: 1.4rem;
  font-weight: 700;
  color: #c6a84b;
}

.shop-silver-label {
  font-size: 0.85rem;
  color: #a89060;
}

/* ── Category Tabs ─────────────────────────────────────────────── */

.shop-category-tabs {
  display: flex;
  gap: 4px;
  padding: 12px 24px 0;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: #5a3e1b #2b1810;
}

.shop-category-tab {
  background: rgba(90, 62, 27, 0.3);
  border: 1px solid rgba(198, 168, 75, 0.2);
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  color: #a89060;
  padding: 8px 16px;
  cursor: pointer;
  font-size: 0.85rem;
  font-family: inherit;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.shop-category-tab:hover {
  background: rgba(90, 62, 27, 0.5);
  color: #f5deb3;
}

.shop-category-tab.active {
  background: rgba(198, 168, 75, 0.15);
  color: #c6a84b;
  border-color: rgba(198, 168, 75, 0.4);
  font-weight: 600;
}

/* ── Items Grid ────────────────────────────────────────────────── */

.shop-items-section {
  padding: 16px 24px 24px;
}

.shop-items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

/* ── Item Card ─────────────────────────────────────────────────── */

.shop-item-card {
  background: rgba(43, 24, 16, 0.8);
  border: 1px solid rgba(198, 168, 75, 0.25);
  border-radius: 10px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  position: relative;
}

.shop-item-card:hover {
  border-color: #c6a84b;
  box-shadow: 0 0 12px rgba(198, 168, 75, 0.25);
  transform: translateY(-2px);
}

.shop-item-card.owned {
  opacity: 0.6;
  cursor: default;
}

.shop-item-card.owned:hover {
  transform: none;
  box-shadow: none;
}

.shop-item-icon {
  font-size: 2.2rem;
  line-height: 1;
}

.shop-item-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: #f5deb3;
}

.shop-item-desc {
  font-size: 0.78rem;
  color: #a89060;
  line-height: 1.3;
}

.shop-item-cost {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.95rem;
  font-weight: 700;
  color: #c6a84b;
  margin-top: auto;
  padding-top: 4px;
}

.shop-item-owned-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: #6b9b3a;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
}

/* ── Premium Battle Pass Card ──────────────────────────────────── */

.shop-premium-bp-card {
  background: linear-gradient(135deg, rgba(198, 168, 75, 0.15), rgba(43, 24, 16, 0.9));
  border: 2px solid #c6a84b;
  border-radius: 12px;
  padding: 20px 24px;
  margin: 16px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.shop-premium-bp-card:hover {
  box-shadow: 0 0 20px rgba(198, 168, 75, 0.3);
  transform: translateY(-2px);
}

.shop-premium-bp-card.owned {
  opacity: 0.6;
  cursor: default;
}

.shop-premium-bp-card.owned:hover {
  transform: none;
  box-shadow: none;
}

.shop-premium-bp-icon {
  font-size: 2.5rem;
}

.shop-premium-bp-info {
  flex: 1;
}

.shop-premium-bp-info h3 {
  margin: 0 0 4px;
  color: #c6a84b;
  font-size: 1.1rem;
}

.shop-premium-bp-info p {
  margin: 0;
  font-size: 0.85rem;
  color: #a89060;
}

.shop-premium-bp-cost {
  font-size: 1.3rem;
  font-weight: 700;
  color: #c6a84b;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ── Confirm Modal ─────────────────────────────────────────────── */

.shop-confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.shop-confirm-dialog {
  background: linear-gradient(180deg, #2b1810, #1a120b);
  border: 2px solid #c6a84b;
  border-radius: 12px;
  padding: 28px;
  max-width: 380px;
  width: 100%;
  text-align: center;
  color: #f5deb3;
}

.shop-confirm-icon {
  font-size: 3rem;
  margin-bottom: 12px;
}

.shop-confirm-name {
  font-size: 1.2rem;
  font-weight: 700;
  color: #c6a84b;
  margin-bottom: 6px;
}

.shop-confirm-desc {
  font-size: 0.85rem;
  color: #a89060;
  margin-bottom: 16px;
}

.shop-confirm-cost {
  font-size: 1.1rem;
  font-weight: 700;
  color: #c6a84b;
  margin-bottom: 20px;
}

.shop-confirm-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.shop-confirm-buy {
  background: linear-gradient(135deg, #6b9b3a, #4a7a22);
  color: #fff;
  border: 1px solid #8bc34a;
  border-radius: 6px;
  padding: 10px 24px;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  transition: all 0.2s;
}

.shop-confirm-buy:hover {
  background: linear-gradient(135deg, #7cad48, #5a8a2f);
}

.shop-confirm-buy:disabled {
  background: #555;
  border-color: #666;
  cursor: not-allowed;
  opacity: 0.6;
}

.shop-confirm-cancel {
  background: rgba(90, 62, 27, 0.4);
  color: #f5deb3;
  border: 1px solid rgba(198, 168, 75, 0.3);
  border-radius: 6px;
  padding: 10px 24px;
  cursor: pointer;
  font-size: 0.95rem;
  font-family: inherit;
  transition: all 0.2s;
}

.shop-confirm-cancel:hover {
  background: rgba(90, 62, 27, 0.6);
}

.shop-insufficient {
  color: #d4382c;
  font-size: 0.85rem;
  margin-top: 8px;
}

/* ── Buy Silver Section ───────────────────────────────────────── */

.shop-buy-silver-section {
  padding: 16px 24px;
  border-bottom: 1px solid rgba(198, 168, 75, 0.15);
}

.shop-section-heading {
  margin: 0 0 12px;
  font-size: 1rem;
  font-weight: 600;
  color: #c6a84b;
}

.shop-silver-packages {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}

.shop-silver-package-card {
  background: rgba(43, 24, 16, 0.8);
  border: 1px solid rgba(198, 168, 75, 0.25);
  border-radius: 10px;
  padding: 16px 12px;
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
}

.shop-silver-package-card:hover {
  border-color: #c6a84b;
  box-shadow: 0 0 12px rgba(198, 168, 75, 0.25);
  transform: translateY(-2px);
}

.shop-silver-pkg-icon {
  font-size: 2rem;
  line-height: 1;
}

.shop-silver-pkg-label {
  font-size: 0.95rem;
  font-weight: 600;
  color: #f5deb3;
}

.shop-silver-pkg-desc {
  font-size: 0.78rem;
  color: #a89060;
  line-height: 1.3;
}

.shop-silver-pkg-price {
  display: inline-block;
  margin-top: auto;
  padding-top: 4px;
  font-size: 0.95rem;
  font-weight: 700;
  color: #c6a84b;
}

.shop-silver-unavailable {
  color: #a89060;
  font-size: 0.85rem;
  text-align: center;
  padding: 12px 0;
}

/* Swish pay button in confirm dialog */
.shop-swish-pay-btn {
  background: linear-gradient(135deg, #6b9b3a, #4a7a22);
  color: #fff;
  border: 1px solid #8bc34a;
  border-radius: 6px;
  padding: 10px 24px;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  transition: all 0.2s;
}

.shop-swish-pay-btn:hover {
  background: linear-gradient(135deg, #7cad48, #5a8a2f);
}

.shop-swish-pay-btn:disabled {
  background: #555;
  border-color: #666;
  cursor: not-allowed;
  opacity: 0.6;
}

/* ── Empty State ───────────────────────────────────────────────── */

.shop-empty {
  text-align: center;
  padding: 40px 20px;
  color: #a89060;
  font-size: 0.95rem;
}

/* ── Responsive ────────────────────────────────────────────────── */

@media (max-width: 600px) {
  .shop-modal {
    max-height: 95vh;
  }

  .shop-items-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .shop-item-card {
    padding: 12px;
  }

  .shop-item-icon {
    font-size: 1.6rem;
  }

  .shop-category-tabs {
    padding: 8px 16px 0;
  }

  .shop-premium-bp-card {
    flex-direction: column;
    text-align: center;
    margin: 12px 16px;
  }

  .shop-buy-silver-section {
    padding: 12px 16px;
  }

  .shop-silver-packages {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .shop-silver-package-card {
    padding: 12px 8px;
  }

  .shop-silver-pkg-icon {
    font-size: 1.6rem;
  }
}

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

  .shop-silver-packages {
    grid-template-columns: 1fr;
  }
}
