/* ============================================
   SHOP STYLES - Emberhold RPG
   ============================================ */

/* Shop Header */
.shop-header {
  min-height: 40vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 6rem 2rem 3rem;
  background:
    linear-gradient(180deg, rgba(10, 10, 15, 0.7) 0%, var(--bg-darkest) 100%),
    radial-gradient(ellipse at center, rgba(255, 107, 53, 0.1) 0%, transparent 70%);
}

.shop-title {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--ember-orange) 0%, var(--ember-gold) 50%, var(--ember-orange) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.shop-subtitle {
  font-size: 1.2rem;
  color: var(--text-secondary);
  font-family: 'Lora', serif;
  font-style: italic;
}

/* User Status Section */
.user-status-section {
  padding: 0 2rem 2rem;
  display: flex;
  justify-content: center;
}

.user-status-card {
  background: var(--bg-dark);
  border: 1px solid var(--bg-lighter);
  border-radius: 12px;
  padding: 1rem 2rem;
  max-width: 600px;
  width: 100%;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-medium);
}

.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.default-avatar {
  color: var(--text-muted);
  font-size: 1rem;
}

.user-name {
  color: var(--text-secondary);
}

.user-name strong {
  color: var(--text-primary);
}

.user-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.player-status {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.player-status.checking {
  color: var(--ember-orange);
}

.player-status.verified {
  color: var(--ember-green);
}

.player-status.error {
  color: var(--ember-red);
}

.btn-small {
  padding: 0.4rem 0.8rem;
  font-size: 0.85rem;
}

.login-prompt {
  text-align: center;
  padding: 1rem;
}

.login-prompt p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.btn-discord {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #5865F2;
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}

.btn-discord:hover {
  background: #4752C4;
  transform: translateY(-2px);
}

.btn-discord svg {
  flex-shrink: 0;
}

/* Shop Notice (when not configured) */
.shop-notice {
  padding: 4rem 2rem;
  display: flex;
  justify-content: center;
}

.notice-card {
  background: var(--bg-dark);
  border: 2px solid var(--ember-orange);
  border-radius: 12px;
  padding: 3rem;
  text-align: center;
  max-width: 500px;
}

.notice-card h3 {
  margin-bottom: 1rem;
  color: var(--ember-gold);
}

.notice-card p {
  color: var(--text-secondary);
}

/* Shop Sections */
.shop-section {
  padding: 4rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.section-description {
  text-align: center;
  color: var(--text-secondary);
  margin-top: -1.5rem;
  margin-bottom: 2rem;
  font-family: 'Lora', serif;
}

/* Products Grid */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  justify-items: center;
}

/* Product Card */
.product-card {
  background: var(--bg-dark);
  border: 2px solid var(--bg-lighter);
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  width: 100%;
  max-width: 320px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.product-card:hover {
  border-color: var(--ember-orange);
  box-shadow: var(--glow-ember);
  transform: translateY(-5px);
}

.product-card.subscription {
  border-color: var(--ember-purple);
}

.product-card.subscription:hover {
  box-shadow: 0 0 20px rgba(155, 89, 182, 0.5);
}

.product-card.donation {
  border-color: var(--ember-gold);
}

.product-card.donation:hover {
  box-shadow: var(--glow-gold);
}

/* Product Badge */
.product-badge {
  position: absolute;
  top: 1rem;
  right: -2rem;
  background: var(--ember-purple);
  color: white;
  padding: 0.3rem 2.5rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transform: rotate(45deg);
}

.product-badge.coming-soon {
  background: var(--bg-lighter);
  color: var(--text-muted);
}

/* Disabled Product Card */
.product-card.disabled {
  opacity: 0.7;
  pointer-events: none;
}

.product-card.disabled:hover {
  transform: none;
  box-shadow: none;
  border-color: var(--bg-lighter);
}

.product-card.disabled .btn {
  background: var(--bg-lighter) !important;
  border-color: var(--bg-lighter) !important;
  color: var(--text-muted) !important;
  cursor: not-allowed;
}

/* Product Icon */
.product-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.3));
}

/* Product Name */
.product-name {
  font-size: 1.3rem;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

/* Product Description */
.product-description {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  min-height: 3rem;
}

/* Product Price */
.product-price {
  font-size: 2rem;
  font-family: 'Cinzel Decorative', serif;
  color: var(--ember-gold);
  margin-bottom: 1.5rem;
  text-shadow: var(--glow-gold);
}

.price-interval {
  font-size: 1rem;
  color: var(--text-secondary);
  font-family: 'Lora', serif;
}

/* Buy/Subscribe Buttons */
.product-card .btn {
  width: 100%;
  padding: 0.875rem 1.5rem;
}

.subscribe-btn {
  background: linear-gradient(135deg, var(--ember-purple) 0%, #7d3c98 100%) !important;
  border-color: var(--ember-purple) !important;
}

.subscribe-btn:hover {
  background: linear-gradient(135deg, #a569bd 0%, var(--ember-purple) 100%) !important;
}

.donate-btn {
  border-color: var(--ember-gold) !important;
  color: var(--ember-gold) !important;
}

.donate-btn:hover {
  background: rgba(255, 215, 0, 0.2) !important;
}

/* Payment Modal */
.payment-modal-content {
  background: var(--bg-dark);
  border: 2px solid var(--ember-orange);
  border-radius: 12px;
  padding: 2rem;
  max-width: 450px;
  width: 90%;
}

.payment-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.payment-header h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

#modal-product-info {
  background: var(--bg-medium);
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
}

#modal-product-info .product-name {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

#modal-product-info .product-price {
  font-size: 1.5rem;
  margin-bottom: 0;
}

#paypal-button-container {
  min-height: 150px;
}

.payment-status {
  text-align: center;
  padding: 1rem;
  margin-top: 1rem;
  border-radius: 8px;
  display: none;
}

.payment-status.success {
  display: block;
  background: rgba(46, 204, 113, 0.2);
  border: 1px solid var(--ember-green);
  color: var(--ember-green);
}

.payment-status.error {
  display: block;
  background: rgba(220, 53, 69, 0.2);
  border: 1px solid var(--ember-red);
  color: var(--ember-red);
}

.payment-status.loading {
  display: block;
  background: rgba(255, 107, 53, 0.2);
  border: 1px solid var(--ember-orange);
  color: var(--ember-orange);
}

/* Result Pages (Success/Cancel) */
.result-section {
  min-height: 80vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 6rem 2rem;
}

.result-card {
  background: var(--bg-dark);
  border-radius: 16px;
  padding: 3rem;
  text-align: center;
  max-width: 500px;
}

.result-card.success {
  border: 2px solid var(--ember-green);
}

.result-card.cancelled {
  border: 2px solid var(--ember-red);
}

.result-icon {
  font-size: 4rem;
  width: 100px;
  height: 100px;
  line-height: 100px;
  border-radius: 50%;
  margin: 0 auto 1.5rem;
}

.result-card.success .result-icon {
  background: rgba(46, 204, 113, 0.2);
  color: var(--ember-green);
  border: 3px solid var(--ember-green);
}

.result-card.cancelled .result-icon {
  background: rgba(220, 53, 69, 0.2);
  color: var(--ember-red);
  border: 3px solid var(--ember-red);
}

.result-card h1 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.result-message {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.result-note {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 2rem;
}

.result-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.result-actions .btn {
  padding: 0.75rem 1.5rem;
}

/* Battle Pass Card */
.battlepass-grid {
  max-width: 450px;
  margin: 0 auto;
}

.product-card.battlepass {
  border-color: var(--ember-gold);
  background: linear-gradient(180deg, var(--bg-dark) 0%, rgba(255, 215, 0, 0.05) 100%);
  max-width: 400px;
}

.product-card.battlepass:hover {
  box-shadow: 0 0 30px rgba(255, 215, 0, 0.4);
}

.product-card.battlepass.featured {
  border-width: 3px;
}

.product-badge.popular {
  background: linear-gradient(135deg, var(--ember-gold) 0%, var(--ember-orange) 100%);
  color: var(--bg-darkest);
  font-weight: 600;
}

.battlepass-benefits {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem 0;
  text-align: left;
}

.battlepass-benefits li {
  padding: 0.5rem 0;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 1px solid var(--bg-lighter);
}

.battlepass-benefits li:last-child {
  border-bottom: none;
}

.benefit-check {
  color: var(--ember-green);
  font-weight: bold;
}

.battlepass-btn {
  background: linear-gradient(135deg, var(--ember-gold) 0%, var(--ember-orange) 100%) !important;
  border-color: var(--ember-gold) !important;
  color: var(--bg-darkest) !important;
  font-weight: 600;
}

.battlepass-btn:hover {
  background: linear-gradient(135deg, #fff8dc 0%, var(--ember-gold) 100%) !important;
  transform: translateY(-2px);
}

.btn-large {
  padding: 1rem 2rem !important;
  font-size: 1.1rem;
}

/* Subscription Status */
.subscription-status {
  font-size: 0.9rem;
  padding: 0.5rem;
  margin-bottom: 1rem;
  border-radius: 6px;
  min-height: 1.5rem;
}

.subscription-status.active {
  background: rgba(46, 204, 113, 0.15);
  color: var(--ember-green);
}

.status-active {
  font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
  .shop-title {
    font-size: 2.5rem;
  }

  .products-grid {
    grid-template-columns: 1fr;
  }

  .product-card {
    max-width: 100%;
  }

  .result-actions {
    flex-direction: column;
  }

  .result-actions .btn {
    width: 100%;
  }
}
