/* ===================================
   MEUS PEDIDOS SECTION
   =================================== */

.orders-title {
  font-size: 24px;
  font-weight: 700;
  color: #111827;
  margin: 0 0 24px 0;
}

.orders-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.order-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px;
  transition: box-shadow 0.2s;
}

.order-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.order-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e5e7eb;
}

.order-number {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.order-number strong {
  font-size: 16px;
  color: #111827;
}

.order-date {
  font-size: 14px;
  color: #6b7280;
}

.order-status {
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
}

.order-status.status-pending {
  background-color: #fef3c7;
  color: #92400e;
}

.order-status.status-processing {
  background-color: #dbeafe;
  color: #1e40af;
}

.order-status.status-on-hold {
  background-color: #fce7f3;
  color: #9f1239;
}

.order-status.status-completed {
  background-color: #d1fae5;
  color: #065f46;
}

.order-status.status-shipped,
.order-detail-status-badge.status-shipped {
  background-color: #ede9fe;
  color: #6d28d9;
}

.order-status.status-cancelled {
  background-color: #f3f4f6;
  color: #6b7280;
}

.order-status.status-refunded {
  background-color: #fce7f3;
  color: #9f1239;
}

.order-status.status-failed {
  background-color: #fee2e2;
  color: #991b1b;
}

.order-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.order-item {
  display: flex;
  gap: 12px;
  align-items: center;
}

.item-image {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
}

.item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.item-details {
  flex: 1;
}

.item-name {
  font-size: 14px;
  font-weight: 600;
  color: #111827;
  margin-bottom: 4px;
}

.item-quantity {
  font-size: 13px;
  color: #6b7280;
}

.more-items {
  font-size: 13px;
  color: #6b7280;
  font-style: italic;
  margin-top: 8px;
}

.order-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 16px;
  border-top: 1px solid #e5e7eb;
}

.order-tracking-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0 0;
  padding: 12px 14px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  font-size: 14px;
}

.order-tracking-summary-label {
  font-weight: 600;
  color: #374151;
}

.order-tracking-summary-code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #111827;
  color: #ffffff;
  font-family: monospace;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
}

.order-tracking-summary-code:hover {
  color: #ffffff;
  opacity: 0.92;
}

.order-total {
  font-size: 16px;
  color: #111827;
}

.order-total strong {
  font-weight: 700;
}

.view-order-btn {
  background-color: var(--color-primary);
  color: #000000 !important;
  padding: 10px 24px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.2s;
  border: none;
  cursor: pointer;
}

.view-order-btn:hover {
  background-color: var(--color-primary);
  color: #000000 !important;
}

.no-orders {
  text-align: center;
  padding: 60px 20px;
}

.no-orders i {
  font-size: 64px;
  color: #d1d5db;
  margin-bottom: 20px;
}

.no-orders p {
  font-size: 16px;
  color: #6b7280;
  margin-bottom: 24px;
}

.start-shopping-btn {
  display: inline-block;
  background-color: var(--color-primary);
  color: #000000;
  padding: 12px 32px;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.2s;
}

.start-shopping-btn:hover {
  background-color: var(--color-primary);
  color: #000000;
}

/* ===================================
   ORDER DETAIL VIEW
   =================================== */

.order-detail-header {
  margin-bottom: 24px;
}

.back-to-orders-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--color-primary);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s;
}

.back-to-orders-btn:hover {
  color: var(--color-primary);
}

.back-to-orders-btn i {
  font-size: 14px;
}

.order-detail-container {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 32px;
}

.order-detail-title-section {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 2px solid #e5e7eb;
}

.order-detail-title {
  font-size: 28px;
  font-weight: 700;
  color: #111827;
  margin: 0 0 8px 0;
}

.order-detail-date {
  font-size: 14px;
  color: #6b7280;
  margin: 0;
}

.order-detail-status-badge {
  padding: 10px 20px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
}

.order-detail-section {
  margin-bottom: 32px;
}

.order-detail-section-title {
  font-size: 18px;
  font-weight: 700;
  color: #111827;
  margin: 0 0 16px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.order-detail-section-title i {
  color: var(--color-primary);
  font-size: 18px;
}

.order-detail-items {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.order-detail-item {
  display: grid;
  grid-template-columns: 100px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 16px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  transition: box-shadow 0.2s;
}

.order-detail-item:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.order-detail-item-image {
  width: 100px;
  height: 100px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
}

.order-detail-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.order-detail-item-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.order-detail-item-name {
  font-size: 16px;
  font-weight: 600;
  color: #111827;
  text-decoration: none;
  transition: color 0.2s;
}

.order-detail-item-name:hover {
  color: var(--color-primary);
}

.order-detail-item-meta {
  font-size: 14px;
  color: #6b7280;
}

.order-detail-item-price {
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.order-item-price-regular {
  font-size: 14px;
  color: #9ca3af;
  text-decoration: line-through;
}

.order-item-price-total {
  font-size: 18px;
  font-weight: 700;
  color: #00a650;
}

.order-detail-summary {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 20px;
}

.order-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #e5e7eb;
}

.order-summary-row:last-child {
  border-bottom: none;
}

.order-summary-label {
  font-size: 15px;
  color: #6b7280;
}

.order-summary-value {
  font-size: 15px;
  font-weight: 600;
  color: #111827;
}

.order-discount {
  color: #00a650 !important;
}

.order-summary-total {
  padding-top: 16px;
  margin-top: 8px;
  border-top: 2px solid #e5e7eb;
}

.order-summary-total .order-summary-label {
  font-size: 18px;
  font-weight: 700;
  color: #111827;
}

.order-summary-total .order-summary-value {
  font-size: 22px;
  font-weight: 700;
  color: #00a650;
}

.order-detail-two-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 32px;
}

.order-detail-address {
  font-size: 14px;
  line-height: 1.6;
  color: #374151;
  padding: 16px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
}

.order-detail-contact {
  font-size: 14px;
  color: #374151;
  margin-top: 8px;
}

.order-detail-contact strong {
  font-weight: 600;
  color: #111827;
}

.order-detail-info-text {
  font-size: 15px;
  color: #374151;
  padding: 16px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
}

.order-qrcode-wrapper {
  display: flex;
  justify-content: center;
}

.order-qrcode-image {
  width: 100%;
  max-width: 260px;
  height: auto;
  border-radius: 8px;
}

.order-detail-note {
  font-size: 14px;
  color: #374151;
  padding: 16px;
  background: #fef3c7;
  border: 1px solid #fbbf24;
  border-radius: 8px;
  line-height: 1.6;
}

.order-detail-note p {
  margin: 0;
}

.order-tracking-panel {
  padding: 20px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
}

.order-tracking-panel-message {
  margin: 0 0 16px;
  font-size: 15px;
  line-height: 1.6;
  color: #374151;
}

.order-tracking-panel-code-wrapper {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.order-tracking-panel-label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #6b7280;
}

.order-tracking-panel-code {
  display: inline-flex;
  align-self: flex-start;
  padding: 10px 14px;
  border-radius: 8px;
  background: #111827;
  color: #ffffff;
  font-family: monospace;
  font-size: 18px;
  letter-spacing: 0.06em;
}

.order-tracking-actions {
  margin-top: 18px;
}

.order-detail-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-start;
  padding-top: 24px;
  border-top: 2px solid #e5e7eb;
}

.order-detail-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
}

.order-detail-btn i {
  font-size: 14px;
}

.order-detail-btn.btn-primary {
  background-color: var(--color-primary);
  color: #ffffff;
  border: 2px solid var(--color-primary);
}

.order-detail-btn.btn-primary:hover {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
  color: #ffffff;
}

.order-detail-btn.btn-secondary {
  background-color: transparent;
  color: #6b7280;
  border: 2px solid #e5e7eb;
}

.order-detail-btn.btn-secondary:hover {
  background-color: #f9fafb;
  border-color: #d1d5db;
  color: #374151;
}

.order-error {
  padding: 20px;
  background-color: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
  border-radius: 8px;
  font-size: 15px;
  text-align: center;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .order-detail-container {
    padding: 20px;
  }

  .order-detail-title-section {
    flex-direction: column;
    gap: 16px;
  }

  .order-detail-title {
    font-size: 22px;
  }

  .order-detail-item {
    grid-template-columns: 80px 1fr;
    gap: 12px;
  }

  .order-detail-item-image {
    width: 80px;
    height: 80px;
  }

  .order-detail-item-price {
    grid-column: 2;
    text-align: left;
    margin-top: 8px;
  }

  .order-detail-two-columns {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .order-detail-actions {
    flex-direction: column;
  }

  .order-tracking-summary {
    flex-direction: column;
    align-items: flex-start;
  }

  .order-tracking-summary-code,
  .order-tracking-panel-code {
    width: 100%;
    justify-content: center;
  }

  .order-detail-btn {
    width: 100%;
    justify-content: center;
  }
}

/* ===================================
   ORDER MODAL
   =================================== */

.order-modal-overlay {
  display: none !important;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.75);
  z-index: 999999;
  padding: 20px;
  overflow-y: auto;
  animation: modalFadeIn 0.3s ease;
  visibility: hidden;
  opacity: 0;
}

.order-modal-overlay.active {
  display: flex !important;
  align-items: flex-start;
  justify-content: center;
  visibility: visible;
  opacity: 1;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.order-modal-container {
  background: #ffffff;
  border-radius: 12px;
  width: 100%;
  max-width: 900px;
  margin: 40px auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: modalSlideUp 0.3s ease;
  position: relative;
}

@keyframes modalSlideUp {
  from {
    transform: translateY(50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.order-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 32px;
  border-bottom: 2px solid #e5e7eb;
}

.order-modal-title {
  font-size: 24px;
  font-weight: 700;
  color: #111827;
  margin: 0;
}

.order-modal-close {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  color: #6b7280;
  font-size: 20px;
}

.order-modal-close:hover {
  background-color: #f3f4f6;
  color: #111827;
}

.order-modal-content {
  padding: 32px;
  max-height: calc(90vh - 120px);
  overflow-y: auto;
}

.order-modal-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  gap: 16px;
}

.order-modal-loading i {
  font-size: 48px;
  color: var(--color-primary);
}

.order-modal-loading p {
  font-size: 16px;
  color: #6b7280;
  margin: 0;
}

/* Override button styles for modal context */
.order-modal-overlay .view-order-btn {
  cursor: pointer;
  border: none;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .order-modal-overlay {
    padding: 0;
  }

  .order-modal-container {
    margin: 0;
    border-radius: 0;
    min-height: 100vh;
    max-width: 100%;
  }

  .order-modal-header {
    padding: 20px;
  }

  .order-modal-title {
    font-size: 20px;
  }

  .order-modal-content {
    padding: 20px;
    max-height: none;
  }

  .order-modal-close {
    width: 36px;
    height: 36px;
    font-size: 18px;
  }
}
