/* ========================================
   MY ACCOUNT PAGES - CSS
   ======================================== */

/* Account Page Layout */
.account-page {
    min-height: 100vh;
    background: #fff;
}

.account-page .page-title {
    text-align: center;
    padding: 80px 0;
}

.account-page .page-title h1 {
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-size: 54px;
    line-height: 58px;
    letter-spacing: -1px;
    color: #000;
    margin: 0;
}

.account-content {
    display: flex;
    gap: 7px;
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 20px 80px;
}

/* Account Sidebar Menu */
.account-menu {
    background: #D63585;
    border-radius: 8px;
    padding: 40px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
    width: 262px;
    flex-shrink: 0;
}

.account-avatar {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.avatar-container {
    position: relative;
    width: 80px;
    height: 80px;
}

.avatar-image {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    background: #FFFFFF;
    border: 3px solid #FFFFFF;
}

.avatar-edit-btn {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 30px;
    height: 30px;
    background: #FFFFFF;
    border: 1.5px solid #D63585;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.avatar-edit-btn svg {
    width: 16px;
    height: 16px;
    color: #D63585;
}

.account-name {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 20px;
    line-height: 32px;
    color: #FFFFFF;
    margin: 0;
}

.account-nav {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.account-nav-item {
    display: block;
    padding: 12px 16px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 16px;
    line-height: 26px;
    color: #FFFFFF !important;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    width: 100%;
    background: transparent;
    border: none;
    text-align: left;
    cursor: pointer;
}

.account-nav-item:link,
.account-nav-item:visited {
    color: #FFFFFF !important;
}

.account-nav-item:hover {
    color: #FFFFFF !important;
    background: rgba(255, 255, 255, 0.15);
}

.account-nav-item.active {
    color: #FFFFFF !important;
    background: rgba(255, 255, 255, 0.2);
    font-weight: 600;
}

.account-nav-item.logout {
    color: #FFFFFF !important;
    cursor: pointer;
    margin-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 24px;
    border-radius: 0;
}

.account-nav-item.logout:hover {
    color: #FFFFFF !important;
    background: transparent;
}

/* Account Main Content */
.account-main {
    flex: 1;
    padding: 0 72px;
}

.account-section-title {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 20px;
    line-height: 32px;
    color: #000;
    margin: 0 0 24px;
}

/* Account Form */
.account-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-bottom: 40px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.form-group label {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 12px;
    line-height: 12px;
    color: #6C7275;
    text-transform: uppercase;
}

.form-group input {
    width: 100%;
    height: 40px;
    padding: 0 16px;
    border: 1px solid #CBCBCB;
    border-radius: 6px;
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    line-height: 26px;
    color: #141718;
    background: white;
}

.form-group input::placeholder {
    color: #6C7275;
}

.form-group input:focus {
    outline: none;
    border-color: #141718;
}

.form-hint {
    font-family: 'Poppins', sans-serif;
    font-style: italic;
    font-size: 12px;
    line-height: 20px;
    color: #6C7275;
}

.save-btn {
    align-self: flex-start;
    padding: 12px 40px;
    background: #141718;
    color: white;
    border: none;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-size: 16px;
    line-height: 28px;
    letter-spacing: -0.4px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.save-btn:hover {
    background: #2a2d2e;
}

/* Password Section */
.password-section {
    margin-top: 40px;
}

/* Address Cards */
.address-cards {
    display: flex;
    gap: 23px;
}

.address-card {
    flex: 1;
    max-width: 342px;
    border: 1px solid #6C7275;
    border-radius: 8px;
    padding: 16px;
}

.address-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.address-card-title {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 16px;
    line-height: 26px;
    color: #000;
    margin: 0;
}

.address-edit-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    color: #6C7275;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 16px;
    line-height: 26px;
}

.address-edit-btn:hover {
    color: #141718;
}

.address-edit-btn svg {
    width: 16px;
    height: 16px;
}

.address-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.address-details p {
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    line-height: 22px;
    color: #000;
    margin: 0;
}

/* Orders History Table */
.orders-table {
    width: 100%;
}

.orders-header {
    display: grid;
    grid-template-columns: 140px 120px 100px 100px 80px;
    gap: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #E8ECEF;
}

.orders-header span {
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    line-height: 22px;
    color: #6C7275;
    text-align: left;
}

.order-row {
    display: grid;
    grid-template-columns: 140px 120px 100px 100px 80px;
    gap: 16px;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid #E8ECEF;
}

.order-row span {
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    line-height: 22px;
    color: #141718;
    text-align: left;
}

.order-status {
    color: #38CB89 !important;
}

.order-status.pending {
    color: #F0B429 !important;
}

.order-status.cancelled {
    color: #D63585 !important;
}

/* Wishlist Table */
.wishlist-table {
    width: 100%;
}

.wishlist-header {
    display: flex;
    justify-content: space-between;
    padding: 0 0 8px 32px;
    border-bottom: 1px solid #E8ECEF;
}

.wishlist-header span {
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    line-height: 22px;
    color: #6C7275;
}

.wishlist-header span:nth-child(1) { width: 160px; }
.wishlist-header span:nth-child(2) { width: 120px; }
.wishlist-header span:nth-child(3) { width: 137px; }

.wishlist-item {
    display: flex;
    align-items: center;
    padding: 24px 0;
    border-bottom: 1px solid #E8ECEF;
    height: 120px;
    box-sizing: border-box;
}

.wishlist-item-product {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 280px;
}

.wishlist-remove-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #6C7275;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wishlist-remove-btn:hover {
    color: #D63585;
}

.wishlist-product-image {
    width: 60px;
    height: 72px;
    background: #F3F5F7;
    border-radius: 4px;
    overflow: hidden;
}

.wishlist-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wishlist-product-info h4 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 14px;
    line-height: 22px;
    color: #141718;
    margin: 0 0 8px;
}

.wishlist-product-info p {
    font-family: 'Poppins', sans-serif;
    font-size: 12px;
    line-height: 20px;
    color: #6C7275;
    margin: 0;
}

.wishlist-item-price {
    width: 120px;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    line-height: 22px;
    color: #141718;
    margin-left: 40px;
}

.wishlist-item-action {
    margin-left: auto;
}

.wishlist-add-btn {
    padding: 6px 24px;
    background: #D63585;
    color: white;
    border: none;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-size: 16px;
    line-height: 28px;
    letter-spacing: -0.4px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.wishlist-add-btn:hover {
    background: #B82D71;
}

/* Responsive */
@media (max-width: 992px) {
    .account-content {
        flex-direction: column;
    }
    
    .account-menu {
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        padding: 20px;
    }
    
    .account-nav {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        width: auto;
    }
    
    .account-nav-item {
        width: auto;
        padding: 8px 16px;
    }
    
    .account-nav-item.logout {
        margin-top: 0;
        border-top: none;
        padding-top: 8px;
    }
    
    .account-main {
        padding: 0;
    }
    
    .address-cards {
        flex-direction: column;
    }
    
    .address-card {
        max-width: 100%;
    }
    
    .orders-header,
    .order-row {
        grid-template-columns: 1fr 1fr 1fr 1fr auto;
        gap: 8px;
    }
}

@media (max-width: 768px) {
    .account-page .page-title {
        padding: 40px 0;
    }
    
    .account-page .page-title h1 {
        font-size: 36px;
        line-height: 42px;
    }
    
    .orders-header,
    .order-row {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    
    .orders-header span,
    .order-row span {
        width: auto !important;
    }
    
    .wishlist-item {
        flex-wrap: wrap;
        height: auto;
        gap: 16px;
    }
    
    .wishlist-item-price {
        margin-left: 70px;
    }
    
    .wishlist-item-action {
        width: 100%;
        margin-left: 0;
    }
    
    .wishlist-add-btn {
        width: 100%;
    }
}

/* Order View Button */
.order-view-btn {
    padding: 6px 16px;
    background: #D63585;
    color: white;
    border: none;
    border-radius: 4px;
    font-family: 'Poppins', sans-serif;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s ease;
}

.order-view-btn:hover {
    background: #b82d71;
}

/* Order Modal */
.order-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
}

.order-modal-content {
    background: white;
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

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

.order-modal-header h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 20px;
    font-weight: 600;
    color: #141718;
    margin: 0;
}

.order-modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: #F3F5F7;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6C7275;
    transition: all 0.2s ease;
}

.order-modal-close:hover {
    background: #E8ECEF;
    color: #141718;
}

.order-modal-meta {
    padding: 16px 24px;
    background: #F9FAFB;
}

.order-modal-meta p {
    margin: 4px 0;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    color: #6C7275;
}

.order-modal-items {
    padding: 20px 24px;
}

.order-modal-items h4 {
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #141718;
    margin: 0 0 16px;
}

.order-detail-item {
    display: flex;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid #E8ECEF;
}

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

.order-detail-image {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    background: #F3F5F7;
}

.order-detail-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

.order-detail-info h4 {
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #141718;
    margin: 0 0 4px;
}

.order-detail-info p {
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    color: #6C7275;
    margin: 2px 0;
}

.order-detail-price {
    font-weight: 600 !important;
    color: #141718 !important;
}

.order-modal-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-top: 2px solid #141718;
    font-family: 'Poppins', sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: #141718;
}

.no-items {
    text-align: center;
    color: #6C7275;
    padding: 24px;
}

/* Order status colors */
.order-status.processing {
    color: #F59E0B;
}

.order-status.pending {
    color: #F59E0B;
}

.order-status.delivered {
    color: #10B981;
}

.order-status.cancelled {
    color: #EF4444;
}

/* Update order row for View button */
.order-row {
    display: flex;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid #E8ECEF;
}

.order-row span {
    flex: 1;
}

.order-row .order-view-btn {
    flex: 0 0 auto;
    margin-left: 16px;
}

@media (max-width: 768px) {
    .order-modal-content {
        max-height: 90vh;
    }
    
    .order-detail-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .order-detail-image {
        width: 60px;
        height: 60px;
    }
}
