/* Verso Shop v2.0 - Catalog Page Styles */
/* Uses design-system.css variables exclusively */

/* ========== BASE STYLES ========== */

#app {
  min-height: 100vh;
  padding-bottom: 72px; /* Space for sticky bottom bar */
  position: relative;
}

.hidden {
  display: none !important;
}

/* ========== OUTSIDE-TELEGRAM GUARD ========== */

.telegram-guard {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem;
  background: var(--color-bg);
}

.guard-content {
  text-align: center;
  max-width: 400px;
}

.guard-icon {
  margin-bottom: 2rem;
  display: flex;
  justify-content: center;
}

.guard-message {
  font-size: 18px;
  color: var(--color-text);
  margin-bottom: 1rem;
  line-height: 1.8;
  font-weight: 600;
}

.guard-instruction {
  font-size: 14px;
  color: var(--color-text-secondary);
  line-height: 1.8;
}

/* When guard is visible, hide main content */
.telegram-guard:not(.hidden) ~ .app-header,
.telegram-guard:not(.hidden) ~ .category-nav,
.telegram-guard:not(.hidden) ~ .catalog-content,
.telegram-guard:not(.hidden) ~ .bottom-bar {
  display: none;
}

/* ========== HEADER ========== */

.app-header {
  background: #1e293b;
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-logo {
  width: 32px;
  height: 32px;
}

.header-title {
  font-size: 16px;
  font-weight: 700;
}

.wallet-badge {
  background: rgba(255, 255, 255, 0.15);
  color: white;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
}

/* ========== CATEGORY PILLS ========== */

.category-nav {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 12px 16px;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 48px;
  z-index: 90;
}

.category-nav::-webkit-scrollbar {
  display: none;
}

.category-pill {
  flex-shrink: 0;
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--color-border);
  background: var(--color-bg);
  font-family: var(--font-family);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-fast);
  white-space: nowrap;
  color: var(--color-text);
}

.category-pill:hover {
  background: var(--color-bg-secondary);
}

.category-pill.active {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

.category-pill.grayed {
  opacity: 0.5;
  color: var(--color-text-muted);
}

.category-pill.grayed.active {
  opacity: 0.7;
}

/* ========== CATALOG CONTENT ========== */

.catalog-content {
  padding: 0 16px 16px;
}

/* ========== CATEGORY SECTION ========== */

.category-section {
  margin-bottom: 24px;
}

.category-section-label {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 12px;
  padding-top: 16px;
}

/* ========== PRODUCT GRID ========== */

.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

/* ========== PRODUCT CARD ========== */

.product-card {
  position: relative;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: box-shadow var(--transition-fast);
}

.product-card:hover {
  box-shadow: var(--shadow-elevated);
}

.card-image {
  width: 100%;
  height: 100px;
  object-fit: cover;
  display: block;
  background: var(--color-bg-secondary);
}

.card-body {
  padding: 10px 12px;
}

.card-category {
  font-size: 11px;
  color: var(--color-text-muted);
  margin-bottom: 4px;
}

.card-name-fa {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.4;
}

.card-name-en {
  font-size: 12px;
  font-weight: 400;
  color: var(--color-text-secondary);
  margin-bottom: 6px;
  direction: ltr;
  text-align: right;
}

.card-price {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 6px;
}

.card-badges {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.card-buy-btn {
  width: 100%;
  padding: 8px;
  background: var(--color-primary);
  color: white;
  border: none;
  border-radius: var(--radius-button);
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-family);
  cursor: pointer;
  transition: background var(--transition-fast);
  min-height: 36px;
}

.card-buy-btn:hover {
  background: var(--color-primary-dark);
}

.card-buy-btn:active {
  background: var(--color-primary-darker);
}

/* ========== COMING SOON CARD ========== */

.product-card.coming-soon {
  opacity: 0.6;
  pointer-events: none;
}

.product-card.coming-soon .card-image {
  filter: grayscale(100%);
}

.product-card.coming-soon .card-price {
  color: var(--color-text-muted);
}

.product-card.coming-soon .card-buy-btn {
  display: none;
}

/* ========== SKELETON LOADING ========== */

.skeleton-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  overflow: hidden;
}

.skeleton-image {
  width: 100%;
  height: 100px;
  background: var(--color-bg-secondary);
  border-radius: var(--radius-card) var(--radius-card) 0 0;
  position: relative;
  overflow: hidden;
}

.skeleton-body {
  padding: 10px 12px;
}

.skeleton-line {
  height: 14px;
  background: var(--color-bg-secondary);
  border-radius: 4px;
  margin-bottom: 8px;
  position: relative;
  overflow: hidden;
}

.skeleton-line.short {
  width: 60%;
}

.skeleton-line.shorter {
  width: 40%;
}

.skeleton-btn {
  height: 36px;
  background: var(--color-bg-secondary);
  border-radius: var(--radius-button);
  position: relative;
  overflow: hidden;
}

.skeleton-text {
  display: inline-block;
  height: 14px;
  width: 80px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  position: relative;
  overflow: hidden;
}

/* Shimmer animation */
@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

.skeleton-image::after,
.skeleton-line::after,
.skeleton-btn::after,
.skeleton-text::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  animation: shimmer 1.5s infinite;
}

/* ========== ERROR STATE ========== */

#error-state {
  text-align: center;
  padding: 48px 16px;
}

.error-message {
  font-size: 16px;
  color: var(--color-text-secondary);
  margin-bottom: 16px;
}

#error-state .btn-primary {
  padding: 12px 32px;
}

/* ========== BOTTOM BAR ========== */

.bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #1e293b;
  padding: 10px 16px;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
  z-index: 100;
}

.bottom-bar button {
  width: 100%;
  padding: 12px;
  background: var(--color-primary);
  color: white;
  border: none;
  border-radius: var(--radius-button);
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-family);
  cursor: pointer;
  min-height: 44px;
  transition: background var(--transition-fast);
}

.bottom-bar button:hover {
  background: var(--color-primary-dark);
}

.bottom-bar button:active {
  background: var(--color-primary-darker);
}

/* ========== DETAIL PAGE ========== */

.detail-page {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--color-bg);
  overflow-y: auto;
  z-index: 200;
  padding-bottom: 80px;
}

.detail-hero {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  background: var(--color-bg-secondary);
}

.detail-content {
  padding: 16px;
}

/* Product info section */
.detail-info {
  margin-bottom: 16px;
}

.detail-category {
  font-size: 11px;
  color: var(--color-text-muted);
  margin-bottom: 4px;
}

.detail-name-fa {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 4px;
}

.detail-name-en {
  font-size: 14px;
  color: var(--color-text-secondary);
  direction: ltr;
  text-align: right;
  margin-bottom: 8px;
}

.detail-description {
  font-size: 14px;
  color: var(--color-text-secondary);
  line-height: 1.8;
  margin-top: 8px;
}

/* Trust badges */
.trust-badges {
  display: flex;
  gap: 8px;
  margin: 16px 0;
}

.trust-badge-card {
  flex: 1;
  background: var(--color-bg-secondary);
  border-radius: var(--radius-card);
  padding: 12px 8px;
  text-align: center;
}

.trust-badge-icon {
  width: 24px;
  height: 24px;
  margin: 0 auto 4px;
  color: var(--color-primary);
}

.trust-badge-text {
  font-size: 11px;
  font-weight: 500;
  color: var(--color-text);
}

/* Variant selector */
.variant-section {
  margin: 16px 0;
}

.variant-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 8px;
}

.variant-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.variant-card {
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  background: var(--color-bg);
}

.variant-card:hover {
  border-color: var(--color-primary);
}

.variant-card.selected {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
}

.variant-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text);
}

.variant-price {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-primary);
}

/* Price breakdown */
.price-breakdown {
  background: var(--color-bg-secondary);
  border-radius: var(--radius-card);
  padding: 16px;
  margin: 16px 0;
}

.price-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  color: var(--color-text);
  margin-bottom: 8px;
}

.price-line:last-child {
  margin-bottom: 0;
}

.price-total {
  border-top: 1px solid var(--color-border);
  padding-top: 12px;
  margin-top: 4px;
}

.price-total .price-line-label {
  font-weight: 700;
  font-size: 16px;
}

.price-total .price-line-value {
  font-weight: 700;
  font-size: 16px;
  color: var(--color-primary);
}

/* Payment methods */
.payment-section {
  margin: 16px 0;
}

.payment-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 8px;
}

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

.payment-card {
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: all var(--transition-fast);
  background: var(--color-bg);
}

.payment-card:hover:not(.disabled) {
  border-color: var(--color-primary);
}

.payment-card.selected {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
}

.payment-card.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.payment-radio {
  width: 20px;
  height: 20px;
  border: 2px solid var(--color-border);
  border-radius: 50%;
  flex-shrink: 0;
  position: relative;
  transition: border-color var(--transition-fast);
}

.payment-card.selected .payment-radio {
  border-color: var(--color-primary);
}

.payment-card.selected .payment-radio::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 10px;
  height: 10px;
  background: var(--color-primary);
  border-radius: 50%;
}

.payment-text {
  flex: 1;
}

.payment-method-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: 2px;
}

.payment-info {
  font-size: 12px;
  color: var(--color-text-secondary);
}

/* Sticky purchase bar */
.detail-bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--color-bg);
  border-top: 1px solid var(--color-border);
  padding: 12px 16px;
  z-index: 210;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  gap: 12px;
}

.detail-total-price {
  flex: 1;
  font-size: 16px;
  font-weight: 700;
  color: var(--color-text);
}

.detail-buy-btn {
  flex: 2;
  padding: 14px;
  background: var(--color-primary);
  color: white;
  border: none;
  border-radius: var(--radius-button);
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font-family);
  cursor: pointer;
  transition: background var(--transition-fast);
  min-height: 48px;
}

.detail-buy-btn:hover {
  background: var(--color-primary-dark);
}

.detail-buy-btn:active {
  background: var(--color-primary-darker);
}

.detail-buy-btn.btn-disabled {
  background: var(--color-disabled);
  color: var(--color-text-muted);
  cursor: not-allowed;
}

/* ========== PURCHASE FLOW ========== */

/* Confirmation card overlay */
.confirmation-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 300;
  display: flex;
  align-items: flex-end;
  animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.confirmation-card {
  background: white;
  border-radius: 20px 20px 0 0;
  padding: 24px 16px;
  width: 100%;
  max-height: 70vh;
  overflow-y: auto;
  animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

.confirm-title {
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 16px;
  color: var(--color-text);
}

.confirm-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  margin-bottom: 10px;
}

.confirm-row .label {
  color: var(--color-text-secondary);
}

.confirm-row .value {
  color: var(--color-text);
  font-weight: 500;
}

.confirm-divider {
  height: 1px;
  background: var(--color-border);
  margin: 12px 0;
}

.confirm-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 16px;
  font-weight: 700;
  color: var(--color-primary);
  margin-top: 12px;
}

.confirm-btn {
  width: 100%;
  padding: 14px;
  background: var(--color-primary);
  color: white;
  border: none;
  border-radius: var(--radius-button);
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font-family);
  margin-top: 16px;
  min-height: 48px;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.confirm-btn:hover {
  background: var(--color-primary-dark);
}

.confirm-btn:active {
  background: var(--color-primary-darker);
}

.confirm-cancel {
  display: block;
  text-align: center;
  margin-top: 12px;
  color: var(--color-text-secondary);
  font-size: 14px;
  cursor: pointer;
  padding: 8px;
}

.confirm-cancel:hover {
  color: var(--color-text);
}

/* Loading state during purchase */
.purchase-loading {
  text-align: center;
  padding: 24px;
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 12px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.purchase-loading-text {
  font-size: 14px;
  color: var(--color-text-secondary);
}

/* ========== RESULT PAGE ========== */

.result-page {
  position: fixed;
  inset: 0;
  background: var(--color-bg);
  z-index: 200;
  overflow-y: auto;
  padding-bottom: 80px;
}

/* Success page content */
.result-success {
  text-align: center;
  padding: 24px 16px;
}

.lottie-container {
  width: 120px;
  height: 120px;
  margin: 0 auto 16px;
}

.result-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--color-text);
}

.result-subtitle {
  font-size: 14px;
  color: var(--color-text-secondary);
  margin-bottom: 24px;
}

/* Order summary card */
.order-summary-card {
  background: var(--color-bg-secondary);
  border-radius: var(--radius-card);
  padding: 16px;
  margin: 0 16px 16px;
  text-align: right;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  margin-bottom: 8px;
}

.summary-row:last-child {
  margin-bottom: 0;
}

.summary-row .label {
  color: var(--color-text-secondary);
}

.summary-row .value {
  color: var(--color-text);
  font-weight: 500;
}

.status-fulfilled {
  color: var(--color-success);
  font-weight: 600;
}

.status-pending {
  color: var(--color-warning);
  font-weight: 600;
}

/* Code card */
.code-card {
  background: var(--color-primary-light);
  border: 2px solid var(--color-primary-medium);
  border-radius: var(--radius-card);
  padding: 20px 16px;
  margin: 0 16px 16px;
  text-align: center;
}

.code-value {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 1px;
  direction: ltr;
  font-family: 'Courier New', monospace;
  margin-bottom: 12px;
  word-break: break-all;
  color: var(--color-text);
}

.copy-btn {
  padding: 10px 24px;
  background: var(--color-primary);
  color: white;
  border: none;
  border-radius: var(--radius-button);
  font-size: 14px;
  font-family: var(--font-family);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.copy-btn:hover {
  background: var(--color-primary-dark);
}

.copy-btn:active {
  background: var(--color-primary-darker);
}

.copy-btn.copied {
  background: var(--color-success);
}

/* Redemption instructions */
.redemption-instructions {
  background: var(--color-bg-secondary);
  border-radius: var(--radius-card);
  padding: 16px;
  margin: 0 16px 16px;
  text-align: right;
}

.redemption-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--color-text);
}

.redemption-steps {
  font-size: 13px;
  line-height: 1.8;
  color: var(--color-text-secondary);
  white-space: pre-line;
}

/* Pending page */
.result-pending {
  text-align: center;
  padding: 24px 16px;
}

.pending-indicator {
  font-size: 64px;
  animation: pulse 2s ease-in-out infinite;
  margin-bottom: 16px;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.pending-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--color-warning);
  margin-bottom: 8px;
}

.delivery-estimate {
  font-size: 14px;
  color: var(--color-text-secondary);
  margin: 8px 0 24px;
}

.pending-explanation {
  font-size: 14px;
  line-height: 1.8;
  color: var(--color-text-secondary);
  padding: 0 16px;
  margin-bottom: 24px;
}

/* Card-to-card page */
.card-payment-page {
  padding: 24px 16px;
  text-align: center;
}

.card-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--color-text);
}

.card-number-display {
  background: var(--color-bg-secondary);
  border-radius: var(--radius-card);
  padding: 20px;
  margin: 16px 0;
}

.card-number {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 2px;
  direction: ltr;
  font-family: 'Courier New', monospace;
  color: var(--color-text);
  margin-bottom: 4px;
}

.card-holder {
  font-size: 13px;
  color: var(--color-text-muted);
  margin-top: 4px;
}

.amount-display {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-primary);
  margin: 12px 0;
}

.card-instructions {
  font-size: 14px;
  color: var(--color-text-secondary);
  line-height: 1.8;
  margin: 16px 0;
}

.bot-link-btn {
  width: 100%;
  padding: 14px;
  background: var(--color-primary);
  color: white;
  border: none;
  border-radius: var(--radius-button);
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font-family);
  cursor: pointer;
  margin: 16px 0;
  transition: background var(--transition-fast);
}

.bot-link-btn:hover {
  background: var(--color-primary-dark);
}

.bot-link-btn:active {
  background: var(--color-primary-darker);
}

.waiting-receipt {
  margin-top: 24px;
  padding: 16px;
  background: var(--color-bg-secondary);
  border-radius: var(--radius-card);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.waiting-receipt .pulsing-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-primary);
  animation: pulse 2s ease-in-out infinite;
}

.waiting-receipt .waiting-text {
  font-size: 14px;
  color: var(--color-text-secondary);
}

/* Return to shop button */
.return-btn {
  width: calc(100% - 32px);
  margin: 16px;
  padding: 14px;
  background: white;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
  border-radius: var(--radius-button);
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font-family);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.return-btn:hover {
  background: var(--color-primary-light);
}

.return-btn:active {
  background: var(--color-primary-medium);
}

/* Error state in confirmation */
.confirm-error {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  border-radius: var(--radius-card);
  padding: 12px;
  margin: 12px 0;
  text-align: center;
}

.confirm-error-message {
  font-size: 14px;
  color: #dc2626;
  margin-bottom: 8px;
}

.confirm-retry-btn {
  padding: 8px 16px;
  background: var(--color-primary);
  color: white;
  border: none;
  border-radius: var(--radius-button);
  font-size: 13px;
  font-family: var(--font-family);
  cursor: pointer;
  margin-left: 8px;
}

/* ========== ORDER HISTORY ========== */

/* Order history page container */
.order-history-page {
  position: fixed;
  inset: 0;
  background: white;
  z-index: 200;
  overflow-y: auto;
  padding-bottom: 24px;
}

/* Order history header */
.order-history-header {
  padding: 16px;
  background: #1e293b;
  color: white;
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  position: sticky;
  top: 0;
  z-index: 210;
}

/* Order list container */
.order-list {
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Order card */
.order-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 12px;
  display: flex;
  gap: 12px;
  align-items: center;
  cursor: pointer;
  transition: box-shadow var(--transition-fast);
}

.order-card:hover {
  box-shadow: var(--shadow-elevated);
}

.order-thumbnail {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--color-bg-secondary);
}

.order-card-info {
  flex: 1;
  min-width: 0;
}

.order-card-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.order-card-price {
  font-size: 13px;
  color: var(--color-primary);
  font-weight: 600;
}

.order-card-time {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-top: 2px;
}

.order-card-status {
  flex-shrink: 0;
  text-align: left;
}

/* Status badges for order cards */
.status-badge-fulfilled {
  padding: 4px 10px;
  background: rgba(22, 163, 74, 0.1);
  color: var(--color-success);
  border-radius: var(--radius-badge);
  font-size: 11px;
  font-weight: 500;
}

.status-badge-confirmed,
.status-badge-processing {
  padding: 4px 10px;
  background: rgba(245, 158, 11, 0.1);
  color: var(--color-warning);
  border-radius: var(--radius-badge);
  font-size: 11px;
  font-weight: 500;
}

.status-badge-pending {
  padding: 4px 10px;
  background: rgba(148, 163, 184, 0.3);
  color: var(--color-text-muted);
  border-radius: var(--radius-badge);
  font-size: 11px;
  font-weight: 500;
}

.status-badge-cancelled,
.status-badge-failed {
  padding: 4px 10px;
  background: rgba(220, 38, 38, 0.1);
  color: var(--color-danger);
  border-radius: var(--radius-badge);
  font-size: 11px;
  font-weight: 500;
}

/* ── VPN Order Card Enhancements ── */

.vpn-order-icon {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  flex-shrink: 0;
  background: linear-gradient(135deg, #0ea5e9, #3b82f6);
  display: flex;
  align-items: center;
  justify-content: center;
}

.vpn-order-icon svg {
  width: 28px;
  height: 28px;
  fill: white;
}

.vpn-usage-bar-container {
  margin-top: 4px;
}

.vpn-usage-skeleton {
  height: 6px;
  background: var(--color-border, #e2e8f0);
  border-radius: 3px;
  animation: shimmer 1.5s infinite;
}

.vpn-usage-bar {
  height: 6px;
  background: var(--color-border, #e2e8f0);
  border-radius: 3px;
  overflow: hidden;
}

.vpn-usage-fill {
  height: 100%;
  background: linear-gradient(90deg, #22c55e, #16a34a);
  border-radius: 3px;
  transition: width 0.5s ease;
}

.vpn-usage-fill.warning {
  background: linear-gradient(90deg, #f59e0b, #d97706);
}

.vpn-usage-fill.danger {
  background: linear-gradient(90deg, #ef4444, #dc2626);
}

.vpn-usage-text {
  font-size: 11px;
  color: var(--color-text-muted);
  margin-top: 2px;
  direction: ltr;
  text-align: right;
}

.vpn-expiry-text {
  font-size: 11px;
  color: var(--color-text-muted);
  margin-top: 1px;
}

.vpn-expiry-text.expiry-warning {
  color: var(--color-warning, #f59e0b);
}

.vpn-expiry-text.expiry-danger {
  color: var(--color-danger, #dc2626);
}

/* VPN-specific status badges */
.status-badge-active {
  padding: 4px 10px;
  background: rgba(22, 163, 74, 0.1);
  color: var(--color-success);
  border-radius: var(--radius-badge);
  font-size: 11px;
  font-weight: 500;
}

.status-badge-limited {
  padding: 4px 10px;
  background: rgba(245, 158, 11, 0.1);
  color: var(--color-warning);
  border-radius: var(--radius-badge);
  font-size: 11px;
  font-weight: 500;
}

.status-badge-expired,
.status-badge-disabled {
  padding: 4px 10px;
  background: rgba(220, 38, 38, 0.1);
  color: var(--color-danger);
  border-radius: var(--radius-badge);
  font-size: 11px;
  font-weight: 500;
}

/* Empty state */
.order-empty-state {
  text-align: center;
  padding: 64px 24px;
}

.empty-illustration {
  margin-bottom: 24px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.empty-illustration svg {
  width: 60px;
  height: 60px;
}

.empty-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--color-text);
}

.empty-subtitle {
  font-size: 14px;
  color: var(--color-text-secondary);
  margin-bottom: 24px;
  line-height: 1.6;
}

/* Loading state for order history */
.order-list-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 64px 24px;
  gap: 16px;
}

.order-list-loading .spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.order-list-loading .loading-text {
  font-size: 14px;
  color: var(--color-text-secondary);
}

/* ========== TOAST NOTIFICATIONS ========== */

.toast-notification {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  padding: 12px 20px;
  border-radius: 12px;
  font-family: 'YekanBakh', sans-serif;
  font-size: 14px;
  font-weight: 500;
  z-index: 10000;
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  max-width: calc(100vw - 32px);
  text-align: center;
  direction: rtl;
}

.toast-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast-error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.toast-success {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.toast-info {
  background: #dbeafe;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

/* ========== OUT OF STOCK PRODUCT CARDS ========== */

.product-card.card-out-of-stock {
  opacity: 0.6;
}

.product-card.card-out-of-stock .card-buy-btn {
  background: #d1d5db;
  color: #6b7280;
  pointer-events: none;
  cursor: not-allowed;
}

.badge-out-of-stock {
  background: #fee2e2;
  color: #991b1b;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 6px;
}

/* ========== VPN SUCCESS RESULT SCREEN ========== */

/* Subscription link container */
.sub-link-card {
  background: var(--color-bg-secondary, #f8fafc);
  border: 1px solid var(--color-border, #e2e8f0);
  border-radius: 16px;
  padding: 20px;
  margin: 16px 0;
  text-align: center;
}

/* "لینک اشتراک شما" label */
.sub-link-label {
  font-size: 14px;
  color: var(--color-text-secondary, #64748b);
  margin-bottom: 12px;
  font-weight: 600;
}

/* The actual URL display */
.sub-link-url {
  direction: ltr;
  text-align: left;
  background: #1e293b;
  color: #38bdf8;
  padding: 12px 16px;
  border-radius: 12px;
  font-family: monospace;
  font-size: 13px;
  word-break: break-all;
  margin-bottom: 12px;
  user-select: all;
  -webkit-user-select: all;
  overflow-wrap: break-word;
}

/* Connection guide card */
.vpn-instructions {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 16px;
  padding: 20px;
  margin: 16px 0;
  text-align: right;
}

/* "راهنمای اتصال" heading */
.vpn-instructions-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--color-text, #0f172a);
}

/* Numbered steps */
.vpn-instructions-steps {
  font-size: 14px;
  line-height: 2;
  color: var(--color-text-secondary, #64748b);
  white-space: pre-line;
}

/* Usage tip at the bottom */
.vpn-usage-tip {
  font-size: 13px;
  color: var(--color-text-tertiary, #94a3b8);
  margin-top: 16px;
  padding: 12px;
  background: #fffbeb;
  border-radius: 12px;
  border: 1px solid #fde68a;
  text-align: center;
}

/* ── Receipt Upload ────────────────────────────────────── */
.receipt-upload-section {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.receipt-upload-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 24px;
  background: var(--color-primary, #3b82f6);
  color: #fff;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.receipt-upload-btn:hover { background: #2563eb; }

.receipt-preview {
  width: 100%;
  max-width: 300px;
}

.confirm-receipt-btn {
  width: 100%;
  max-width: 300px;
  padding: 14px;
  background: #10b981;
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.confirm-receipt-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.receipt-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px;
  background: #f0fdf4;
  border-radius: 12px;
  border: 1px solid #bbf7d0;
  margin-top: 16px;
}

/* ── Wallet Page ───────────────────────────────────────── */
.wallet-page {
  padding: 20px 16px;
  max-width: 480px;
  margin: 0 auto;
}

.wallet-balance-card {
  background: linear-gradient(135deg, #1e293b, #334155);
  color: #fff;
  border-radius: 16px;
  padding: 24px;
  text-align: center;
  margin-bottom: 20px;
}

.wallet-balance-label {
  font-size: 14px;
  opacity: 0.8;
  margin-bottom: 8px;
}

.wallet-balance-amount {
  font-size: 28px;
  font-weight: 700;
}

.wallet-balance-currency {
  font-size: 14px;
  opacity: 0.7;
  margin-top: 4px;
}

.wallet-topup-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--color-text-primary, #1e293b);
}

.topup-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

.topup-card {
  background: #fff;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s;
}
.topup-card.selected {
  border-color: var(--color-primary, #3b82f6);
  background: #eff6ff;
}
.topup-card:active { transform: scale(0.97); }

.topup-amount {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text-primary, #1e293b);
}

.topup-confirm-btn {
  width: 100%;
  padding: 16px;
  background: var(--color-primary, #3b82f6);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}
.topup-confirm-btn.btn-disabled {
  opacity: 0.5;
  pointer-events: none;
}

/* ── VPN Detail View ── */

.vpn-detail-header {
  padding: 16px;
  background: #1e293b;
  color: white;
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  position: sticky;
  top: 0;
  z-index: 210;
}

.vpn-detail-content {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-bottom: 100px;
}

.vpn-status-indicator {
  text-align: center;
  padding: 20px;
}

.vpn-status-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
  margin-left: 8px;
  vertical-align: middle;
}

.vpn-status-dot.active { background: var(--color-success); }
.vpn-status-dot.expired { background: var(--color-danger); }
.vpn-status-dot.limited { background: var(--color-warning); }
.vpn-status-dot.disabled { background: var(--color-text-muted); }

.vpn-status-label {
  font-size: 18px;
  font-weight: 700;
  vertical-align: middle;
}

.vpn-detail-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 20px;
  box-shadow: var(--shadow-card);
}

.vpn-detail-card-title {
  font-size: 13px;
  color: var(--color-text-secondary);
  margin-bottom: 12px;
  font-weight: 600;
}

.vpn-detail-usage-bar {
  height: 10px;
  background: var(--color-border, #e2e8f0);
  border-radius: 5px;
  overflow: hidden;
  margin-bottom: 8px;
}

.vpn-detail-usage-fill {
  height: 100%;
  border-radius: 5px;
  transition: width 0.5s ease;
}

.vpn-detail-usage-fill.green { background: linear-gradient(90deg, #22c55e, #16a34a); }
.vpn-detail-usage-fill.yellow { background: linear-gradient(90deg, #f59e0b, #d97706); }
.vpn-detail-usage-fill.red { background: linear-gradient(90deg, #ef4444, #dc2626); }

.vpn-detail-usage-text {
  font-size: 20px;
  font-weight: 700;
  text-align: center;
  color: var(--color-text);
  margin-bottom: 4px;
}

.vpn-detail-usage-sub {
  font-size: 13px;
  color: var(--color-text-muted);
  text-align: center;
}

.vpn-detail-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--color-border-light, #f1f5f9);
}

.vpn-detail-info-row:last-child {
  border-bottom: none;
}

.vpn-detail-info-label {
  font-size: 13px;
  color: var(--color-text-secondary);
}

.vpn-detail-info-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
}

.vpn-renew-btn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #0ea5e9, #3b82f6);
  color: white;
  border: none;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 700;
  font-family: 'YekanBakh', sans-serif;
  cursor: pointer;
  transition: opacity 0.2s;
}

.vpn-renew-btn:active {
  opacity: 0.85;
}

.vpn-renew-btn.expired {
  background: linear-gradient(135deg, #ef4444, #dc2626);
}

/* Renewal confirmation */
.renewal-summary-card {
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 20px;
  text-align: center;
}

.renewal-note {
  font-size: 13px;
  color: var(--color-text-muted);
  margin-top: 8px;
}

.renewal-payment-methods {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

.renewal-pay-btn {
  width: 100%;
  padding: 14px;
  border: 1px solid var(--color-border);
  border-radius: 14px;
  font-size: 14px;
  font-weight: 600;
  font-family: 'YekanBakh', sans-serif;
  cursor: pointer;
  background: white;
  color: var(--color-text);
  transition: background 0.2s;
}

.renewal-pay-btn.wallet-btn {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: white;
  border: none;
}

.renewal-pay-btn.wallet-btn:disabled {
  background: var(--color-border);
  color: var(--color-text-muted);
  cursor: not-allowed;
}

.renewal-pay-btn.card-btn {
  background: white;
  border: 1px solid var(--color-primary);
  color: var(--color-primary);
}

.renewal-pay-btn.stars-btn {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
  border: none;
}

.renewal-pay-btn.crypto-btn {
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
  color: white;
  border: none;
}

/* ── Crypto Payment Page ── */

.crypto-payment-page {
  padding: 24px 16px;
}

.crypto-amount-display {
  text-align: center;
  padding: 20px;
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
  border-radius: 16px;
  color: white;
  margin-bottom: 20px;
}

.crypto-amount {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 1px;
}

.crypto-amount-toman {
  font-size: 13px;
  opacity: 0.85;
  margin-top: 4px;
}

.crypto-network-selector {
  margin-bottom: 16px;
}

.crypto-networks {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.crypto-network-card {
  flex: 1;
  padding: 12px 8px;
  border: 2px solid var(--color-border);
  border-radius: 12px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  background: var(--color-bg);
}

.crypto-network-card.selected {
  border-color: #8b5cf6;
  background: rgba(139, 92, 246, 0.08);
}

.crypto-network-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-text);
}

.crypto-network-coin {
  font-size: 11px;
  color: var(--color-text-muted);
  margin-top: 2px;
}

.crypto-address-section {
  margin-bottom: 16px;
}

.crypto-address-display {
  background: var(--color-bg-secondary, #f8fafc);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
}

.crypto-address {
  font-size: 12px;
  font-family: monospace;
  word-break: break-all;
  color: var(--color-text);
  line-height: 1.6;
  margin-bottom: 8px;
}

.crypto-warnings {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 16px;
}

.crypto-warnings p {
  font-size: 13px;
  color: #92400e;
  margin: 4px 0;
  text-align: center;
}

.crypto-hash-input-section {
  margin-top: 12px;
}

.crypto-tx-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  font-size: 13px;
  font-family: monospace;
  background: var(--color-bg);
  color: var(--color-text);
  box-sizing: border-box;
}

.crypto-tx-input:focus {
  outline: none;
  border-color: #8b5cf6;
}
