/* Store Page Styles */
.store-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
  color: #ffffff;
}

/* Store Header Stats */
.store-header {
  margin-bottom: 30px;
}

.store-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  border-radius: 15px;
  padding: 20px;
  text-align: center;
  border: 1px solid #333;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 123, 255, 0.2);
}

.stat-card h3 {
  font-size: 14px;
  color: #888;
  margin: 0 0 10px 0;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.stat-card .stat-value {
  font-size: 24px;
  font-weight: bold;
  color: #007bff;
  margin: 0;
}

.stat-card .stat-date {
  font-size: 12px;
  color: #666;
  margin-top: 5px;
}

/* Store Categories Filter */
.store-categories {
  margin-bottom: 30px;
}

.category-filters {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.category-btn {
  background: #2a2a3e;
  border: 1px solid #444;
  color: #fff;
  padding: 10px 20px;
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 14px;
  text-decoration: none;
  display: inline-block;
}

.category-btn:hover,
.category-btn.active {
  background: #007bff;
  border-color: #007bff;
  color: #fff;
  transform: translateY(-2px);
}

/* Store Products Grid */
.store-products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 25px;
  margin-bottom: 40px;
}

.product-card {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  border-radius: 15px;
  padding: 20px;
  border: 1px solid #333;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 35px rgba(0, 123, 255, 0.15);
  border-color: #007bff;
}

.product-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #007bff, #00d4ff);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.product-card:hover::before {
  opacity: 1;
}

/* Stock Status Indicator */
.stock-indicator {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #28a745;
  border: 2px solid #1a1a2e;
  animation: pulse 2s infinite;
}

.stock-indicator.out-of-stock {
  background: #dc3545;
  animation: none;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(40, 167, 69, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(40, 167, 69, 0);
  }
}

/* Product Image */
.product-image {
  width: 80px;
  height: 80px;
  margin: 0 auto 15px;
  background: #2a2a3e;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: #007bff;
  position: relative;
  overflow: hidden;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
}

.product-image.no-image::before {
  content: "📦";
}

/* Product Category */
.product-category {
  font-size: 11px;
  color: #007bff;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
  font-weight: 600;
}

/* Product Name */
.product-name {
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 15px;
  line-height: 1.4;
  min-height: 44px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Product Price */
.product-price {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.price-amount {
  font-size: 18px;
  font-weight: bold;
  color: #ff6b6b;
  display: flex;
  align-items: center;
  gap: 5px;
}

.price-amount::before {
  content: "💎";
  font-size: 16px;
}

.price-suffix {
  font-size: 12px;
  color: #888;
  margin-left: 5px;
}

/* Purchase Button */
.purchase-btn {
  width: 100%;
  background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
  color: #fff;
  border: none;
  padding: 12px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
  overflow: hidden;
}

.purchase-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s ease;
}

.purchase-btn:hover::before {
  left: 100%;
}

.purchase-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 123, 255, 0.3);
}

.purchase-btn:disabled {
  background: #444;
  color: #888;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.purchase-btn:disabled::before {
  display: none;
}

/* Product Detail Modal */
.product-detail-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  z-index: 1040;
  backdrop-filter: blur(8px);
  overflow-y: auto;
}

.product-detail-modal .modal-content {
  position: relative;
  margin: 2% auto;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  border-radius: 20px;
  padding: 0;
  max-width: 800px;
  width: 95%;
  border: 1px solid #333;
  animation: modalSlideIn 0.4s ease;
  transform: none;
  top: auto;
  left: auto;
}

.product-detail-modal .modal-header {
  background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
  border-radius: 20px 20px 0 0;
  padding: 20px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0;
}

.product-detail-modal .modal-header h3 {
  color: #fff;
  margin: 0;
  font-size: 22px;
  font-weight: 600;
}

.modal-close {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: #fff;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  padding: 5px 12px;
  border-radius: 50%;
  transition: all 0.3s ease;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
}

.product-detail-modal .modal-body {
  padding: 30px;
}

/* Product Detail Info */
.product-detail-info {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 25px;
  margin-bottom: 30px;
  align-items: start;
}

.product-detail-image {
  width: 150px;
  height: 150px;
  background: #2a2a3e;
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 2px solid #333;
}

.product-detail-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 13px;
}

.no-image-placeholder {
  color: #007bff;
  font-size: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.product-detail-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.product-detail-category {
  font-size: 12px;
  color: #007bff;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
  background: rgba(0, 123, 255, 0.1);
  padding: 4px 12px;
  border-radius: 20px;
  display: inline-block;
  width: fit-content;
}

.product-detail-content h4 {
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  margin: 0;
  line-height: 1.3;
}

.product-detail-price {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 28px;
  font-weight: bold;
  color: #ff6b6b;
}

.product-detail-price::before {
  content: "💎";
  font-size: 24px;
}

.product-detail-stock {
  margin-top: 8px;
}

.stock-available {
  color: #28a745;
  font-weight: 600;
}

.stock-low {
  color: #ffc107;
  font-weight: 600;
}

.stock-out {
  color: #dc3545;
  font-weight: 600;
}

/* Product Description Section */
.product-description-section,
.product-terms-section {
  background: #2a2a3e;
  border-radius: 15px;
  padding: 25px;
  margin-bottom: 25px;
  border: 1px solid #333;
}

.product-description-section h5,
.product-terms-section h5 {
  color: #007bff;
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 15px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.product-description {
  color: #ccc;
  line-height: 1.6;
  font-size: 14px;
}

.product-description p {
  margin-bottom: 12px;
}

.default-description {
  background: rgba(0, 123, 255, 0.05);
  border-left: 4px solid #007bff;
  padding: 15px;
  margin-top: 15px;
  border-radius: 0 8px 8px 0;
}

.default-description h6 {
  color: #007bff;
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 10px 0;
}

.default-description ul {
  margin: 0;
  padding-left: 20px;
  color: #ddd;
}

.default-description li {
  margin-bottom: 6px;
  font-size: 13px;
}

/* Terms and Conditions */
.terms-content h6 {
  color: #007bff;
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 12px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.terms-list {
  list-style: none;
  padding: 0;
  margin: 0 0 20px 0;
}

.terms-list li {
  background: rgba(0, 123, 255, 0.05);
  border-left: 3px solid #007bff;
  padding: 10px 15px;
  margin-bottom: 8px;
  border-radius: 0 8px 8px 0;
  color: #ddd;
  font-size: 13px;
  line-height: 1.4;
}

.terms-list.warning li {
  background: rgba(255, 193, 7, 0.05);
  border-left-color: #ffc107;
}

/* Modal Actions for Product Detail */
.product-detail-modal .modal-actions {
  padding: 0 30px 30px;
  display: flex;
  gap: 15px;
}

.modal-btn.secondary {
  background: #6c757d;
  color: #fff;
  flex: 1;
}

.modal-btn.primary {
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  color: #fff;
  flex: 2;
}

.modal-btn.primary:disabled {
  background: #6c757d;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Purchase Modal */
.purchase-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 1030;
  backdrop-filter: blur(5px);
}

.modal-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  border-radius: 15px;
  padding: 30px;
  max-width: 500px;
  width: 90%;
  border: 1px solid #333;
  animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translate(-50%, -60%);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

.modal-header {
  text-align: center;
  margin-bottom: 25px;
}

.modal-header h3 {
  color: #007bff;
  margin: 0 0 10px 0;
  font-size: 24px;
}

.modal-product-details {
  background: #2a2a3e;
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 25px;
  text-align: center;
}

.modal-product-name {
  font-size: 18px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 10px;
}

.modal-product-price {
  font-size: 20px;
  font-weight: bold;
  color: #ff6b6b;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.modal-product-price::before {
  content: "💎";
  font-size: 18px;
}

.modal-actions {
  display: flex;
  gap: 15px;
}

.modal-btn {
  flex: 1;
  padding: 12px 20px;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.modal-btn.confirm {
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  color: #fff;
}

.modal-btn.cancel {
  background: #444;
  color: #fff;
}

.modal-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Loading States */
.loading {
  text-align: center;
  padding: 40px;
  color: #888;
}

.loading::before {
  content: "";
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid #444;
  border-top: 2px solid #007bff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-right: 10px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.no-products {
  text-align: center;
  padding: 60px 20px;
  color: #888;
}

.no-products h3 {
  font-size: 24px;
  margin-bottom: 10px;
  color: #666;
}

/* Success/Error Messages */
.message {
  padding: 15px 20px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-weight: 500;
}

.message.success {
  background: rgba(40, 167, 69, 0.1);
  border: 1px solid #28a745;
  color: #28a745;
}

.message.error {
  background: rgba(220, 53, 69, 0.1);
  border: 1px solid #dc3545;
  color: #dc3545;
}

/* Responsive Design */
@media (max-width: 768px) {
  .store-container {
    padding: 15px;
  }

  .store-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }

  .store-products {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
  }

  .category-filters {
    justify-content: center;
  }

  .category-btn {
    padding: 8px 16px;
    font-size: 13px;
  }

  .modal-content {
    padding: 20px;
    width: 95%;
  }

  .modal-actions {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .store-stats {
    grid-template-columns: 1fr;
  }

  .store-products {
    grid-template-columns: 1fr;
  }

  .stat-card .stat-value {
    font-size: 20px;
  }

  .category-filters {
    gap: 10px;
  }

  .category-btn {
    padding: 6px 12px;
    font-size: 12px;
  }
}

/* SweetAlert Custom Styles - Black Text */
.swal-black-text {
  color: #333 !important;
}

.swal2-title.swal-black-text {
  color: #333 !important;
}

.swal2-content.swal-black-text {
  color: #333 !important;
}

.swal2-html-container.swal-black-text {
  color: #333 !important;
}

/* Additional SweetAlert text selectors - Force all text to be black */
.swal2-popup .swal2-title {
  color: #333 !important;
}

.swal2-popup .swal2-content {
  color: #333 !important;
}

.swal2-popup .swal2-html-container {
  color: #333 !important;
}

.swal2-popup #swal2-content {
  color: #333 !important;
}

.swal2-popup .swal2-styled {
  color: #333 !important;
}

/* Target the specific content div */
.swal2-popup div {
  color: #333 !important;
}

.swal2-popup p {
  color: #333 !important;
}

.swal2-popup span {
  color: #333 !important;
}

/* Fix button colors - Keep buttons white text */
.swal2-popup .swal2-confirm {
  color: #fff !important;
  background-color: #dc3545 !important;
}

.swal2-popup .swal2-styled {
  color: #fff !important;
}

.swal2-popup button {
  color: #fff !important;
}

.swal2-actions button {
  color: #fff !important;
}

/* Product Detail Modal - Responsive Fixes */
@media (max-width: 768px) {
  /* Product Detail Modal Responsive */
  .product-detail-modal .modal-content {
    margin: 1% auto;
    width: 98%;
  }

  .product-detail-info {
    grid-template-columns: 1fr;
    gap: 20px;
    text-align: center;
  }

  .product-detail-image {
    margin: 0 auto;
  }

  .product-detail-modal .modal-header {
    padding: 15px 20px;
  }

  .product-detail-modal .modal-body {
    padding: 20px;
  }

  .product-detail-modal .modal-actions {
    padding: 0 20px 20px;
    flex-direction: column;
  }

  .product-description-section,
  .product-terms-section {
    padding: 20px;
  }
}

@media (max-width: 480px) {
  /* Mobile Product Detail Modal */
  .product-detail-modal .modal-header h3 {
    font-size: 18px;
  }

  .modal-close {
    width: 35px;
    height: 35px;
    font-size: 24px;
  }

  .product-detail-content h4 {
    font-size: 20px;
  }

  .product-detail-price {
    font-size: 24px;
  }

  .product-description-section h5,
  .product-terms-section h5 {
    font-size: 16px;
  }

  .product-detail-modal .modal-content {
    width: 100%;
    margin: 0;
    border-radius: 0;
    height: 100vh;
    overflow-y: auto;
  }

  .product-detail-modal .modal-header {
    border-radius: 0;
    position: sticky;
    top: 0;
    z-index: 10;
  }
}
