/* My Orders Page Styles */

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #7422FF;
    --secondary-color: #575756;
    --success-color: #10B981;
    --danger-color: #EF4444;
    --warning-color: #F59E0B;
    --info-color: #3B82F6;
    --group-color: #FF6B6B;
    --text-dark: #1F2937;
    --text-light: #6B7280;
    --border-color: #E5E7EB;
    --bg-gray: #F9FAFB;
    --white: #FFFFFF;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Source Sans Pro', sans-serif;
    background-color: var(--bg-gray);
    color: var(--text-dark);
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.main-header {
    background: var(--white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--primary-color);
    font-size: 24px;
    font-weight: 700;
}

.logo-icon {
    font-size: 28px;
    font-weight: 700;
}

.main-nav {
    display: flex;
    gap: 30px;
}

.main-nav a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 600;
    transition: color 0.3s;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--primary-color);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.btn-icon {
    background: none;
    border: none;
    color: var(--text-dark);
    cursor: pointer;
    font-size: 18px;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.3s;
    position: relative;
}

.btn-icon:hover {
    background: var(--bg-gray);
    color: var(--primary-color);
}

.cart-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: var(--danger-color);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

.mobile-menu-toggle {
    display: none;
}

/* Page Header */
.orders-page {
    padding: 30px 0 60px;
}

.page-header {
    margin-bottom: 30px;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 15px;
}

.breadcrumb a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.3s;
}

.breadcrumb a:hover {
    color: var(--primary-color);
}

.breadcrumb i {
    font-size: 10px;
}

.page-header h1 {
    font-size: 32px;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.subtitle {
    color: var(--text-light);
    font-size: 16px;
}

/* Orders Layout */
.orders-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
}

/* Sidebar */
.account-sidebar {
    background: var(--white);
    border-radius: 12px;
    padding: 24px;
    height: fit-content;
    position: sticky;
    top: 100px;
    box-shadow: var(--shadow-sm);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 15px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.avatar {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), #9D5CFF);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
}

.user-info h3 {
    font-size: 16px;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.user-info p {
    font-size: 13px;
    color: var(--text-light);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: all 0.3s;
}

.sidebar-nav a:hover {
    background: var(--bg-gray);
    color: var(--primary-color);
}

.sidebar-nav a.active {
    background: linear-gradient(135deg, var(--primary-color), #9D5CFF);
    color: white;
}

.sidebar-nav a i {
    width: 20px;
    text-align: center;
}

.sidebar-nav a.logout {
    margin-top: 12px;
    color: var(--danger-color);
}

.sidebar-nav a.logout:hover {
    background: rgba(239, 68, 68, 0.1);
}

/* Orders Content */
.orders-content {
    background: var(--white);
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

/* Toolbar */
.orders-toolbar {
    margin-bottom: 24px;
}

.filters-row {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.status-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-btn {
    background: var(--bg-gray);
    border: 2px solid transparent;
    color: var(--text-dark);
    font-weight: 600;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    font-size: 14px;
}

.filter-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.filter-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.filter-btn .count {
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
}

.filter-btn:not(.active) .count {
    background: var(--white);
    color: var(--text-dark);
}

.search-sort {
    display: flex;
    gap: 12px;
}

.search-box {
    flex: 1;
    position: relative;
}

.search-box i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
}

.search-box input {
    width: 100%;
    padding: 12px 16px 12px 45px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Source Sans Pro', sans-serif;
    transition: border-color 0.3s;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.sort-select {
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Source Sans Pro', sans-serif;
    font-weight: 600;
    color: var(--text-dark);
    cursor: pointer;
    background: var(--white);
    transition: border-color 0.3s;
}

.sort-select:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Orders List */
.orders-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.order-card {
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s;
}

.order-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.order-info-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.order-id {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-dark);
}

.order-date {
    font-size: 14px;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 6px;
}

.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.processing {
    background: rgba(249, 115, 22, 0.1);
    color: #F97316;
}

.status-badge.shipped {
    background: rgba(59, 130, 246, 0.1);
    color: #3B82F6;
}

.status-badge.delivered {
    background: rgba(16, 185, 129, 0.1);
    color: #10B981;
}

.status-badge.cancelled {
    background: rgba(239, 68, 68, 0.1);
    color: #EF4444;
}

.order-items {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.order-item {
    position: relative;
}

.order-item img {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    object-fit: cover;
    border: 2px solid var(--border-color);
}

.item-count {
    position: absolute;
    bottom: -6px;
    right: -6px;
    background: var(--primary-color);
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 12px;
    min-width: 20px;
    text-align: center;
}

.order-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.order-total {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
}

.order-total span {
    color: var(--primary-color);
}

.order-actions {
    display: flex;
    gap: 8px;
}

.btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid transparent;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: #6419E6;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-outline {
    background: transparent;
    border-color: var(--border-color);
    color: var(--text-dark);
}

.btn-outline:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: rgba(116, 34, 255, 0.05);
}

.btn-danger {
    background: transparent;
    border-color: var(--danger-color);
    color: var(--danger-color);
}

.btn-danger:hover {
    background: var(--danger-color);
    color: white;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-icon {
    font-size: 64px;
    color: var(--text-light);
    margin-bottom: 20px;
}

.empty-state h3 {
    font-size: 24px;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.empty-state p {
    color: var(--text-light);
    margin-bottom: 24px;
}

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.btn-page {
    padding: 10px 16px;
    border: 2px solid var(--border-color);
    background: var(--white);
    color: var(--text-dark);
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-page:hover:not(:disabled) {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-page:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-numbers {
    display: flex;
    gap: 8px;
}

.page-num {
    width: 40px;
    height: 40px;
    border: 2px solid var(--border-color);
    background: var(--white);
    color: var(--text-dark);
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-num:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.page-num.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Footer */
.main-footer {
    background: var(--text-dark);
    color: white;
    padding: 40px 0 20px;
    margin-top: 60px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-bottom: 30px;
}

.footer-section h3 {
    font-size: 18px;
    margin-bottom: 16px;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    line-height: 1.8;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section ul li a:hover {
    color: white;
}

.social-links {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.social-links a {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: all 0.3s;
}

.social-links a:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
}

.newsletter-form {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.newsletter-form input {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-family: 'Source Sans Pro', sans-serif;
}

.newsletter-form button {
    padding: 12px 20px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s;
}

.newsletter-form button:hover {
    background: #6419E6;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

.payment-methods {
    display: flex;
    gap: 12px;
    font-size: 24px;
}

.payment-methods i {
    opacity: 0.7;
    transition: opacity 0.3s;
}

.payment-methods i:hover {
    opacity: 1;
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--text-dark);
    color: white;
    padding: 16px 24px;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    display: none;
    align-items: center;
    gap: 12px;
    z-index: 10000;
    animation: slideIn 0.3s ease;
}

.toast.show {
    display: flex;
}

.toast.success {
    background: var(--success-color);
}

.toast.error {
    background: var(--danger-color);
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .orders-layout {
        grid-template-columns: 1fr;
    }

    .account-sidebar {
        position: static;
    }

    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

    .mobile-menu-toggle {
        display: block;
    }

    .page-header h1 {
        font-size: 24px;
    }

    .status-filters {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 8px;
    }

    .filter-btn {
        white-space: nowrap;
    }

    .search-sort {
        flex-direction: column;
    }

    .order-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .order-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .order-actions {
        width: 100%;
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .pagination {
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 12px;
    }

    .orders-content {
        padding: 16px;
    }

    .order-card {
        padding: 16px;
    }

    .order-items {
        overflow-x: auto;
    }

    .order-item img {
        width: 60px;
        height: 60px;
    }
}
