.orders-page {
  padding: 2rem 0 4rem;
  min-height: 70vh;
}

.orders-title {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 2rem;
}

/* Empty state */

.orders-empty {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-muted, #888);
}

.orders-empty-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.orders-empty h2 {
  margin-bottom: 0.5rem;
}

.orders-empty p {
  margin-bottom: 1.5rem;
}

.gs-btn {
  display: inline-block;
  padding: 0.65rem 1.6rem;
  background: var(--accent, #222);
  color: #fff;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  transition: opacity 0.2s;
}

.gs-btn:hover {
  opacity: 0.85;
}

/* Error */

.orders-error {
  color: #c0392b;
  padding: 1rem 0;
}

/* ---- Accordion wrapper ---- */

.orders-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.order-accordion {
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 10px;
  overflow: hidden;
  background: var(--card-bg, #fff);
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  transition: box-shadow 0.2s;
}

.order-accordion:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

/* ---- Accordion header (clickable row) ---- */

.order-accordion-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.4rem;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  gap: 1rem;
  transition: background 0.15s;
}

.order-accordion-header:hover, .order-accordion-header.open {
  background: var(--hover-bg, #f7f9fb);
}

.order-header-left {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.order-number {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-primary, #1a202c);
}

.order-date {
  font-size: 0.82rem;
  color: var(--text-muted, #718096);
}

.order-header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
}

.order-total {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-primary, #1a202c);
}

/* Status badges */

.order-status {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.7rem;
  border-radius: 20px;
  text-transform: capitalize;
  white-space: nowrap;
}

.status-pending {
  background: #fef3c7;
  color: #92400e;
}

.status-processing {
  background: #dbeafe;
  color: #1e40af;
}

.status-shipped {
  background: #e0f2fe;
  color: #0369a1;
}

.status-delivered {
  background: #dcfce7;
  color: #166534;
}

.status-cancelled {
  background: #fee2e2;
  color: #991b1b;
}

.status-refunded {
  background: #f3f4f6;
  color: #374151;
}

.status-return-requested {
  background: #fce7f3;
  color: #9d174d;
}

.order-chevron {
  font-size: 1.1rem;
  color: var(--text-muted, #718096);
  transition: transform 0.25s ease;
  line-height: 1;
}

/* ---- Accordion body ---- */

.order-accordion-body {
  border-top: 1px solid var(--border-color, #e2e8f0);
  padding: 1.5rem 1.4rem;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.order-details-loading {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text-muted, #718096);
  font-size: 0.9rem;
  padding: 0.5rem 0;
}

/* ---- Details grid layout ---- */

.order-details-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 2rem;
}

@media (max-width: 768px) {
  .order-details-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .order-header-right {
    gap: 0.5rem;
  }
}

@media (max-width: 768px) {
  .order-status {
    display: none;
  }
}

/* shown in details on mobile */

/* ---- Section title ---- */

.order-section-title {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted, #718096);
  margin: 0 0 0.85rem;
}

/* ---- Items ---- */

.order-items-section {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.order-item-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-color, #f1f5f9);
}

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

.order-item-img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border-color, #e2e8f0);
  flex-shrink: 0;
}

.order-item-info {
  flex: 1;
}

.order-item-name {
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.2rem;
  color: var(--text-primary, #1a202c);
}

.order-item-meta {
  font-size: 0.8rem;
  color: var(--text-muted, #718096);
}

.order-item-price {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary, #1a202c);
  white-space: nowrap;
}

/* ---- Right side panel ---- */

.order-side-panel {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Summary box */

.order-summary-box, .order-shipping-box, .order-actions-box {
  background: var(--surface-subtle, #f8fafc);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 8px;
  padding: 1rem 1.1rem;
}

.summary-line {
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
  padding: 0.3rem 0;
  color: var(--text-primary, #1a202c);
}

.discount-line {
  color: #16a34a;
}

.total-line {
  font-weight: 700;
  font-size: 0.95rem;
  border-top: 1px solid var(--border-color, #e2e8f0);
  margin-top: 0.3rem;
  padding-top: 0.5rem;
}

/* Shipping */

.order-shipping-box p {
  font-size: 0.87rem;
  line-height: 1.7;
  color: var(--text-primary, #1a202c);
  margin: 0;
}

/* Action buttons */

.order-actions-box {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.order-action-btn {
  display: block;
  padding: 0.55rem 1rem;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.87rem;
  font-weight: 600;
  text-align: center;
  background: var(--card-bg, #fff);
  border: 1px solid var(--border-color, #e2e8f0);
  color: var(--text-primary, #1a202c);
  transition: background 0.15s, border-color 0.15s;
}

.order-action-btn:hover {
  background: var(--hover-bg, #f1f5f9);
  border-color: #cbd5e1;
}

.order-action-btn--return {
  border-color: #fca5a5;
  color: #dc2626;
}

.order-action-btn--return:hover {
  background: #fff5f5;
}

/* Spinner (small) */

.spinner-sm {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid var(--border-color, #e2e8f0);
  border-top-color: var(--accent, #555);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

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

