/* Profile Page Styles */

/* Profile Section */
.profile-section {
    padding: 2rem 0;
    background-color: var(--light-gray);
}

.profile-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2rem;
}

/* Profile Sidebar */
.profile-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.profile-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 2rem;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.profile-avatar {
    width: 120px;
    height: 120px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid var(--primary-color);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    display: flex;
    align-items: center;
    justify-content: center;
}

.avatar-icon {
    font-size: 4rem;
    color: var(--white);
}

.profile-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin: 0 0 0.5rem 0;
}

.profile-email {
    font-size: 0.95rem;
    color: var(--gray);
    margin: 0 0 1rem 0;
}

.profile-balance {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background-color: rgba(91, 172, 50, 0.1);
    border-radius: var(--border-radius);
    margin-top: 1rem;
}

.balance-label {
    font-size: 0.9rem;
    color: var(--gray);
}

.balance-amount {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* Profile Navigation */
.profile-nav {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 0.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.profile-nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    color: var(--dark);
    text-decoration: none;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.profile-nav-item:hover {
    background-color: var(--light-gray);
    color: var(--primary-color);
}

.profile-nav-item.active {
    background-color: var(--primary-color);
    color: var(--white);
}

.profile-nav-item.logout {
    color: #dc3545;
}

.profile-nav-item.logout:hover {
    background-color: rgba(220, 53, 69, 0.1);
}

.nav-icon {
    font-size: 1.25rem;
}

/* Profile Content */
.profile-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Profile Welcome Banner */
.profile-welcome {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: var(--white);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    box-shadow: 0 8px 20px rgba(91, 172, 50, 0.3);
}

.profile-welcome h1 {
    font-size: 2rem;
    margin: 0 0 0.5rem 0;
}

.profile-welcome p {
    font-size: 1.1rem;
    margin: 0;
    opacity: 0.9;
}

/* Profile Content Sections */
.profile-section {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.profile-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--light-gray);
}

.profile-section-header h2 {
    font-size: 1.5rem;
    color: var(--secondary-color);
    margin: 0;
}

/* Profile Info Grid */
.profile-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.25rem;
}

.profile-info-item {
    padding: 1rem;
    background-color: var(--light-gray);
    border-radius: var(--border-radius);
    border-left: 3px solid var(--primary-color);
}

.profile-info-label {
    display: block;
    font-size: 0.85rem;
    color: var(--gray);
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.profile-info-value {
    display: block;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--dark);
}

/* Profile Orders List */
.profile-orders-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

/* Profile Empty State */
.profile-empty-state,
.profile-profile-empty-state {
    text-align: center;
    padding: 3rem 1rem;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.profile-empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.profile-empty-state p,
.profile-profile-empty-state p {
    font-size: 1.1rem;
    color: var(--gray);
    margin-bottom: 1.5rem;
}

/* Profile Favorites Grid */
.profile-favorites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.profile-favorite-card {
    position: relative;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1rem;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.profile-favorite-card:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(-3px);
}

.profile-remove-favorite {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    z-index: 10;
}

.profile-remove-favorite:hover {
    background: #dc3545;
    transform: scale(1.1);
}

.profile-favorite-image-link {
    display: block;
    margin-bottom: 1rem;
}

.profile-favorite-image {
    width: 100%;
    height: 180px;
    object-fit: contain;
    border-radius: var(--border-radius);
}

.profile-favorite-placeholder {
    width: 100%;
    height: 180px;
    background-color: var(--light-gray);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}

.profile-favorite-info,
.profile-profile-favorite-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.profile-favorite-name {
    font-size: 1.125rem;
    margin: 0 0 0.5rem 0;
    line-height: 1.4;
}

.profile-favorite-name a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.profile-favorite-name a:hover {
    color: var(--primary-color);
}

.profile-favorite-articul {
    font-size: 0.85rem;
    color: var(--gray);
    margin: 0 0 0.5rem 0;
}

.profile-favorite-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0 0 1rem 0;
}

.profile-favorite-quantity-control,
.profile-profile-favorite-quantity-control {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
}

.profile-quantity-btn {
    width: 36px;
    height: 36px;
    border: 2px solid var(--primary-color);
    background-color: var(--white);
    color: var(--primary-color);
    border-radius: 50%;
    font-size: 1.25rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.profile-quantity-btn:hover {
    background-color: var(--primary-color);
    color: var(--white);
    transform: scale(1.1);
}

.profile-quantity-btn:active {
    transform: scale(0.95);
}

.profile-quantity-display {
    font-size: 1rem;
    font-weight: 600;
    color: var(--dark);
    min-width: 60px;
    text-align: center;
}

.profile-favorites-count {
    font-size: 0.95rem;
    color: var(--gray);
    background-color: var(--light-gray);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
}

/* Profile Settings Grid */
.profile-settings-grid {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.profile-setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background-color: var(--light-gray);
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
}

.profile-setting-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.profile-setting-info h3 {
    font-size: 1.125rem;
    color: var(--secondary-color);
    margin: 0 0 0.25rem 0;
}

.profile-setting-info p {
    font-size: 0.9rem;
    color: var(--gray);
    margin: 0;
}

/* Profile Toggle Switch */
.profile-toggle-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 30px;
}

.profile-toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.profile-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 30px;
}

.profile-toggle-slider::before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.profile-toggle-switch input:checked + .profile-toggle-slider {
    background-color: var(--primary-color);
}

.profile-toggle-switch input:checked + .profile-toggle-slider::before {
    transform: translateX(30px);
}

/* Profile Danger Zone */
.profile-danger-zone {
    border-left: 3px solid #dc3545;
    background-color: rgba(220, 53, 69, 0.05);
}

.btn-danger {
    background-color: #dc3545;
    color: var(--white);
    border: none;
}

.btn-danger:hover {
    background-color: #c82333;
}

/* Responsive Design */
@media (max-width: 992px) {
    .profile-container {
        grid-template-columns: 1fr;
    }
    
    .profile-sidebar {
        flex-direction: row;
        gap: 1rem;
    }
    
    .profile-card {
        flex: 1;
    }
    
    .profile-nav {
        flex: 2;
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
    }
}

@media (max-width: 768px) {
    .profile-sidebar {
        flex-direction: column;
    }
    
    .profile-nav {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .profile-welcome {
        padding: 2rem 1.5rem;
    }
    
    .profile-welcome h1 {
        font-size: 1.5rem;
    }
    
    .profile-section {
        padding: 1.5rem;
    }
    
.profile-info-grid {
        grid-template-columns: 1fr;
    }

    .profile-setting-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}

@media (max-width: 576px) {
    .profile-nav {
        grid-template-columns: 1fr;
    }

    .profile-section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .profile-welcome h1 {
        font-size: 1.25rem;
    }

    .profile-welcome p {
        font-size: 1rem;
    }
}
/* Mini Notification Popup */
.mini-notification {
    position: fixed;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--primary-color);
    color: var(--white);
    padding: 1rem 2rem;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    font-size: 1rem;
    font-weight: 500;
    z-index: 10000;
    transition: top 0.3s ease;
    white-space: nowrap;
}

.mini-notification.show {
    top: 20px;
}

.mini-notification.success {
    background-color: #28a745;
}

.mini-notification.error {
    background-color: #dc3545;
}

.mini-notification.info {
    background-color: #17a2b8;
}

.mini-notification.warning {
    background-color: #ffc107;
    color: var(--dark);
}

/* Edit Profile Modal */
.edit-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.edit-modal-content {
    background: var(--white);
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.edit-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 2px solid var(--light-gray);
}

.edit-modal-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark);
    margin: 0;
}

.edit-modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--gray);
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.edit-modal-close:hover {
    background-color: var(--light-gray);
    color: var(--dark);
}

.edit-modal-body {
    padding: 2rem;
}

.edit-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.edit-form-row:last-child {
    grid-template-columns: 1fr;
}

.edit-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.edit-form-group label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--dark);
}

.edit-form-input {
    padding: 0.75rem 1rem;
    border: 2px solid var(--light-gray);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.edit-form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.1);
}

.edit-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding: 1.5rem 2rem;
    border-top: 2px solid var(--light-gray);
}

.edit-modal-footer .btn {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}

/* Responsive for Edit Modal */
@media (max-width: 768px) {
    .edit-modal-content {
        width: 95%;
        max-height: 95vh;
    }

    .edit-form-row {
        grid-template-columns: 1fr;
    }

    .edit-modal-header {
        padding: 1rem 1.5rem;
    }

    .edit-modal-body {
        padding: 1.5rem;
    }

    .edit-modal-footer {
        padding: 1rem 1.5rem;
        flex-direction: column;
    }

    .edit-modal-footer .btn {
        width: 100%;
    }
}

/* Profile Order Cards Styles */
.profile-orders-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

.profile-order-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: block;
    border: 2px solid transparent;
    width: 100%;
    max-width: 800px;
}

.profile-order-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
    border-color: var(--primary-color);
}

.profile-order-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e9ecef;
}

.profile-order-number {
    display: flex;
    flex-direction: column;
}

.profile-order-label {
    font-size: 0.75rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.profile-order-id {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--secondary-color);
}

.profile-order-status {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.profile-order-status.status-pending {
    background: #fff3cd;
    color: #856404;
}

.profile-order-status.status-completed {
    background: #d4edda;
    color: #155724;
}

.profile-order-status.status-canceled {
    background: #f8d7da;
    color: #721c24;
}

.profile-order-status.status-refunded {
    background: #d1ecf1;
    color: #0c5460;
}

.profile-status-icon {
    font-size: 1rem;
}

.profile-order-card-body {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.profile-order-info {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.profile-order-date,
.profile-order-items-count,
.profile-order-payment {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #6c757d;
}

.profile-info-icon {
    font-size: 1rem;
}

.profile-order-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.profile-order-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
}

.profile-order-products {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.profile-order-product-thumb {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #dee2e6;
}

.profile-order-product-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-product-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    font-size: 1.5rem;
}

.profile-order-more {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    background: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: #495057;
    font-size: 0.875rem;
}

.profile-order-action {
    display: flex;
    align-items: center;
}

.profile-view-details {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.875rem;
}

@media (max-width: 768px) {
    .profile-order-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .profile-order-card-body {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .profile-order-info {
        gap: 1rem;
    }
    
    .profile-order-card-footer {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
}
