/* ===========================================
   Profile / Account Dashboard — EzyCommerce
   Page-specific styles only; base from index.css
   =========================================== */

/* Breadcrumb */
.breadcrumb {
    padding: 16px 0;
    background: #fff;
    border-bottom: 1px solid #E8ECF1;
}

.breadcrumb-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 24px;
}

.breadcrumb ul { display: flex; list-style: none; gap: 8px; margin: 0; padding: 0; }
.breadcrumb li { color: #636E72; font-size: 14px; font-weight: 500; }
.breadcrumb li:not(:last-child)::after { content: '\203A'; margin-left: 8px; color: #B2BEC3; }
.breadcrumb li:last-child { color: #2D3436; font-weight: 600; }
.breadcrumb a { color: #636E72; text-decoration: none; transition: color 0.2s; }
.breadcrumb a:hover { color: #6C5CE7; }

/* Main Content */
.main-content {
    max-width: 1300px;
    margin: 32px auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 28px;
    align-items: start;
}

/* Profile Sidebar */
.profile-sidebar {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
    border: 1px solid #E8ECF1;
    padding: 28px;
    position: sticky;
    top: 90px;
}

.profile-header {
    text-align: center;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid #E8ECF1;
}

.profile-avatar {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 14px;
    border: 3px solid #6C5CE7;
    box-shadow: 0 4px 16px rgba(108,92,231,0.15);
}

.profile-name {
    font-size: 18px;
    font-weight: 700;
    color: #2D3436;
    margin-bottom: 4px;
}

.profile-email {
    color: #636E72;
    font-size: 13px;
}

.profile-menu { list-style: none; padding: 0; margin: 0; }
.profile-menu-item { margin-bottom: 4px; }

.profile-menu-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #636E72;
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.2s;
    font-weight: 500;
    font-size: 14px;
}

.profile-menu-link i { width: 18px; text-align: center; font-size: 15px; }

.profile-menu-link:hover {
    background: #F7F8FC;
    color: #6C5CE7;
}

.profile-menu-link.active {
    background: linear-gradient(135deg, #F8F7FF, #EDE9FF);
    color: #6C5CE7;
    font-weight: 700;
}

/* Profile Content */
.profile-content {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
    border: 1px solid #E8ECF1;
    padding: 28px;
    min-height: 500px;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
    padding-bottom: 16px;
    border-bottom: 1px solid #E8ECF1;
    flex-wrap: wrap;
    gap: 12px;
}

.content-title {
    font-size: 22px;
    font-weight: 700;
    color: #2D3436;
    letter-spacing: -0.3px;
}

/* Dashboard Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.stat-card {
    background: #F7F8FC;
    border-radius: 14px;
    padding: 22px;
    text-align: center;
    border: 1px solid #E8ECF1;
    transition: all 0.25s;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
}

.stat-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #6C5CE7, #A29BFE);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    margin: 0 auto 14px;
}

.stat-value {
    font-size: 26px;
    font-weight: 800;
    color: #2D3436;
    margin-bottom: 4px;
}

.stat-label {
    color: #636E72;
    font-size: 13px;
    font-weight: 500;
}

/* Orders Table */
.orders-table-container {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid #E8ECF1;
}

.orders-table {
    width: 100%;
    border-collapse: collapse;
}

.orders-table th,
.orders-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid #F0F3F6;
    font-size: 14px;
}

.orders-table th {
    background: #F7F8FC;
    font-weight: 700;
    color: #2D3436;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.orders-table tr:hover { background: #FAFBFD; }
.orders-table tr:last-child td { border-bottom: none; }

.order-status {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    display: inline-block;
}

.status-pending { background: #FFF8E1; color: #F09000; }
.status-processing { background: #E8F0FE; color: #1A73E8; }
.status-shipped { background: #E6F4EA; color: #137333; }
.status-delivered { background: #E0F7FA; color: #00838F; }
.status-cancelled { background: #FCE4EC; color: #C62828; }

.view-order-btn {
    padding: 7px 14px;
    background: linear-gradient(135deg, #6C5CE7, #5A4BD1);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s;
}

.view-order-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(108,92,231,0.3); }

/* Order Details */
.order-details { margin-top: 20px; }
.order-items { margin-bottom: 20px; }

.order-item {
    display: flex;
    padding: 14px 0;
    border-bottom: 1px solid #F0F3F6;
    gap: 14px;
    align-items: center;
}

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

.order-item-image {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 10px;
    flex-shrink: 0;
}

.order-item-details { flex: 1; }
.order-item-name { font-weight: 700; margin-bottom: 4px; font-size: 14px; }
.order-item-price { color: #6C5CE7; font-weight: 800; }

.order-summary {
    background: #F7F8FC;
    border-radius: 14px;
    padding: 20px;
    margin-top: 20px;
    border: 1px solid #E8ECF1;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 14px;
    color: #636E72;
}

.summary-total {
    font-weight: 700;
    font-size: 16px;
    color: #2D3436;
    border-top: 2px solid #E8ECF1;
    padding-top: 12px;
    margin-top: 12px;
}

/* Address Book */
.address-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.address-card {
    background: #F7F8FC;
    border-radius: 14px;
    padding: 20px;
    position: relative;
    border: 1.5px solid #E8ECF1;
    transition: all 0.2s;
}

.address-card:hover { border-color: #A29BFE; }
.address-card.default { border-color: #6C5CE7; background: #F8F7FF; }

.address-type {
    position: absolute;
    top: 14px; right: 14px;
    background: linear-gradient(135deg, #6C5CE7, #5A4BD1);
    color: #fff;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.address-name { font-weight: 700; margin-bottom: 8px; color: #2D3436; }
.address-details { color: #636E72; line-height: 1.6; margin-bottom: 14px; font-size: 14px; }

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

.address-btn {
    padding: 7px 14px;
    border: 1.5px solid #E8ECF1;
    background: #fff;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s;
}

.address-btn:hover { border-color: #6C5CE7; color: #6C5CE7; }
.address-btn.primary { background: #6C5CE7; color: #fff; border-color: #6C5CE7; }
.address-btn.primary:hover { background: #5A4BD1; }

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(26,26,46,0.6);
    backdrop-filter: blur(4px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: #fff;
    border-radius: 20px;
    width: 500px;
    max-width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 28px;
    box-shadow: 0 25px 60px rgba(0,0,0,0.2);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #E8ECF1;
}

.modal-header h3 { font-size: 20px; font-weight: 700; color: #2D3436; }

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #636E72;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.close-btn:hover { background: #F7F8FC; color: #2D3436; }

/* Forms */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 6px; font-weight: 600; font-size: 14px; color: #2D3436; }

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border-radius: 10px;
    border: 1.5px solid #E8ECF1;
    background: #F7F8FC;
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    color: #2D3436;
    outline: none;
    transition: all 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #6C5CE7;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(108,92,231,0.1);
}

.form-row { display: flex; gap: 16px; }
.form-row .form-group { flex: 1; }

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    cursor: pointer;
}

.checkbox-label input { width: 16px; height: 16px; accent-color: #6C5CE7; }

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 24px;
}

.btn {
    padding: 12px 20px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    font-weight: 700;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-primary { background: linear-gradient(135deg, #6C5CE7, #5A4BD1); color: #fff; }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(108,92,231,0.3); }
.btn-outline { background: transparent; border: 1.5px solid #E8ECF1; color: #636E72; }
.btn-outline:hover { background: #F7F8FC; border-color: #6C5CE7; color: #6C5CE7; }

/* Wishlist Items */
#wishlist-items-container,
.products-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    padding: 0;
}

.wishlist-item {
    background: #fff;
    border: 1.5px solid #E8ECF1;
    border-radius: 14px;
    overflow: hidden;
    transition: all 0.25s;
    display: flex;
    flex-direction: column;
}

.wishlist-item:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,0.06); border-color: transparent; }
.wishlist-item img { width: 100%; height: 180px; object-fit: cover; }

.item-details { padding: 14px; flex-grow: 1; }
.item-details h3 { font-size: 15px; font-weight: 700; margin: 0 0 6px; color: #2D3436; }
.item-details .price { color: #6C5CE7; font-weight: 800; margin: 0 0 4px; }
.item-details .stock { font-size: 13px; color: #636E72; }

.item-actions {
    display: flex;
    gap: 6px;
    padding: 12px 14px;
    border-top: 1px solid #E8ECF1;
}

.item-actions .btn { flex: 1; padding: 8px; font-size: 13px; border-radius: 8px; }

.add-to-cart-btn { background: #6C5CE7; color: #fff; border: none; }
.add-to-cart-btn:hover { background: #5A4BD1; }
.remove-wishlist-btn { background: #FFF0F0; color: #FF6B6B; border: none; }
.remove-wishlist-btn:hover { background: #FF6B6B; color: #fff; }

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.pagination-btn {
    padding: 8px 16px;
    border: 1.5px solid #E8ECF1;
    background: #fff;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s;
    color: #636E72;
}

.pagination-btn:hover { border-color: #6C5CE7; color: #6C5CE7; }
.pagination-btn.active { background: #6C5CE7; color: #fff; border-color: #6C5CE7; }

/* Toast */
.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    background: #fff;
    border-radius: 12px;
    padding: 14px 18px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideIn 0.3s ease, fadeOut 0.4s ease 2.6s forwards;
    min-width: 300px;
}

.toast-success { border-left: 4px solid #00B894; }
.toast-error { border-left: 4px solid #FF6B6B; }
.toast-warning { border-left: 4px solid #FDCB6E; }
.toast-icon { font-size: 20px; flex-shrink: 0; }
.toast-success .toast-icon { color: #00B894; }
.toast-error .toast-icon { color: #FF6B6B; }
.toast-warning .toast-icon { color: #FDCB6E; }
.toast-content { flex: 1; }
.toast-title { font-weight: 700; margin-bottom: 2px; font-size: 14px; }
.toast-message { font-size: 13px; color: #636E72; }
.toast-close { background: none; border: none; color: #B2BEC3; cursor: pointer; font-size: 18px; }

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

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

/* Responsive */
@media (max-width: 992px) {
    .main-content { grid-template-columns: 1fr; }
    .profile-sidebar { position: static; }
}

@media (max-width: 768px) {
    .main-content { padding: 0 16px; margin: 24px auto; }
    .profile-content, .profile-sidebar { padding: 20px; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .form-row { flex-direction: column; gap: 0; }
    .address-grid { grid-template-columns: 1fr; }
    .content-header { flex-direction: column; align-items: flex-start; }
    #wishlist-items-container,
    .products-container { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; }
    .modal-content { padding: 20px; }
}