        /* Profile Sidebar
           - Always anchored to the viewport right edge
           - Use --profile-sidebar-right for any optional offset overrides
        */
        .profile-overlay {
            position: fixed;
            inset: 0;
            background: rgba(0,0,0,0.5);
            z-index: var(--z-sidebar);
            opacity: 0;
            visibility: hidden;
            transition: all 0.3s;
            overflow: hidden;
            -webkit-overflow-scrolling: touch;
        }
        
        .profile-overlay.open {
            opacity: 1;
            visibility: visible;
        }

        .profile-positioner {
            position: absolute;
            inset: 0;
            width: 100%;
            max-width: 520px;
            margin: 0 auto;
            pointer-events: none;
            height: 100%;
        }
        
        .profile-sidebar {
            position: absolute;
            top: 0;
            right: 0;
            bottom: 0;
            width: 320px;
            max-width: 85vw;
            background: transparent;
            border-radius: 24px 0 0 24px;
            z-index: var(--z-sidebar-top);
            transform: translateX(100%);
            transition: transform 0.3s ease, box-shadow 0.3s ease;
            display: flex;
            flex-direction: column;
            overflow: hidden;
            box-shadow: var(--shadow-lg);
            pointer-events: auto;
        }

        @media (min-width: 768px) {
            .profile-sidebar {
                width: 360px;
                max-width: 400px;
                right: 0;
            }
        }
        
        .profile-overlay.open .profile-sidebar {
            transform: translateX(0);
        }
        
        .profile-header {
            background: var(--primary);
            color: white;
            border-radius: 24px 0 0 0;
            padding: 24px 20px;
            position: relative;
        }
        
        .profile-close {
            position: absolute;
            top: 16px;
            right: 16px;
            background: rgba(255,255,255,0.2);
            border: none;
            border-radius: 50%;
            width: 32px;
            height: 32px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            color: white;
            transition: background 0.2s;
        }
        
        .profile-close:hover {
            background: rgba(255,255,255,0.3);
        }
        
        .profile-avatar {
            width: 72px;
            height: 72px;
            background: rgba(255,255,255,0.2);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-bottom: 16px;
            font-size: 28px;
            font-weight: 600;
        }
        
        .profile-name {
            font-size: 20px;
            font-weight: 600;
            margin-bottom: 4px;
        }
        
        .profile-phone {
            font-size: 14px;
            opacity: 0.9;
        }
        
        .profile-member-badge {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            background: rgba(255,255,255,0.2);
            padding: 6px 12px;
            border-radius: 20px;
            font-size: 12px;
            margin-top: 12px;
        }
        
        .profile-content {
            flex: 1;
            overflow-y: auto;
            padding: 20px;
            background: white;
        }
        
        .profile-section {
            margin-bottom: 24px;
        }
        
        .profile-section-title {
            font-size: 12px;
            font-weight: 600;
            color: var(--gray-500);
            text-transform: uppercase;
            letter-spacing: 0.5px;
            margin-bottom: 12px;
        }
        
        .profile-stats {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 12px;
        }
        
        .profile-stat-card {
            background: linear-gradient(135deg, var(--gray-50) 0%, var(--gray-100) 100%);
            border-radius: 12px;
            padding: 16px;
            text-align: center;
        }
        
        .profile-stat-card.highlight {
            background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
        }
        
        .profile-stat-icon {
            width: 40px;
            height: 40px;
            background: white;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 0 auto 8px;
            color: var(--primary);
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        }
        
        .profile-stat-card.highlight .profile-stat-icon {
            color: #d97706;
        }
        
        .profile-stat-value {
            font-size: 20px;
            font-weight: 700;
            color: var(--gray-800);
        }
        
        .profile-stat-label {
            font-size: 12px;
            color: var(--gray-500);
            margin-top: 2px;
        }
        
        .profile-menu-item {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 14px 16px;
            background: var(--gray-50);
            border-radius: 12px;
            margin-bottom: 8px;
            cursor: pointer;
            transition: all 0.2s;
            border: none;
            width: 100%;
            text-align: left;
        }
        
        .profile-menu-item:hover {
            background: var(--gray-100);
        }
        
        .profile-menu-icon {
            width: 40px;
            height: 40px;
            background: white;
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: var(--gray-600);
        }
        
        .profile-menu-text {
            flex: 1;
        }
        
        .profile-menu-title {
            font-weight: 500;
            color: var(--gray-800);
            font-size: 14px;
        }
        
        .profile-menu-subtitle {
            font-size: 12px;
            color: var(--gray-500);
        }
        
        .profile-menu-arrow {
            color: var(--gray-400);
        }
        
        .profile-edit-form {
            display: none;
        }
        
        .profile-edit-form.active {
            display: block;
        }
        
        .profile-form-group {
            margin-bottom: 16px;
        }
        
        .profile-form-label {
            display: block;
            font-size: 13px;
            font-weight: 500;
            color: var(--gray-700);
            margin-bottom: 6px;
        }
        
        .profile-form-input {
            width: 100%;
            padding: 12px 14px;
            border: 1px solid var(--gray-300);
            border-radius: var(--radius);
            font-size: 15px;
            transition: border-color 0.2s;
            background: white;
        }
        
        #address-modal input[type="text"],
        #address-modal input[type="tel"] {
            border-radius: 12px;
        }
        
        .profile-form-input:focus {
            outline: none;
            border-color: var(--primary);
        }
        
        .profile-form-input:disabled {
            background: var(--gray-100);
            color: var(--gray-500);
        }
        
        .searchable-select {
            position: relative;
        }
        
        .searchable-select-input {
            cursor: pointer;
        }
        
        .searchable-select-dropdown {
            position: absolute;
            top: calc(100% + 4px);
            left: 0;
            right: 0;
            background: white;
            border: 1px solid var(--gray-300);
            border-radius: 12px;
            max-height: 240px;
            overflow-y: auto;
            z-index: var(--z-dropdown);
            display: none;
            box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
        }
        
        .searchable-select-dropdown.active {
            display: block;
        }
        
        .searchable-select-dropdown.fixed {
            position: fixed;
            z-index: var(--z-dropdown);
        }
        
        .searchable-select-options {
            padding: 4px 0;
        }
        
        .searchable-select-option {
            padding: 10px 14px;
            cursor: pointer;
            font-size: 14px;
            color: var(--gray-800);
        }
        
        .searchable-select-option:hover,
        .searchable-select-option.highlighted {
            background: var(--gray-100);
        }
        
        .searchable-select-option.selected {
            background: color-mix(in srgb, var(--primary) 12%, white);
            color: var(--primary);
            font-weight: 600;
        }
        
        .searchable-select-empty {
            padding: 12px 14px;
            font-size: 13px;
            color: var(--gray-500);
            text-align: center;
        }
        
        .profile-form-actions {
            display: flex;
            gap: 12px;
            margin-top: 20px;
        }
        
        .profile-btn {
            flex: 1;
            padding: 12px;
            border-radius: 10px;
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s;
            border: none;
        }
        
        .profile-btn-primary {
            background: var(--primary);
            color: white;
        }
        
        .profile-btn-primary:hover {
            background: var(--primary-dark);
        }
        
        .profile-btn-secondary {
            background: var(--gray-200);
            color: var(--gray-700);
        }
        
        .profile-btn-secondary:hover {
            background: var(--gray-300);
        }
        
        .profile-login-prompt {
            text-align: center;
            padding: 40px 20px;
        }
        
        .profile-login-icon {
            width: 80px;
            height: 80px;
            background: var(--gray-100);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 0 auto 20px;
            color: var(--gray-400);
        }
        
        .profile-login-title {
            font-size: 18px;
            font-weight: 600;
            color: var(--gray-800);
            margin-bottom: 8px;
        }
        
        .profile-login-text {
            font-size: 14px;
            color: var(--gray-500);
            margin-bottom: 24px;
        }
        
        .header-actions {
            display: flex;
            align-items: center;
            gap: 8px;
        }
        
        .header-btn {
            background: none;
            border: none;
            color: inherit;
            padding: 8px;
            cursor: pointer;
            border-radius: 50%;
            transition: background 0.2s;
        }
        
        .header-btn:hover {
            background: rgba(255,255,255,0.1);
        }
        
        .location-pill {
            display: flex;
            align-items: center;
            background: rgba(255,255,255,0.15);
            color: inherit;
            padding: 6px 12px;
            border-radius: 20px;
            font-size: 13px;
            font-weight: 500;
            border: 1px solid rgba(255,255,255,0.2);
            backdrop-filter: blur(10px);
            transition: all 0.2s ease;
            cursor: default;
        }
        
        .location-pill:hover {
            background: rgba(255,255,255,0.2);
            border-color: rgba(255,255,255,0.3);
        }
        
        .location-pill i {
            opacity: 0.8;
        }

