/* =====================================
   USER PROFILE PAGE STYLES
   ===================================== */

:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --success-color: #27ae60;
    --danger-color: #e74c3c;
    --warning-color: #f39c12;
    --light-color: #ecf0f1;
    --border-color: #ddd;
    --text-color: #333;
    --transition: all 0.3s ease;
}

/* ===== Profile Section ===== */
.user-profile-section {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: calc(100vh - 200px);
}

.profile-sidebar {
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.profile-menu {
    padding: 20px 0;
}

.profile-menu ul li {
    margin: 0;
}

.profile-menu-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    color: var(--text-color);
    text-decoration: none;
    transition: var(--transition);
    border-left: 4px solid transparent;
    font-weight: 500;
}

.profile-menu-link i {
    font-size: 18px;
    width: 25px;
}

.profile-menu-link:hover {
    background-color: #f8f9fa;
    border-left-color: var(--secondary-color);
    padding-left: 25px;
}

.profile-menu-link.active {
    background-color: #e3f2fd;
    border-left-color: var(--secondary-color);
    color: var(--secondary-color);
}

/* ===== Profile Card ===== */
.profile-card {
    background: white;
    border: none;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
    transition: var(--transition);
}

.profile-card:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

.card .card-body {
    padding: 30px;
}

.profile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.profile-header h3 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
}

/* ===== Profile Picture ===== */
.profile-picture-area {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    position: relative;
}

.profile-picture {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid var(--secondary-color);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    transition: var(--transition);
}

.upload-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.profile-picture-area:hover .upload-overlay {
    opacity: 1;
}

.btn-upload {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--secondary-color);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: var(--transition);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
}

.btn-upload:hover {
    background: darken(#3498db, 10%);
    transform: scale(1.1);
}

/* ===== Form Styles ===== */
.profile-form {
    padding: 20px 0;
}

.form-label {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 8px;
    font-size: 14px;
}

.form-control {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 10px 15px;
    font-size: 14px;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

.form-control:disabled {
    background-color: #f5f5f5;
    cursor: not-allowed;
}

textarea.form-control {
    resize: vertical;
}

.form-action-buttons {
    display: flex;
    gap: 15px;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 2px solid #f0f0f0;
}

.btn-save,
.btn-cancel {
    padding: 12px 30px;
    border-radius: 8px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
    font-size: 14px;
}

.btn-save {
    background: linear-gradient(135deg, var(--secondary-color), #2980b9);
    color: white;
}

.btn-save:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
}

.btn-cancel {
    background: #e0e0e0;
    color: var(--text-color);
}

.btn-cancel:hover {
    background: #d0d0d0;
}

/* ===== Orders List ===== */
.orders-list {
    padding: 20px 0;
}

.order-item {
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    transition: var(--transition);
}

.order-item:hover {
    border-color: var(--secondary-color);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.1);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

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

.order-status {
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.order-status.completed {
    background: #d4edda;
    color: #155724;
}

.order-status.pending {
    background: #fff3cd;
    color: #856404;
}

.order-status.shipped {
    background: #d1ecf1;
    color: #0c5460;
}

.order-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.order-detail-item {
    display: flex;
    flex-direction: column;
}

.order-detail-label {
    font-size: 12px;
    color: #999;
    font-weight: 600;
    text-transform: uppercase;
}

.order-detail-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color);
    margin-top: 5px;
}

.order-items {
    background: white;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
}

.order-item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #e0e0e0;
}

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

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

.order-item-name {
    font-weight: 600;
    color: var(--primary-color);
}

.order-item-qty {
    font-size: 12px;
    color: #999;
}

.order-item-price {
    font-weight: 700;
    color: var(--secondary-color);
}

.order-action-btn {
    padding: 8px 16px;
    background: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: var(--transition);
}

.order-action-btn:hover {
    background: #2980b9;
}

/* ===== Addresses ===== */
.addresses-list {
    padding: 20px 0;
}

.address-card {
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    transition: var(--transition);
}

.address-card:hover {
    border-color: var(--secondary-color);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.1);
}

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

.address-title {
    font-weight: 700;
    color: var(--primary-color);
}

.address-type-badge {
    background: var(--secondary-color);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.address-content {
    color: var(--text-color);
    line-height: 1.6;
    margin-bottom: 15px;
    font-size: 14px;
}

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

.address-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 5px;
}

.address-btn-edit {
    background: #e3f2fd;
    color: var(--secondary-color);
}

.address-btn-delete {
    background: #ffebee;
    color: var(--danger-color);
}

.address-btn:hover {
    opacity: 0.8;
}

/* ===== Wishlist ===== */
.wishlist-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

.wishlist-item {
    background: #f8f9fa;
    border-radius: 10px;
    overflow: hidden;
    transition: var(--transition);
    position: relative;
}

.wishlist-item:hover {
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.wishlist-item-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    background: white;
}

.wishlist-item-content {
    padding: 15px;
}

.wishlist-item-name {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 8px;
    font-size: 14px;
}

.wishlist-item-price {
    color: var(--secondary-color);
    font-weight: 700;
    margin-bottom: 10px;
}

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

.wishlist-btn {
    flex: 1;
    padding: 8px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: var(--transition);
}

.wishlist-btn-cart {
    background: var(--secondary-color);
    color: white;
}

.wishlist-btn-remove {
    background: #ffebee;
    color: var(--danger-color);
}

/* ===== Settings ===== */
.settings-content {
    padding: 20px 0;
}

.setting-item {
    margin-bottom: 30px;
}

.setting-item h5 {
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 16px;
}

.form-check {
    padding-left: 30px;
}

.form-check-input {
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 2px;
}

.form-check-input:checked {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.form-check-label {
    margin-left: 8px;
    cursor: pointer;
    font-size: 14px;
}

.dropdown-divider {
    margin: 10px 0;
    border-color: #e0e0e0;
}

/* ===== Profile Tab Content ===== */
.profile-content-tab {
    display: none;
    animation: fadeIn 0.3s ease-in;
}

.profile-content-tab.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Header Profile Picture ===== */
.profile-header-container {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.profile-header-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--secondary-color);
    transition: var(--transition);
}

.profile-header-img:hover {
    transform: scale(1.05);
}

.profile-dropdown {
    min-width: 180px;
}

.profile-dropdown li a {
    display: flex;
    align-items: center;
    gap: 10px;
}

.profile-dropdown li a i {
    font-size: 16px;
}

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

.empty-state-icon {
    font-size: 64px;
    color: #ddd;
    margin-bottom: 20px;
}

.empty-state-text {
    color: #999;
    font-size: 16px;
    margin-bottom: 20px;
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
    .user-profile-section {
        padding-top: 20px !important;
        padding-bottom: 20px !important;
    }

    .profile-sidebar {
        margin-bottom: 20px;
    }

    .profile-menu-link {
        padding: 12px 15px;
    }

    .profile-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .card-body {
        padding: 20px;
    }

    .form-action-buttons {
        flex-direction: column;
    }

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

    .profile-picture {
        width: 120px;
        height: 120px;
    }

    .order-details {
        grid-template-columns: 1fr;
    }

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

    .order-item-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .wishlist-items {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }

    .wishlist-item-image {
        height: 150px;
    }

    .address-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

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

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

@media (max-width: 480px) {
    .profile-picture {
        width: 100px;
        height: 100px;
    }

    .profile-header h3 {
        font-size: 20px;
    }

    .wishlist-items {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 10px;
    }

    .wishlist-item-image {
        height: 120px;
    }

    .order-status {
        font-size: 11px;
        padding: 4px 10px;
    }
}

/* ===== Notification Messages ===== */
.alert {
    border-radius: 10px;
    border: none;
    margin-bottom: 20px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
}
