
/* ==================== PURCHASES PAGE ==================== */
.purchases-container {
  padding-top: 120px;
  min-height: 100vh;
}

.purchase-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: var(--transition);
  animation: fadeIn 0.4s ease forwards;
}

.purchase-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
}

/* Purchase Card Carousel */
.purchase-card .carousel {
  aspect-ratio: 16/10;
  background: var(--bg-primary);
}

.purchase-card .carousel img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
}

/* Purchase Info Section */
.purchase-info {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.purchase-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.purchase-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.purchase-value {
  font-size: 14px;
  color: var(--text-primary);
  font-weight: 500;
}

.order-id {
  background: var(--accent-light);
  color: var(--accent);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.seller-id {
  color: var(--text-secondary);
  font-size: 13px;
}

.product-desc-text {
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Status Badge */
.status-container {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.status-text {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: capitalize;
}

.status-delivered {
  background: rgba(0, 184, 148, 0.15);
  color: #00b894;
}

.status-pending {
  background: rgba(253, 203, 110, 0.2);
  color: #e17055;
}

.status-shipped {
  background: rgba(116, 185, 255, 0.2);
  color: #0984e3;
}

.status-default {
  background: var(--bg-primary);
  color: var(--text-secondary);
}

.status-badge {
  cursor: help;
  font-size: 16px;
}

/* Track Number */
.track-number {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: var(--bg-primary);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-secondary);
}

.track-number::before {
  content: "📦";
}

.track-number.empty {
  color: var(--text-muted);
  font-style: italic;
}

/* Dispute Button in Purchase Card */
.purchase-actions {
  padding: 0 16px 16px;
}

.dispute-btn {
  width: 100%;
  padding: 12px 16px;
  background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.dispute-btn::before {
  content: "⚠️";
}

.dispute-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  background: linear-gradient(135deg, #c0392b 0%, #a93226 100%);
}

/* ==================== DISPUTE FORM ==================== */
.dispute-container {
  max-width: 600px;
  margin: 0 auto;
  padding: 24px;
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  animation: fadeIn 0.4s ease forwards;
}

.dispute-container h2 {
  margin: 0 0 24px 0;
  font-size: 22px;
  color: var(--text-primary);
  text-align: center;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--border);
}

.dispute-input {
  width: 100%;
  min-height: 150px;
  padding: 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 15px;
  font-family: inherit;
  background: var(--bg-primary);
  color: var(--text-primary);
  resize: vertical;
  transition: var(--transition);
  line-height: 1.6;
}

.dispute-input:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--bg-secondary);
  box-shadow: 0 0 0 4px var(--accent-light);
}

.dispute-input::placeholder {
  color: var(--text-muted);
}

/* Upload Section */
.upload-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 20px 0;
}

.upload-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.upload-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.upload-label::before {
  font-size: 18px;
}

.upload-label.photo::before {
  content: "📷";
}

.upload-label.video::before {
  content: "🎥";
}

.upload-input-wrapper {
  position: relative;
  overflow: hidden;
}

.upload-input-wrapper input[type="file"] {
  position: absolute;
  left: 0;
  top: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.upload-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 16px;
  background: var(--bg-primary);
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.upload-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
}

.upload-btn.has-files {
  border-style: solid;
  border-color: #00b894;
  color: #00b894;
  background: rgba(0, 184, 148, 0.1);
}

/* File Preview */
.file-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.file-preview-item {
  position: relative;
  width: 60px;
  height: 60px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
}

.file-preview-item img,
.file-preview-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.file-preview-item .remove-file {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 18px;
  height: 18px;
  background: rgba(231, 76, 60, 0.9);
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Submit Dispute Button */
.submit-dispute-btn {
  width: 100%;
  padding: 16px 24px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  margin-top: 8px;
}

.submit-dispute-btn:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.submit-dispute-btn:disabled {
  background: var(--text-muted);
  cursor: not-allowed;
  transform: none;
}

/* Back Button */
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--bg-primary);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  margin-bottom: 20px;
}

.back-btn::before {
  content: "←";
}

.back-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

/* ==================== PURCHASES RESPONSIVE ==================== */
@media (min-width: 1200px) {
  .purchases-container {
    padding-top: 100px;
  }
  
  .purchase-card .carousel {
    aspect-ratio: 16/9;
  }
  
  .dispute-container {
    padding: 32px;
  }
}

@media (min-width: 768px) and (max-width: 1199px) {
  .purchases-container {
    padding-top: 160px;
  }
  
  .product-container.purchases-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 767px) {
  .purchases-container {
    padding-top: 200px;
  }
  
  .product-container.purchases-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .purchase-card .carousel {
    aspect-ratio: 16/10;
  }
  
  .purchase-info {
    padding: 14px;
    gap: 10px;
  }
  
  .dispute-container {
    margin: 16px;
    padding: 20px;
  }
  
  .dispute-container h2 {
    font-size: 18px;
    margin-bottom: 20px;
  }
  
  .upload-section {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .dispute-input {
    min-height: 120px;
    padding: 14px;
    font-size: 14px;
  }
}

@media (max-width: 400px) {
  .purchase-info {
    padding: 12px;
  }
  
  .order-id {
    font-size: 11px;
    padding: 3px 8px;
  }
  
  .product-desc-text {
    font-size: 13px;
    -webkit-line-clamp: 2;
  }
  
  .status-text {
    font-size: 11px;
    padding: 4px 10px;
  }
  
  .dispute-btn {
    padding: 10px 14px;
    font-size: 13px;
  }
  
  .dispute-container {
    padding: 16px;
    margin: 12px;
  }
}

/* ==================== PURCHASES NAVBAR SPECIFIC ==================== */
.purchases-nav {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.purchases-nav .nav-button {
  flex: 1;
  max-width: 150px;
  text-align: center;
}

@media (max-width: 767px) {
  .purchases-nav {
    gap: 8px;
  }
  
  .purchases-nav .nav-button {
    flex: 1;
    max-width: none;
    padding: 10px 12px;
    font-size: 13px;
  }
}