/* Orders Page Styles */

.orders-section {
    min-height: calc(100vh - 80px - 120px);
    padding: var(--space-20) 0;
    background: linear-gradient(135deg, #faf8f5 0%, #ebceb2 50%, #f5f0e8 100%);
    margin-top: 80px;
}

.page-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    text-align: center;
    margin-bottom: var(--space-12);
    background: linear-gradient(135deg, var(--burgundy-700), var(--primary-700));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-family: 'Playfair Display', Georgia, serif;
}

/* Filter Controls */
.filter-controls {
    display: flex;
    gap: var(--space-3);
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: var(--space-12);
    padding: 0 var(--space-4);
}

.filter-btn {
    padding: var(--space-3) var(--space-6);
    border: 2px solid var(--burgundy-600);
    background: transparent;
    color: var(--burgundy-700);
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.filter-btn:hover {
    background: var(--burgundy-50);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(57, 18, 25, 0.15);
}

.filter-btn.active {
    background: linear-gradient(135deg, var(--burgundy-600), var(--burgundy-700));
    color: white;
    box-shadow: 0 4px 12px rgba(57, 18, 25, 0.25);
}

/* Orders Grid */
.orders-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-4);
}

.orders-grid {
    display: grid;
    gap: var(--space-8);
    grid-template-columns: 1fr;
}

/* Order Card */
.order-card {
    background: white;
    border-radius: 16px;
    padding: var(--space-8);
    box-shadow: 0 4px 20px rgba(57, 18, 25, 0.08);
    transition: all 0.3s ease;
    border: 1px solid rgba(235, 206, 178, 0.3);
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.order-card:hover {
    box-shadow: 0 8px 30px rgba(57, 18, 25, 0.15);
    transform: translateY(-4px);
}

/* Order Header */
.order-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-6);
    padding-bottom: var(--space-6);
    border-bottom: 2px solid var(--primary-100);
}

.order-info {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.order-id {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--burgundy-700);
    font-family: 'Playfair Display', Georgia, serif;
}

.order-date {
    font-size: 0.9rem;
    color: var(--neutral-600);
}

.order-status-container {
    display: flex;
    align-items: center;
}

/* Status Badge */
.status-badge {
    padding: var(--space-2) var(--space-4);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.status-badge.pending {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #92400e;
    border: 1px solid #fbbf24;
}

.status-badge.confirmed {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    color: #1e40af;
    border: 1px solid #3b82f6;
}

.status-badge.processing {
    background: linear-gradient(135deg, #e0e7ff, #c7d2fe);
    color: #4338ca;
    border: 1px solid #6366f1;
}

.status-badge.shipped {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    color: #065f46;
    border: 1px solid #10b981;
}

.status-badge.delivered {
    background: linear-gradient(135deg, #d1fae5, #6ee7b7);
    color: #064e3b;
    border: 1px solid #059669;
}

.status-badge.cancelled {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    color: #991b1b;
    border: 1px solid #ef4444;
}

/* Order Items */
.order-items {
    margin-bottom: var(--space-6);
}

.order-items h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--burgundy-700);
    margin-bottom: var(--space-4);
    font-family: 'Playfair Display', Georgia, serif;
}

.order-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-3) 0;
    border-bottom: 1px solid var(--neutral-100);
}

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

.order-item-info {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
    flex: 1;
}

.item-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--neutral-800);
}

.item-quantity {
    font-size: 0.85rem;
    color: var(--neutral-600);
}

.item-price {
    font-size: 1rem;
    font-weight: 700;
    color: var(--burgundy-700);
}

/* Order Details */
.order-details {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-6);
    margin-bottom: var(--space-6);
    padding: var(--space-6);
    background: linear-gradient(135deg, var(--primary-50), var(--primary-100));
    border-radius: 12px;
}

.shipping-info h5,
.payment-info h5 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--burgundy-700);
    margin-bottom: var(--space-3);
    font-family: 'Playfair Display', Georgia, serif;
}

.shipping-info p,
.payment-info p {
    font-size: 0.9rem;
    color: var(--neutral-700);
    line-height: 1.6;
    margin: 0;
}

/* Order Total */
.order-total {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--burgundy-700);
    text-align: right;
    padding: var(--space-4) 0;
    border-top: 2px solid var(--primary-200);
    border-bottom: 2px solid var(--primary-200);
    margin-bottom: var(--space-4);
    font-family: 'Playfair Display', Georgia, serif;
}

/* Order Footer */
.order-footer {
    margin-top: var(--space-4);
}

.order-status-note {
    padding: var(--space-4);
    background: linear-gradient(135deg, var(--primary-50), rgba(235, 206, 178, 0.2));
    border-left: 4px solid var(--burgundy-600);
    border-radius: 8px;
    font-size: 0.9rem;
    color: var(--neutral-700);
    line-height: 1.6;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: var(--space-20) var(--space-8);
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(57, 18, 25, 0.08);
    border: 2px dashed var(--primary-200);
}

.empty-state h3 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--burgundy-700);
    margin-bottom: var(--space-4);
    font-family: 'Playfair Display', Georgia, serif;
}

.empty-state p {
    font-size: 1rem;
    color: var(--neutral-600);
    margin-bottom: var(--space-8);
    line-height: 1.6;
}

.empty-state .btn {
    display: inline-block;
    padding: var(--space-4) var(--space-8);
    background: linear-gradient(135deg, var(--burgundy-600), var(--burgundy-700));
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(57, 18, 25, 0.2);
}

.empty-state .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(57, 18, 25, 0.3);
}

/* Responsive Design */
@media (min-width: 768px) {
    .order-details {
        grid-template-columns: 1fr 1fr;
    }

    .orders-grid {
        gap: var(--space-10);
    }

    .order-card {
        padding: var(--space-10);
    }
}

@media (max-width: 767px) {
    .orders-section {
        padding: var(--space-12) 0;
    }

    .page-title {
        font-size: 1.75rem;
        margin-bottom: var(--space-8);
    }

    .filter-controls {
        gap: var(--space-2);
        margin-bottom: var(--space-8);
    }

    .filter-btn {
        padding: var(--space-2) var(--space-4);
        font-size: 0.85rem;
    }

    .order-header {
        flex-direction: column;
        gap: var(--space-4);
    }

    .order-status-container {
        align-self: flex-start;
    }

    .order-id {
        font-size: 1.1rem;
    }

    .order-total {
        font-size: 1.25rem;
    }

    .order-item {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-2);
    }

    .item-price {
        align-self: flex-end;
    }

    .empty-state {
        padding: var(--space-12) var(--space-4);
    }

    .empty-state h3 {
        font-size: 1.5rem;
    }

    .empty-state p {
        font-size: 0.95rem;
    }
}

/* Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    animation: reveal 0.8s ease forwards;
}

@keyframes reveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.order-card:nth-child(1) { animation-delay: 0.1s; }
.order-card:nth-child(2) { animation-delay: 0.2s; }
.order-card:nth-child(3) { animation-delay: 0.3s; }
.order-card:nth-child(4) { animation-delay: 0.4s; }
.order-card:nth-child(5) { animation-delay: 0.5s; }

/* Interactive States */
.filter-btn:active {
    transform: translateY(0) scale(0.98);
}

.order-card:active {
    transform: translateY(-2px);
}

/* Loading State */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(250, 248, 245, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(8px);
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--primary-200);
    border-top-color: var(--burgundy-600);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Print Styles */
@media print {
    .header,
    .footer,
    .filter-controls {
        display: none;
    }

    .orders-section {
        margin-top: 0;
        padding: 0;
    }

    .order-card {
        page-break-inside: avoid;
        box-shadow: none;
        border: 1px solid #000;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus Styles */
.filter-btn:focus-visible {
    outline: 3px solid var(--burgundy-600);
    outline-offset: 2px;
}

.empty-state .btn:focus-visible {
    outline: 3px solid var(--burgundy-600);
    outline-offset: 4px;
}
