/* ===== PROFILE PAGE BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-black: #1A1A1A;
    --secondary-black: #2D2D2D;
    --dark-grey: #404040;
    --medium-grey: #666666;
    --light-grey: #F5F7FB;
    --white: #FFFFFF;
    --blue-primary: #0066ff;
    --blue-light: #E6F2FF;
    --accent-blue: #009cf7;
    --accent-purple: #7C3AED;
    --shadow-md: 0 10px 30px rgba(15, 23, 42, 0.08);
    --shadow-sm: 0 4px 16px rgba(15, 23, 42, 0.06);
    --radius-lg: 20px;
    --radius-md: 14px;
    --radius-sm: 10px;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--dark-grey);
    background: var(--light-grey);
    min-height: 100vh;
}

img {
    width: 100%;
    height: auto;
    display: block;
}

.top-bar {
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

.top-bar .container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo-icon {
    width: 48px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-text .site-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--blue-primary);
    font-family: 'Poppins', sans-serif;
}

.logo-text .tagline {
    font-size: 0.85rem;
    color: var(--medium-grey);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn {
    border: none;
    border-radius: var(--radius-sm);
    padding: 10px 20px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.95rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--blue-primary), var(--accent-blue));
    color: var(--white);
    box-shadow: var(--shadow-sm);
}

.btn-outline {
    background: transparent;
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: var(--dark-grey);
}

.btn-ghost {
    background: transparent;
    color: var(--medium-grey);
}

.btn:hover {
    transform: translateY(-1px);
}

.profile-shell {
    max-width: 1280px;
    margin: 40px auto;
    padding: 0 24px 60px;
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 24px;
}

.profile-sidebar {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.user-card {
    text-align: center;
}

.user-avatar {
    width: 72px;
    height: 72px;
    margin: 0 auto 16px;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--blue-primary), var(--accent-purple));
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.5rem;
}

.user-card h2 {
    font-size: 1.3rem;
    margin-bottom: 4px;
}

.user-card p {
    font-size: 0.95rem;
    color: var(--medium-grey);
}

.user-avatar.has-photo {
    color: transparent;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.avatar-actions {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.avatar-upload-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    border: 1px dashed rgba(0, 102, 255, 0.4);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--blue-primary);
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.avatar-upload-trigger:hover {
    background: rgba(0, 102, 255, 0.08);
}

.avatar-upload-status {
    min-height: 18px;
    font-size: 0.8rem;
    color: var(--medium-grey);
    text-align: center;
}

.avatar-upload-status.error {
    color: #c0392b;
}

.avatar-upload-status.success {
    color: #0f9d58;
}

.avatar-upload-status.loading {
    color: var(--blue-primary);
}

.avatar-reset-btn,
.avatar-reset-mini {
    width: 100%;
    border: 1px dashed rgba(0, 0, 0, 0.2);
    background: transparent;
    color: var(--medium-grey);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: var(--transition-fast);
}

.avatar-reset-btn:hover,
.avatar-reset-mini:hover {
    color: var(--blue-primary);
    border-color: var(--blue-primary);
}

.avatar-reset-mini {
    width: auto;
    border-style: solid;
    padding: 6px 14px;
    font-size: 0.8rem;
}

.avatar-editor-overlay {
    position: fixed;
    inset: 0;
    background: rgba(3, 6, 23, 0.65);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease;
}

.avatar-editor-overlay.active {
    opacity: 1;
    visibility: visible;
}

.avatar-editor-modal {
    width: min(960px, 100%);
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow-xl);
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.avatar-editor-header {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: flex-start;
}

.avatar-editor-label {
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    color: var(--medium-grey);
    margin-bottom: 4px;
}

.avatar-editor-close {
    border: none;
    background: transparent;
    font-size: 1.2rem;
    color: var(--medium-grey);
    cursor: pointer;
}

.avatar-editor-body {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 32px;
}

.avatar-preview-wrapper {
    background: var(--light-grey);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

#avatarEditorCanvas {
    width: 100%;
    height: auto;
    max-width: 320px;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    border: 8px solid #fff;
    box-shadow: var(--shadow-md);
    cursor: grab;
    touch-action: none;
}

#avatarEditorCanvas:active {
    cursor: grabbing;
}

.avatar-preview-hint {
    font-size: 0.8rem;
    color: var(--medium-grey);
    display: flex;
    align-items: center;
    gap: 6px;
}

.avatar-editor-controls {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.control-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--dark-grey);
}

.control-group input[type="range"] {
    width: 100%;
    accent-color: var(--blue-primary);
}

.avatar-bg-options {
    display: flex;
    gap: 10px;
}

.avatar-bg-option {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
}

.avatar-bg-option.active {
    border-color: var(--blue-primary);
    box-shadow: 0 0 0 2px rgba(0, 102, 255, 0.15);
}

.avatar-editor-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

@media (max-width: 960px) {
    .avatar-editor-body {
        grid-template-columns: 1fr;
    }

    .avatar-editor-modal {
        padding: 20px;
    }
}

.profile-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.profile-nav a {
    text-decoration: none;
    color: var(--dark-grey);
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
    transition: background 0.2s ease, color 0.2s ease;
}

.profile-nav a i {
    width: 20px;
    text-align: center;
}

.profile-nav a.active,
.profile-nav a:hover {
    background: var(--blue-light);
    color: var(--blue-primary);
}

.profile-content {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 32px;
    min-height: 600px;
}

.content-header {
    margin-bottom: 30px;
}

.section-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--blue-primary);
    background: var(--blue-light);
    padding: 6px 12px;
    border-radius: 999px;
}

.content-header h1 {
    margin: 12px 0 8px;
    font-size: 2rem;
    color: var(--primary-black);
}

.content-header p {
    color: var(--medium-grey);
    max-width: 720px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 30px;
}

.stat-card {
    background: linear-gradient(135deg, #ffffff, #f9fbff);
    border: 1px solid rgba(0, 102, 255, 0.08);
    border-radius: var(--radius-md);
    padding: 18px;
}

.stat-card p {
    font-size: 0.85rem;
    color: var(--medium-grey);
    margin-bottom: 6px;
}

.stat-card h3 {
    font-size: 1.8rem;
    color: var(--primary-black);
}

.stat-card span {
    font-size: 0.85rem;
    color: var(--blue-primary);
}

.content-body {
    display: grid;
    gap: 24px;
}

.content-card {
    background: var(--white);
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.content-card h3 {
    margin-bottom: 12px;
    color: var(--primary-black);
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
}

.timeline {
    list-style: none;
    border-left: 2px solid var(--blue-light);
    margin-left: 12px;
    padding-left: 18px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.timeline li {
    position: relative;
    color: var(--medium-grey);
}

.timeline li::before {
    content: '';
    position: absolute;
    left: -28px;
    top: 6px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--blue-primary);
    border: 3px solid var(--white);
}

.list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.list li {
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    background: var(--blue-light);
    color: var(--dark-grey);
}

.flex-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge.success {
    background: #E7F8EE;
    color: #0F9D58;
}

.badge.warning {
    background: #FFF4DE;
    color: #FF8B00;
}

.badge.info {
    background: #E6F2FF;
    color: var(--blue-primary);
}

.quick-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 16px;
}

.quick-actions a {
    text-decoration: none;
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    background: var(--primary-black);
    color: var(--white);
    font-weight: 600;
    transition: opacity 0.2s ease;
}

.quick-actions a:hover {
    opacity: 0.85;
}

.empty-state {
    padding: 30px;
    border: 2px dashed rgba(0, 0, 0, 0.08);
    border-radius: var(--radius-md);
    text-align: center;
}

.empty-state h4 {
    margin-bottom: 12px;
}

@media (max-width: 1100px) {
    .profile-shell {
        grid-template-columns: 1fr;
    }

    .profile-sidebar {
        order: 2;
    }

    .profile-content {
        order: 1;
    }
}

@media (max-width: 768px) {
    .top-bar .container {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .header-actions {
        width: 100%;
        flex-wrap: wrap;
        gap: 8px;
    }

    .header-actions .btn {
        flex: 1;
        min-width: 120px;
        justify-content: center;
    }

    .profile-shell {
        padding: 16px;
        margin: 16px auto;
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .profile-sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        width: 280px;
        height: 100vh;
        z-index: 1001;
        border-radius: 0;
        transition: left 0.3s ease;
        overflow-y: auto;
    }

    .profile-sidebar.active {
        left: 0;
    }

    .profile-content {
        padding: 20px 16px;
        min-height: auto;
    }

    .content-header h1 {
        font-size: 1.5rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .stat-card {
        padding: 14px;
    }

    .stat-card h3 {
        font-size: 1.4rem;
    }
}

/* ===== WISHLIST & CART PREVIEW ===== */
.wishlist-preview-list,
.cart-preview-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.wishlist-item,
.cart-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.wishlist-item:hover,
.cart-item:hover {
    background: #f0f2f5;
}

.wishlist-item img,
.cart-item img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.wishlist-item-info,
.cart-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.item-name {
    font-weight: 600;
    color: var(--primary-black);
    font-size: 0.9rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.item-price {
    font-weight: 700;
    color: var(--blue-primary);
    font-size: 0.95rem;
}

.item-qty {
    font-size: 0.8rem;
    color: var(--medium-grey);
}

.wishlist-item button {
    padding: 8px 12px;
    background: var(--blue-primary);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
}

.wishlist-item button:hover {
    background: #0052cc;
    transform: scale(1.05);
}

.cart-total {
    padding: 16px 12px;
    background: linear-gradient(135deg, #f0f4ff 0%, #e8f0ff 100%);
    border-radius: var(--radius-sm);
    text-align: right;
    font-size: 1.1rem;
    color: var(--primary-black);
}

.empty-preview {
    text-align: center;
    padding: 32px 16px;
    color: var(--medium-grey);
}

.empty-preview i {
    font-size: 2.5rem;
    margin-bottom: 12px;
    opacity: 0.4;
}

.empty-preview p {
    margin-bottom: 16px;
}

.btn-browse {
    display: inline-block;
    padding: 10px 20px;
    background: var(--blue-primary);
    color: white;
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.btn-browse:hover {
    background: #0052cc;
}

.more-items {
    text-align: center;
    color: var(--medium-grey);
    font-size: 0.85rem;
    padding-top: 8px;
}

/* Cart Item Remove Button */
.cart-item {
    position: relative;
}

.cart-item-remove {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    padding: 0;
    background: rgba(220, 53, 69, 0.1);
    border: none;
    border-radius: 50%;
    color: #dc3545;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    opacity: 0;
    transition: all 0.2s ease;
}

.cart-item:hover .cart-item-remove {
    opacity: 1;
}

.cart-item-remove:hover {
    background: #dc3545;
    color: white;
    transform: scale(1.1);
}

/* Cart Load More / Show Less Buttons */
.cart-load-more-btn,
.cart-show-less-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 16px;
    margin-top: 12px;
    background: transparent;
    border: 2px dashed rgba(0, 102, 255, 0.3);
    border-radius: var(--radius-sm);
    color: var(--blue-primary);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cart-load-more-btn:hover,
.cart-show-less-btn:hover {
    background: rgba(0, 102, 255, 0.05);
    border-color: var(--blue-primary);
}

.cart-load-more-btn i,
.cart-show-less-btn i {
    font-size: 0.8rem;
}

/* Applied Offer in Cart */
.cart-offer-applied {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    margin: 12px 0;
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    border: 1px solid rgba(76, 175, 80, 0.3);
    border-radius: var(--radius-sm);
}

.cart-offer-applied .offer-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #2e7d32;
    font-size: 0.9rem;
}

.cart-offer-applied .offer-info i {
    color: #4caf50;
}

.cart-offer-applied .offer-discount {
    font-weight: 700;
    color: #2e7d32;
}

.cart-offer-applied .remove-offer-btn {
    width: 24px;
    height: 24px;
    padding: 0;
    background: rgba(0, 0, 0, 0.1);
    border: none;
    border-radius: 50%;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    transition: all 0.2s ease;
}

.cart-offer-applied .remove-offer-btn:hover {
    background: rgba(220, 53, 69, 0.2);
    color: #dc3545;
}

/* Cart Total Styling */
.cart-total {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 16px 12px;
    background: linear-gradient(135deg, #f0f4ff 0%, #e8f0ff 100%);
    border-radius: var(--radius-sm);
    text-align: right;
    font-size: 1.1rem;
    color: var(--primary-black);
}

.cart-total .original-total {
    font-size: 0.9rem;
    color: var(--medium-grey);
    text-decoration: line-through;
}

.loading-text {
    text-align: center;
    padding: 24px;
    color: var(--medium-grey);
}

/* Enhanced Wishlist Item Styles */
.wishlist-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: linear-gradient(135deg, #ffffff 0%, #fafbff 100%);
    border: 1px solid rgba(0, 102, 255, 0.08);
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
}

.wishlist-item:hover {
    border-color: rgba(0, 102, 255, 0.2);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.wishlist-item img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
    background: #f5f5f5;
}

.wishlist-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.item-brand {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--blue-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.item-name {
    font-weight: 600;
    color: var(--primary-black);
    font-size: 0.95rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.item-meta {
    display: flex;
    align-items: center;
    gap: 8px;
}

.item-rating {
    font-size: 0.8rem;
    color: #f59e0b;
}

.item-price {
    font-weight: 700;
    color: var(--blue-primary);
    font-size: 1.1rem;
}

.wishlist-item-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.wishlist-item-actions .btn-add-cart {
    padding: 10px 14px;
    background: var(--blue-primary);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
}

.wishlist-item-actions .btn-add-cart:hover {
    background: #0052cc;
    transform: scale(1.05);
}

.wishlist-item-actions .btn-remove {
    padding: 10px 14px;
    background: #fff0f0;
    color: #ef4444;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
}

.wishlist-item-actions .btn-remove:hover {
    background: #fee2e2;
    transform: scale(1.05);
}

/* ===== ORDERS SECTION ===== */
.orders-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.orders-filter select {
    padding: 8px 16px;
    border: 1px solid #e0e0e0;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    color: var(--dark-grey);
    background: white;
    cursor: pointer;
}

.orders-loading {
    text-align: center;
    padding: 40px;
    color: var(--medium-grey);
}

.orders-loading i {
    margin-right: 8px;
}

.orders-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.order-card {
    background: white;
    border: 1px solid #f0f0f0;
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.order-card:hover {
    box-shadow: var(--shadow-sm);
}

.order-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: #fafafa;
    border-bottom: 1px solid #f0f0f0;
    flex-wrap: wrap;
    gap: 12px;
}

.order-id-date {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.order-id {
    font-weight: 600;
    color: var(--primary-black);
}

.order-date {
    font-size: 0.85rem;
    color: var(--medium-grey);
}

.order-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: capitalize;
}

.order-status.pending {
    background: #fff3e0;
    color: #e65100;
}

.order-status.confirmed {
    background: #e3f2fd;
    color: #1565c0;
}

.order-status.shipped {
    background: #e8f5e9;
    color: #2e7d32;
}

.order-status.delivered {
    background: #e8f5e9;
    color: #1b5e20;
}

.order-status.cancelled {
    background: #ffebee;
    color: #c62828;
}

.order-status.return_requested,
.order-status.returned,
.order-status.refunded {
    background: #fce4ec;
    color: #ad1457;
}

.order-items {
    padding: 16px 20px;
}

.order-item {
    display: flex;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid #f5f5f5;
}

.order-item:last-child {
    border-bottom: none;
}

.order-item-image {
    width: 70px;
    height: 70px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    background: #f5f5f5;
}

.order-item-details {
    flex: 1;
}

.order-item-name {
    font-weight: 600;
    color: var(--primary-black);
    margin-bottom: 4px;
}

.order-item-qty {
    font-size: 0.85rem;
    color: var(--medium-grey);
}

.order-item-price {
    font-weight: 600;
    color: var(--blue-primary);
    text-align: right;
}

.order-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: #fafafa;
    border-top: 1px solid #f0f0f0;
    flex-wrap: wrap;
    gap: 12px;
}

.order-total {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-black);
}

.order-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.order-actions button {
    padding: 8px 16px;
    border: 1px solid var(--blue-primary);
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--blue-primary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.order-actions button:hover {
    background: var(--blue-primary);
    color: white;
}

.order-actions button.btn-danger {
    border-color: #dc3545;
    color: #dc3545;
}

.order-actions button.btn-danger:hover {
    background: #dc3545;
    color: white;
}

.no-orders {
    text-align: center;
    padding: 60px 24px;
    color: var(--medium-grey);
}

.no-orders i {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.4;
}

.no-orders p {
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.no-orders .btn-shop {
    display: inline-block;
    padding: 12px 24px;
    background: var(--blue-primary);
    color: white;
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    transition: all 0.2s ease;
}

.no-orders .btn-shop:hover {
    background: #0052cc;
    transform: translateY(-2px);
}

/* ===== ADDRESSES SECTION ===== */
.addresses-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.btn-add-address {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--blue-primary);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-add-address:hover {
    background: #0052cc;
    transform: translateY(-2px);
}

.addresses-loading {
    text-align: center;
    padding: 40px;
    color: var(--medium-grey);
}

.addresses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.address-card {
    background: white;
    border: 2px solid #f0f0f0;
    border-radius: var(--radius-md);
    padding: 20px;
    position: relative;
    transition: all 0.2s ease;
}

.address-card:hover {
    border-color: var(--blue-primary);
    box-shadow: var(--shadow-sm);
}

.address-card.default {
    border-color: var(--blue-primary);
    background: linear-gradient(to bottom right, rgba(0, 102, 255, 0.03), white);
}

.address-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: #f0f4ff;
    color: var(--blue-primary);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.address-label.home {
    background: #e8f5e9;
    color: #2e7d32;
}

.address-label.office {
    background: #e3f2fd;
    color: #1565c0;
}

.address-label.other {
    background: #fff3e0;
    color: #e65100;
}

.default-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 10px;
    background: var(--blue-primary);
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: 12px;
    text-transform: uppercase;
}

.address-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-black);
    margin-bottom: 8px;
}

.address-details {
    font-size: 0.9rem;
    color: var(--dark-grey);
    line-height: 1.6;
    margin-bottom: 12px;
}

.address-phone {
    font-size: 0.9rem;
    color: var(--medium-grey);
    margin-bottom: 16px;
}

.address-actions {
    display: flex;
    gap: 12px;
    border-top: 1px solid #f0f0f0;
    padding-top: 16px;
}

.address-actions button {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #e0e0e0;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--dark-grey);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.address-actions button:hover {
    border-color: var(--blue-primary);
    color: var(--blue-primary);
}

.address-actions button.btn-delete:hover {
    border-color: #dc3545;
    color: #dc3545;
}

.no-addresses {
    text-align: center;
    padding: 60px 24px;
    color: var(--medium-grey);
}

.no-addresses i {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.4;
}

.no-addresses p {
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.btn-add-first {
    padding: 12px 24px;
    background: var(--blue-primary);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-add-first:hover {
    background: #0052cc;
}

/* Address Modal */
.address-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 24px;
}

.address-modal-overlay.active {
    display: flex;
}

.address-modal {
    background: white;
    border-radius: var(--radius-lg);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.address-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #f0f0f0;
}

.address-modal-header h3 {
    font-size: 1.25rem;
    color: var(--primary-black);
}

.address-modal .close-modal {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--medium-grey);
    cursor: pointer;
}

#addressForm {
    padding: 24px;
}

#addressForm .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

#addressForm .form-group {
    margin-bottom: 16px;
}

#addressForm label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--dark-grey);
    margin-bottom: 8px;
}

#addressForm input,
#addressForm select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e0e0e0;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

#addressForm input:focus,
#addressForm select:focus {
    outline: none;
    border-color: var(--blue-primary);
    box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.1);
}

.checkbox-group {
    display: flex;
    align-items: center;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 0.9rem;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--blue-primary);
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.form-actions button {
    flex: 1;
    padding: 14px;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.form-actions .btn-cancel {
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    color: var(--dark-grey);
}

.form-actions .btn-cancel:hover {
    background: #e0e0e0;
}

.form-actions .btn-save {
    background: var(--blue-primary);
    border: none;
    color: white;
}

.form-actions .btn-save:hover {
    background: #0052cc;
}

@media (max-width: 600px) {
    #addressForm .form-row {
        grid-template-columns: 1fr;
    }
    
    .addresses-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== MODAL STYLES ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
    backdrop-filter: blur(4px);
}

.modal-content {
    background: var(--white);
    border-radius: var(--radius-lg);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #eee;
    background: var(--light-grey);
}

.modal-header h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-black);
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-header h3 i {
    color: var(--blue-primary);
}

.modal-close {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--white);
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--medium-grey);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: #f0f0f0;
    color: var(--primary-black);
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    background: var(--light-grey);
}

/* ===== TRACKING MODAL ===== */
.tracking-modal {
    max-width: 500px;
}

.tracking-header {
    background: linear-gradient(135deg, var(--blue-primary), var(--accent-blue));
    color: white;
    padding: 20px;
    border-radius: var(--radius-md);
    margin-bottom: 24px;
}

.tracking-info p {
    margin: 6px 0;
    font-size: 0.95rem;
}

.tracking-info strong {
    opacity: 0.8;
}

.tracking-timeline {
    position: relative;
    padding-left: 40px;
}

.tracking-timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 20px;
    bottom: 20px;
    width: 2px;
    background: #e0e0e0;
}

.tracking-step {
    position: relative;
    padding: 16px 0;
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.tracking-step .step-icon {
    position: absolute;
    left: -40px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 0.85rem;
    z-index: 1;
}

.tracking-step.completed .step-icon {
    background: var(--blue-primary);
    color: white;
}

.tracking-step.current .step-icon {
    background: #28a745;
    color: white;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(40, 167, 69, 0); }
}

.step-label {
    font-weight: 600;
    color: var(--primary-black);
}

.tracking-step:not(.completed) .step-label {
    color: #999;
}

.step-date {
    font-size: 0.85rem;
    color: var(--medium-grey);
    margin-top: 2px;
}

.carrier-info {
    margin-top: 20px;
    padding: 16px;
    background: var(--light-grey);
    border-radius: var(--radius-sm);
    text-align: center;
}

.carrier-info i {
    color: var(--blue-primary);
    margin-right: 6px;
}

/* ===== INVOICE MODAL ===== */
.invoice-modal {
    max-width: 700px;
}

.invoice-content {
    font-size: 0.95rem;
}

.invoice-header-section {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--blue-primary);
}

.invoice-brand h2 {
    font-family: 'Poppins', sans-serif;
    color: var(--blue-primary);
    margin: 0;
}

.invoice-brand p {
    color: var(--medium-grey);
    font-size: 0.9rem;
}

.invoice-details {
    text-align: right;
}

.invoice-details h3 {
    font-family: 'Poppins', sans-serif;
    color: var(--primary-black);
    margin-bottom: 10px;
}

.invoice-details p {
    margin: 4px 0;
    font-size: 0.9rem;
}

.invoice-addresses {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.invoice-addresses h4 {
    color: var(--primary-black);
    margin-bottom: 8px;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.invoice-addresses p {
    margin: 4px 0;
    color: var(--dark-grey);
}

.invoice-items {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 24px;
}

.invoice-items th {
    background: var(--light-grey);
    padding: 12px;
    text-align: left;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.invoice-items td {
    padding: 12px;
    border-bottom: 1px solid #eee;
}

.invoice-items th:last-child,
.invoice-items td:last-child {
    text-align: right;
}

.invoice-totals {
    margin-left: auto;
    max-width: 280px;
}

.total-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.total-row.grand-total {
    border-top: 2px solid var(--primary-black);
    border-bottom: none;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--primary-black);
    margin-top: 8px;
    padding-top: 12px;
}

.invoice-footer-section {
    margin-top: 30px;
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.invoice-footer-section p:first-child {
    font-weight: 600;
    color: var(--blue-primary);
}

.invoice-note {
    font-size: 0.85rem;
    color: var(--medium-grey);
    margin-top: 8px;
}

/* ===== RETURN MODAL ===== */
.return-modal {
    max-width: 500px;
}

.return-modal .form-group {
    margin-bottom: 20px;
}

.return-modal label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--primary-black);
}

.return-modal select,
.return-modal textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s ease;
}

.return-modal select:focus,
.return-modal textarea:focus {
    outline: none;
    border-color: var(--blue-primary);
}

.return-modal .checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: normal;
    cursor: pointer;
}

/* ===== ORDER ACTION BUTTONS ===== */
.order-actions button i {
    margin-right: 4px;
}

.order-actions .btn-outline {
    background: transparent;
    border: 1px solid #ddd;
    color: var(--dark-grey);
}

.order-actions .btn-outline:hover {
    background: var(--light-grey);
    border-color: var(--medium-grey);
}

/* ===== MODAL RESPONSIVE ===== */
@media (max-width: 600px) {
    .modal-content {
        max-height: 95vh;
        margin: 10px;
    }
    
    .invoice-addresses {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .invoice-header-section {
        flex-direction: column;
        gap: 20px;
    }
    
    .invoice-details {
        text-align: left;
    }
    
    .modal-footer {
        flex-direction: column;
    }
    
    .modal-footer button {
        width: 100%;
    }
}

/* ===== SETTINGS PAGE STYLES ===== */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 24px;
}

@media (max-width: 900px) {
    .settings-grid {
        grid-template-columns: 1fr;
    }
}

.settings-card {
    padding: 0;
    overflow: hidden;
}

.settings-card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    background: linear-gradient(135deg, #fafbfc 0%, #ffffff 100%);
}

.settings-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.settings-card-header h3 {
    margin: 0;
    font-size: 1rem;
}

.settings-desc {
    font-size: 0.8rem;
    color: var(--medium-grey);
    margin: 0;
}

.settings-items {
    padding: 8px 0;
}

.settings-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    transition: background 0.2s ease;
}

.settings-item:last-child {
    border-bottom: none;
}

.settings-item:hover {
    background: rgba(0, 102, 255, 0.03);
}

.settings-item.clickable {
    cursor: pointer;
}

.settings-item.clickable:hover {
    background: rgba(0, 102, 255, 0.05);
}

.settings-item-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.settings-item-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--primary-black);
}

.settings-item-desc {
    font-size: 0.75rem;
    color: var(--medium-grey);
}

.settings-item > i {
    color: var(--medium-grey);
    font-size: 0.85rem;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 26px;
}

.toggle-slider::before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-switch input:checked + .toggle-slider {
    background: linear-gradient(135deg, var(--blue-primary) 0%, #00a3ff 100%);
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(22px);
}

/* Danger Zone */
.danger-zone {
    border: 1px solid rgba(220, 38, 38, 0.2);
    background: linear-gradient(135deg, #fff5f5 0%, #ffffff 100%);
}

.danger-zone h3 {
    color: #DC2626;
    display: flex;
    align-items: center;
    gap: 10px;
}

.danger-zone p {
    color: var(--medium-grey);
    margin-bottom: 20px;
}

.danger-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-danger {
    padding: 10px 20px;
    background: #DC2626;
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-danger:hover {
    background: #B91C1C;
}

.btn-danger-outline {
    padding: 10px 20px;
    background: transparent;
    color: #DC2626;
    border: 1px solid #DC2626;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-danger-outline:hover {
    background: #FEE2E2;
}

/* ===== PROFILE MOBILE MENU TOGGLE ===== */
.profile-mobile-menu-toggle {
    display: none;
    position: fixed;
    bottom: 24px;
    left: 24px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--blue-primary), var(--accent-blue));
    color: white;
    border: none;
    box-shadow: 0 4px 20px rgba(0, 102, 255, 0.4);
    cursor: pointer;
    z-index: 1000;
    font-size: 1.25rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.profile-mobile-menu-toggle:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 25px rgba(0, 102, 255, 0.5);
}

.profile-sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.profile-sidebar-overlay.active {
    display: block;
    opacity: 1;
}

.profile-sidebar-close {
    display: none;
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--light-grey);
    border: none;
    color: var(--dark-grey);
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.2s ease;
}

.profile-sidebar-close:hover {
    background: #e5e7eb;
}

@media (max-width: 768px) {
    .profile-mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .profile-sidebar-close {
        display: flex;
        align-items: center;
        justify-content: center;
    }
}
