/* ===== Item Shop Gaming Styles ===== */

/* Filter Section */
.item-shop-filters {
  background: linear-gradient(135deg,
    rgba(26, 26, 46, 0.9),
    rgba(22, 33, 62, 0.9)
  );
  border: 1px solid rgba(168, 85, 247, 0.2);
  border-radius: 16px;
  backdrop-filter: blur(10px);
  box-shadow:
    0 8px 32px rgba(10, 10, 15, 0.8),
    0 0 40px rgba(168, 85, 247, 0.1);
}

.filter-button {
  background: linear-gradient(135deg,
    rgba(168, 85, 247, 0.1),
    rgba(147, 51, 234, 0.1)
  );
  border: 1px solid rgba(168, 85, 247, 0.3);
  color: #bb86fc;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.filter-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg,
    transparent,
    rgba(0, 255, 255, 0.1),
    transparent
  );
  transition: left 0.5s;
}

.filter-button:hover::before {
  left: 100%;
}

.filter-button:hover {
  background: linear-gradient(135deg,
    rgba(168, 85, 247, 0.2),
    rgba(147, 51, 234, 0.2)
  );
  border-color: rgba(0, 255, 255, 0.5);
  box-shadow:
    0 0 20px rgba(168, 85, 247, 0.4),
    0 0 40px rgba(0, 255, 255, 0.2);
  transform: translateY(-2px);
}

.filter-button.active {
  background: linear-gradient(135deg, #9333ea, #7c3aed);
  border-color: #00ffff;
  color: #ffffff;
  box-shadow:
    0 0 20px rgba(0, 255, 255, 0.5),
    0 4px 20px rgba(147, 51, 234, 0.4);
}

/* Search Input */
.search-input {
  background: rgba(26, 26, 46, 0.8);
  border: 1px solid rgba(168, 85, 247, 0.3);
  color: #f0e7ff;
  border-radius: 12px;
  transition: all 0.3s ease;
}

.search-input:focus {
  border-color: #00ffff;
  box-shadow:
    0 0 20px rgba(0, 255, 255, 0.3),
    0 0 40px rgba(168, 85, 247, 0.2);
  outline: none;
}

.search-input::placeholder {
  color: #a0a0a0;
}

/* Reset Button */
.reset-button {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  border: 1px solid rgba(220, 38, 38, 0.5);
  color: white;
  transition: all 0.3s ease;
}

.reset-button:hover {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  box-shadow:
    0 0 20px rgba(220, 38, 38, 0.4),
    0 4px 20px rgba(185, 28, 28, 0.3);
  transform: translateY(-2px);
}

/* Item Cards */
.item-card {
  background: linear-gradient(145deg,
    rgba(26, 26, 46, 0.95),
    rgba(22, 33, 62, 0.95)
  );
  border: 1px solid rgba(168, 85, 247, 0.2);
  border-radius: 20px;
  backdrop-filter: blur(12px);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.item-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg,
    transparent,
    #00ffff,
    #bb86fc,
    #00ffff,
    transparent
  );
  opacity: 0;
  transition: opacity 0.3s ease;
}

.item-card:hover::before {
  opacity: 1;
}

.item-card:hover {
  border-color: rgba(0, 255, 255, 0.5);
  box-shadow:
    0 20px 60px rgba(10, 10, 15, 0.9),
    0 0 40px rgba(168, 85, 247, 0.3),
    0 0 80px rgba(0, 255, 255, 0.1);
  transform: translateY(-8px) scale(1.02);
}

/* Item Image */
.item-image-container {
  position: relative;
  background: radial-gradient(circle at center,
    rgba(168, 85, 247, 0.1),
    rgba(22, 33, 62, 0.9)
  );
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
}

.item-image {
  transition: all 0.4s ease;
  filter: brightness(0.9) saturate(1.1);
}

.item-image:hover {
  transform: scale(1.1) rotate(2deg);
  filter: brightness(1.1) saturate(1.3);
}

.item-rarity-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center,
    transparent 40%,
    rgba(187, 134, 252, 0.1) 70%,
    rgba(0, 255, 255, 0.1) 100%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
}

.item-image-container:hover .item-rarity-glow {
  opacity: 1;
}

/* Item Info */
.item-name {
  background: linear-gradient(45deg, #bb86fc, #00ffff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 600;
  text-shadow: 0 0 20px rgba(187, 134, 252, 0.3);
}

.item-description {
  color: #a0a0a0;
  line-height: 1.6;
}

.item-type-badge {
  background: linear-gradient(135deg, #9333ea, #7c3aed);
  color: white;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 4px 12px;
  border-radius: 20px;
  display: inline-block;
  box-shadow: 0 4px 12px rgba(147, 51, 234, 0.3);
}

/* Price Section */
.price-section {
  background: linear-gradient(135deg,
    rgba(168, 85, 247, 0.1),
    rgba(0, 255, 255, 0.1)
  );
  border: 1px solid rgba(168, 85, 247, 0.3);
  border-radius: 12px;
  padding: 16px;
  margin-top: 16px;
}

.price-display {
  color: #00ffff;
  font-size: 1.5rem;
  font-weight: 700;
  text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

.total-price {
  color: #bb86fc;
  font-size: 1.25rem;
  font-weight: 600;
  text-shadow: 0 0 8px rgba(187, 134, 252, 0.4);
}

/* Quantity Controls */
.quantity-controls {
  display: flex;
  align-items: center;
  background: rgba(26, 26, 46, 0.8);
  border: 1px solid rgba(168, 85, 247, 0.3);
  border-radius: 8px;
  overflow: hidden;
}

.quantity-btn {
  background: linear-gradient(135deg, #7c3aed, #6b21a8);
  border: none;
  color: white;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  font-weight: 600;
}

.quantity-btn:hover {
  background: linear-gradient(135deg, #9333ea, #7c3aed);
  box-shadow: 0 0 12px rgba(124, 58, 237, 0.4);
}

.quantity-input {
  background: transparent;
  border: none;
  color: #f0e7ff;
  text-align: center;
  width: 60px;
  font-weight: 600;
  outline: none;
}

/* Action Buttons */
.buy-button {
  background: linear-gradient(135deg, #059669, #047857);
  border: 1px solid rgba(5, 150, 105, 0.5);
  color: white;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: 12px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.buy-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg,
    transparent,
    rgba(255, 255, 255, 0.1),
    transparent
  );
  transition: left 0.5s;
}

.buy-button:hover::before {
  left: 100%;
}

.buy-button:hover {
  background: linear-gradient(135deg, #10b981, #059669);
  box-shadow:
    0 0 20px rgba(5, 150, 105, 0.5),
    0 4px 20px rgba(4, 120, 87, 0.3);
  transform: translateY(-2px);
}

.buy-button:disabled {
  background: linear-gradient(135deg, #6b7280, #4b5563);
  border-color: rgba(107, 114, 128, 0.5);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Toggle Details Button */
.details-toggle {
  background: linear-gradient(135deg,
    rgba(168, 85, 247, 0.1),
    rgba(0, 255, 255, 0.1)
  );
  border: 1px solid rgba(168, 85, 247, 0.3);
  color: #bb86fc;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.875rem;
  transition: all 0.3s ease;
}

.details-toggle:hover {
  background: linear-gradient(135deg,
    rgba(168, 85, 247, 0.2),
    rgba(0, 255, 255, 0.2)
  );
  border-color: rgba(0, 255, 255, 0.5);
}

/* Item Details */
.item-details {
  background: linear-gradient(135deg,
    rgba(10, 10, 15, 0.9),
    rgba(26, 26, 46, 0.9)
  );
  border: 1px solid rgba(168, 85, 247, 0.2);
  border-radius: 12px;
  padding: 16px;
  margin-top: 12px;
}

.detail-item {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid rgba(168, 85, 247, 0.1);
}

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

.detail-label {
  color: #a0a0a0;
  font-weight: 500;
}

.detail-value {
  color: #f0e7ff;
  font-weight: 600;
}

/* Stock Status */
.stock-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 16px;
  font-size: 0.75rem;
  font-weight: 600;
}

.stock-available {
  background: rgba(5, 150, 105, 0.2);
  color: #10b981;
  border: 1px solid rgba(5, 150, 105, 0.3);
}

.stock-low {
  background: rgba(245, 158, 11, 0.2);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.stock-out {
  background: rgba(220, 38, 38, 0.2);
  color: #ef4444;
  border: 1px solid rgba(220, 38, 38, 0.3);
}

/* Expiry Status */
.expiry-warning {
  background: rgba(245, 158, 11, 0.2);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Loading States */
.loading-shimmer {
  background: linear-gradient(90deg,
    rgba(168, 85, 247, 0.1) 0%,
    rgba(168, 85, 247, 0.2) 50%,
    rgba(168, 85, 247, 0.1) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 2s infinite linear;
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* Image Modal */
.image-modal-overlay {
  background: rgba(10, 10, 15, 0.95);
  backdrop-filter: blur(8px);
  z-index: 9999;
}

.image-modal-content {
  background: linear-gradient(145deg,
    rgba(26, 26, 46, 0.95),
    rgba(22, 33, 62, 0.95)
  );
  border: 2px solid rgba(0, 255, 255, 0.5);
  border-radius: 20px;
  box-shadow:
    0 0 60px rgba(0, 255, 255, 0.3),
    0 20px 80px rgba(10, 10, 15, 0.9);
  animation: modalFadeIn 0.4s ease;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .item-card {
    border-radius: 16px;
  }

  .item-card:hover {
    transform: translateY(-4px) scale(1.01);
  }

  .price-display {
    font-size: 1.25rem;
  }

  .buy-button {
    padding: 10px 20px;
    font-size: 0.875rem;
  }
}

/* Custom Scrollbar for Details */
.item-details::-webkit-scrollbar {
  width: 6px;
}

.item-details::-webkit-scrollbar-track {
  background: rgba(26, 26, 46, 0.5);
  border-radius: 3px;
}

.item-details::-webkit-scrollbar-thumb {
  background: linear-gradient(to bottom, #bb86fc, #9333ea);
  border-radius: 3px;
}

.item-details::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(to bottom, #00ffff, #bb86fc);
}
