/* --- Profile Page (Light Mode) --- */
.profile-page {
    padding-top: 100px;
    min-height: calc(100vh - 300px);
    max-width: 1200px;
    margin: 0 auto;
    padding-bottom: 4rem;
}

.profile-container {
    display: flex;
    gap: 2rem;
    padding: 2rem;
}

.profile-sidebar {
    width: 280px;
    flex-shrink: 0;
    background: #fff;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    padding: 2rem;
    align-self: flex-start;
    box-shadow: var(--shadow-sm);
}

.user-summary {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--color-border);
}

.user-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--color-accent-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin: 0 auto 1rem;
    color: var(--color-accent);
}

.user-summary h3 {
    margin-bottom: 5px;
    font-family: var(--font-heading);
    font-weight: 600;
}

.user-summary p {
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.profile-nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.profile-nav a {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 15px;
    border-radius: var(--radius-sm);
    color: var(--color-text-muted);
    transition: var(--transition);
    font-weight: 500;
}

.profile-nav a:hover, .profile-nav a.active {
    background: var(--color-accent-soft);
    color: var(--color-text);
}

.profile-nav a.active {
    border-left: 3px solid var(--color-accent);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.profile-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.profile-header-card {
    background: var(--color-accent-soft);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 2rem;
}

.profile-header-card h2 {
    font-size: 2rem;
    margin-bottom: 10px;
    font-family: var(--font-heading);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.dashboard-card {
    background: #fff;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.dashboard-card.full-width {
    grid-column: 1 / -1;
}

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

.card-header h3 {
    font-family: var(--font-heading);
    font-weight: 600;
}

.card-header a, .card-header button {
    color: var(--color-accent);
    font-size: 0.9rem;
    font-weight: 500;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--color-border);
}

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

.detail-row .label {
    color: var(--color-text-muted);
    font-weight: 500;
}

.detail-row .value {
    color: var(--color-text);
    font-weight: 600;
}

.address-item {
    padding: 15px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    margin-bottom: 10px;
    position: relative;
    background: #f9f9f9;
}

.address-item .actions {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    gap: 10px;
}

.address-item button {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    border: none;
    background: none;
    cursor: pointer;
}

.address-item button:hover {
    color: var(--color-accent);
}

.address-item strong {
    display: block;
    margin-bottom: 5px;
    color: var(--color-text);
}

.address-item p {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    line-height: 1.4;
}

@media (max-width: 768px) {
    .profile-container {
        flex-direction: column;
        padding: 1rem;
    }
    .profile-sidebar {
        width: 100%;
    }
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

.mobile-logout-wrapper {
    display: none;
}

@media (max-width: 992px) {
    .mobile-logout-wrapper {
        display: block !important;
    }
}

/* Orders Table Styling */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.admin-table th {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--color-text-muted);
    font-weight: 700;
    padding: 16px 12px;
    border-bottom: 2px solid var(--color-border);
}

.admin-table td {
    padding: 16px 12px;
    font-size: 0.9rem;
    vertical-align: middle;
}

.admin-table tbody tr {
    transition: var(--transition);
}

.admin-table tbody tr:hover {
    background-color: var(--color-accent-soft);
}

/* Custom Modal Animation */
.product-modal-overlay {
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Accordion Order Card CSS */
.orders-accordion {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    margin-top: 1rem;
}

.order-accordion-item {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: #ffffff;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.order-accordion-item.active {
    border-color: #000000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.order-accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 1.5rem;
    cursor: pointer;
    background: #fbfbfa;
    user-select: none;
    transition: background 0.2s ease;
}

.order-accordion-header:hover {
    background: #f5f5f4;
}

.order-header-info {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: center;
}

.order-header-id {
    font-weight: 700;
    color: var(--color-text);
    font-family: var(--font-heading);
}

.order-header-date {
    color: var(--color-text-muted);
    font-size: 0.85rem;
}

.order-header-total {
    font-weight: 700;
    color: var(--color-accent);
}

.order-header-badges {
    display: flex;
    gap: 8px;
    align-items: center;
}

.order-toggle-icon {
    font-size: 1.2rem;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.order-accordion-item.active .order-toggle-icon {
    transform: rotate(180deg);
}

/* Accordion Content */
.order-accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-top: 1px solid transparent;
}

.order-accordion-item.active .order-accordion-content {
    max-height: 2000px; /* high limit to accommodate content */
    border-top: 1px solid var(--color-border);
}

.order-accordion-inner {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Tracking Timeline CSS */
.order-tracking-section {
    background: #fafaf9;
    border-radius: var(--radius-sm);
    padding: 1.2rem;
    border: 1px solid var(--color-border);
}

.order-tracking-title {
    font-weight: 700;
    margin-bottom: 1.2rem;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-heading);
}

.timeline-tracker {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin: 1.5rem 0 1rem;
}

.timeline-tracker::before {
    content: '';
    position: absolute;
    top: 14px;
    left: 10%;
    right: 10%;
    height: 3px;
    background: var(--color-border);
    z-index: 1;
}

.timeline-progress-bar {
    position: absolute;
    top: 14px;
    left: 10%;
    height: 3px;
    background: var(--color-accent);
    z-index: 2;
    transition: width 0.4s ease;
}

.timeline-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 3;
    width: 20%;
    text-align: center;
}

.timeline-dot {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #ffffff;
    border: 3px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--color-text-muted);
    transition: all 0.3s ease;
}

.timeline-step.completed .timeline-dot {
    border-color: var(--color-accent);
    background: var(--color-accent);
    color: #000;
}

.timeline-step.active .timeline-dot {
    border-color: #000;
    background: #000;
    color: #fff;
    box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.1);
}

.timeline-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-text-muted);
}

.timeline-step.active .timeline-label,
.timeline-step.completed .timeline-label {
    color: var(--color-text);
    font-weight: 700;
}

/* Order Details Grid */
.order-details-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 2rem;
}

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

.order-items-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

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

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

.order-item-img {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    border: 1px solid var(--color-border);
}

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

.order-item-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--color-text);
    margin-bottom: 2px;
}

.order-item-meta {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

.order-item-price-qty {
    text-align: right;
    font-size: 0.9rem;
}

.order-item-price {
    font-weight: 600;
}

.order-item-qty {
    color: var(--color-text-muted);
    font-size: 0.8rem;
}

.order-summary-box {
    background: #fafaf9;
    border-radius: var(--radius-sm);
    padding: 1.2rem;
    border: 1px solid var(--color-border);
    align-self: start;
}

.order-summary-box h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 0.5rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    margin-bottom: 8px;
    color: var(--color-text-muted);
}

.summary-row.total {
    border-top: 1px solid var(--color-border);
    padding-top: 8px;
    margin-top: 8px;
    font-weight: 700;
    font-size: 1rem;
    color: var(--color-text);
}

.shipping-info-block {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px dashed var(--color-border);
    font-size: 0.85rem;
}

.shipping-info-block strong {
    color: var(--color-text);
    display: block;
    margin-bottom: 4px;
}


